diff options
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx')
-rw-r--r-- | macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx | 440 |
1 files changed, 298 insertions, 142 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx b/macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx index 9bf9170ab8..f52a3160f4 100644 --- a/macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx +++ b/macros/latex/contrib/biblatex-contrib/windycity/windycity.bbx @@ -1,4 +1,4 @@ -% Last modified: Tue 10 Nov 2020 05:24:28 PM CST +% Last modified: Sat 30 Jan 2021 06:17:53 PM CST % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License (LPPL), @@ -11,7 +11,7 @@ % implied warranties of merchantability and fitness for a particular % purpose. -\ProvidesFile{windycity.bbx}[2020/11/10 Windy City bibliography style +\ProvidesFile{windycity.bbx}[2021/01/30 Windy City bibliography style for biblatex] \@ifpackagelater{biblatex}{2019/08/17} {} @@ -37,9 +37,13 @@ \AtBeginBibliography{\blx@key@bibcheck{collsonly}}} {}} -\providetoggle{firstshort} -\DeclareBiblatexOption{global}[boolean]{firstshort}[true]{% - \settoggle{firstshort}{#1}}% +\providetoggle{doi} +\DeclareBiblatexOption{entry,global}[boolean]{doi}[true]{% + \settoggle{doi}{#1}} + +\providetoggle{eprint} +\DeclareBiblatexOption{entry,global}[boolean]{eprint}[true]{% + \settoggle{eprint}{#1}} \providetoggle{ibid} \DeclareBiblatexOption{global}[boolean]{ibid}[true]{% @@ -68,6 +72,10 @@ \DeclareBiblatexOption{entry}[boolean]{noauth}[true]{% \settoggle{noauth}{#1}}% +\providetoggle{noreprint} +\DeclareBiblatexOption{entry}[boolean]{noreprint}[true]{% + \settoggle{noreprint}{#1}}% + \DeclareBiblatexOption{global}[boolean]{nolos}[true]{% \ifstrequal{#1}{true} {\AtBeginBibliography{\blx@key@bibcheck{nolos}}} @@ -95,9 +103,17 @@ \DeclareBiblatexOption{global}[boolean]{short}[true]{% \ifstrequal{#1}{true} {\toggletrue{short}% - \toggletrue{firstshort}}% + \toggletrue{shortfirst}}% {\togglefalse{short}}} +\providetoggle{shortfirst} +\DeclareBiblatexOption{global}[boolean]{shortfirst}[true]{% + \settoggle{shortfirst}{#1}}% + +\providetoggle{shortlinks} +\DeclareBiblatexOption{global}[boolean]{shortlinks}[true]{% + \settoggle{shortlinks}{#1}}% + \providetoggle{skipdate} \DeclareBiblatexOption{entry}[boolean]{skipdate}[true]{% \settoggle{skipdate}{#1}}% @@ -106,6 +122,10 @@ \DeclareBiblatexOption{entry}[boolean]{swapauth}[true]{% \settoggle{swapauth}{#1}}% +\providetoggle{newauth} +\DeclareBiblatexOption{entry}[boolean]{newauth}[true]{% + \settoggle{newauth}{#1}}% + \providetoggle{swaptrans} \DeclareBiblatexOption{entry}[boolean]{swaptrans}[true]{% \settoggle{swaptrans}{#1}}% @@ -114,6 +134,10 @@ \DeclareBiblatexOption{entry,global}[boolean]{swapvol}[true]{% \settoggle{swapvol}{#1}}% +\providetoggle{url} +\DeclareBiblatexOption{entry,global}[boolean]{url}[true]{% + \settoggle{url}{#1}} + % For setting 'minbibnames' and such, see CMOS, 17th ed., 14.76 and % 15.29. @@ -126,6 +150,8 @@ date=long, dateabbrev=false, dateusetime=true, + doi=true, + eprint=true, ibidtracker=constrict, idemtracker=false, indexing=true, @@ -148,6 +174,7 @@ timezones=true, uniquelist=minyear, uniquename=minfull, + url=true, urldate=long, useeditor=true, useprefix=false, @@ -208,9 +235,13 @@ \field{sortyear} \field{year} \field{labelyear}} + \sort{\field{month}} + \sort{\field{day}} + \sort{\field{hour}} + \sort{\field{minute}} \sort{% - \field[padside=left,padwidth=4,padchar=0]{volume} - \literal{0000}}} + \field{volume} + \literal{0}}} \DeclareSortingTemplate{nyt}{% \sort{\field{presort}} \sort[final]{\field{sortkey}} @@ -232,6 +263,10 @@ \field{origyear} \field{labelyear} \field{year}} + \sort{\field{month}} + \sort{\field{day}} + \sort{\field{hour}} + \sort{\field{minute}} \sort{% \field{sorttitle} \field{title} @@ -240,8 +275,89 @@ \field{blogtitle} \field{journaltitle}} \sort{% - \field[padside=left,padwidth=4,padchar=0]{volume} - \literal{0000}}} + \field{volume} + \literal{0}}} + +% Mapping for when 'journal', 'journaltitle', 'organization', or +% 'blogtitle' goes in the author's position. + +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite]{ + \pertype{article} + \pertype{review} + \step[notfield=author, final] + \step[notfield=editor, final] + \step[notfield=translator, final] + \step[fieldsource=journal] + \step[fieldsource=journaltitle] + \step[fieldset=author, origfieldval] + \step[fieldsource=author, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibemph{{$1}}}] + \step[fieldset=options, fieldvalue={,newauth}, append] + \step[fieldset=verba, fieldvalue=journaltitle] + \step[fieldsource=shortjournal] + \step[fieldset=shortauthor, origfieldval] + \step[fieldsource=shortauthor, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibemph{{$1}}}] + \step[fieldsource=journaltitleaddon, final] + \step[fieldset=nameaddon, origfieldval] + \step[fieldsource=nameaddon, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibbrackets{$1}}] + } + } +} +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite]{ + \pertype{online} + \step[notfield=author, final] + \step[notfield=editor, final] + \step[notfield=translator, final] + \step[fieldsource=blogtitle] + \step[fieldset=author, origfieldval] + \step[fieldsource=author, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibemph{{$1}}}] + \step[fieldset=options, fieldvalue={,newauth}, append] + \step[fieldset=verba, fieldvalue=blogtitle] + \step[fieldsource=shortblog] + \step[fieldset=shortauthor, origfieldval] + \step[fieldsource=shortauthor, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibemph{{$1}}}] + \step[fieldsource=blogtitleaddon, final] + \step[fieldset=nameaddon, origfieldval] + \step[fieldsource=nameaddon, + match=\regexp{(.+)}, + replace=\regexp{\\mkbibparens{$1}}] + } + } +} +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite=false]{ + \pertype{inreference} + \pertype{reference} + \step[notfield=author, final] + \step[fieldsource=organization] + \step[fieldset=author, origfieldval] + \step[fieldsource=author, + match=\regexp{(.+)}, + replace=\regexp{{$1}}] + \step[fieldset=options, fieldvalue={,newauth}, append] + \step[fieldset=verba, fieldvalue=organization] + \step[fieldsource=shortorganization] + \step[fieldset=shortauthor, origfieldval] + \step[fieldsource=shortauthor, + match=\regexp{(.+)}, + replace=\regexp{{$1}}] + } + } +} \defbibcheck{collsonly}{% \ifentrytype{inbook} @@ -296,8 +412,6 @@ \DeclareDataInheritance{collection}{collection,inbook}{% \inherit{year}{bookyear} \inherit{endyear}{endbookyear}} -\DeclareDataInheritance{reference}{reference}{% - \inherit{author}{bookauthor}} \DeclareDataInheritance{*}{*}{% \noinherit{crossref} \noinherit{entryset} @@ -336,7 +450,6 @@ \providetoggle{authposition} \providetoggle{bibliography} \providetoggle{ibid:loccit} -\providetoggle{journalfirst} \providetoggle{multicite} \providetoggle{cbx:collection} @@ -492,6 +605,7 @@ \usebibmacro{index:field}{#1}{\thefield{indexsorttitle}}{#2}}% \DeclareFieldFormat{blogtitleaddon}{\mkbibparens{#1}} +\DeclareFieldFormat{journaltitleaddon}{\mkbibbrackets{#1}} \DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}} \DeclareFieldFormat[article,incollection,online,reference,review] @@ -553,6 +667,7 @@ \DeclareFieldFormat{part}{\bibstring{part}\space#1} \DeclareFieldFormat{postnote}{#1} \DeclareListFormat{publisher}{#1} +\DeclareFieldFormat{pubstate}{\ifcapital{\MakeCapital{#1}}{#1}}% \DeclareFieldFormat{season}{\MakeCapital{#1}}% always capitalize % A shorthand should be italicized if the title that it abbreviates is @@ -626,10 +741,9 @@ {\usebibmacro{edtrans:authpos}% \ifnameundef{\cbx@namelist} {\toggletrue{noauth}% - \usebibmacro{authpos+deflabel}% - \usebibmacro{journalfirst}}% + \usebibmacro{authpos+deflabel}}% {\usebibmacro{addplus:authpos}% - \usebibmacro{namehash+etc}}}% + \usebibmacro{namehash+etc}}} {\usebibmacro{namehash+etc}}}} \newbibmacro*{authpos+deflabel}{% @@ -652,6 +766,7 @@ \newbibmacro*{author+namelist}{% \ifboolexpr{ test {\ifnameundef{shortauthor}} + or togl {cbx:first} or togl {bibliography}} {\renewcommand*{\cbx@namelist}{author}}% {\renewcommand*{\cbx@namelist}{shortauthor}}% @@ -664,8 +779,6 @@ {\renewcommand*{\cbx@namelist}{shortbookauthor}}% \usebibmacro{author+bookauthor+type}}% -% See notes for 'handle' and 'nameaddon'. - \newbibmacro*{author+bookauthor+type}{% \iffieldundef{\cbx@namelist type} {} @@ -680,43 +793,6 @@ {\renewcommand*{\anonb}{\space\mkbibbrackets{\bibstring{pseudo}}}} {}}}}} -% When 'journaltitle' goes in the author's position. - -\newbibmacro*{journalfirst}{% - \ifboolexpr{ ( test {\ifentrytype{article}} - or test {\ifentrytype{review}} ) - and togl {bibliography}} - {\toggletrue{journalfirst}% - \usebibmacro{bibjournaldash}% - \setunit{\space}% - \usebibmacro{journallocation}% - \clearlist{location}% - \usebibmacro{labeldate+extradate}% - \newunit}% - {\usebibmacro{blogtitlefirst}}} - -% When 'blogtitle' goes in the author's position. - -\newbibmacro*{blogtitlefirst}{% - \ifboolexpr{ test {\ifentrytype{online}} - and togl {bibliography}} - {\toggletrue{journalfirst}% - \usebibmacro{bibblogdash}% - \setunit{\space}% - \usebibmacro{labeldate+extradate}% - \newunit}% - {\usebibmacro{orgfirst}}} - -% When 'organization' goes in the author's position. - -\newbibmacro*{orgfirst}{% - \ifboolexpr{ test {\ifentrytype{reference}} - and not test {\iflistundef{organization}}} - {\printlist{organization}% - \setunit{\space}% - \newunit}% - {}} - \newbibmacro*{namehash+etc}{% \usebibmacro{printnames+etc}% \ifboolexpr{ togl {authposition}% false in 'crossref' macro @@ -1186,6 +1262,7 @@ %% Names and Dashes %% %%%%%%%%%%%%%%%%%%%%%%%% +% HERE \newbibmacro*{printnames+etc}{% \ifboolexpr{ togl {authposition} and togl {bibliography}} @@ -1193,6 +1270,7 @@ {\usebibmacro{printnames}}% \usebibmacro{handle}% \usebibmacro{nameaddon}% + \usebibmacro{newauth+journallocation}% \usebibmacro{a:labeldate+extradate}% \usebibmacro{clearnames+empty}}% @@ -1234,8 +1312,20 @@ or togl {cbx:short}} {} {\space - \printfield[brackets]{nameaddon}% - \clearfield{nameaddon}}} + \iftoggle{newauth} + {\printfield[noformat]{nameaddon}% + \clearfield{nameaddon}}% + {\printfield[brackets]{nameaddon}% + \clearfield{nameaddon}}}} + +\newbibmacro*{newauth+journallocation}{% + \iftoggle{newauth} + {\ifboolexpr{ test {\ifentrytype{article}} + and togl {bibliography}} + {\usebibmacro{journallocation}% + \newunit}% + {}} + {}} \newbibmacro*{clearnames+empty}{% \clearname{\cbx@namelist}% @@ -1245,33 +1335,6 @@ \let\pluga\empty \let\plugb\empty}% -% When a dash replaces 'journaltitle' in the author's position. - -\newbibmacro*{bibjournaldash}{% - \ifboolexpr{ test {\iffieldequals{journaltitle}{\bbx@lasthash}} - and not test \iffirstonpage} - {\bibnamedash - \clearfield{journaltitle}% - \clearlist{location}% - \newunit}% - {\savefield{journaltitle}{\bbx@lasthash}% - \renewcommand*{\xtitle}{journal}% - \usebibmacro{longtitle+titleaddon}% - \let\xtitle\empty}}% - -% When a dash replaces 'blogtitle' in the author's position. - -\newbibmacro*{bibblogdash}{% - \ifboolexpr{ test {\iffieldequals{blogtitle}{\bbx@lasthash}} - and not test \iffirstonpage} - {\bibnamedash - \clearfield{blogtitle}% - \newunit}% - {\savefield{blogtitle}{\bbx@lasthash}% - \renewcommand*{\xtitle}{blog}% - \usebibmacro{longtitle+titleaddon}% - \let\xtitle\empty}}% - %%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Titles and Subtitles %% %%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1281,10 +1344,13 @@ \newbibmacro*{longtitle+titleaddon}{% \iffieldundef{\xtitle title} {} - {\usebibmacro{longtitle}% + {\iftoggle{shortlinks} + {\togglefalse{shortlinks}% + \printtext[bibhyperref]{\usebibmacro{longtitle}}} + {\usebibmacro{longtitle}}% \usebibmacro{titleaddon}% \usebibmacro{test:titledupes}% - \clearfield{\xtitle title}}} + \clearfield{\xtitle title}}}% test \newbibmacro*{longtitle}{% \printtext[\xtitle title]{% @@ -1300,8 +1366,8 @@ {\ifboolexpr{ test {\iffieldundef{subtitle}} or test {\iffieldsequal{subtitle}{booksubtitle}}} {\clearfield{booktitle}}% - {}} - {}} + {}}% test + {}}% test \newbibmacro*{titleaddon}{% \iffieldundef{\xtitle titleaddon} @@ -1314,8 +1380,10 @@ {\usebibmacro{longtitle+titleaddon}% \usebibmacro{b:labeldate+extradate}}% {\ifboolexpr{ test \ifciteseen - or togl {firstshort}} - {\usebibmacro{shorttitle}}% + or togl {shortfirst}} + {\iftoggle{shortlinks} + {\printtext[bibhyperref]{\usebibmacro{shorttitle}}} + {\usebibmacro{shorttitle}}} {\usebibmacro{longtitle+titleaddon}}}} \newbibmacro*{shorttitle}{% @@ -1390,7 +1458,8 @@ \printtext[parens]{% \usebibmacro{origlocation}% \usebibmacro{origpublisher}% - \iftoggle{reflist} + \ifboolexpr{ togl {bibliography} + and togl {reflist}} {} {\usebibmacro{origyear+origendyear}}}}} @@ -1495,10 +1564,10 @@ \newbibmacro*{issue+month+etc}[1]{% \iffieldundef{year} - {\iffieldundef{month} - {} - {\setunit{\space}% - \printtext[parens]{\printdate}}} + {\setunit{\space}% + \iffieldundef{month} + {\usebibmacro{pubstate}{parens}}% + {\printtext[parens]{\printdate}}} {\ifboolexpr{ test {\iffieldundef{volume}} and test {\iffieldundef{number}}} {\iffieldundef{journal} @@ -1509,16 +1578,45 @@ {\usebibmacro{reflist+year+day}% \printdate}}% {\iffieldundef{month} - {\setunit{\space}% - \usebibmacro{reflist+issue+season}}% + {\usebibmacro{reflist+issue+season}}% {\ifstrequal{#1}{noparens} {\usebibmacro{reflist+year+day}% \newunit - \printdate}% + \usebibmacro{pubstate}{date}}% {\usebibmacro{reflist+year+day}% \setunit{\space}% \printtext[parens]{\printdate}}}}}} +\newbibmacro*{pubstate}[1]{% + \iftoggle{authposition} + {\iffieldequalstr{pubstate}{forthcoming} + {\printfield{pubstate}% + \clearfield{pubstate}}% + {\usebibmacro{labeldate+date}{#1}}} + {\iffieldundef{pubstate} + {\usebibmacro{labeldate+date}{#1}}% + {\iffieldequalstr{pubstate}{preprint} + {\bibstring{preprint}}% + {\iffieldequalstr{pubstate}{prepub} + {\newunit% necessary if no 'date' + \bibstring{prepub}% + \setunit{\addcomma\space}% + \printdate}% + {\iffieldequalstr{pubstate}{working} + {\bibstring{working}% + \setunit{\addcomma\space}}% + {\ifstrequal{#1}{parens} + {\printtext[parens]{\printfield{pubstate}}} + {\printfield{pubstate}}}}}% needs '%' + \clearfield{pubstate}}}} + +\newbibmacro*{labeldate+date}[1]{% + \ifstrequal{#1}{label} + {\printlabeldate}% + {\ifstrequal{#1}{date} + {\printdate}% + {}}} + \newbibmacro*{reflist+year+day}{% \ifboolexpr{ togl {bibliography} and togl {reflist} @@ -1541,8 +1639,8 @@ {} {\setunit{\space}% \iffieldundef{issue} - {\printtext[parens]{\printfield{season}}} - {\printtext[parens]{\printfield{issue}}}}} + {\printtext[parens]{\printfield{season}}} + {\printtext[parens]{\printfield{issue}}}}} {\setunit{\space}% \printtext[parens]{\usebibmacro{issue+season+year}}}} @@ -1573,7 +1671,7 @@ \usebibmacro{endbookyear}}} {\ifboolexpr{ test {\iffieldundef{year}} and test {\iffieldundef{bookyear}}} - {\bibstring{nodate}}% + {\usebibmacro{pubstate}{label}}% {\iffieldundef{bookyear} {\printfield{year}% \usebibmacro{endyear}}% @@ -1617,8 +1715,7 @@ {\usebibmacro{labeldate+extradate}}} \newbibmacro*{b:labeldate+extradate}{% - \ifboolexpr{ togl {noauth} - and not togl {journalfirst}} + \iftoggle{noauth} {\usebibmacro{labeldate+extradate}}% {}} @@ -1654,10 +1751,10 @@ \newbibmacro*{labeldate+endyear}{% \iffieldequalstr{labeldatesource}{bookyear} {\iffieldundef{year} - {\printlabeldate}% - {\printfield{year}% + {\usebibmacro{pubstate}{label}}% + {\usebibmacro{pubstate}{date}% \usebibmacro{endyear}}} - {\printlabeldate}}% + {\usebibmacro{pubstate}{label}}} %%%%%%%%%%%%%%%%% %% Locations %% @@ -1709,6 +1806,7 @@ \DeclareBibliographyDriver{article}{% \usebibmacro{bibindex}% + \usebibmacro{newauth}% \usebibmacro{author+title+etc}% \usebibmacro{articles}% \usebibmacro{colon+pages+etc}% @@ -1735,6 +1833,7 @@ \DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% + \usebibmacro{newauth}% \usebibmacro{author+title+etc}% \newunit \usebibmacro{websites}% @@ -1752,6 +1851,7 @@ \DeclareBibliographyDriver{review}{% \usebibmacro{bibindex}% + \usebibmacro{newauth}% \usebibmacro{reviews}% \usebibmacro{articles}% \usebibmacro{colon+pages+etc}% @@ -1775,6 +1875,13 @@ \usebibmacro{annotation}% \finentry}% +\newbibmacro*{newauth}{% + \iftoggle{newauth} + {\iftoggle{bibliography} + {\clearfield{\thefield{verba}}} + {\toggletrue{noauth}}} + {}} + \newbibmacro*{author+title+etc}{% \usebibmacro{author+bookauthor+etc}% \usebibmacro{title+labelyear}% @@ -1787,18 +1894,19 @@ \usebibmacro{issuetitle}% \renewcommand*{\xtitle}{journal}% \usebibmacro{longtitle+titleaddon}% - \usebibmacro{journalseries}% - \setunit{\space}% \usebibmacro{journallocation}% - \printfield[noformat]{volume}% - \iftoggle{journalfirst} + \usebibmacro{journalseries}% + \usebibmacro{volume}% + \iftoggle{newauth} {\newunit}% {\setunit{\addcomma\space}}% \iffieldequalstr{type}{newsmag} {\usebibmacro{issue+month+etc}{noparens}% \usebibmacro{periodical:number}}% {\usebibmacro{periodical:number}% - \usebibmacro{issue+month+etc}{}}% + \iffieldequalstr{pubstate}{prepub} + {\usebibmacro{issue+month+etc}{noparens}}% + {\usebibmacro{issue+month+etc}{}}}% needs '%' \toggletrue{edshift}% \usebibmacro{edition}{noformat}}% @@ -1809,7 +1917,8 @@ \ifboolexpr{ test {\iffieldundef{pages}} or not test {\iffieldundef{eid}}} {} - {\iftoggle{reflist} + {\ifboolexpr{ togl {bibliography} + and togl {reflist}} {\ifboolexpr{test {\iffieldundef{number}} and test {\iffieldundef{month}} and test {\iffieldundef{issue}} @@ -1917,21 +2026,27 @@ \usebibmacro{note}% \usebibmacro{review+title}% \setunit{\addcomma\space}% - \iftoggle{firstshort} + \iftoggle{shortfirst} {} {\toggletrue{edshift}% \usebibmacro{edtrans}}} \newbibmacro*{inst+loc+date}{% \usebibmacro{thesis+type}% - \setunit{\addcomma\space}% - \iflistundef{institution} - {\printfield{venue}}% - {\printlist{institution}}% - \setunit{\addcomma\space}% - \printlist{location}% - \setunit{\addcomma\space}% - \usebibmacro{reflist+year+day}% + \ifboolexpr{ test {\iflistundef{institution}} + and test {\iflistundef{venue}}} + {} + {\iflistundef{institution} + {\printfield{venue}}% + {\printlist{institution}}% + \setunit{\addcomma\space}}% + \iflistundef{location} + {} + {\printlist{location}% + \setunit{\addcomma\space}}% + \iffieldundef{month} + {\usebibmacro{reflist+year+day}}% + {} \printdate}% %%%%%%%%%%%%%%%%%%%%%%%%% @@ -1962,24 +2077,35 @@ \setunit{\addcomma\space}% \clearfield{part}}} +\newbibmacro*{journallocation}{% + \iflistundef{location} + {} + {\nopunct\setunit{\space}% + \printtext[parens]{% + \printlist{location}}}% + \clearlist{location}}% + \newbibmacro*{journalseries}{% \iffieldundef{series} {} - {\iflistundef{location} - {\setunit{\addcomma\space}% + {\iftoggle{newauth} + {\newunit \printfield{series}}% - {\setunit{\space}% + {\setunit{\addcomma\space}% \printfield{series}}% \isdot\addcomma \usebibmacro{seriesaddon}% \usebibmacro{editortypes}{series}% \newunit}}% -\newbibmacro*{journallocation}{% - \iflistundef{location} +\newbibmacro*{volume}{% + \iffieldundef{volume} {} - {\nopunct\printtext[parens]{% - \printlist{location}}\space}}% + {\ifboolexpr{ togl {bibliography} + and togl {newauth}} + {\printfield[noformat]{volume}}% + {\setunit{\space}% + \printfield[noformat]{volume}}}} % On how to format the issue number of periodicals, see CMOS, 17th % ed., 14.171 and 15.47. @@ -2019,20 +2145,21 @@ \ifboolexpr{ test {\iffieldundef{howpublished}} and test {\iffieldundef{url}} and test {\iffieldundef{doi}} + and test {\iffieldundef{eprint}} and test {\iffieldundef{addendum}} - or ( togl {firstshort} and not togl {bibliography} )} + or ( togl {shortfirst} and not togl {bibliography} )} {} {\usebibmacro{eid}% \newunit \printfield{howpublished}% \newunit - \printurldate - \newunit \printfield[noformat]{version}% \newunit - \printfield{url}% + \usebibmacro{urldate+url}% + \newunit + \usebibmacro{doi}% \newunit - \printfield{doi}% + \usebibmacro{eprint+etc}% \newunit \printfield{addendum}}} @@ -2202,7 +2329,8 @@ \renewcommand*{\cbx@deflabel}{labelname}% \global\toggletrue{cbx:short}% \entrydata{\thefield{crossref}}{% - \iftoggle{reflist} + \ifboolexpr{ togl {bibliography} + and togl {reflist}} {\usebibmacro{parencite:new}}% {\usebibmacro{author+bookauthor+etc}% \usebibmacro{shorttitle+crossref}}% @@ -2219,13 +2347,13 @@ {}}} \newbibmacro*{review+title}{% - \iftoggle{noauth} + \iftoggle{newauth} {\bibcpstring{reviewnoauth}}% {\bibstring{review}}% \space \renewcommand*{\xtitle}{book}% \usebibmacro{title+labelyear}% - \iftoggle{firstshort} + \iftoggle{shortfirst} {\clearfield{booktitle}}% {\setunit{\addcomma\space}% \ifdefempty{\reviewee} @@ -2237,14 +2365,17 @@ \newbibmacro*{thesis+type}{% \ifentrytype{mathesis} - {\bibstring{mathesis}}% + {\bibstring{mathesis}% + \setunit{\addcomma\space}}% {\ifentrytype{phdthesis} - {\bibstring{phdthesis}}% + {\bibstring{phdthesis}% + \setunit{\addcomma\space}}% {\iffieldundef{type} - {} + {\usebibmacro{pubstate}{}}% {\iffieldbibstring{type} {\bibstring{\thefield{type}}} - {\printfield{type}}}}}} + {\printfield{type}}% + \setunit{\addcomma\space}}}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Fourth and Higher Tier Macros %% @@ -2258,6 +2389,29 @@ {\newunit}% \printfield{eid}}} +\newbibmacro*{urldate+url}{% + \iffieldundef{url} + {} + {\iftoggle{url} + {\printurldate + \newunit + \printfield{url}}% + {}}} + +\newbibmacro*{doi}{% + \iffieldundef{doi} + {} + {\iftoggle{doi} + {\printfield{doi}}% + {}}} + +\newbibmacro*{eprint+etc}{% + \iffieldundef{eprint} + {} + {\iftoggle{eprint} + {\usebibmacro{eprint}}% + {}}} + \newbibmacro*{volumes}{% \iffieldundef{volumes} {} @@ -2326,7 +2480,8 @@ \newbibmacro*{orig+etc}{% \usebibmacro{origlocation}% \usebibmacro{origpublisher}% - \iftoggle{reflist} + \ifboolexpr{ togl {bibliography} + and togl {reflist}} {} {\usebibmacro{origyear+origendyear}}% \usebibmacro{reprint}% @@ -2340,7 +2495,8 @@ \newbibmacro*{reprint}{% \ifboolexpr{ test {\iffieldundef{origyear}} - and test {\iflistundef{origpublisher}}} + and test {\iflistundef{origpublisher}} + or togl {noreprint}} {} {\iftoggle{bibliography} {\newunit}% |