summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-01-17 03:01:22 +0000
committerNorbert Preining <norbert@preining.info>2020-01-17 03:01:22 +0000
commite71ffee2103e3f137bbc9ee526858bc277e95908 (patch)
treeac2a97b2b6e40f1cf6d3191f3e08adb12e3d401e /macros/latex/contrib/biblatex-contrib
parent4c0e3e7fa86ecd3794204d362c7e17b3d9433415 (diff)
CTAN sync 202001170301
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-bath/README.md2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.dtx184
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.pdfbin445184 -> 494638 bytes
3 files changed, 134 insertions, 52 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-bath/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-bath/README.md
index 82ef9ef2a0..7caac7451c 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-bath/README.md
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-bath/README.md
@@ -96,7 +96,7 @@ documentation.
## Licence
-Copyright 2016-2019 University of Bath.
+Copyright 2016-2020 University of Bath.
This work consists of the documented LaTeX file biblatex-bath.dtx and a Makefile.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.dtx b/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.dtx
index bca43bc895..f5592d4c3b 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.dtx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.dtx
@@ -1,7 +1,33 @@
% \iffalse meta-comment
+%<*internal|bbx|cbx|dbx|lbx|lbx-gb>
+\def\Version{2020/01/16 v3.2}
+%</internal|bbx|cbx|dbx|lbx|lbx-gb>
%<*internal>
\iffalse
%</internal>
+%<*bbx|cbx|dbx|lbx|lbx-gb>
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%</bbx|cbx|dbx|lbx|lbx-gb>
+%<*bbx>
+\ProvidesFile{bath.bbx}
+ [\Version\space Biblography style as recommended by the University of Bath Library]
+%</bbx>
+%<*cbx>
+\ProvidesFile{bath.cbx}
+ [\Version\space Citation style as recommended by the University of Bath Library]
+%</cbx>
+%<*dbx>
+\ProvidesFile{bath.dbx}
+ [\Version\space Data model required by the biblatex-bath style]
+%</dbx>
+%<*lbx>
+\ProvidesFile{english-bath.lbx}
+ [\Version\space Generic English conventions required by the biblatex-bath style]
+%</lbx>
+%<*lbx-gb>
+\ProvidesFile{british-bath.lbx}
+ [\Version\space British English conventions required by the biblatex-bath style]
+%</lbx-gb>
%<*readme>
# biblatex-bath: Harvard referencing style as recommended by the University of Bath Library
%</readme>
@@ -37,7 +63,7 @@ See: http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2019 by University of Bath
+Copyright (C) 2020 by University of Bath
\endpostamble
\usedir{tex/latex/\jobname}
@@ -63,7 +89,7 @@ Copyright (C) 2019 by University of Bath
%</internal>
%<*driver>
\ProvidesFile{biblatex-bath.dtx}
- [2019/08/29 v3.1 Harvard referencing style as recommended by the University of Bath Library]
+ [\Version\space Harvard referencing style as recommended by the University of Bath Library]
\documentclass[10pt,a4paper]{article}
\usepackage[british]{babel}
@@ -397,7 +423,7 @@ documentation.
\section{Using the style}
-This style has been tested with \textsf{biblatex} versions 3.7 and 3.13.
+This style has been tested with \textsf{biblatex} versions 3.12 and 3.14.
To use the style, specify it when you load \textsf{biblatex}. To get the sorting
order of your \emph{citations} right, specify the \texttt{ynt} sorting scheme.
@@ -1414,13 +1440,13 @@ Use the \texttt{journal} field to specify the mailing list. If you omit the
\begin{Verbatim}
%</driver>
%<*driver|bib>
-@online{bvd2008bt,
+@dataset{bvd2008bt,
author = {{Bureau van Dijk}},
year = {2008},
title = {{BT} {Group} PLC Company Report},
library = {FAME},
address = {London},
- organization = {Bureau van Dijk},
+ publisher = {Bureau van Dijk},
url = {http://www.portal.euromonitor.com},
urldate = {2014-11-06}}
%</driver|bib>
@@ -1442,13 +1468,13 @@ and the \texttt{library} field for the name of the database itself.
\begin{Verbatim}
%</driver>
%<*driver|bib>
-@online{wilson2013rgc,
+@dataset{wilson2013rgc,
author = {Wilson, D.},
year = {2013},
title = {Real Geometry and Connectedness via Triangular Description},
subtitle = {{CAD} Example Bank},
address = {Bath},
- organization = {University of Bath},
+ publisher = {University of Bath},
doi = {10.15125/BATH-00069},
urldate = {2016-04-20}}
%</driver|bib>
@@ -1456,10 +1482,6 @@ and the \texttt{library} field for the name of the database itself.
\end{Verbatim}
\end{bibexbox}
-\begin{tips}\item
-You can also use \texttt{dataset} as an alias for \texttt{online}.
-\end{tips}
-
\subsubsection*{Computer program}
@@ -1997,7 +2019,7 @@ Commission case number, \texttt{number} for the formal decision number, and give
%<readme>## Licence
%<readme>
%<*driver|readme>
-Copyright 2016-2019 University of Bath.
+Copyright 2016-2020 University of Bath.
This work consists of the documented LaTeX file biblatex-bath.dtx and a Makefile.
@@ -2054,7 +2076,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \section{Implementation: bibliography style}
%
-% \setcounter{lstnumber}{16}
+% \setcounter{lstnumber}{20}
%
% \subsection{Preliminaries}
%
@@ -2113,8 +2135,8 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
\renewcommand*{\bibfont}{\normalfont\normalsize}
% \end{macrocode}
%
-% To maintain compatibility with \textsf{biblatex} 3.7 (used on Overleaf at the
-% time of writing) we backport some newer features.
+% To maintain compatibility with older versions of \textsf{biblatex},
+% we backport some newer features if necessary.
%
% \begin{macrocode}
\ifcsdef{letbibmacro}{}{%
@@ -2399,6 +2421,8 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
\newtoggle{bbx:onlineshown}
\newbibmacro*{isonline}{%
\ifboolexpr{(
+ test {\iffieldundef{doi}}
+ and
test {\iffieldundef{url}}
and
not test {\ifentrytype{online}}
@@ -2432,35 +2456,47 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \begin{macrocode}
\renewbibmacro*{title}{%
- \printtext{%
+ \ifboolexpr{
+ test {\iffieldundef{title}}
+ and
+ test {\iffieldundef{subtitle}}
+ }{}{%
+ \printtext[title]{%
+ \printfield[sentencecase]{title}%
+ \setunit{\subtitlepunct}%
+ \printfield[midsentencecase]{subtitle}%
+ \setunit{\addspace}%
+ }%
+ \printfield{version}%
+ \clearfield{version}%
+ \setunit*{\addspace}%
+ \printfield{titleaddon}%
\ifboolexpr{
- test {\iffieldundef{title}}
+ test {\iffieldundef{journaltitle}}
and
- test {\iffieldundef{subtitle}}
- }{}{%
- \printtext[title]{%
- \printfield[sentencecase]{title}%
- \setunit{\subtitlepunct}%
- \printfield[midsentencecase]{subtitle}%
- \setunit{\addspace}%
- }%
- \printfield{version}%
- \clearfield{version}%
+ test {\iffieldundef{booktitle}}
+ and
+ test {\iffieldundef{library}}
+ and
+ not test {\ifentrytype{software}}
+ and (
+ test {\iffieldundef{type}}
+ or
+ test {\nottoggle{bbx:labelistitle}}
+ or
+ not (
+ test {\ifentrytype{audio}}
+ or
+ test {\ifentrytype{video}}
+ or
+ test {\ifentrytype{music}}
+ or
+ test {\ifentrytype{movie}}
+ ))
+ }{%
\setunit*{\addspace}%
- \printfield{titleaddon}%
- \ifboolexpr{
- test {\iffieldundef{journaltitle}}
- and
- test {\iffieldundef{booktitle}}
- and
- test {\iffieldundef{library}}
- and
- not test {\ifentrytype{software}}
- }{%
- \setunit*{\addspace}%
- \usebibmacro{isonline}%
- }{}%
- }%
+ \usebibmacro{isonline}%
+ }{}%
}%
}
@@ -2555,6 +2591,18 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
test {\ifentrytype{image}}
) and
not test {\ifentrytype{software}}
+ and (
+ test {\iffieldundef{type}}
+ or
+ not (
+ test {\ifentrytype{audio}}
+ or
+ test {\ifentrytype{video}}
+ or
+ test {\ifentrytype{music}}
+ or
+ test {\ifentrytype{movie}}
+ ))
}{%
\setunit*{\addspace}%
\usebibmacro{isonline}%
@@ -2620,7 +2668,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \begin{macrocode}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
-\DeclareDelimFormat*[parencite,bib,biblist]{nameyeardelim}{\addcomma\space}
+\DeclareDelimFormat[parencite,bib,biblist]{nameyeardelim}{\addcomma\space}
\newcommand{\dononameyeardelim}{%
\ifentrytype{legislation}{%
\addspace
@@ -2671,7 +2719,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
) and
togl {bbx:labelistitle}
}{\addspace}{\addcomma\space}}
-\DeclareDelimFormat*[bib,biblist]{nametitledelim}{%
+\DeclareDelimFormat[bib,biblist]{nametitledelim}{%
\ifboolexpr{
(
test {\ifentrytype{jurisdiction}}
@@ -2807,7 +2855,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@false}}
% \end{macrocode}
%
-% If biblatex 3.7 is used, we update the logic for
+% If an older version of biblatex is used, we update the logic for
% |\bbx@opt@mergedate@maximum|, which is used by the |letter| driver.
%
% \begin{macrocode}
@@ -3009,7 +3057,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
% Versions are printed with `v.\@' in parentheses.
%
% \begin{macrocode}
-\DeclareFieldFormat{version}{\mkbibparens{\bibstring{version}#1}}
+\DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}}
% \end{macrocode}
%
% \subsection{Types}
@@ -3106,6 +3154,12 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
+\xpatchbibdriver{online}{%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+}{}{}{\wlog{WARNING: biblatex-bath failed to remove extra DOI from online driver}}
+
\renewbibmacro*{url}{%
\iffieldundef{doi}%
{\printfield{url}}%
@@ -3273,6 +3327,24 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
% \end{macrocode}
%
+% \subsection{Datasets}
+%
+% We patch the new datasets driver from biblatex v3.13 so it can emulate what
+% we had previously done with the online driver.
+%
+% \begin{macrocode}
+\xpatchbibdriver{dataset}{%
+ \printlist{organization}%
+ \newunit
+ \usebibmacro{publisher+location+date}%
+}{%
+ \usebibmacro{library}%
+ \newunit\newblock
+ \usebibmacro{organization+location+date}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver}}
+
+% \end{macrocode}
+%
% \subsection{Online works}
%
% Compared with the standard styles, the main difference is that the
@@ -3281,6 +3353,8 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
% \begin{macrocode}
\xpatchbibdriver{online}{%
\printlist{organization}%
+ \newunit\newblock
+ \usebibmacro{date}%
}{%
\usebibmacro{library}%
\newunit\newblock
@@ -3440,6 +3514,15 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
% The \texttt{audio} and \texttt{video} drivers are based on \texttt{misc}.
%
% \begin{macrocode}
+\newbibmacro*{type+online}{%
+ \printfield{type}%
+ \ifboolexpr{
+ test {\iffieldundef{type}}
+ or
+ test {\nottoggle{bbx:labelistitle}}
+ }{}{%
+ \setunit{\addspace}%
+ \usebibmacro{isonline}}}
\DeclareBibliographyDriver{audio}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
@@ -3449,7 +3532,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
\newunit
\printlist{language}%
\newunit\newblock
- \printfield{type}%
+ \usebibmacro{type+online}%
\newunit\newblock
\usebibmacro{byauthor}[given-family:full]%
\newunit\newblock
@@ -4022,7 +4105,6 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \begin{macrocode}
\DeclareBibliographyAlias{standard}{manual}
-\DeclareBibliographyAlias{dataset}{online}
% \end{macrocode}
%
% \iffalse
@@ -4032,7 +4114,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \section{Implementation: data model}
%
-% \setcounter{lstnumber}{16}
+% \setcounter{lstnumber}{20}
%
% \begin{macrocode}
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,cjk}
@@ -4044,7 +4126,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \section{Implementation: General English language localization}
%
-% \setcounter{lstnumber}{16}
+% \setcounter{lstnumber}{20}
%
% The strings are mostly the same except for the following changes. Note that
% month names are never abbreviated.
@@ -4107,7 +4189,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \section{Implementation: British English language localization}
%
-% \setcounter{lstnumber}{16}
+% \setcounter{lstnumber}{20}
%
% We use the standard version with a few changes. We display the day as a
% cardinal number instead of an ordinal. The date is separated from the time
@@ -4144,7 +4226,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me].
%
% \section{Implementation: citation style}
%
-% \setcounter{lstnumber}{16}
+% \setcounter{lstnumber}{20}
%
% The standard |authoryear-comp| style is a close match for what we need.
%
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.pdf
index 1a4d4254ee..a61f4a509f 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-bath/biblatex-bath.pdf
Binary files differ