diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-bath')
5 files changed, 1861 insertions, 1053 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx index 306194a259c..dc1158ea0bc 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.bbx @@ -13,35 +13,25 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2022/03/04 v5.0} +\def\Version{2022/05/25 v6.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.bbx} [\Version\space Biblography style as recommended by the University of Bath Library] -\RequirePackage{xpatch} +\RequirePackage{etoolbox,xpatch} \RequirePackage{xstring} -\RequirePackage{etoolbox} \ifcsdef{DeclareLanguageMappingSuffix}{% \DeclareLanguageMappingSuffix{-bath} }{% \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,labelalpha=true} -\ExecuteBibliographyOptions[reference,audio,video,music,movie]{% - useeditor=false} \NewBibliographyString{% online, hours, at, unpublished, legalchapter, director, performer, reader, conductor, 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}{}{% \def\letbibmacro#1#2{% \ifcsundef{abx@macro@#2} @@ -59,6 +49,18 @@ (test {\iffieldequalstr{labeldatesource}{}} or test {\iffieldequalstr{labeldatesource}{year}})}}% } +\ifcsdef{DeclareBiblatexOption}{}{% + \def\DeclareBiblatexOption@II#1[#2]#3[#4]#5{ + \IfSubStr#1{global}{\DeclareBibliographyOption[#2]{#3}[#4]{#5}}{}% + \IfSubStr#1{type}{\DeclareTypeOption[#2]{#3}[#4]{#5}}{}% + \IfSubStr#1{entry}{\DeclareEntryOption[#2]{#3}[#4]{#5}}{}}% + \def\DeclareBiblatexOption@I#1[#2]#3#4{\@ifnextchar[% + {\DeclareBiblatexOption@II#1[#2]#3#4}% + {\DeclareBiblatexOption@II#1[#2]#3[]#4}}% + \def\DeclareBiblatexOption#1#2{\@ifnextchar[% + {\DeclareBiblatexOption@I#1#2}% + {\DeclareBiblatexOption@I#1[]#2}}% +} \def\blx@setsfcodes{% \let\blx@setsfcodes\relax \let\frenchspacing\blx@setfrcodes @@ -76,10 +78,1173 @@ \sfcode`\<=\@m \sfcode`\>=\@m} -\DeclareNameAlias{author}{family-given} -\DeclareNameAlias{editor}{family-given} -\DeclareNameAlias{bookeditor}{given-family} -\renewcommand*{\bibinitdelim}{} +\newtoggle{bbx:isbn} +\newtoggle{bbx:url} +\newtoggle{bbx:doi} +\newtoggle{bbx:eprint} +\newtoggle{bbx:related} + +\DeclareBiblatexOption{global,type,entry}[boolean]{isbn}[true]{% + \settoggle{bbx:isbn}{#1}} +\DeclareBiblatexOption{global,type,entry}[boolean]{url}[true]{% + \settoggle{bbx:url}{#1}} +\DeclareBiblatexOption{global,type,entry}[boolean]{doi}[true]{% + \settoggle{bbx:doi}{#1}} +\DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{% + \settoggle{bbx:eprint}{#1}} +\DeclareBiblatexOption{global,type,entry}[boolean]{related}[true]{% + \settoggle{bbx:related}{#1}} + +\newbibmacro*{bbx:savehash}{% + \savefield{fullhash}{\bbx@lasthash}} + +\DeclareBibliographyOption[boolean]{dashed}[true]{% + \ifstrequal{#1}{true} + {\ExecuteBibliographyOptions{pagetracker}% + \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}} + {\renewbibmacro*{bbx:savehash}{}}} + +\newtoggle{bbx:nonodate} +\DeclareBiblatexOption{global,type,entry}[boolean]{nonodate}[true]{% + \settoggle{bbx:nonodate}{#1}} + +\providebibmacro*{date+extradate}{} +\newbibmacro*{issue+date}{% + \printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \usebibmacro{date}}% + \newunit} + +\newbibmacro*{bbx:ifmergeddate}{\@secondoftwo} +\renewbibmacro*{date}{% + \usebibmacro{bbx:ifmergeddate}{}{% + \printdate + \setunit*{\bibdatetimesep}% + }% + \printtime}% + +\def\bbx@opt@mergedate@maximum{% + \renewbibmacro*{date+extradate}{% + \iffieldundef{labelyear} + {} + {\printtext[datelabel]{% + \iflabeldateisdate + {\printfield{issue}% + \setunit*{\addspace}% + \printdateextra} + {\printlabeldateextra}}}}% + \renewbibmacro*{bbx:ifmergeddate}{\iflabeldateisdate}% + \renewbibmacro*{issue+date}{% + \usebibmacro{bbx:ifmergeddate} + {} + {\printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \printdate}}}} + +\def\bbx@opt@mergedate@compact{% + \renewbibmacro*{date+extradate}{% + \ifboolexpr{ + togl {bbx:nonodate} + and not test {\iflabeldateisdate}} + {} + {\printtext[datelabel]{% + \iflabeldateisdate + {\printdateextra} + {\printlabeldateextra}}}}% + \renewbibmacro*{bbx:ifmergeddate}{\iflabeldateisdate}% + \renewbibmacro*{issue+date}{% + \ifboolexpr{test {\usebibmacro{bbx:ifmergeddate}} + and + test {\iffieldundef{issue}}} + {} + {\printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \usebibmacro{bbx:ifmergeddate} + {} + {\printdate}}}% + \newunit}} + +\def\bbx@opt@mergedate@basic{% + \renewbibmacro*{date+extradate}{% + \ifboolexpr{ + togl {bbx:nonodate} + and not test {\iflabeldateisdate}} + {} + {\printtext[datelabel]{\printlabeldateextra}}}% + \renewbibmacro*{bbx:ifmergeddate}{% + \ifboolexpr{ + test {\iflabeldateisdate} + and + not test {\ifdateshavedifferentprecision{label}{}} + }% + }% + \renewbibmacro*{issue+date}{% + \ifboolexpr{ + test {\usebibmacro{bbx:ifmergeddate}} + and + test {\iffieldundef{issue}} + } + {} + {\printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \printdate}}% + \newunit}} + +\def\bbx@opt@mergedate@minimum{% + \renewbibmacro*{date+extradate}{% + \ifboolexpr{ + togl {bbx:nonodate} + and not test {\iflabeldateisdate}} + {} + {\printtext[datelabel]{\printlabeldateextra}}}% + \renewbibmacro*{bbx:ifmergeddate}{% + \ifboolexpr{ + test {\iflabeldateisdate} + and + not test {\ifdateshavedifferentprecision{label}{}} + and + test {\iffieldundef{extradate}} + }% + }% + \renewbibmacro*{issue+date}{% + \ifboolexpr{ + test {\usebibmacro{bbx:ifmergeddate}} + and + test {\iffieldundef{issue}} + } + {} + {\printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \printdate}}% + \newunit}} + +\def\bbx@opt@mergedate@false{% + \renewbibmacro*{date+extradate}{% + \iffieldundef{labelyear} + {} + {\printtext[parens]{\printlabeldateextra}}}% + \renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}% + \renewbibmacro*{issue+date}{% + \printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + \usebibmacro{date}}% + \newunit}} + +\def\bbx@opt@mergedate@year{% + \renewbibmacro*{date+extradate}{% + \iffieldundef{labelyear}{}{% + \ifboolexpr{ + togl {bbx:nonodate} + and + not test {\iflabeldateisdate} + }{}{% + \printtext[datelabel]{\printlabeldateextra}% + }% + \iflabeldateisdate{% + \clearfield{year}% + }{}}} + \ifcsundef{abx@macro@date+extrayear}{}{% + \renewbibmacro*{date+extrayear}{\usebibmacro{date+extradate}}% + } + \renewbibmacro*{issue+date}{% + \iffieldundef{issue}{}{% + \ifboolexpr{( + test {\iffieldundef{volume}} + and + test {\iffieldundef{number}} + ) and + test {\iffieldundef{eid}} + }{% + \newunit + \printfield{issue}% + }{% + \printtext[parens]{% + \printfield{issue}% + }% + } + }% + \setunit{\addcomma\space}% + \printdate + \newunit + }% +}% + +\def\bbx@opt@mergedate@true{\bbx@opt@mergedate@year} + +\DeclareBiblatexOption{global,type,entry}[boolean]{mergedate}[true]{% + \ifcsdef{bbx@opt@mergedate@#1} + {\csuse{bbx@opt@mergedate@#1}} + {\PackageError{biblatex} + {Invalid option 'mergedate=#1'} + {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak + 'year', 'true' (=year), and 'false'.}}} + +\ExecuteBibliographyOptions{isbn,url,doi,eprint,related} +\ExecuteBibliographyOptions{labeldateparts,sorting=nyt,pagetracker,mergedate} +\ExecuteBibliographyOptions{% + maxcitenames=3,maxbibnames=9999,isbn=false,giveninits=true,dashed=false, + alldates=comp,labeldate=year,labelalpha=true} +\ExecuteBibliographyOptions[online]{url=true} +\ExecuteBibliographyOptions[reference,audio,video,music,movie]{% + useeditor=false} +\ExecuteBibliographyOptions[letter]{mergedate=maximum} + +\newbibmacro*{begentry}{} +\newbibmacro*{finentry}{\finentry} + +\DeclareBibliographyDriver{article}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{bytranslator+others}% + \newunit\newblock + \usebibmacro{journal+issuetitle}% + \newunit + \usebibmacro{byeditor+others}% + \newunit + \usebibmacro{note+pages}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{issn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{addendum}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{periodical}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title+issuetitle}% + \newunit\newblock + \usebibmacro{byeditor}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{issn}} + {}% + \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}} + +\DeclareBibliographyDriver{book}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{maintitle+title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \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}} + +\DeclareBibliographyDriver{collection}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{maintitle+title}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \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}} + +\DeclareBibliographyDriver{proceedings}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{maintitle+title}% + \newunit\newblock + \usebibmacro{event+venue+date}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \printlist{organization}% + \newunit + \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}} + +\DeclareBibliographyDriver{inbook}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{in:}% + \usebibmacro{bybookauthor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \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}} + +\DeclareBibliographyDriver{incollection}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{in:}% + \usebibmacro{bookeditor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}% + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \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}} + +\DeclareBibliographyDriver{inproceedings}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \ifnameundef{editor}{}{\usebibmacro{in:}}% + \usebibmacro{bookeditor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}% + \usebibmacro{byeditor+others}% + \newunit + \usebibmacro{event+venue+date}% + \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \setunit{\addcomma\space}% + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \printlist{organization}% + \newunit + \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}} + +\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}% + \setunit{\addcomma\space}% + \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}} + +\DeclareBibliographyDriver{dataset}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{type}% + \newunit + \printfield{edition}% + \setunit{\addcomma\space}% + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{library}% + \newunit\newblock + \usebibmacro{organization+location+date}% + \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}} + +\DeclareBibliographyDriver{software}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \setunit{\addspace} + \printfield{type}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{organization+location+date}% + \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}} + +\DeclareBibliographyDriver{manual}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor}% + \newunit\newblock + \printfield{edition}% + \usebibmacro{manual:series+type+number}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{organization+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}} + +\DeclareBibliographyDriver{patent}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{type}% + \setunit*{\addspace}% + \printfield{number}% + \iflistundef{location} + {} + {\setunit*{\addspace}% + \printtext[parens]{% + \printlist[][-\value{listtotal}]{location}}}% + \newunit\newblock + \usebibmacro{byholder}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{date}% + \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}} + +\DeclareBibliographyDriver{online}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{library}% + \newunit\newblock + \usebibmacro{organization+location+date}% + \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}} + +\DeclareBibliographyDriver{report}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{series+type+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{institution+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \newunit\newblock + \usebibmacro{library}% + \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}} + +\DeclareBibliographyDriver{thesis}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \printfield{type}% + \newunit + \usebibmacro{institution+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}} + +\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\newblock + \printfield{type}% + \newunit\newblock + \usebibmacro{byauthor}[given-family:full]% + \newunit\newblock + \usebibmacro{byeditor+others}[given-family:full]% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \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}} + +\DeclareBibliographyDriver{image}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{type}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{collection+shelfmark}% + \newunit\newblock + \usebibmacro{organization+location+date+library}% + \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}} + +\DeclareBibliographyDriver{jurisdiction}{% + \savebibmacro{title}% + \xapptobibmacro{labeltitle}{% + \setunit*{\addspace}% + \usebibmacro{casenumber}% + }{}{}% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{eucheck}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{note}% + \setunit{\addspace}% + \usebibmacro{reporter}% + \newunit\newblock + \printfield{institution}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \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}% + \restorebibmacro{title}} + +\DeclareBibliographyDriver{legislation}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{eucheck}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{journal+series+volume+number+chapter+pages} + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{institution+location+date}% + \newunit\newblock + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \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}} + +\DeclareBibliographyDriver{booklet}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{type}% + \newunit\newblock + \printfield{note}% + \usebibmacro{collection+shelfmark}% + \newunit\newblock + \usebibmacro{organization+location+date+library}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \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}} + +\DeclareBibliographyDriver{letter}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{bytranslator+others}% + \newunit\newblock + \usebibmacro{journal+issuetitle}% + \newunit\newblock + \printfield{howpublished}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{collection+shelfmark}% + \newunit\newblock + \usebibmacro{organization+location+date+library}% + \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}} + +\DeclareBibliographyDriver{misc}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{type}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{collection+shelfmark}% + \newunit\newblock + \usebibmacro{organization+location+date+library}% + \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}} + +\DeclareBibliographyDriver{unpublished}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \ifnameundef{editor}{}{\usebibmacro{in:}}% + \usebibmacro{bookeditor}% + \newunit\newblock + \usebibmacro{maintitle+booktitle}% + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{type}% + \newunit\newblock + \usebibmacro{event+venue+date}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{collection+shelfmark}% + \newunit\newblock + \usebibmacro{organization+location+date+library}% + \newunit\newblock + \usebibmacro{isunpublished}% + \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}} + +\DeclareBibliographyDriver{shorthand}{% + \usedriver + {\DeclareNameAlias{sortname}{default}} + {\thefield{entrytype}}% + \finentry} + +\newbool{bbx@inset} +\DeclareBibliographyDriver{set}{% + \booltrue{bbx@inset}% + \entryset{}{}% + \newunit\newblock + \usebibmacro{setpageref}% + \finentry} + +\DeclareBibliographyAlias{mvbook}{book} +\DeclareBibliographyAlias{bookinbook}{inbook} +\DeclareBibliographyAlias{suppbook}{inbook} +\DeclareBibliographyAlias{mvcollection}{collection} +\DeclareBibliographyAlias{suppcollection}{incollection} +\DeclareBibliographyAlias{movie}{audio} +\DeclareBibliographyAlias{music}{audio} +\DeclareBibliographyAlias{mvproceedings}{proceedings} +\DeclareBibliographyAlias{reference}{collection} +\DeclareBibliographyAlias{mvreference}{reference} +\DeclareBibliographyAlias{suppperiodical}{article} +\DeclareBibliographyAlias{review}{article} +\DeclareBibliographyAlias{standard}{manual} +\DeclareBibliographyAlias{software}{misc} +\DeclareBibliographyAlias{video}{audio} +\DeclareBibliographyAlias{*}{misc} + \newbibmacro*{name:cjk-given-family}[3]{% \ifitemannotation{cjk}{% \usebibmacro{name:delim}{#2#1#3}% @@ -179,6 +1344,49 @@ \usebibmacro{name:andothers}% } +\DeclareNameFormat{given-family:full}{% + \ifdefvoid{\namepartcjk}{% + \usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% + }{% + \usebibmacro{name:cjk-given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartcjk}% + }% + \usebibmacro{name:andothers}% +} + +\DeclareNameAlias{author}{family-given} +\DeclareNameAlias{editor}{family-given} +\DeclareNameAlias{translator}{family-given} + +\DeclareNameWrapperAlias{author}{family-given} +\DeclareNameWrapperAlias{editor}{family-given} +\DeclareNameWrapperAlias{translator}{family-given} + +\DeclareNameAlias{bookeditor}{given-family} + +\renewcommand*{\bibinitdelim}{} + +\newbibmacro*{bbx:dashcheck}[2]{% + \ifboolexpr{ + test {\iffieldequals{fullhash}{\bbx@lasthash}} + and + not test \iffirstonpage + and + ( + not bool {bbx@inset} + or + test {\iffieldequalstr{entrysetcount}{1}} + ) + } + {#1} + {#2}} + \DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1}} \renewbibmacro*{author}{% \ifboolexpr{ @@ -203,16 +1411,62 @@ \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} - {\namepartgiven} - {\namepartprefix} - {\namepartsuffix}% - \usebibmacro{name:andothers}} + \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}% + \usebibmacro{date+extradate}} + +\renewbibmacro*{editor}{% + \usebibmacro{bbx:editor}{editorstrg}} +\renewbibmacro*{editor+others}{% + \usebibmacro{bbx:editor}{editor+othersstrg}} +\newbibmacro*{bbx:editor}[1]{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\printnames{editor}% + \setunit{\printdelim{editortypedelim}}% + \usebibmacro{bbx:savehash}}% + \usebibmacro{#1}% + \clearname{editor}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}% + \usebibmacro{date+extradate}} + +\renewbibmacro*{translator}{% + \usebibmacro{bbx:translator}{translatorstrg}} +\renewbibmacro*{translator+others}{% + \usebibmacro{bbx:translator}{translator+othersstrg}} +\newbibmacro*{bbx:translator}[1]{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\printnames{translator}% + \setunit{\printdelim{translatortypedelim}}% + \usebibmacro{bbx:savehash}}% + \usebibmacro{#1}% + \clearname{translator}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}% + \usebibmacro{date+extradate}} + +\newbibmacro*{bookeditor}{% + \ifnameundef{editor}{}{% + \printnames[bookeditor]{editor}% + \setunit*{\addcomma\space}% + \usebibmacro{editor+othersstrg}% + \clearname{editor}% + }} \renewbibmacro*{byauthor}[1][byauthor]{% \ifboolexpr{ @@ -301,262 +1555,12 @@ \newunit \usebibmacro{withothers}}}} -\newbibmacro*{bookeditor}{% - \ifnameundef{editor}{}{% - \printnames[bookeditor]{editor}% - \setunit*{\addcomma\space}% - \usebibmacro{editor+othersstrg}% - \clearname{editor}% - }} - -\DeclareFieldFormat{sentencecase}{\MakeSentenceCase*{#1}} -\DeclareFieldFormat{midsentencecase}{\MakeSentenceCase*{{}#1}} -\DeclareFieldFormat{title}{\mkbibemph{#1}} -\DeclareFieldFormat - [article,inbook,incollection,inproceedings]% - {title}{#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 - [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}} - -\newtoggle{bbx:onlineshown} -\newbibmacro*{isonline}{% - \ifboolexpr{( - test {\iffieldundef{doi}} - and - test {\iffieldundef{url}} - and - test {\iffieldundef{urlyear}} - and - not test {\ifentrytype{online}} - ) or - togl {bbx:onlineshown} - }{}{% - \bibstring[\mkbibbrackets]{online}% - \toggletrue{bbx:onlineshown}}} - -\DeclareFieldFormat{titleaddon}{\mkbibbrackets{% - \IfBeginWith{#1}{[}{% - \IfEndWith{#1}{]}{% - \StrBetween{#1}{[}{]}% - }{#1}% - }{#1}% -}} - -\renewbibmacro*{title}{% - \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{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 {\iffieldequalstr{type}{TV}} - or - test {\iffieldequalstr{type}{Radio}} - ) - or - test {\iffieldundef{series}} - ) - }{% - \setunit*{\addspace}% - \usebibmacro{isonline}% - }{}% - }% -} - -\renewbibmacro*{booktitle}{% - \ifboolexpr{ - test {\iffieldundef{booktitle}} - and - test {\iffieldundef{booksubtitle}} - }{}{% - \printtext[booktitle]{% - \printfield[sentencecase]{booktitle}% - \setunit{\subtitlepunct}% - \printfield[midsentencecase]{booksubtitle}% - \setunit{\addspace}% - }% - \printfield{booktitleaddon} - \setunit*{\addspace}% - \usebibmacro{isonline}% - }% -} - -\renewbibmacro*{maintitle}{% - \ifboolexpr{ - test {\iffieldundef{maintitle}} - and - test {\iffieldundef{mainsubtitle}} - }{}{ - \printtext[maintitle]{% - \printfield[sentencecase]{maintitle}% - \setunit{\subtitlepunct}% - \printfield[midsentencecase]{mainsubtitle}% - \setunit{\addspace}% - }% - \printfield{maintitleaddon}% - }% -} - -\renewcommand*{\subtitlepunct}{\addcolon\space} - -\DeclareLabeltitle[inreference]{% - \field{shorttitle} - \field{booktitle} - \field{title} -} -\providetoggle{bbx:labelistitle} -\renewbibmacro*{labeltitle}{% - \iffieldundef{label}{% - \ifboolexpr{ - test {\ifentrytype{inreference}} - and - 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}}% - \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}% - }% -} -\DeclareDelimFormat{yearlabeltitleaddondelim}{\addspace} -\newbibmacro*{labeltitleaddon}{% - \iftoggle{bbx:labelistitle}{% - \setunit{\printdelim{yearlabeltitleaddondelim}}% - \printfield{version}% - \clearfield{version}% - \setunit*{\addspace}% - \printfield{titleaddon}% - \clearfield{titleaddon}% - \ifboolexpr{( - test {\ifentrytype{legislation}} - or - test {\ifentrytype{jurisdiction}} - ) - and - test {\iffieldundef{journaltitle}} - and - test {\iffieldundef{booktitle}} - }{% - \setunit*{\addspace}% - \usebibmacro{isonline}% - }{}% - }{}% -} -\xapptobibmacro{bbx:editor}{\usebibmacro{labeltitleaddon}}{}{} -\xapptobibmacro{bbx:translator}{\usebibmacro{labeltitleaddon}}{}{} - \DeclareLabeldate{% \field{date} \field{year} \literal{nodate} } -\newtoggle{bbx:nonodate} -\DeclareBibliographyOption[boolean]{nonodate}[true]{% - \settoggle{bbx:nonodate}{#1}} -\DeclareTypeOption[boolean]{nonodate}[true]{% - \settoggle{bbx:nonodate}{#1}} -\DeclareEntryOption[boolean]{nonodate}[true]{% - \settoggle{bbx:nonodate}{#1}} + \DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map[overwrite=true]{ @@ -572,6 +1576,9 @@ } } +\DeclareFieldFormat{datelabel}{#1} +\DeclareFieldFormat{time}{#1~\bibstring{hours}} + \DeclareDelimFormat{nameyeardelim}{\addcomma\space} \DeclareDelimFormat[parencite,bib,biblist]{nameyeardelim}{\addcomma\space} \newcommand{\dononameyeardelim}{% @@ -626,161 +1633,6 @@ togl {bbx:labelistitle} }{\addspace}{\labelnamepunct}} -\renewbibmacro*{date}{% - \printdate - \setunit*{\bibdatetimesep} - \printtime -} -\DeclareFieldFormat{time}{#1~\bibstring{hours}} - -\xpatchcmd{\KV@blx@opt@pre@mergedate}{% - 'true' (=compact)% -}{% - 'year', 'true' (=year)% -}{}{\wlog{WARNING: biblatex-bath failed to patch KV@blx@opt@pre@datemerge}} -\ifdefined\KV@blx@opt@typ@mergedate - \xpatchcmd{\KV@blx@opt@typ@mergedate}{% - 'true' (=compact)% - }{% - 'year', 'true' (=year)% - }{}{\wlog{WARNING: biblatex-bath failed to patch KV@blx@opt@typ@datemerge}} -\else - \DeclareTypeOption[boolean]{mergedate}[true]{% - \ifcsdef{bbx@opt@mergedate@#1}{% - \csuse{bbx@opt@mergedate@#1}% - }{% - \PackageError{biblatex} - {Invalid option 'mergedate=#1'} - {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak - 'year', 'true' (=year), and 'false'.}}} -\fi -\xpatchcmd{\KV@blx@opt@ent@mergedate}{% - 'true' (=compact)% -}{% - 'year', 'true' (=year)% -}{}{\wlog{WARNING: biblatex-bath failed to patch KV@blx@opt@ent@datemerge}} - -\DeclareFieldFormat{datelabel}{#1} -\xpatchcmd{\bbx@opt@mergedate@maximum}{% - \iffieldundef{labelyear}% -}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate}}% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@maximum}} -\xpatchcmd{\bbx@opt@mergedate@maximum}{% - \printtext[parens]% -}{% - \printtext[datelabel]% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@maximum}} -\xpatchcmd{\bbx@opt@mergedate@compact}{% - \iffieldundef{labelyear}% -}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate}}% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@compact}} -\xpatchcmd{\bbx@opt@mergedate@compact}{% - \printtext[parens]% -}{% - \printtext[datelabel]% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@compact}} -\xpatchcmd{\bbx@opt@mergedate@basic}{% - \iffieldundef{labelyear}% -}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate}}% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@basic}} -\xpatchcmd{\bbx@opt@mergedate@basic}{% - \printtext[parens]% -}{% - \printtext[datelabel]% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@basic}} -\xpatchcmd{\bbx@opt@mergedate@minimum}{% - \iffieldundef{labelyear}% -}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate}}% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@minimum}} -\xpatchcmd{\bbx@opt@mergedate@minimum}{% - \printtext[parens]% -}{% - \printtext[datelabel]% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@minimum}} -\xpatchcmd{\bbx@opt@mergedate@false}{% - \iffieldundef{labelyear}% -}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate}}% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@false}} -\xpatchcmd{\bbx@opt@mergedate@false}{% - \printtext[parens]% -}{% - \printtext[datelabel]% -}{}{\wlog{WARNING: biblatex-bath failed to patch bbx@opt@mergedate@false}} -\xpatchcmd{\bbx@opt@mergedate@maximum}{% - \iffieldsequal{year}{labelyear} - {\printlabeldateextra}% - {\printfield{labelyear}% - \printfield{extrayear}}% -}{% - \iflabeldateisdate - {\printfield{issue}% - \setunit*{\addspace}% - \printdateextra} - {\printlabeldateextra}% -}{}{} - -\def\bbx@opt@mergedate@year{% - \renewbibmacro*{date+extradate}{% - \iffieldundef{labelyear}{}{% - \ifboolexpr{ - togl {bbx:nonodate} - and - not test {\iflabeldateisdate} - }{}{% - \printtext[datelabel]{\printlabeldateextra}% - }% - \iflabeldateisdate{% - \clearfield{year}% - }{}}} - \ifcsundef{abx@macro@date+extrayear}{}{% - \renewbibmacro*{date+extrayear}{\usebibmacro{date+extradate}}% - } - \renewbibmacro*{issue+date}{% - \iffieldundef{issue}{}{% - \ifboolexpr{( - test {\iffieldundef{volume}} - and - test {\iffieldundef{number}} - ) and - test {\iffieldundef{eid}} - }{% - \newunit - \printfield{issue}% - }{% - \printtext[parens]{% - \printfield{issue}% - }% - } - }% - \setunit{\addcomma\space}% - \printdate - \newunit - }% -}% - -\def\bbx@opt@mergedate@true{\bbx@opt@mergedate@year} -\ExecuteBibliographyOptions{mergedate} - \newrobustcmd*{\mknoyeardaterangefull}[2]{% \iffieldundef{#2month}{}{% \printtext[{#2date}]{% @@ -923,128 +1775,294 @@ \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}} -\DeclareFieldFormat{series}{\MakeSentenceCase*{#1}} +\DeclareFieldFormat{sentencecase}{\MakeSentenceCase*{#1}} +\DeclareFieldFormat{midsentencecase}{\MakeSentenceCase*{{}#1}} +\DeclareFieldFormat{title}{\mkbibemph{#1}} \DeclareFieldFormat - [audio,video,music,video]% - {series}{\ifboolexpr{ - test {\iffieldequalstr{type}{TV}} - or - test {\iffieldequalstr{type}{Radio}} - }{\mkbibemph{\MakeSentenceCase*{#1}}}{\MakeSentenceCase*{#1}}} + [article,inbook,incollection,inproceedings]% + {title}{#1} +\DeclareFieldFormat + [reference,mvreference]% + {title}{\iftoggle{bbx:labelistitle}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [inreference]% + {title}{\iftoggle{bbx:labelistitle}{\mkbibemph{#1}}{#1}} +\DeclareFieldFormat + [inreference]% + {booktitle}{\iftoggle{bbx:labelistitle}{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [patent,thesis]% + {title}{\mkbibemph{#1}} \DeclareFieldFormat [audio,video,music,video]% - {number}{\ifboolexpr{ + {title}{\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}% + }{#1}{\mkbibemph{#1}}} +\DeclareFieldFormat + [unpublished]% + {title}{\iffieldundef{booktitle}{\mkbibemph{#1}}{#1}} +\DeclareFieldFormat + [letter]% + {title}{\iffieldundef{journaltitle}{\emph{#1}}{#1}} + +\DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}} + +\DeclareFieldFormat{titleaddon}{\mkbibbrackets{% + \IfBeginWith{#1}{[}{% + \IfEndWith{#1}{]}{% + \StrBetween{#1}{[}{]}% + }{#1}% + }{#1}% +}} + +\renewcommand*{\subtitlepunct}{\addcolon\space} + +\newbibmacro*{maintitle+title}{% + \iffieldsequal{maintitle}{title} + {\clearfield{maintitle}% + \clearfield{mainsubtitle}% + \clearfield{maintitleaddon}} + {\iffieldundef{maintitle} + {} + {\usebibmacro{maintitle}% + \newunit\newblock + \iffieldundef{volume} + {} + {\printfield{volume}% + \printfield{part}% + \setunit{\addcolon\space}}}}% + \usebibmacro{title}% \newunit} -\renewbibmacro*{event+venue+date}{% - \printfield{eventtitle}% + +\newbibmacro*{title+issuetitle}{% + \usebibmacro{periodical}% \setunit*{\addspace}% - \printfield{eventtitleaddon}% - \ifboolexpr{ - test {\iffieldundef{venue}} - and - test {\iffieldundef{eventyear}} - } + \iffieldundef{series} {} - {\setunit{\addcomma\space}% - \printeventdate - \setunit*{\addcomma\space}% - \printfield{venue}% - \newunit}} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \usebibmacro{volume+number+eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} -\letbibmacro{plain:institution+location+date}{institution+location+date} -\renewbibmacro*{institution+location+date}{% - \iflistundef{publisher}{% - \usebibmacro{plain:institution+location+date}% +\renewbibmacro*{title}{% + \ifboolexpr{ + test {\iffieldundef{title}} + and + test {\iffieldundef{subtitle}} }{% - \printlist{institution}% - \newunit - \usebibmacro{publisher+location+date}}} -\renewbibmacro*{organization+location+date}{% - \iflistundef{publisher}{% - \printlist{location}% - \iflistundef{organization} - {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% - \printlist{organization}% - \iflistundef{location} - {\setunit{\addcomma\space}}% - {\setunit*{\addcomma\space}}% - \usebibmacro{date}% - \newunit + \ifboolexpr{ + test {\ifentrytype{legislation}} + and + test {\iffieldundef{journaltitle}} + }{% + \setunit*{\addspace}% + \usebibmacro{isonline}% + }{}% }{% - \printlist{organization}% - \newunit - \usebibmacro{publisher+location+date}}} + \printtext[title]{% + \printfield[sentencecase]{title}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{subtitle}% + \setunit{\addspace}}% + \printfield{titleaddon}% + \setunit*{\addspace}% + \printfield{version}\clearfield{version}% + \ifboolexpr{ + test {\iffieldundef{entrysubtype}} + or ( + test {\ifentrytype{legislation}} + or + test {\ifentrytype{jurisdiction}} + ) + }{% + \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 {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + ) + or + test {\iffieldundef{series}} + ) + }{% + \setunit*{\addspace}% + \usebibmacro{isonline}% + }{}% + }{% + \setunit*{\addspace}% + \printfield{entrysubtype}} + }% +} -\DeclareFieldFormat{library}{\mkbibemph{#1}} -\newbibmacro*{library}{% - \iffieldundef{library}{}{% - \printfield{library}\clearfield{library}% +\renewbibmacro*{booktitle}{% + \ifboolexpr{ + test {\iffieldundef{booktitle}} + and + test {\iffieldundef{booksubtitle}} + }{}{% + \printtext[booktitle]{% + \printfield[sentencecase]{booktitle}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{booksubtitle}% + \setunit{\addspace}% + }% + \printfield{booktitleaddon} \setunit*{\addspace}% \usebibmacro{isonline}% }% } -\renewcommand*{\ppspace}{} -\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}{% +\renewbibmacro*{maintitle}{% + \ifboolexpr{ + test {\iffieldundef{maintitle}} + and + test {\iffieldundef{mainsubtitle}} + }{}{ + \printtext[maintitle]{% + \printfield[sentencecase]{maintitle}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{mainsubtitle}% + \setunit{\addspace}% + }% + \printfield{maintitleaddon}% + }% +} + +\DeclareLabeltitle[inreference]{% + \field{shorttitle} + \field{booktitle} + \field{title} +} +\DeclareFieldFormat{entrysubtype}{\mkbibbrackets{#1}} +\providetoggle{bbx:labelistitle} +\newbibmacro*{labeltitle}{% + \iffieldundef{label}{% \ifboolexpr{ - test {\iffieldundef{url}} - and not - test {\iffieldundef{urlyear}} - }{\printfield[pseudourl]{library}}{\printfield{url}}% + test {\ifentrytype{inreference}} + and + not test {\iffieldundef{booktitle}} + }{% + \toggletrue{bbx:labelistitle}% + \printtext[booktitle]{% + \printfield[sentencecase]{booktitle}% + \setunit{\booksubtitlepunct}% + \printfield[midsentencecase]{booksubtitle}}% + \clearfield{booktitle}\clearfield{booksubtitle}% + }{% + \ifboolexpr{ + test {\iffieldundef{title}} + and + test {\iffieldundef{subtitle}} + }{}{% + \toggletrue{bbx:labelistitle}% + \printtext[title]{% + \printfield[sentencecase]{title}% + \setunit{\subtitlepunct}% + \printfield[midsentencecase]{subtitle}% + \setunit{\addspace}}% + \clearfield{title}\clearfield{subtitle}}% + \printfield{titleaddon}% + \ifboolexpr{ + test {\ifentrytype{legislation}} + or + test {\ifentrytype{jurisdiction}} + }{}{% + \setunit*{\addspace}% + \printfield{version}\clearfield{version}% + \iffieldundef{entrysubtype}{% + \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 {\iffieldequalstr{type}{TV}} + or + test {\iffieldequalstr{type}{Radio}} + ) + or + test {\iffieldundef{series}} + ) + }{% + \setunit*{\addspace}% + \usebibmacro{isonline}% + }{}% + }{% + \setunit*{\addspace}% + \printfield{entrysubtype}}}}% }{% - \printfield{doi}% + \printfield{label}% }} -\renewbibmacro*{doi+eprint+url}{% - \iftoggle{bbx:eprint} - {\usebibmacro{eprint}} - {}% - \newunit\newblock - \iftoggle{bbx:url} - {\usebibmacro{url+urldate}} - {}} -\xpatchbibdriver{online}{% - \iftoggle{bbx:doi} - {\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}% -}{% - \usebibmacro{journal+issuetitle}% -}{}{\wlog{WARNING: biblatex-bath failed to patch article driver}} -\xpatchbibdriver{article}{% - \usebibmacro{addendum+pubstate}% -}{% - \printfield{addendum}% -}{}{\wlog{WARNING: biblatex-bath failed to patch article driver}} +\newtoggle{bbx:onlineshown} +\newbibmacro*{isonline}{% + \ifboolexpr{( + test {\iffieldundef{doi}} + and + test {\iffieldundef{url}} + and + test {\iffieldundef{urlyear}} + and + not test {\ifentrytype{online}} + ) or + togl {bbx:onlineshown} + }{}{% + \bibstring[\mkbibbrackets]{online}% + \toggletrue{bbx:onlineshown}}} + +\newbibmacro*{event+venue+date}{% + \printfield{eventtitle}% + \setunit*{\addspace}% + \printfield{eventtitleaddon}% + \ifboolexpr{ + test {\iffieldundef{venue}} + and + test {\iffieldundef{eventyear}} + } + {} + {\setunit{\addcomma\space}% + \printeventdate + \setunit*{\addcomma\space}% + \printfield{venue}% + \newunit}} + \xpatchbibmacro{journal}{% \printfield[titlecase]{journaltitle}% }{% @@ -1055,7 +2073,8 @@ }{% \printfield[sentencecase]{journalsubtitle}% }{}{\wlog{WARNING: biblatex-bath failed to patch journal macro}} -\renewbibmacro*{journal+issuetitle}{% + +\newbibmacro*{journal+issuetitle}{% \usebibmacro{journal}% \setunit*{\addspace}% \usebibmacro{isonline}% @@ -1073,168 +2092,82 @@ \setunit{\addcomma\space}% \printfield{pubstate}% \newunit} -\renewbibmacro*{volume+number+eid}{% + +\newbibmacro*{volume+number+eid}{% \printfield{volume}% \printfield[parens]{number}% \setunit{\addcomma\space}% \printfield{eid}} -\xpatchbibdriver{book}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch book driver (series+number)}} - -\xpatchbibdriver{collection}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch collection driver (series+number)}} - -\xpatchbibdriver{inbook}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inbook driver (series+number)}} - -\xpatchbibdriver{incollection}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (series+number)}} - -\xpatchbibdriver{inproceedings}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (series+number)}} - -\xpatchbibdriver{proceedings}{% - \newunit\newblock - \usebibmacro{series+number}% -}{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch proceedings driver (series+number)}} +\newbibmacro*{maintitle+booktitle}{% + \iffieldundef{maintitle} + {} + {\usebibmacro{maintitle}% + \newunit\newblock + \iffieldundef{volume} + {} + {\printfield{volume}% + \printfield{part}% + \setunit{\addcolon\space}}}% + \usebibmacro{booktitle}% + \newunit} -\xpatchbibdriver{incollection}{% - \usebibmacro{in:}% - \usebibmacro{maintitle+booktitle}% - \newunit\newblock - \usebibmacro{byeditor+others}% -}{% - \ifnameundef{editor}{}{\usebibmacro{in:}}% - \usebibmacro{bookeditor}% - \newunit\newblock - \usebibmacro{maintitle+booktitle}% - \usebibmacro{byeditor+others}% -}{}{\wlog{WARNING: biblatex-bath failed to patch incollection driver (bookeditor)}} +\DeclareFieldFormat{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}} +\DeclareFieldFormat[software]{type}{\mkbibbrackets{#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} +\DeclareFieldFormat{forceparens}{(#1)} -\xpatchbibdriver{inproceedings}{% - \usebibmacro{in:}% - \usebibmacro{maintitle+booktitle}% - \newunit\newblock - \usebibmacro{event+venue+date}% - \newunit\newblock - \usebibmacro{byeditor+others}% -}{% - \ifnameundef{editor}{}{\usebibmacro{in:}}% - \usebibmacro{bookeditor}% - \newunit\newblock - \usebibmacro{maintitle+booktitle}% - \usebibmacro{byeditor+others}% - \newunit - \usebibmacro{event+venue+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch inproceedings driver (bookeditor)}} +\newbibmacro*{series+number}{% + \printfield{series}% + \setunit*{\addcomma\space}% + \printfield{number}% + \newunit} -\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}% +\newbibmacro{manual:series+type+number}{% + \iffieldundef{series}{% \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 - \usebibmacro{publisher+location+date}% -}{% - \usebibmacro{library}% - \newunit\newblock - \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch dataset driver (publisher)}} + \printfield{type}% + \setunit{\addspace}% + \printfield{number}% + }{% + \setunit{\addcomma\space}% + \usebibmacro{series+number}% + \newunit\newblock + \printfield{type}% + }% +} -\xpatchbibdriver{online}{% - \printlist{organization}% - \newunit\newblock - \usebibmacro{date}% -}{% - \usebibmacro{library}% - \newunit\newblock - \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch online driver (publisher)}} +\newbibmacro*{collection+shelfmark}{% + \ifboolexpr{ + test {\iffieldundef{library}} + or ( + test {\iffieldundef{collection}} + and + test {\iffieldundef{shelfmark}} + ) + }{ + \usebibmacro{series+number}% + }{ + \printfield{collection}% + \setunit*{\addcomma\space}% + \printfield{shelfmark}% + \newunit}} -\DeclareFieldFormat{forceparens}{(#1)} \newbibmacro{series+type+number}{% \ifboolexpr{ test {\iffieldundef{series}} @@ -1261,73 +2194,139 @@ \printfield{number}% }}}} -\DeclareBibliographyDriver{report}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% +\newbibmacro*{publisher+location+date}{% + \printlist{location}% + \iflistundef{publisher} + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% + \printlist{publisher}% + \setunit*{\addcomma\space}% + \usebibmacro{date}% + \newunit} + +\newbibmacro*{plain:institution+location+date}{% + \printlist{location}% + \iflistundef{institution} + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% + \printlist{institution}% + \setunit*{\addcomma\space}% + \usebibmacro{date}% + \newunit} +\newbibmacro*{institution+location+date}{% + \iflistundef{publisher}{% + \usebibmacro{plain:institution+location+date}% + }{% + \printlist{institution}% + \newunit + \usebibmacro{publisher+location+date}}} + +\newbibmacro*{organization+location+date}{% + \iflistundef{publisher}{% + \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 + \usebibmacro{publisher+location+date}}} + +\DeclareFieldFormat{library}{\mkbibemph{#1}} +\DeclareFieldFormat[image]{library}{#1} +\newbibmacro*{library}{% + \iffieldundef{library}{}{% + \printfield{library}\clearfield{library}% + \setunit*{\addspace}% + \usebibmacro{isonline}}} +\newbibmacro*{location+library}{% + \iffieldundef{library}{% + \iffieldundef{institution}{}{% + \printlist{institution}% + \setunit{\addcomma\space}% + \printlist{location}% + }% + }{% + \printfield{library}\clearfield{library}% + \setunit*{\addcomma\space}% + \printlist{location}}} + +\newbibmacro*{organization+location+date+library}{% + \ifboolexpr{ + test {\iffieldundef{library}} + or + not test {\iflistundef{publisher}} + }{% + \printlist{location}\clearfield{location}% + \setunit*{\addcolon\space}% + }{}% + \iflistundef{publisher}{% + \iflistundef{organization}{ + \printlist{location}% + }{% + \printlist{organization}} + }{% + \printlist{publisher}% + }% + \setunit{\addcomma\space}% + \usebibmacro{date}% \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{series+type+number}% - \newunit\newblock + \usebibmacro{location+library}} + +\newbibmacro*{isunpublished}{% + \bibstring{unpublished}} + +\renewcommand*{\ppspace}{} +\DeclareNumChars{ab} + +\newbibmacro*{chapter+pages}{% + \printfield{chapter}% + \setunit{\bibpagespunct}% + \printfield{eid}% + \setunit{\bibpagespunct}% + \printfield{pages}% + \newunit} + +\newbibmacro*{note+pages}{% \printfield{note}% + \setunit{\bibpagespunct}% + \printfield{pages}% + \newunit} + +\newbibmacro*{addendum+pubstate}{% + \printfield{addendum}% \newunit\newblock - \usebibmacro{institution+location+date}% - \newunit\newblock - \usebibmacro{chapter+pages}% - \newunit - \printfield{pagetotal}% - \newunit\newblock - \iftoggle{bbx:isbn} - {\printfield{isrn}} - {}% - \newunit\newblock - \usebibmacro{library}% - \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}} + \printfield{pubstate}} -\newbibmacro{manual:series+type+number}{% - \iffieldundef{series}{% - \newunit\newblock - \printfield{type}% - \setunit{\addspace}% - \printfield{number}% +\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}{% + \ifboolexpr{ + test {\iffieldundef{url}} + and not + test {\iffieldundef{urlyear}} + }{\printfield[pseudourl]{library}}{\printfield{url}}% }{% - \setunit{\addcomma\space}% - \usebibmacro{series+number}% - \newunit\newblock - \printfield{type}% - }% -} -\xpatchbibdriver{manual}{% - \newunit\newblock - \usebibmacro{series+number}% + \printfield{doi}% + }} +\newbibmacro*{doi+eprint+url}{% + \iftoggle{bbx:eprint} + {\usebibmacro{eprint}} + {}% \newunit\newblock - \printfield{type}% -}{% - \usebibmacro{manual:series+type+number}% -}{}{\wlog{WARNING: biblatex-bath failed to patch manual driver}} -\xpatchbibdriver{manual}{% - \printlist{organization}% - \newunit - \usebibmacro{publisher+location+date}% -}{% - \usebibmacro{organization+location+date}% -}{}{\wlog{WARNING: biblatex-bath failed to patch manual driver}} + \iftoggle{bbx:url} + {\usebibmacro{url+urldate}} + {}} \DeclareStyleSourcemap{% \maps[datatype=bibtex]{% @@ -1348,50 +2347,6 @@ }} \ExecuteBibliographyOptions[standard]{useeditor=false} -\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 - \printfield{type}% - \newunit\newblock - \usebibmacro{byauthor}[given-family:full]% - \newunit\newblock - \usebibmacro{byeditor+others}[given-family:full]% - \newunit\newblock - \printfield{howpublished}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{publisher+location+date}% - \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}} -\DeclareBibliographyAlias{movie}{audio} -\DeclareBibliographyAlias{music}{audio} -\DeclareBibliographyAlias{video}{audio} \newtoggle{bbx:eu-oj} \newbibmacro*{eucheck}{% \IfBeginWith{\thefield{journaltitle}}{OJ}{% @@ -1525,48 +2480,6 @@ \DeclareFieldFormat[jurisdiction]{institution}{\mkbibparens{#1}} -\DeclareBibliographyDriver{jurisdiction}{% - \savebibmacro{title}% - \xapptobibmacro{labeltitle}{% - \setunit*{\addspace}% - \usebibmacro{casenumber}% - }{}{}% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{eucheck}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \printfield{note}% - \setunit{\addspace}% - \usebibmacro{reporter}% - \newunit - \printfield{pagetotal}% - \newunit\newblock - \printfield{institution}% - \newunit\newblock - \iftoggle{bbx:isbn} - {\printfield{isrn}} - {}% - \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}% - \restorebibmacro{title}} - \DeclareFieldFormat[legislation]{datelabel}{% \iftoggle{bbx:eu-oj}{% \mkbibbrackets{#1}% @@ -1610,227 +2523,120 @@ \setunit*{\addcomma\space}% \printfield{chapter}}}}}} -\DeclareBibliographyDriver{legislation}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{eucheck}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{journal+series+volume+number+chapter+pages} - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{institution+location+date}% - \newunit\newblock - \printfield{pagetotal}% - \newunit\newblock - \iftoggle{bbx:isbn} - {\printfield{isrn}} - {}% - \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}} +\newcounter{bbx:relatedcount} +\newcounter{bbx:relatedtotal} -\DeclareFieldFormat[letter]{title}{\iffieldundef{journaltitle}{\emph{#1}}{#1}} -\ExecuteBibliographyOptions[letter]{mergedate=maximum} -\DeclareBibliographyDriver{letter}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/translator+others}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{bytranslator+others}% - \newunit\newblock - \usebibmacro{journal+issuetitle}% - \newunit\newblock - \printfield{howpublished}% - \newunit - \printfield{note}% - \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}% -} +\newbibmacro*{related:init}{% + \csundef{bbx:relatedloop}} -\DeclareFieldFormat[software]{type}{\mkbibbrackets{#1}} -\DeclareBibliographyDriver{software}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \setunit{\addspace} - \printfield{type}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{byeditor+others}% - \newunit\newblock - \printfield{howpublished}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{organization+location+date}% - \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}} +\newbibmacro*{begrelated}{% + \booltrue{bbx@inset}} -\DeclareFieldFormat[image]{library}{#1} -\DeclareBibliographyDriver{image}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{byeditor+others}% - \newunit\newblock - \printfield{howpublished}% - \newunit\newblock - \printfield{type}% - \newunit - \printfield{note}% - \newunit\newblock - \usebibmacro{organization+location+date+library}% - \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}} -\newbibmacro*{organization+location+date+library}{% - \ifboolexpr{ - test {\iffieldundef{library}} - or - not test {\iflistundef{publisher}} - }{% - \printlist{location}% - \setunit*{\addcolon\space}% - \clearfield{location}% - }{}% - \iflistundef{publisher}{% - \printlist{organization}% - }{% - \printlist{publisher}% - }% - \setunit{\addcomma\space}% - \usebibmacro{date}% - \newunit - \iffieldundef{library}{% - \iffieldundef{institution}{}{% - \bibsentence - \bibstring{at}% - \setunit{\addcolon\space}% - \printlist{location}% - \setunit*{\addperiod\space}% - \printfield{institution}% - }% - }{% - \bibsentence - \bibstring{at}% - \setunit{\addcolon\space}% - \printlist{location}% - \setunit*{\addperiod\space}% - \printfield{library}\clearfield{library}% - }% -} +\newbibmacro*{endrelated}{% + \usebibmacro*{bbx:savehash}} -\newbibmacro*{isunpublished}{% - \bibstring{unpublished}% -} -\DeclareBibliographyDriver{unpublished}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \ifnameundef{editor}{}{\usebibmacro{in:}}% - \usebibmacro{bookeditor}% - \newunit\newblock - \usebibmacro{maintitle+booktitle}% - \usebibmacro{byeditor+others}% - \newunit\newblock - \printfield{howpublished}% - \newunit\newblock - \printfield{type}% - \newunit\newblock - \usebibmacro{event+venue+date}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{location+date}% - \newunit\newblock - \usebibmacro{isunpublished}% - \newunit\newblock - \iftoggle{bbx:url} - {\usebibmacro{url+urldate}} - {}% - \newunit\newblock - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{finentry}} +\newbibmacro*{begrelatedloop}{} +\newbibmacro*{endrelatedloop}{} -\DeclareBibliographyAlias{standard}{manual} +\def\ifrelatedloop{% + \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}} + or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }} + +\newbibmacro*{related}{% + \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} } + {} + {\ifcsundef{begrelateddelim\strfield{relatedtype}} + {\printunit{\begrelateddelim}} + {\printunit{\csuse{begrelateddelim\strfield{relatedtype}}}}% + \usebibmacro{begrelated}% + \def\bbx@tempa{}% + \setcounter{bbx:relatedtotal}{0}% + \def\do##1{% + \entrydata{##1}{% + \ifrelatedloop + {} + {\stepcounter{bbx:relatedtotal}% + \gappto{\bbx@tempa}{##1,}}}}% + \docsvfield{related}% + \restorefield{related}{\bbx@tempa}% + \ifnumgreater{\value{bbx:relatedtotal}}{0} + {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}% + \iffieldundef{clonesourcekey} + {} + {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}% + \setcounter{bbx:relatedcount}{0}% + \def\do{% + \stepcounter{bbx:relatedcount}% + \ifnumgreater{\value{bbx:relatedcount}}{1} + {\ifcsundef{relateddelim\strfield{relatedtype}} + {\printunit{\relateddelim}} + {\expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\printunit + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter{% + \csuse{relateddelim\strfield{relatedtype}}}}} + {}}% + \ifbibmacroundef{related:\strfield{relatedtype}} + {\appto{\do}{\usebibmacro{related:default}}} + {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}% + \iffieldformatundef{related:\strfield{relatedtype}} + {\def\bbx@tempa{related}} + {\def\bbx@tempa{related:\strfield{relatedtype}}}% + \iffieldformatundef{relatedstring:\strfield{relatedtype}} + {\def\bbx@tempb{relatedstring:default}} + {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}% + \printtext[\bbx@tempa]{% + \usebibmacro{begrelatedloop}% + \iffieldundef{relatedstring} + {\ifboolexpr{ + test {\ifnumgreater{\value{bbx:relatedtotal}}{1}} + and + test {\ifbibxstring{\thefield{relatedtype}s}} + } + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}s}}} + {\iffieldbibstring{relatedtype} + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}}}} + {}}} + {\iffieldbibstring{relatedstring} + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstringtext]{\thefield{relatedstring}}}} + {\printfield[\bbx@tempb]{relatedstring}}}% + \docsvfield{related}% + \usebibmacro{endrelatedloop}}}% + {}% + \usebibmacro{endrelated}}} + +\DeclareFieldFormat{shorthandwidth}{#1} +\setlength{\bibhang}{0pt} +\setlength{\bibitemsep}{1em plus 0.2em minus 0.2em} +\renewcommand*{\bibfont}{\normalfont\normalsize} + +\defbibenvironment{bibliography} + {\list + {} + {\setlength{\leftmargin}{\bibhang}% + \setlength{\itemindent}{-\leftmargin}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}} + {\endlist} + {\item} + +\defbibenvironment{shorthand} + {\list + {\printfield[shorthandwidth]{shorthand}} + {\setlength{\labelwidth}{\shorthandwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist} + {\item} + +\InitializeBibliographyStyle{\global\undef\bbx@lasthash} \DeclareStyleSourcemap{% \maps[datatype=bibtex]{% diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.cbx index 74cad99a933..7f701556e14 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{2022/03/04 v5.0} +\def\Version{2022/05/25 v6.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{bath.cbx} [\Version\space Citation style as recommended by the University of Bath Library] @@ -32,8 +32,8 @@ \xpatchbibmacro{cite:label}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}% }{% - \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}% \toggletrue{bbx:labelistitle}% + \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}% }{}{\wlog{WARNING: biblatex-bath failed to patch cite:label}} %% diff --git a/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx b/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx index 30c5211815e..22352cfb6ba 100644 --- a/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx +++ b/Master/texmf-dist/tex/latex/biblatex-bath/bath.dbx @@ -13,11 +13,13 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2022/03/04 v5.0} +\def\Version{2022/05/25 v6.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} +\DeclareDatamodelFields[type=field,datatype=literal]{collection,shelfmark} +\DeclareDatamodelEntryfields[booklet,image,map,unpublished]{collection,shelfmark} %% %% Copyright (C) 2016-2022 by University of Bath 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 27d8fd32df2..2ed184664af 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{2022/03/04 v5.0} +\def\Version{2022/05/25 v6.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{british-bath.lbx} [\Version\space British English conventions required by the biblatex-bath style] 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 7e6f144cc8a..bab1860d0d5 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{2022/03/04 v5.0} +\def\Version{2022/05/25 v6.0} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{english-bath.lbx} [\Version\space Generic English conventions required by the biblatex-bath style] |