From 281dbdd4b6428543a168e6ed88d3bc6422fde174 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Mar 2022 21:46:19 +0000 Subject: biblatex-bath (4mar22) git-svn-id: svn://tug.org/texlive/trunk@62399 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx | 278 +++++++++++++++------ Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx | 4 +- Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx | 4 +- .../tex/latex/biblatex-bath/british-bath.lbx | 4 +- .../tex/latex/biblatex-bath/english-bath.lbx | 4 +- 5 files changed, 204 insertions(+), 90 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-bath') diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx index 55010a018fa..306194a259c 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{2021/02/25 v4.0} +\def\Version{2022/03/04 v5.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.bbx} [\Version\space Biblography style as recommended by the University of Bath Library] @@ -39,6 +39,7 @@ directors, performers, readers, conductors, bydirector, byperformer, byreader, byconductor, } +\setlength{\bibhang}{0pt} \setlength{\bibitemsep}{1em plus 0.2em minus 0.2em} \renewcommand*{\bibfont}{\normalfont\normalsize} \ifcsdef{letbibmacro}{}{% @@ -58,6 +59,22 @@ (test {\iffieldequalstr{labeldatesource}{}} or test {\iffieldequalstr{labeldatesource}{year}})}}% } +\def\blx@setsfcodes{% + \let\blx@setsfcodes\relax + \let\frenchspacing\blx@setfrcodes + \let\nonfrenchspacing\blx@setencodes + \ifnum\sfcode`\.>2000 + \blx@setencodes + \else + \blx@setfrcodes + \fi + \@setquotesfcodes + \sfcode`\(=\@m + \sfcode`\)=\@m + \sfcode`\[=\@m + \sfcode`\]=\@m + \sfcode`\<=\@m + \sfcode`\>=\@m} \DeclareNameAlias{author}{family-given} \DeclareNameAlias{editor}{family-given} @@ -162,6 +179,33 @@ \usebibmacro{name:andothers}% } +\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1}} +\renewbibmacro*{author}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\usebibmacro{bbx:savehash}% + \printnames{author}% + \iffieldundef{nameaddon} + {} + {\setunit{\addspace}% + \printfield{nameaddon}}% + \iffieldundef{authortype} + {\setunit{\printdelim{nameyeardelim}}} + {\setunit{\printdelim{authortypedelim}}}}% + \iffieldundef{authortype} + {} + {\usebibmacro{authorstrg}% + \setunit{\printdelim{nameyeardelim}}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}% + \usebibmacro{labeltitleaddon}} \DeclareNameFormat{given-family:full}{% \usebibmacro{name:given-family} {\namepartfamily} @@ -271,9 +315,6 @@ \DeclareFieldFormat [article,inbook,incollection,inproceedings]% {title}{#1} -\DeclareFieldFormat - [patent,thesis]% - {title}{\mkbibemph{#1}} \DeclareFieldFormat [reference,mvreference]% {title}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} @@ -283,6 +324,16 @@ \DeclareFieldFormat [inreference]% {booktitle}{\ifnameundef{author}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [patent,thesis]% + {title}{\mkbibemph{#1}} +\DeclareFieldFormat + [audio,video,music,video]% + {title}{\ifboolexpr{ + test {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + }{#1}{\mkbibemph{#1}}} \DeclareFieldFormat [unpublished]% {title}{\iffieldundef{booktitle}{\mkbibemph{#1}}{#1}} @@ -294,6 +345,8 @@ and test {\iffieldundef{url}} and + test {\iffieldundef{urlyear}} + and not test {\ifentrytype{online}} ) or togl {bbx:onlineshown} @@ -329,24 +382,29 @@ test {\iffieldundef{journaltitle}} and test {\iffieldundef{booktitle}} - and - test {\iffieldundef{library}} - and - not test {\ifentrytype{software}} and ( - test {\iffieldundef{type}} + test {\iffieldundef{library}} + or + test {\ifentrytype{image}} + or + test {\ifentrytype{audio}} + or + test {\ifentrytype{video}} or - test {\nottoggle{bbx:labelistitle}} + test {\ifentrytype{music}} or + test {\ifentrytype{movie}} + ) and + not test {\ifentrytype{software}} + and ( not ( - test {\ifentrytype{audio}} + test {\iffieldequalstr{type}{TV}} or - test {\ifentrytype{video}} - or - test {\ifentrytype{music}} - or - test {\ifentrytype{movie}} - )) + test {\iffieldequalstr{type}{Radio}} + ) + or + test {\iffieldundef{series}} + ) }{% \setunit*{\addspace}% \usebibmacro{isonline}% @@ -420,6 +478,41 @@ \printfield[midsentencecase]{subtitle}}% \clearfield{title}\clearfield{subtitle}% \toggletrue{bbx:labelistitle}}% + \ifboolexpr{ + test {\iffieldundef{journaltitle}} + and + test {\iffieldundef{booktitle}} + and ( + test {\iffieldundef{library}} + or + test {\ifentrytype{image}} + or + test {\ifentrytype{audio}} + or + test {\ifentrytype{video}} + or + test {\ifentrytype{music}} + or + test {\ifentrytype{movie}} + ) and + not test {\ifentrytype{software}} + and + not test {\ifentrytype{legislation}} + and + not test {\ifentrytype{jurisdiction}} + and ( + not ( + test {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + ) + or + test {\iffieldundef{series}} + ) + }{% + \setunit*{\addspace}% + \usebibmacro{isonline}% + }{}% }% }{% \printfield{label}% @@ -434,35 +527,21 @@ \setunit*{\addspace}% \printfield{titleaddon}% \clearfield{titleaddon}% - \ifboolexpr{ + \ifboolexpr{( + test {\ifentrytype{legislation}} + or + test {\ifentrytype{jurisdiction}} + ) + and test {\iffieldundef{journaltitle}} and test {\iffieldundef{booktitle}} - and ( - test {\iffieldundef{library}} - or - 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}% }{}% }{}% } -\xapptobibmacro{author}{\usebibmacro{labeltitleaddon}}{}{} \xapptobibmacro{bbx:editor}{\usebibmacro{labeltitleaddon}}{}{} \xapptobibmacro{bbx:translator}{\usebibmacro{labeltitleaddon}}{}{} @@ -704,33 +783,33 @@ \newrobustcmd*{\mknoyeardaterangefull}[2]{% \iffieldundef{#2month}{}{% - \datecircaprint - \printtext[#2date]{% - \iffieldundef{#2season}{% - \csuse{mkbibdate#1}{}{#2month}{#2day}% - \blx@printtime{#2}{}% - }{% - \csuse{mkbibseasondate#1}{}{#2season}}% - \dateuncertainprint - \iffieldundef{#2endmonth}{}{% - \iffieldequalstr{#2endmonth}{}{% - \mbox{\bibdaterangesep}% + \printtext[{#2date}]{% + \datecircaprint + \iffieldundef{#2yeardivision}{% + \csuse{mkbibdate#1}{}{#2month}{#2day}% + \blx@printtime{#2}{}% }{% - \bibdaterangesep - \enddatecircaprint - \iffieldundef{#2season}{% - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}% - \blx@printtime{#2}{end}% + \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}% + \dateuncertainprint + \iffieldundef{#2endmonth}{}{% + \iffieldequalstr{#2endmonth}{}{% + \mbox{\bibdaterangesep}% }{% - \csuse{mkbibseasondate#1}{}{#2endseason}}% - \enddateuncertainprint}}}}} + \bibdaterangesep + \enddatecircaprint + \iffieldundef{#2yeardivision}{% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}% + \blx@printtime{#2}{end}% + }{% + \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}% + \enddateuncertainprint}}}}} \newrobustcmd*{\mknoyeardaterangetrunc}[2]{% \iffieldundef{#2month}{}{% - \datecircaprint - \printtext[#2date]{% - \iffieldundef{#2season}{% + \printtext[{#2date}]{% + \datecircaprint + \iffieldundef{#2yeardivision}{% \ifboolexpr{ - test {\iffieldsequal{labelyear}{labelendyear}} + test {\ifdateyearsequal{label}{labelend}} and test {\iffieldsequal{#2month}{#2endmonth}} }{% @@ -738,7 +817,7 @@ }{% \csuse{mkbibdate#1}{}{#2month}{#2day}}% }{% - \csuse{mkbibseasondate#1}{}{#2season}}% + \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}% \dateuncertainprint \iffieldundef{#2endmonth}{}{% \iffieldequalstr{#2endmonth}{}{% @@ -746,10 +825,10 @@ }{% \bibdaterangesep \enddatecircaprint - \iffieldundef{#2season}{% + \iffieldundef{#2yeardivision}{% \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}% }{% - \csuse{mkbibseasondate#1}{}{#2endseason}}% + \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}% \enddateuncertainprint}}}}} \xpatchcmd{\mkdaterangefull}{% \iffieldundef{#2year} {\blx@nounit}% @@ -846,6 +925,27 @@ \DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}} \DeclareFieldFormat{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}} +\DeclareFieldFormat{series}{\MakeSentenceCase*{#1}} +\DeclareFieldFormat + [audio,video,music,video]% + {series}{\ifboolexpr{ + test {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + }{\mkbibemph{\MakeSentenceCase*{#1}}}{\MakeSentenceCase*{#1}}} +\DeclareFieldFormat + [audio,video,music,video]% + {number}{\ifboolexpr{ + test {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + }{\mkbibemph{#1}}{#1}} +\DeclareFieldFormat[legislation,jurisdiction]{series}{#1} +\renewbibmacro*{series+number}{% + \printfield{series}% + \setunit*{\addcomma\space}% + \printfield{number}% + \newunit} \renewbibmacro*{event+venue+date}{% \printfield{eventtitle}% \setunit*{\addspace}% @@ -870,10 +970,18 @@ \printlist{institution}% \newunit \usebibmacro{publisher+location+date}}} -\letbibmacro{plain:organization+location+date}{organization+location+date} \renewbibmacro*{organization+location+date}{% \iflistundef{publisher}{% - \usebibmacro{plain:organization+location+date}% + \printlist{location}% + \iflistundef{organization} + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% + \printlist{organization}% + \iflistundef{location} + {\setunit{\addcomma\space}}% + {\setunit*{\addcomma\space}}% + \usebibmacro{date}% + \newunit }{% \printlist{organization}% \newunit @@ -882,7 +990,7 @@ \DeclareFieldFormat{library}{\mkbibemph{#1}} \newbibmacro*{library}{% \iffieldundef{library}{}{% - \printfield{library}% + \printfield{library}\clearfield{library}% \setunit*{\addspace}% \usebibmacro{isonline}% }% @@ -892,12 +1000,18 @@ \DeclareNumChars{ab} \DeclareFieldFormat{url}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{#1}} \DeclareFieldFormat{doi}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{https://doi.org/#1}} +\DeclareFieldFormat{pseudourl}{\bibsentence\bibstring{urlfrom}\addcolon\space#1} \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}} \renewbibmacro*{url}{% - \iffieldundef{doi}% - {\printfield{url}}% - {\printfield{doi}}% -} + \iffieldundef{doi}{% + \ifboolexpr{ + test {\iffieldundef{url}} + and not + test {\iffieldundef{urlyear}} + }{\printfield[pseudourl]{library}}{\printfield{url}}% + }{% + \printfield{doi}% + }} \renewbibmacro*{doi+eprint+url}{% \iftoggle{bbx:eprint} {\usebibmacro{eprint}} @@ -1141,7 +1255,7 @@ \setunit*{\addcomma\space}}% \printfield{type}% \setunit*{\addspace}% - \IfBeginWith{\thefield{series}}{HL}{% + \IfBeginWith{\thefield{series}}{{HL}}{% \printfield[forceparens]{number}% }{% \printfield{number}% @@ -1234,25 +1348,25 @@ }} \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}% \usebibmacro{author/editor+others/translator+others}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% + \newunit\newblock + \usebibmacro{series+number}% + \ifboolexpr{ + test {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + }{% + \setunit{\addspace}% + \usebibmacro{isonline}}{}% \newunit \printlist{language}% \newunit\newblock - \usebibmacro{type+online}% + \printfield{type}% \newunit\newblock \usebibmacro{byauthor}[given-family:full]% \newunit\newblock @@ -1666,7 +1780,7 @@ \setunit{\addcolon\space}% \printlist{location}% \setunit*{\addperiod\space}% - \printfield{library}% + \printfield{library}\clearfield{library}% }% } @@ -1730,6 +1844,6 @@ }% %% -%% Copyright (C) 2016-2021 by University of Bath +%% Copyright (C) 2016-2022 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 4e4059c70ce..74cad99a933 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{2021/02/25 v4.0} +\def\Version{2022/03/04 v5.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) 2016-2021 by University of Bath +%% Copyright (C) 2016-2022 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 618d06026c4..30c5211815e 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{2021/02/25 v4.0} +\def\Version{2022/03/04 v5.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) 2016-2021 by University of Bath +%% Copyright (C) 2016-2022 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 08b9d31b1c8..27d8fd32df2 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{2021/02/25 v4.0} +\def\Version{2022/03/04 v5.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) 2016-2021 by University of Bath +%% Copyright (C) 2016-2022 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 77c5003f83d..7e6f144cc8a 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{2021/02/25 v4.0} +\def\Version{2022/03/04 v5.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) 2016-2021 by University of Bath +%% Copyright (C) 2016-2022 by University of Bath %% %% End of file `english-bath.lbx'. -- cgit v1.2.3