texlive[57918] branches/branch2020.0/Master/texmf-dist: biblatex-bath
commits+karl at tug.org
commits+karl at tug.org
Thu Feb 25 23:03:36 CET 2021
Revision: 57918
http://tug.org/svn/texlive?view=revision&revision=57918
Author: karl
Date: 2021-02-25 23:03:35 +0100 (Thu, 25 Feb 2021)
Log Message:
-----------
biblatex-bath (25feb21) (branch)
Modified Paths:
--------------
branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/README.md
branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib
branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf
branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx
branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx
branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx
branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx
branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx
Removed Paths:
-------------
branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins
Modified: branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/README.md
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/README.md 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/README.md 2021-02-25 22:03:35 UTC (rev 57918)
@@ -52,8 +52,8 @@
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 @@
[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.
Modified: branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.bib 2021-02-25 22:03:35 UTC (rev 57918)
@@ -34,6 +34,27 @@
titleaddon = {Kindle version 4.18},
address = {Bath},
publisher = {University of Bath}}
+ at reference{bnf2020,
+ year = {2020},
+ title = {{British National Formulary}},
+ edition = {79},
+ address = {London},
+ publisher = {Pharmaceutical Press}}
+ at inreference{asprin2020bnf,
+ title = {Asprin},
+ year = {2020},
+ booktitle = {{British National Formulary}},
+ edition = {79},
+ address = {London},
+ publisher = {Pharmaceutical Press}}
+ at 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}}
+ at 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}}
+ at 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},
Modified: branches/branch2020.0/Master/texmf-dist/doc/latex/biblatex-bath/biblatex-bath.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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 @@
\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 @@
\else
\ifLuaTeX
\usepackage{luatexja-fontspec}
- \setmainjfont{IPAexGothic}
\else
\ifXeTeX
\usepackage{ctex}
@@ -182,7 +181,7 @@
}
, moredelim=**[s][\color{violet}]{[}{]}
, moredelim=**[s][\color{blue!75!black}]{\{}{\}}
- , mathescape
+ , mathescape=false
}
\lstset{style=dtxlatex}
\tcbset
@@ -281,6 +280,8 @@
% 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 @@
}{}{}
\usepackage{readprov}
-\usepackage[british,cleanlook]{isodate}
\usepackage[colorlinks,citecolor=black]{hyperref}
@@ -376,8 +376,8 @@
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 @@
[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 @@
\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>
+ at 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>
+ at 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>
+ at 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 @@
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>
+ at 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>
+ at 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 @@
%<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 @@
\DeclareLanguageMapping{english}{english-bath}
\DeclareLanguageMapping{british}{british-bath}
}
+
% \end{macrocode}
%
% We begin by loading the default author--year style.
@@ -2112,8 +2219,8 @@
\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 @@
[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 @@
% \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 @@
% 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 @@
\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 @@
\printfield{issue}%
}%
}
- \setunit{\addcomma\space}%
- \printdate
}%
+ \setunit{\addcomma\space}%
+ \printdate
\newunit
}%
}%
@@ -3049,6 +3178,53 @@
\iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at 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 at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at i once}}%
+\xpatchcmd{\mkdaterangetruncextra at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at i twice}}%
+\xpatchcmd{\mkdaterangetruncextra at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at i thrice}}%
% \end{macrocode}
%
@@ -3146,6 +3322,17 @@
\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,18 +3341,27 @@
\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}}
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{url+urldate}%
+}{%
+ \toggletrue{bbx:url}%
+ \usebibmacro{doi+eprint+url}%
+}{}{}
-\renewbibmacro*{url}{%
- \iffieldundef{doi}%
- {\printfield{url}}%
- {\printfield{doi}}%
-}
-
% \end{macrocode}
%
% \subsection{Articles}
@@ -3245,7 +3441,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
@@ -3253,7 +3449,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
@@ -3261,7 +3457,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
@@ -3269,7 +3465,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
@@ -3277,7 +3473,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
@@ -3285,7 +3481,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)}}
% \end{macrocode}
%
@@ -3306,7 +3502,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:}%
@@ -3323,10 +3519,74 @@
\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}
+%
% \subsection{Datasets}
%
% We patch the new datasets driver from biblatex v3.13 so it can emulate what
@@ -3341,7 +3601,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)}}
% \end{macrocode}
%
@@ -3359,7 +3619,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)}}
% \end{macrocode}
%
@@ -4105,8 +4365,26 @@
%
% \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
%</bbx>
%<*dbx>
Deleted: branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins
===================================================================
--- branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/source/latex/biblatex-bath/biblatex-bath.ins 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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 at 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 at 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'.
Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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 at 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 at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at i once}}%
+\xpatchcmd{\mkdaterangetruncextra at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at i twice}}%
+\xpatchcmd{\mkdaterangetruncextra at i}{%
+ \printfield{extradate}%
+}{%
+ \printfield{extraalpha}%
+}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra at 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,14 +910,17 @@
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
-}{}{}{\wlog{WARNING: biblatex-bath failed to remove extra DOI from online driver}}
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{url+urldate}%
+}{%
+ \toggletrue{bbx:url}%
+ \usebibmacro{doi+eprint+url}%
+}{}{}
-\renewbibmacro*{url}{%
- \iffieldundef{doi}%
- {\printfield{url}}%
- {\printfield{doi}}%
-}
-
\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,8 +1041,65 @@
\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}%
\newunit
@@ -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'.
Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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'.
Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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.dbx}
[\Version\space Data model required by the biblatex-bath style]
@@ -20,6 +20,6 @@
\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'.
Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/british-bath.lbx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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'.
Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx 2021-02-25 22:02:35 UTC (rev 57917)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/biblatex-bath/english-bath.lbx 2021-02-25 22:03:35 UTC (rev 57918)
@@ -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'.
More information about the tex-live-commits
mailing list.