summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-16 21:57:10 +0000
committerKarl Berry <karl@freefriends.org>2020-01-16 21:57:10 +0000
commit3cf7754225744a63df15eeaa639c79bf0a7a8d1b (patch)
tree6c941619f311d9132127dcd22adb780cc80a1a84 /Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
parent742d002c8282ce3cca5713d900745182c68b3a89 (diff)
biblatex-bath (16jan20)
git-svn-id: svn://tug.org/texlive/trunk@53424 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx120
1 files changed, 88 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
index c3ceb7ee218..0929ccbd5c0 100644
--- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx
@@ -13,6 +13,10 @@
%% See: http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%%
+\def\Version{2020/01/16 v3.2}
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesFile{bath.bbx}
+ [\Version\space Biblography style as recommended by the University of Bath Library]
\RequirePackage{xpatch}
\RequirePackage{xstring}
\RequirePackage{etoolbox}
@@ -276,6 +280,8 @@
\newtoggle{bbx:onlineshown}
\newbibmacro*{isonline}{%
\ifboolexpr{(
+ test {\iffieldundef{doi}}
+ and
test {\iffieldundef{url}}
and
not test {\ifentrytype{online}}
@@ -294,35 +300,47 @@
}}
\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}%
+ }{}%
}%
}
@@ -399,6 +417,18 @@
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}%
@@ -437,7 +467,7 @@
}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
-\DeclareDelimFormat*[parencite,bib,biblist]{nameyeardelim}{\addcomma\space}
+\DeclareDelimFormat[parencite,bib,biblist]{nameyeardelim}{\addcomma\space}
\newcommand{\dononameyeardelim}{%
\ifentrytype{legislation}{%
\addspace
@@ -480,7 +510,7 @@
) and
togl {bbx:labelistitle}
}{\addspace}{\addcomma\space}}
-\DeclareDelimFormat*[bib,biblist]{nametitledelim}{%
+\DeclareDelimFormat[bib,biblist]{nametitledelim}{%
\ifboolexpr{
(
test {\ifentrytype{jurisdiction}}
@@ -747,7 +777,7 @@
}{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i}}%
\fi
-\DeclareFieldFormat{version}{\mkbibparens{\bibstring{version}#1}}
+\DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}}
\DeclareFieldFormat{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}}
\renewbibmacro*{event+venue+date}{%
\printfield{eventtitle}%
@@ -804,6 +834,12 @@
\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}}%
@@ -932,8 +968,20 @@
\usebibmacro{event+venue+date}%
}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver}}
+\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}}
+
\xpatchbibdriver{online}{%
\printlist{organization}%
+ \newunit\newblock
+ \usebibmacro{date}%
}{%
\usebibmacro{library}%
\newunit\newblock
@@ -1054,6 +1102,15 @@
}}
\ExecuteBibliographyOptions[standard]{useeditor=false}
+\newbibmacro*{type+online}{%
+ \printfield{type}%
+ \ifboolexpr{
+ test {\iffieldundef{type}}
+ or
+ test {\nottoggle{bbx:labelistitle}}
+ }{}{%
+ \setunit{\addspace}%
+ \usebibmacro{isonline}}}
\DeclareBibliographyDriver{audio}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
@@ -1063,7 +1120,7 @@
\newunit
\printlist{language}%
\newunit\newblock
- \printfield{type}%
+ \usebibmacro{type+online}%
\newunit\newblock
\usebibmacro{byauthor}[given-family:full]%
\newunit\newblock
@@ -1528,9 +1585,8 @@
\usebibmacro{finentry}}
\DeclareBibliographyAlias{standard}{manual}
-\DeclareBibliographyAlias{dataset}{online}
%%
-%% Copyright (C) 2019 by University of Bath
+%% Copyright (C) 2020 by University of Bath
%%
%% End of file `bath.bbx'.