diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 22:03:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 22:03:35 +0000 |
commit | 5eed9f6d641a78357f9c1098fc45891e1c6df73a (patch) | |
tree | a1dc52e556ce6f04e7a9e50a77d9bc86c85f4eb0 | |
parent | c9989009c3dce550e1dd39eecabf1a804dca71a3 (diff) |
biblatex-bath (25feb21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@57918 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-bath/README.md | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib | 35 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf | bin | 494638 -> 368102 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx | 374 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins | 56 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx | 217 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx | 4 |
10 files changed, 553 insertions, 153 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-bath/README.md b/Master/texmf-dist/doc/latex/biblatex-bath/README.md index 7caac7451c4..6b73edbfc01 100644 --- a/Master/texmf-dist/doc/latex/biblatex-bath/README.md +++ b/Master/texmf-dist/doc/latex/biblatex-bath/README.md @@ -52,8 +52,8 @@ documentation. 2. Compile `biblatex-bath.dtx` with [LuaLaTeX] and [Biber] to generate the documentation. You will need, among other things, the [luatexja], - [adobemapping] and [ipaex] packages installed; this is just for the - documentation, not for the biblatex style itself. + [adobemapping] and [haranoaji] packages installed; this is just + for the documentation, not for the biblatex style itself. 3. If you are using TeX Live, find your home TeX tree using the following command at the command prompt/terminal: @@ -92,11 +92,11 @@ documentation. [Biber]: http://ctan.org/pkg/biber [luatexja]: http://ctan.org/pkg/luatexja [adobemapping]: http://ctan.org/pkg/adobemapping -[ipaex]: http://ctan.org/pkg/ipaex +[haranoaji]: http://ctan.org/pkg/haranoaji ## Licence -Copyright 2016-2020 University of Bath. +Copyright 2016-2021 University of Bath. This work consists of the documented LaTeX file biblatex-bath.dtx and a Makefile. diff --git a/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib b/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib index d6b0aedaec2..4a994be2cfb 100644 --- a/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib +++ b/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib @@ -34,6 +34,27 @@ titleaddon = {Kindle version 4.18}, address = {Bath}, publisher = {University of Bath}} +@reference{bnf2020, + year = {2020}, + title = {{British National Formulary}}, + edition = {79}, + address = {London}, + publisher = {Pharmaceutical Press}} +@inreference{asprin2020bnf, + title = {Asprin}, + year = {2020}, + booktitle = {{British National Formulary}}, + edition = {79}, + address = {London}, + publisher = {Pharmaceutical Press}} +@inreference{asprin2019bnf, + title = {Asprin}, + year = {2019}, + booktitle = {{British National Formulary}}, + address = {London}, + publisher = {Pharmaceutical Press}, + url = {https://www.medicinescomplete.com/#/content/bnf/_456850132}, + urldate = {2019-11-26}} @incollection{burchard1965hhl, author = {Burchard, J. E.}, year = {1965}, @@ -224,6 +245,20 @@ series = {1 inch to 2 miles}, address = {Devizes}, publisher = {Wiltshire Record Society}} +@manual{os2020bath, + author = {{Ordnance Survey}}, + year = {2020}, + title = {Street view map of {University of Bath}}, + series = {1:5000, OS VectorMap® Local}, + url = {https://digimap.edina.ac.uk/roam/map/os}, + urldate = {2020-04-30}} +@manual{google2020harbourside, + author = {{Google}}, + year = {2020}, + title = {{Harbourside, Bristol}}, + series = {Google Maps}, + url = {https://www.google.co.uk/maps/place/Harbourside,+Bristol/}, + urldate = {2020-04-30}} @video{macbeth1948, year = {1948}, title = {Macbeth}, diff --git a/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf b/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf Binary files differindex a61f4a509f9..d02f0e43dd3 100644 --- a/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf +++ b/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf diff --git a/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx b/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx index f5592d4c3b1..a7e02886dea 100644 --- a/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx +++ b/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment %<*internal|bbx|cbx|dbx|lbx|lbx-gb> -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} %</internal|bbx|cbx|dbx|lbx|lbx-gb> %<*internal> \iffalse @@ -63,7 +63,7 @@ See: http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2020 by University of Bath +Copyright (C) 2016-2021 by University of Bath \endpostamble \usedir{tex/latex/\jobname} @@ -104,7 +104,6 @@ Copyright (C) 2020 by University of Bath \else \ifLuaTeX \usepackage{luatexja-fontspec} - \setmainjfont{IPAexGothic} \else \ifXeTeX \usepackage{ctex} @@ -182,7 +181,7 @@ Copyright (C) 2020 by University of Bath } , moredelim=**[s][\color{violet}]{[}{]} , moredelim=**[s][\color{blue!75!black}]{\{}{\}} - , mathescape + , mathescape=false } \lstset{style=dtxlatex} \tcbset @@ -281,6 +280,8 @@ Copyright (C) 2020 by University of Bath % Documentation +\usepackage[british,cleanlook]{isodate} + \usepackage[backend=biber,bibencoding=utf8,hyperref=false,isbn=false,style=bath,sorting=ynt]{biblatex} \addbibresource{biblatex-bath.bib} \assignrefcontextentries[]{*} @@ -300,7 +301,6 @@ Copyright (C) 2020 by University of Bath }{}{} \usepackage{readprov} -\usepackage[british,cleanlook]{isodate} \usepackage[colorlinks,citecolor=black]{hyperref} @@ -376,8 +376,8 @@ documentation. 2. Compile `biblatex-bath.dtx` with [LuaLaTeX] and [Biber] to generate the documentation. You will need, among other things, the [luatexja], - [adobemapping] and [ipaex] packages installed; this is just for the - documentation, not for the biblatex style itself. + [adobemapping] and [haranoaji] packages installed; this is just + for the documentation, not for the biblatex style itself. 3. If you are using TeX Live, find your home TeX tree using the following command at the command prompt/terminal: @@ -416,7 +416,7 @@ documentation. [Biber]: http://ctan.org/pkg/biber [luatexja]: http://ctan.org/pkg/luatexja [adobemapping]: http://ctan.org/pkg/adobemapping -[ipaex]: http://ctan.org/pkg/ipaex +[haranoaji]: http://ctan.org/pkg/haranoaji %</driver|readme> %<*driver> \end{markdown*} @@ -663,6 +663,75 @@ BibTeX, and not a symptom of recalcitrance on the part of the author. \end{bibexbox} +\subsubsection*{Book known by its title} + +\begin{info}\item +Use the most appropriate \texttt{reference} entry type instead of, say, +\texttt{book} or \texttt{collection}. +\end{info} + +\begin{bibexbox}<RX>{bnf2020} + British National Formulary, 2020. 79th ed. London: Pharmaceutical Press. + \tcblower +\begin{Verbatim} +%</driver> +%<*driver|bib> +@reference{bnf2020, + year = {2020}, + title = {{British National Formulary}}, + edition = {79}, + address = {London}, + publisher = {Pharmaceutical Press}} +%</driver|bib> +%<*driver> +\end{Verbatim} +\end{bibexbox} + +\begin{bibexbox}<RX>{asprin2020bnf} + British National Formulary, 2020. 79th ed. \emph{Asprin.} London: Pharmaceutical Press. + \tcblower +\begin{Verbatim} +%</driver> +%<*driver|bib> +@inreference{asprin2020bnf, + title = {Asprin}, + year = {2020}, + booktitle = {{British National Formulary}}, + edition = {79}, + address = {London}, + publisher = {Pharmaceutical Press}} +%</driver|bib> +%<*driver> +\end{Verbatim} +\end{bibexbox} + +\begin{info}\item +If you use the Bib\TeX\ backend, you will have to repeat the contents of the +\texttt{booktitle} field in the \texttt{sorttitle} field yourself to ensure the +entry is placed correctly in the reference list. If you use Biber, this is done +automatically for you. +\end{info} + +\begin{bibexbox}<RX>{asprin2019bnf} + British National Formulary, 2019. \emph{Aspirin} [Online]. London: Pharmaceutical Press. Available from: \url{https://www.medicinescomplete.com/#/content/bnf/_456850132} [Accessed 26 November 2019]. + \tcblower +\begin{Verbatim} +%</driver> +%<*driver|bib> +@inreference{asprin2019bnf, + title = {Asprin}, + year = {2019}, + booktitle = {{British National Formulary}}, + address = {London}, + publisher = {Pharmaceutical Press}, + url = {https://www.medicinescomplete.com/#/content/bnf/_456850132}, + urldate = {2019-11-26}} +%</driver|bib> +%<*driver> +\end{Verbatim} +\end{bibexbox} + + \subsubsection*{One chapter\slash paper from a collection (by different authors) in an edited book} \begin{bibexbox}<RL>{burchard1965hhl} @@ -1225,6 +1294,43 @@ but the \texttt{organization} field if the location relates to the archive. The \texttt{book} entry type would also work for this reference. \end{info} +\begin{bibexbox}<RX>{os2020bath} + Ordnance Survey, 2020. \emph{Street view map of University of Bath} [Online], 1:5000, OS VectorMap® Local. Available from: \url{https://digimap.edina.ac.uk/roam/map/os} [Accessed 30 April 2020]. + \tcblower +\begin{Verbatim} +%</driver> +%<*driver|bib> +@manual{os2020bath, + author = {{Ordnance Survey}}, + year = {2020}, + title = {Street view map of {University of Bath}}, + series = {1:5000, OS VectorMap® Local}, + url = {https://digimap.edina.ac.uk/roam/map/os}, + urldate = {2020-04-30}} +%</driver|bib> +%<*driver> +\end{Verbatim} +\end{bibexbox} + +\begin{bibexbox}<RX>{google2020harbourside} + Google, 2020. \emph{Harbourside, Bristol} [Online], Google Maps. Available from: \url{https://www.google.co.uk/maps/place/Harbourside,+Bristol/} [Accessed 30 April 2020]. + \tcblower +\begin{Verbatim} +%</driver> +%<*driver|bib> +@manual{google2020harbourside, + author = {{Google}}, + year = {2020}, + title = {{Harbourside, Bristol}}, + series = {Google Maps}, + url = {https://www.google.co.uk/maps/place/Harbourside,+Bristol/}, + urldate = {2020-04-30}} +%</driver|bib> +%<*driver> +\end{Verbatim} +\end{bibexbox} + + \subsubsection*{Film, video or DVD} \begin{bibexbox}<RX>{macbeth1948} @@ -2019,7 +2125,7 @@ Commission case number, \texttt{number} for the formal decision number, and give %<readme>## Licence %<readme> %<*driver|readme> -Copyright 2016-2020 University of Bath. +Copyright 2016-2021 University of Bath. This work consists of the documented LaTeX file biblatex-bath.dtx and a Makefile. @@ -2104,6 +2210,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \DeclareLanguageMapping{english}{english-bath} \DeclareLanguageMapping{british}{british-bath} } + % \end{macrocode} % % We begin by loading the default author--year style. @@ -2112,8 +2219,8 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \RequireBibliographyStyle{authoryear} \ExecuteBibliographyOptions{% maxcitenames=3,maxbibnames=9999,isbn=false,giveninits=true,dashed=false, - alldates=comp,labeldate=year} -\ExecuteBibliographyOptions[audio,video,music,movie]{% + alldates=comp,labeldate=year,labelalpha=true} +\ExecuteBibliographyOptions[reference,audio,video,music,movie]{% useeditor=false} % \end{macrocode} % @@ -2408,6 +2515,15 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. [patent,thesis]% {title}{\mkbibemph{#1}} \DeclareFieldFormat + [reference,mvreference]% + {title}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [inreference]% + {title}{\ifnameundef{author}{\mkbibemph{#1}}{#1}} +\DeclareFieldFormat + [inreference]% + {booktitle}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat [unpublished]% {title}{\iffieldundef{booktitle}{\mkbibemph{#1}}{#1}} @@ -2449,10 +2565,10 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. % \end{macrocode} % -% We need to supply a new |title| macro. The standard version hard-codes the -% case used (we use sentence case, not title case) and puts default unit -% punctuation between the |title| and |titleaddon| fields. We also need to add -% conditional code for printing the automatic `[Online]' label. +% We need to supply a new |title| macro. The standard version puts default unit +% punctuation between the |title| and |titleaddon| fields, but we need a space. +% We also need to add conditional code for printing the automatic `[Online]' +% label. % % \begin{macrocode} \renewbibmacro*{title}{% @@ -2554,20 +2670,37 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. % and show titleaddon after the |date+extradate| macro. % % \begin{macrocode} +\DeclareLabeltitle[inreference]{% + \field{shorttitle} + \field{booktitle} + \field{title} +} \providetoggle{bbx:labelistitle} \renewbibmacro*{labeltitle}{% \iffieldundef{label}{% \ifboolexpr{ - test {\iffieldundef{title}} + test {\ifentrytype{inreference}} and - test {\iffieldundef{subtitle}} - }{}{% - \printtext[title]{% - \printfield[sentencecase]{title}% - \setunit{\subtitlepunct}% - \printfield[midsentencecase]{subtitle}}% - \clearfield{title}\clearfield{subtitle}% - \toggletrue{bbx:labelistitle}}% + not test {\iffieldundef{booktitle}} + }{% + \printtext[booktitle]{% + \printfield[sentencecase]{booktitle}% + \setunit{\booksubtitlepunct}% + \printfield[midsentencecase]{booksubtitle}}% + \clearfield{booktitle}\clearfield{booksubtitle}% + }{% + \ifboolexpr{ + test {\iffieldundef{title}} + and + test {\iffieldundef{subtitle}} + }{}{% + \printtext[title]{% + \printfield[sentencecase]{title}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{subtitle}}% + \clearfield{title}\clearfield{subtitle}% + \toggletrue{bbx:labelistitle}}% + }% }{% \printfield{label}% }% @@ -2897,11 +3030,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \renewbibmacro*{date+extrayear}{\usebibmacro{date+extradate}}% } \renewbibmacro*{issue+date}{% - \ifboolexpr{ - test {\iffieldundef{issue}} - and - test {\iffieldundef{month}} - }{}{% + \iffieldundef{issue}{}{% \ifboolexpr{( test {\iffieldundef{volume}} and @@ -2916,9 +3045,9 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \printfield{issue}% }% } - \setunit{\addcomma\space}% - \printdate }% + \setunit{\addcomma\space}% + \printdate \newunit }% }% @@ -3049,6 +3178,53 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}% }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i}}% \fi +% +% By default, Title--year combinations are not disambiguated, so we fix that +% too. +\DeclareFieldFormat{extraalpha}{% + \iffieldnums{labelyear} + {\mknumalph{#1}} + {\mkbibparens{\mknumalph{#1}}}} +\DeclareLabelalphaTemplate{ + \labelelement{ + \field{label} + \field{labelname} + \field{labeltitle} + } + \labelelement{ + \field{labelyear} + } +} +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra once}}% +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra twice}}% +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra thrice}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i once}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i twice}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i thrice}}% % \end{macrocode} % @@ -3146,6 +3322,17 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \DeclareFieldFormat{url}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{#1}} \DeclareFieldFormat{doi}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{https://doi.org/#1}} \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}} +% \end{macrocode} +% +% Since URLs and DOIs are presented in exactly the same way, we combine them +% such that the DOI overrides the URL. +% +% \begin{macrocode} +\renewbibmacro*{url}{% + \iffieldundef{doi}% + {\printfield{url}}% + {\printfield{doi}}% +} \renewbibmacro*{doi+eprint+url}{% \iftoggle{bbx:eprint} {\usebibmacro{eprint}} @@ -3154,17 +3341,26 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \iftoggle{bbx:url} {\usebibmacro{url+urldate}} {}} +% \end{macrocode} +% +% This backports changes to the |online| driver in biblatex v3.15 to earlier +% versions, so the above works as intended. +% +% \begin{macrocode} \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}}% - {\printfield{doi}}% -} + \newunit\newblock + \iftoggle{bbx:eprint} + {\usebibmacro{eprint}} + {}% + \newunit\newblock + \usebibmacro{url+urldate}% +}{% + \toggletrue{bbx:url}% + \usebibmacro{doi+eprint+url}% +}{}{} % \end{macrocode} % @@ -3245,7 +3441,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch book driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch book driver (series+number)}} \xpatchbibdriver{collection}{% \newunit\newblock @@ -3253,7 +3449,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch collection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch collection driver (series+number)}} \xpatchbibdriver{inbook}{% \newunit\newblock @@ -3261,7 +3457,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inbook driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inbook driver (series+number)}} \xpatchbibdriver{incollection}{% \newunit\newblock @@ -3269,7 +3465,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (series+number)}} \xpatchbibdriver{inproceedings}{% \newunit\newblock @@ -3277,7 +3473,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (series+number)}} \xpatchbibdriver{proceedings}{% \newunit\newblock @@ -3285,7 +3481,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch proceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch proceedings driver (series+number)}} % \end{macrocode} % @@ -3306,7 +3502,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \newunit\newblock \usebibmacro{maintitle+booktitle}% \usebibmacro{byeditor+others}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (bookeditor)}} \xpatchbibdriver{inproceedings}{% \usebibmacro{in:}% @@ -3323,7 +3519,71 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \usebibmacro{byeditor+others}% \newunit \usebibmacro{event+venue+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (bookeditor)}} + +% \end{macrocode} +% +% \subsection{Works in books known by their title} +% +% In these cases, the title is moved after the edition information. +% +% \begin{macrocode} +\DeclareBibliographyDriver{inreference}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \ifnameundef{author}{}{\usebibmacro{title}% + \newunit}% + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \ifboolexpr{ + test {\iffieldundef{maintitle}} + and + test {\iffieldundef{booktitle}} + }{}{% + \ifnameundef{editor}{}{\usebibmacro{in:}}% + \usebibmacro{bookeditor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}}% + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \ifnameundef{author}{\usebibmacro{title}% + \newunit}{}% + \printfield{volumes}% + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} % \end{macrocode} % @@ -3341,7 +3601,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \usebibmacro{library}% \newunit\newblock \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver (publisher)}} % \end{macrocode} % @@ -3359,7 +3619,7 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. \usebibmacro{library}% \newunit\newblock \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch online driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch online driver (publisher)}} % \end{macrocode} % @@ -4105,6 +4365,24 @@ This work is `maintained' (as per LPPL maintenance status) by [Alex Ball][me]. % % \begin{macrocode} \DeclareBibliographyAlias{standard}{manual} + +% \end{macrocode} +% +% \subsection{Sorting} +% +% This source map helps with correct sorting of anonymous |inreference| entries. +% +% \begin{macrocode} +\DeclareStyleSourcemap{% + \maps[datatype=bibtex]{% + \map{% + \pertype{inreference} + \step[notfield=author, final] + \step[fieldsource=booktitle] + \step[fieldset=sorttitle, origfieldval] + }% + }% +}% % \end{macrocode} % % \iffalse diff --git a/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins b/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins deleted file mode 100644 index a12d040ad79..00000000000 --- a/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins +++ /dev/null @@ -1,56 +0,0 @@ -%% -%% This is file `biblatex-bath.ins', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% biblatex-bath.dtx (with options: `install') -%% ---------------------------------------------------------------- -%% biblatex-bath --- Harvard referencing style as recommended by the University of Bath Library -%% Author: Alex Ball -%% E-mail: a.j.ball@bath.ac.uk -%% License: Released under the LaTeX Project Public License v1.3c or later -%% See: http://www.latex-project.org/lppl.txt -%% ---------------------------------------------------------------- -%% -\input docstrip.tex -\keepsilent -\askforoverwritefalse - -\nopreamble\nopostamble - -\usedir{doc/latex/\jobname} -\generate{ - \file{README.md}{\from{\jobname.dtx}{readme}} - \file{\jobname.bib}{\from{\jobname.dtx}{bib}} -} - -\preamble ----------------------------------------------------------------- -biblatex-bath --- Harvard referencing style as recommended by the University of Bath Library -Author: Alex Ball -E-mail: a.j.ball@bath.ac.uk -License: Released under the LaTeX Project Public License v1.3c or later -See: http://www.latex-project.org/lppl.txt ----------------------------------------------------------------- - -\endpreamble -\postamble - -Copyright (C) 2020 by University of Bath -\endpostamble - -\usedir{tex/latex/\jobname} -\generate{ - \file{bath.bbx}{\from{\jobname.dtx}{bbx}} - \file{bath.cbx}{\from{\jobname.dtx}{cbx}} - \file{bath.dbx}{\from{\jobname.dtx}{dbx}} - \file{english-bath.lbx}{\from{\jobname.dtx}{lbx}} - \file{british-bath.lbx}{\from{\jobname.dtx}{lbx-gb}} -} -\endbatchfile - -%% -%% Copyright (C) 2020 by University of Bath -%% -%% End of file `biblatex-bath.ins'. diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx index 0929ccbd5c0..55010a018fa 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx @@ -13,7 +13,7 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.bbx} [\Version\space Biblography style as recommended by the University of Bath Library] @@ -26,11 +26,12 @@ \DeclareLanguageMapping{english}{english-bath} \DeclareLanguageMapping{british}{british-bath} } + \RequireBibliographyStyle{authoryear} \ExecuteBibliographyOptions{% maxcitenames=3,maxbibnames=9999,isbn=false,giveninits=true,dashed=false, - alldates=comp,labeldate=year} -\ExecuteBibliographyOptions[audio,video,music,movie]{% + alldates=comp,labeldate=year,labelalpha=true} +\ExecuteBibliographyOptions[reference,audio,video,music,movie]{% useeditor=false} \NewBibliographyString{% online, hours, at, unpublished, legalchapter, @@ -274,6 +275,15 @@ [patent,thesis]% {title}{\mkbibemph{#1}} \DeclareFieldFormat + [reference,mvreference]% + {title}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [inreference]% + {title}{\ifnameundef{author}{\mkbibemph{#1}}{#1}} +\DeclareFieldFormat + [inreference]% + {booktitle}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat [unpublished]% {title}{\iffieldundef{booktitle}{\mkbibemph{#1}}{#1}} @@ -380,20 +390,37 @@ \renewcommand*{\subtitlepunct}{\addcolon\space} +\DeclareLabeltitle[inreference]{% + \field{shorttitle} + \field{booktitle} + \field{title} +} \providetoggle{bbx:labelistitle} \renewbibmacro*{labeltitle}{% \iffieldundef{label}{% \ifboolexpr{ - test {\iffieldundef{title}} + test {\ifentrytype{inreference}} and - test {\iffieldundef{subtitle}} - }{}{% - \printtext[title]{% - \printfield[sentencecase]{title}% - \setunit{\subtitlepunct}% - \printfield[midsentencecase]{subtitle}}% - \clearfield{title}\clearfield{subtitle}% - \toggletrue{bbx:labelistitle}}% + not test {\iffieldundef{booktitle}} + }{% + \printtext[booktitle]{% + \printfield[sentencecase]{booktitle}% + \setunit{\booksubtitlepunct}% + \printfield[midsentencecase]{booksubtitle}}% + \clearfield{booktitle}\clearfield{booksubtitle}% + }{% + \ifboolexpr{ + test {\iffieldundef{title}} + and + test {\iffieldundef{subtitle}} + }{}{% + \printtext[title]{% + \printfield[sentencecase]{title}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{subtitle}}% + \clearfield{title}\clearfield{subtitle}% + \toggletrue{bbx:labelistitle}}% + }% }{% \printfield{label}% }% @@ -650,11 +677,7 @@ \renewbibmacro*{date+extrayear}{\usebibmacro{date+extradate}}% } \renewbibmacro*{issue+date}{% - \ifboolexpr{ - test {\iffieldundef{issue}} - and - test {\iffieldundef{month}} - }{}{% + \iffieldundef{issue}{}{% \ifboolexpr{( test {\iffieldundef{volume}} and @@ -669,9 +692,9 @@ \printfield{issue}% }% } - \setunit{\addcomma\space}% - \printdate }% + \setunit{\addcomma\space}% + \printdate \newunit }% }% @@ -776,6 +799,50 @@ \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}% }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i}}% \fi +\DeclareFieldFormat{extraalpha}{% + \iffieldnums{labelyear} + {\mknumalph{#1}} + {\mkbibparens{\mknumalph{#1}}}} +\DeclareLabelalphaTemplate{ + \labelelement{ + \field{label} + \field{labelname} + \field{labeltitle} + } + \labelelement{ + \field{labelyear} + } +} +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra once}}% +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra twice}}% +\xpatchcmd{\mkdaterangefullextra}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra thrice}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i once}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i twice}}% +\xpatchcmd{\mkdaterangetruncextra@i}{% + \printfield{extradate}% +}{% + \printfield{extraalpha}% +}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i thrice}}% \DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}} \DeclareFieldFormat{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}} @@ -826,6 +893,11 @@ \DeclareFieldFormat{url}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{#1}} \DeclareFieldFormat{doi}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{https://doi.org/#1}} \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}} +\renewbibmacro*{url}{% + \iffieldundef{doi}% + {\printfield{url}}% + {\printfield{doi}}% +} \renewbibmacro*{doi+eprint+url}{% \iftoggle{bbx:eprint} {\usebibmacro{eprint}} @@ -838,13 +910,16 @@ \iftoggle{bbx:doi} {\printfield{doi}} {}% -}{}{}{\wlog{WARNING: biblatex-bath failed to remove extra DOI from online driver}} - -\renewbibmacro*{url}{% - \iffieldundef{doi}% - {\printfield{url}}% - {\printfield{doi}}% -} + \newunit\newblock + \iftoggle{bbx:eprint} + {\usebibmacro{eprint}} + {}% + \newunit\newblock + \usebibmacro{url+urldate}% +}{% + \toggletrue{bbx:url}% + \usebibmacro{doi+eprint+url}% +}{}{} \xpatchbibdriver{article}{% \usebibmacro{in:}\usebibmacro{journal+issuetitle}% @@ -896,7 +971,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch book driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch book driver (series+number)}} \xpatchbibdriver{collection}{% \newunit\newblock @@ -904,7 +979,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch collection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch collection driver (series+number)}} \xpatchbibdriver{inbook}{% \newunit\newblock @@ -912,7 +987,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inbook driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inbook driver (series+number)}} \xpatchbibdriver{incollection}{% \newunit\newblock @@ -920,7 +995,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (series+number)}} \xpatchbibdriver{inproceedings}{% \newunit\newblock @@ -928,7 +1003,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (series+number)}} \xpatchbibdriver{proceedings}{% \newunit\newblock @@ -936,7 +1011,7 @@ }{% \setunit{\addcomma\space}% \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch proceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch proceedings driver (series+number)}} \xpatchbibdriver{incollection}{% \usebibmacro{in:}% @@ -949,7 +1024,7 @@ \newunit\newblock \usebibmacro{maintitle+booktitle}% \usebibmacro{byeditor+others}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (bookeditor)}} \xpatchbibdriver{inproceedings}{% \usebibmacro{in:}% @@ -966,7 +1041,64 @@ \usebibmacro{byeditor+others}% \newunit \usebibmacro{event+venue+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (bookeditor)}} + +\DeclareBibliographyDriver{inreference}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \ifnameundef{author}{}{\usebibmacro{title}% + \newunit}% + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \ifboolexpr{ + test {\iffieldundef{maintitle}} + and + test {\iffieldundef{booktitle}} + }{}{% + \ifnameundef{editor}{}{\usebibmacro{in:}}% + \usebibmacro{bookeditor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}}% + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \ifnameundef{author}{\usebibmacro{title}% + \newunit}{}% + \printfield{volumes}% + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} \xpatchbibdriver{dataset}{% \printlist{organization}% @@ -976,7 +1108,7 @@ \usebibmacro{library}% \newunit\newblock \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver (publisher)}} \xpatchbibdriver{online}{% \printlist{organization}% @@ -986,7 +1118,7 @@ \usebibmacro{library}% \newunit\newblock \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch online driver}} +}{}{\wlog{WARNING: biblatex-bath failed to patch online driver (publisher)}} \DeclareFieldFormat{forceparens}{(#1)} \newbibmacro{series+type+number}{% @@ -1586,7 +1718,18 @@ \DeclareBibliographyAlias{standard}{manual} +\DeclareStyleSourcemap{% + \maps[datatype=bibtex]{% + \map{% + \pertype{inreference} + \step[notfield=author, final] + \step[fieldsource=booktitle] + \step[fieldset=sorttitle, origfieldval] + }% + }% +}% + %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `bath.bbx'. diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx index 5b95e4a16d3..4e4059c70ce 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx @@ -13,7 +13,7 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.cbx} [\Version\space Citation style as recommended by the University of Bath Library] @@ -37,6 +37,6 @@ }{}{\wlog{WARNING: biblatex-bath failed to patch cite:label}} %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `bath.cbx'. diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx index 36b8d2bf9a4..618d06026c4 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx @@ -13,13 +13,13 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.dbx} [\Version\space Data model required by the biblatex-bath style] \DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,cjk} %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `bath.dbx'. diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx b/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx index c454f632c74..08b9d31b1c8 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx @@ -13,7 +13,7 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{british-bath.lbx} [\Version\space British English conventions required by the biblatex-bath style] @@ -40,6 +40,6 @@ } %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `british-bath.lbx'. diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx b/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx index 611f070c694..77c5003f83d 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx @@ -13,7 +13,7 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2020/01/16 v3.2} +\def\Version{2021/02/25 v4.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{english-bath.lbx} [\Version\space Generic English conventions required by the biblatex-bath style] @@ -63,6 +63,6 @@ } %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `english-bath.lbx'. |