diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/windycity/windycity.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/windycity/windycity.bbx | 562 |
1 files changed, 305 insertions, 257 deletions
diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.bbx b/Master/texmf-dist/tex/latex/windycity/windycity.bbx index 6e8e2c35ebe..0476af4784a 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.bbx +++ b/Master/texmf-dist/tex/latex/windycity/windycity.bbx @@ -1,7 +1,5 @@ -% Last modified: Wed 17 Jul 2019 09:44:45 AM CDT +% Last modified: Mon 07 Sep 2020 06:40:45 PM CDT -% Copyright (c) 2019 Brian Michael Chase. -% % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License (LPPL), % version 1.3. @@ -13,13 +11,13 @@ % implied warranties of merchantability and fitness for a particular % purpose. -\ProvidesFile{windycity.bbx}[2019/07/17 Windy City bibliography style +\ProvidesFile{windycity.bbx}[2020/09/07 Windy City bibliography style for biblatex] -\@ifpackagelater{biblatex}{2017/11/04} +\@ifpackagelater{biblatex}{2019/08/17} {} {\PackageError{biblatex} {Outdated 'biblatex' package} - {Windy City is for biblatex v3.8 and above.\MessageBreak + {Windy City is for biblatex v3.13 and above.\MessageBreak You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak This is a fatal error. I'm aborting now.}% \endinput}% @@ -29,24 +27,24 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \providetoggle{anonauth} -\DeclareEntryOption{anonauth}[true]{% +\DeclareBiblatexOption{entry}[boolean]{anonauth}[true]{% \ifstrequal{#1}{true} {\renewcommand*{\anona}{\bibopenbracket}% \renewcommand*{\anonb}{\bibclosebracket}}% {}} \providetoggle{anonqauth} -\DeclareEntryOption{anonqauth}[true]{% +\DeclareBiblatexOption{entry}[boolean]{anonqauth}[true]{% \ifstrequal{#1}{true} {\renewcommand*{\anona}{\bibopenbracket}% \renewcommand*{\anonb}{\addquestion\bibclosebracket}}% {}} \providetoggle{annotate} -\DeclareBibliographyOption[boolean]{annotate}[true]{% - \global\settoggle{annotate}{#1}}% +\DeclareBiblatexOption{global}[boolean]{annotate}[true]{% + \settoggle{annotate}{#1}}% -\DeclareBibliographyOption{collsonly}[true]{% +\DeclareBiblatexOption{global}[boolean]{collsonly}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{mincrossrefs=1}% \ExecuteBibliographyOptions{minxrefs=1}% @@ -54,45 +52,41 @@ {}} \providetoggle{firstshort} -\DeclareBibliographyOption[boolean]{firstshort}[true]{% - \global\settoggle{firstshort}{#1}}% +\DeclareBiblatexOption{global}[boolean]{firstshort}[true]{% + \settoggle{firstshort}{#1}}% \providetoggle{ibid} -\DeclareBibliographyOption{ibid}[true]{% +\DeclareBiblatexOption{global}[boolean]{ibid}[true]{% \ifstrequal{#1}{true} - {\global\toggletrue{ibid}% - \global\toggletrue{short}}% - {\global\togglefalse{ibid}}} + {\toggletrue{ibid}% + \toggletrue{short}}% + {\togglefalse{ibid}}} \providetoggle{isbn} -\DeclareBibliographyOption[boolean]{isbn}[true]{% - \global\settoggle{isbn}{#1}}% -\DeclareEntryOption[boolean]{isbn}[true]{% +\DeclareBiblatexOption{entry,global}[boolean]{isbn}[true]{% \settoggle{isbn}{#1}}% \providetoggle{library} -\DeclareBibliographyOption[boolean]{library}[true]{% - \global\settoggle{library}{#1}}% -\DeclareEntryOption[boolean]{library}[true]{% +\DeclareBiblatexOption{entry,global}[boolean]{library}[true]{% \settoggle{library}{#1}}% \providetoggle{listvols} -\DeclareEntryOption[boolean]{listvols}[true]{% +\DeclareBiblatexOption{entry}[boolean]{listvols}[true]{% \settoggle{listvols}{#1}}% \providetoggle{noauth} -\DeclareEntryOption[boolean]{noauth}[true]{% +\DeclareBiblatexOption{entry}[boolean]{noauth}[true]{% \settoggle{noauth}{#1}}% -\DeclareBibliographyOption{nolos}[true]{% +\DeclareBiblatexOption{global}[boolean]{nolos}[true]{% \ifstrequal{#1}{true} {\AtBeginBibliography{\blx@key@bibcheck{nolos}}} {}} \providetoggle{reflist} -\DeclareBibliographyOption{reflist}[true]{% +\DeclareBiblatexOption{global}[boolean]{reflist}[true]{% \ifstrequal{#1}{true} - {\global\toggletrue{reflist}% + {\toggletrue{reflist}% \DeclareLabeldate{% \field{date} \field{year} @@ -101,31 +95,29 @@ \literal{nodate}} \ExecuteBibliographyOptions{% sorting=nyt}}% - {\global\togglefalse{reflist}}} + {\togglefalse{reflist}}} \providetoggle{short} -\DeclareBibliographyOption{short}[true]{% +\DeclareBiblatexOption{global}[boolean]{short}[true]{% \ifstrequal{#1}{true} - {\global\toggletrue{short}% - \global\toggletrue{firstshort}}% - {\global\togglefalse{short}}} + {\toggletrue{short}% + \toggletrue{firstshort}}% + {\togglefalse{short}}} \providetoggle{skipdate} -\DeclareEntryOption[boolean]{skipdate}[true]{% +\DeclareBiblatexOption{entry}[boolean]{skipdate}[true]{% \settoggle{skipdate}{#1}}% \providetoggle{swapauth} -\DeclareEntryOption[boolean]{swapauth}[true]{% +\DeclareBiblatexOption{entry}[boolean]{swapauth}[true]{% \settoggle{swapauth}{#1}}% \providetoggle{swaptrans} -\DeclareEntryOption[boolean]{swaptrans}[true]{% +\DeclareBiblatexOption{entry}[boolean]{swaptrans}[true]{% \settoggle{swaptrans}{#1}}% \providetoggle{swapvol} -\DeclareBibliographyOption[boolean]{swapvol}[true]{% - \global\settoggle{swapvol}{#1}}% -\DeclareEntryOption[boolean]{swapvol}[true]{% +\DeclareBiblatexOption{entry,global}[boolean]{swapvol}[true]{% \settoggle{swapvol}{#1}}% % For setting 'minbibnames' and such, see CMOS, 17th ed., 14.76 and @@ -136,7 +128,7 @@ autocite=footnote, autopunct=true, block=none, - citetracker=constrict, + citetracker=context, date=long, dateabbrev=false, dateusetime=true, @@ -259,8 +251,7 @@ \literal{0000}}} \defbibcheck{collsonly}{% - \ifboolexpr{ test {\ifentrytype{bookinbook}} - or test {\ifentrytype{inbook}}} + \ifentrytype{inbook} {\iffieldundef{crossref} {} {\skipentry}}% @@ -277,18 +268,18 @@ \defbibcheck{reference}{% \ifentrytype{reference} {\skipentry}% - {\ifentrytype{inreference} - {\skipentry}% - {}}} + {}} %%%%%%%%%%%%%%%%%%%%%%%% %% Data Inheritance %% %%%%%%%%%%%%%%%%%%%%%%%% +% As of biblatex 3.14 or biber 2.14 (or thereabouts), '\inherit' no +% longer works for 'options'. + \ResetDataInheritance \DefaultInheritance[\except{*}{review}{all=false}]{all=true,override=false} -\DeclareDataInheritance{*}{% - incollection,inbook,bookinbook,inproceedings,letter,suppbook,review}{% +\DeclareDataInheritance{*}{incollection,inbook,letter,review}{% \inherit{author}{bookauthor} \inherit{shortauthor}{shortbookauthor} \inherit{editor}{editora} @@ -308,9 +299,25 @@ \inherit{volume}{bookvolume} \inherit{bookvolume}{bookbookvolume} \inherit{options}{options}} -\DeclareDataInheritance{collection}{bookinbook,collection,inbook}{% +\DeclareDataInheritance{collection}{collection,inbook}{% \inherit{year}{bookyear} \inherit{endyear}{endbookyear}} +\DeclareDataInheritance{*}{*}{% + \noinherit{crossref} + \noinherit{entryset} + \noinherit{entrysubtype} + \noinherit{execute} + \noinherit{ids} + \noinherit{label} + \noinherit{presort} + \noinherit{related} + \noinherit{relatedoptions} + \noinherit{relatedstring} + \noinherit{relatedtype} + \noinherit{shorthand} + \noinherit{shorthandintro} + \noinherit{sortkey} + \noinherit{xref}} %%%%%%%%%%%%%%%%%%% %% Preliminary %% @@ -400,6 +407,7 @@ \DeclareNameAlias{editorc}{sortname} \DeclareNameAlias{foreword}{sortname} \DeclareNameAlias{introduction}{sortname} +\DeclareNameAlias{preface}{sortname} \DeclareNameAlias{translator}{sortname} \DeclareIndexNameAlias{author}{default} @@ -411,6 +419,7 @@ \DeclareIndexNameAlias{editorc}{default} \DeclareIndexNameAlias{foreword}{default} \DeclareIndexNameAlias{introduction}{default} +\DeclareIndexNameAlias{preface}{default} \DeclareIndexNameAlias{translator}{default} % Affixes like 'Jr.', should appear last, delimited with a comma, when @@ -485,14 +494,11 @@ \DeclareFieldFormat{blogtitleaddon}{\mkbibparens{#1}} \DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}} -\DeclareFieldFormat[% - article,incollection,inreference,inproceedings,online,reference,review] +\DeclareFieldFormat[article,incollection,online,reference,review] {title}{\mkbibquote{#1}} -\DeclareFieldFormat[% - article,incollection,inreference,inproceedings,online,reference,review] +\DeclareFieldFormat[article,incollection,online,reference,review] {labeltitle}{\mkbibquote{#1}} -\DeclareIndexFieldFormat[% - article,incollection,inreference,inproceedings,online,reference,review] +\DeclareIndexFieldFormat[article,incollection,online,reference,review] {indextitle}{\usebibmacro{index:title}{\index}{\mkbibquote{#1}}} \DeclareFieldAlias[inbook]{title}{title} @@ -565,53 +571,43 @@ %% Bibliography Aliases %% %%%%%%%%%%%%%%%%%%%%%%%%%%%% -\DeclareBibliographyAlias{periodical}{article} -\DeclareBibliographyAlias{cite:periodical}{cite:article} +\DeclareDriverSourcemap[datatype=bibtex]{ + \map{ + \step[typesource=periodical, typetarget=article] + \step[typesource=booklet, typetarget=book] + \step[typesource=manual, typetarget=book] + \step[typesource=mvbook, typetarget=book] + \step[typesource=mvcollection, typetarget=book] + \step[typesource=proceedings, typetarget=book] + \step[typesource=report, typetarget=book] + \step[typesource=techreport, typetarget=book] + \step[typesource=bookinbook, typetarget=inbook] + \step[typesource=conference, typetarget=incollection] + \step[typesource=inproceedings, typetarget=incollection] + \step[typesource=suppbook, typetarget=incollection] + \step[typesource=suppcollection, typetarget=incollection] + \step[typesource=electronic, typetarget=online] + \step[typesource=www, typetarget=online] + \step[typesource=inreference, typetarget=reference] + \step[typesource=mathesis, typetarget=thesis] + \step[typesource=phdthesis, typetarget=thesis]} + \map{ + \step[fieldsource=school, fieldtarget=institution] + \step[fieldsource=address, fieldtarget=location] + \step[fieldsource=journal, fieldtarget=journaltitle]}} -\DeclareBibliographyAlias{booklet}{book} \DeclareBibliographyAlias{collection}{book} -\DeclareBibliographyAlias{manual}{book} -\DeclareBibliographyAlias{mvbook}{book} -\DeclareBibliographyAlias{mvcollection}{book} -\DeclareBibliographyAlias{proceedings}{book} -\DeclareBibliographyAlias{report}{book} -\DeclareBibliographyAlias{techreport}{book} -\DeclareBibliographyAlias{cite:booklet}{cite:book} \DeclareBibliographyAlias{cite:collection}{cite:book} -\DeclareBibliographyAlias{cite:manual}{cite:book} -\DeclareBibliographyAlias{cite:mvbook}{cite:book} -\DeclareBibliographyAlias{cite:mvcollection}{cite:book} -\DeclareBibliographyAlias{cite:proceedings}{cite:book} -\DeclareBibliographyAlias{cite:report}{cite:book} -\DeclareBibliographyAlias{cite:techreport}{cite:book} - -\DeclareBibliographyAlias{bookinbook}{incollection} -\DeclareBibliographyAlias{conference}{incollection} + \DeclareBibliographyAlias{inbook}{incollection} -\DeclareBibliographyAlias{inproceedings}{incollection} \DeclareBibliographyAlias{letter}{incollection} -\DeclareBibliographyAlias{suppbook}{incollection} -\DeclareBibliographyAlias{suppcollection}{incollection} -\DeclareBibliographyAlias{cite:bookinbook}{cite:incollection} -\DeclareBibliographyAlias{cite:conference}{cite:incollection} \DeclareBibliographyAlias{cite:inbook}{cite:incollection} -\DeclareBibliographyAlias{cite:inproceedings}{cite:incollection} \DeclareBibliographyAlias{cite:letter}{cite:incollection} -\DeclareBibliographyAlias{cite:suppbook}{cite:incollection} -\DeclareBibliographyAlias{cite:suppcollection}{cite:incollection} -\DeclareBibliographyAlias{mathesis}{thesis} -\DeclareBibliographyAlias{phdthesis}{thesis} \DeclareBibliographyAlias{unpublished}{thesis} -\DeclareBibliographyAlias{cite:mathesis}{cite:thesis} -\DeclareBibliographyAlias{cite:phdthesis}{cite:thesis} \DeclareBibliographyAlias{cite:unpublished}{cite:thesis} -\DeclareBibliographyAlias{inreference}{reference} -\DeclareBibliographyAlias{cite:inreference}{cite:reference} - \DeclareBibliographyAlias{*}{book} -\DeclareBibliographyAlias{cite:*}{cite:book} %%%%%%%%%%%%%%%%%%%%%%%% %% Author's Position %% @@ -627,11 +623,11 @@ {\usebibmacro{authpos+deflabel}}% {\usebibmacro{author+bookauthor}% \ifnameundef{\cbx@namelist} - {\usebibmacro{edtrans:authpos}% + {\usebibmacro{edtransuthpos}% \ifnameundef{\cbx@namelist} {\toggletrue{noauth}% \usebibmacro{journalfirst}}% - {\usebibmacro{edscomps:authpos}% + {\usebibmacro{addplus:authpos}% \usebibmacro{namehash+etc}}}% {\usebibmacro{namehash+etc}}}} @@ -642,12 +638,9 @@ \newbibmacro*{author+bookauthor}{% \ifboolexpr{ togl {swapauth} and ( test {\ifentrytype{book}} - or test {\ifentrytype{bookinbook}} or test {\ifentrytype{collection}} or test {\ifentrytype{inbook}} - or test {\ifentrytype{incollection}} - or test {\ifentrytype{mvbook}} - or test {\ifentrytype{mvcollection}} )} + or test {\ifentrytype{incollection}} )} {} {\ifboolexpr{ togl {collection:ib} and togl {swapvol}} @@ -699,20 +692,21 @@ \newunit}% {\setunit{\addcomma\space}}} -\newbibmacro*{aft+fore+intro}{% +\newbibmacro*{supplement}{% \ifnameundef{afterword} {\ifnameundef{foreword} - {\renewcommand*{\cbx@namelist}{introduction}% - \renewcommand*{\cbx@bibstring}{introduction}}% + {\ifnameundef{introduction} + {\renewcommand*{\cbx@namelist}{preface}% + \renewcommand*{\cbx@bibstring}{preface}}% + {\renewcommand*{\cbx@namelist}{introduction}% + \renewcommand*{\cbx@bibstring}{introduction}}} {\renewcommand*{\cbx@namelist}{foreword}% \renewcommand*{\cbx@bibstring}{foreword}}} {\renewcommand*{\cbx@namelist}{afterword}% \renewcommand*{\cbx@bibstring}{afterword}}% \usebibmacro{printnames+etc}% \savefield{namehash}{\bbx@lasthash}% - \usebibmacro{authpos+deflabel}% - \newunit - \bibstring{\cbx@bibstring}\space}% + \usebibmacro{authpos+deflabel}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Editors and Translators %% @@ -720,7 +714,7 @@ % For editors and translators in the author's position. -\newbibmacro*{edtrans:authpos}{% +\newbibmacro*{edtransuthpos}{% \togglefalse{noed}% \togglefalse{notrans}% \usebibmacro{test:ed:authpos}% @@ -827,48 +821,83 @@ \renewcommand*{\cbx@namelist}{\yeditor}% \ifnamesequal{\xeditor}{\yeditor} {\clearname{\xeditor}% - \iffieldequalstr{\xeditor type}{compiler} + \ifboolexpr{ test {\iffieldequalstr{\xeditor type}{compiler}} + or test {\iffieldequalstr{\xeditor type}{comped}} + or test {\iffieldequalstr{\xeditor type}{comprev}} + or test {\iffieldequalstr{\xeditor type}{comptrans}} + or test {\iffieldequalstr{\xeditor type}{transcomp}}} {\renewcommand*{\cbx@bibstring}{transcomp}}% - {\renewcommand*{\cbx@bibstring}{transed}}} + {\ifboolexpr{ test {\iffieldequalstr{\xeditor type}{reviser}} + or test {\iffieldequalstr{\xeditor type}{revcomp}} + or test {\iffieldequalstr{\xeditor type}{reved}} + or test {\iffieldequalstr{\xeditor type}{revtrans}} + or test {\iffieldequalstr{\xeditor type}{transrev}}} + {\renewcommand*{\cbx@bibstring}{transrev}}% + {\renewcommand*{\cbx@bibstring}{transed}}}} {\renewcommand*{\cbx@bibstring}{translator}}} \newbibmacro*{edcombos}{% \renewcommand*{\cbx@namelist}{\xeditor}% \ifnamesequal{\xeditor}{\yeditor} {\clearname{\yeditor}% - \iffieldequalstr{\xeditor type}{compiler} + \ifboolexpr{ test {\iffieldequalstr{\xeditor type}{compiler}} + or test {\iffieldequalstr{\xeditor type}{comped}} + or test {\iffieldequalstr{\xeditor type}{comprev}} + or test {\iffieldequalstr{\xeditor type}{comptrans}} + or test {\iffieldequalstr{\xeditor type}{transcomp}}} {\renewcommand*{\cbx@bibstring}{comptrans}}% - {\renewcommand*{\cbx@bibstring}{edtrans}}}% + {\ifboolexpr{ test {\iffieldequalstr{\xeditor type}{reviser}} + or test {\iffieldequalstr{\xeditor type}{revcomp}} + or test {\iffieldequalstr{\xeditor type}{reved}} + or test {\iffieldequalstr{\xeditor type}{revtrans}} + or test {\iffieldequalstr{\xeditor type}{transrev}}} + {\renewcommand*{\cbx@bibstring}{revtrans}}% + {\renewcommand*{\cbx@bibstring}{edtrans}}}} {\iffieldequalstr{\xeditor type}{compiler} {\renewcommand*{\cbx@bibstring}{compiler}}% - {\renewcommand*{\cbx@bibstring}{editor}}}} - -\newbibmacro*{edscomps:authpos}{% + {\iffieldequalstr{\xeditor type}{reviser} + {\renewcommand*{\cbx@bibstring}{reviser}}% + {\iffieldequalstr{\xeditor type}{comped} + {\renewcommand*{\cbx@bibstring}{comped}}% + {\iffieldequalstr{\xeditor type}{comprev} + {\renewcommand*{\cbx@bibstring}{comprev}}% + {\iffieldequalstr{\xeditor type}{edcomp} + {\renewcommand*{\cbx@bibstring}{edcomp}}% + {\iffieldequalstr{\xeditor type}{edrev} + {\renewcommand*{\cbx@bibstring}{edrev}}% + {\iffieldequalstr{\xeditor type}{revcomp} + {\renewcommand*{\cbx@bibstring}{revcomp}}% + {\iffieldequalstr{\xeditor type}{reved} + {\renewcommand*{\cbx@bibstring}{reved}}% + {\renewcommand*{\cbx@bibstring}{editor}}}}}}}}}}} + +\newbibmacro*{addplus:authpos}{% \iftoggle{cbx@short} {} - {\usebibmacro{edscomps}% + {\usebibmacro{addplus}% \renewcommand*{\plugb}{% \addcomma\space\bibsstring{\cbx@bibstring}}}} -\newbibmacro*{edscomps}{% - \iftoggle{swaptrans} - {} - {\ifnameundef{editor} - {\ifnumgreater{\value{editora}}{1} - {\edef\cbx@bibstring{\cbx@bibstring +}}% - {}} - {\ifnumgreater{\value{editor}}{1} +\newbibmacro*{addplus}{% + \ifnameundef{\xeditor} + {\ifnameundef{\yeditor} + {} + {\ifnumgreater{\value{\yeditor}}{1} {\edef\cbx@bibstring{\cbx@bibstring +}}% - {}}}} + {}}} + {\ifnumgreater{\value{\xeditor}}{1} + {\edef\cbx@bibstring{\cbx@bibstring +}}% + {}}} % For editors and translators not in the author's position. -\newbibmacro*{edtrans:a}{% +\newbibmacro*{edtrans}{% \iftoggle{swaptrans} {\usebibmacro{transcombos+etc}% \usebibmacro{edcombos+etc}}% {\usebibmacro{edcombos+etc}% - \usebibmacro{transcombos+etc}}} + \usebibmacro{transcombos+etc}}% + \usebibmacro{editoraddon}}% \newbibmacro*{transcombos+etc}{% \togglefalse{noed}% @@ -890,21 +919,17 @@ {\usebibmacro{edcombos}% \usebibmacro{pluga+etc}}} -\newbibmacro*{edtrans:b}{% - \toggletrue{edshift}% - \usebibmacro{edtrans:a}% - \usebibmacro{editoraddon}}% - \newbibmacro*{pluga+etc}{% \usebibmacro{edtranspunct:a}% \usebibmacro{pluga+printnames}% \usebibmacro{edtranspunct:b}}% \newbibmacro*{edtranspunct:a}{% - \ifboolexpr{ togl {authposition} - or togl {edshift}} + \iftoggle{authposition} {} - {\newunit}}% + {\iftoggle{edshift} + {\setunit{\addcomma\space}}% + {\newunit}}} \newbibmacro*{pluga+printnames}{% \renewcommand*{\pluga}{% @@ -916,7 +941,7 @@ {\setunit{\addcomma\space}}% {\newunit}}% -% Tests for 'edtrans:a' and 'edtrans:b' macros. +% Tests for 'edtrans' macro. \newbibmacro*{test:ed}{% \iftoggle{edshift} @@ -988,6 +1013,20 @@ {\toggletrue{noed}}% {\ifdefempty{\xtitle} {\ifboolexpr{ test {\iffieldequalstr{\xeditor type}{compiler}} + or test {\iffieldequalstr{\xeditor type}{comped}} + or test {\iffieldequalstr{\xeditor type}{comprev}} + or test {\iffieldequalstr{\xeditor type}{comptrans}} + or test {\iffieldequalstr{\xeditor type}{editor}} + or test {\iffieldequalstr{\xeditor type}{edcomp}} + or test {\iffieldequalstr{\xeditor type}{edrev}} + or test {\iffieldequalstr{\xeditor type}{edtrans}} + or test {\iffieldequalstr{\xeditor type}{reviser}} + or test {\iffieldequalstr{\xeditor type}{revcomp}} + or test {\iffieldequalstr{\xeditor type}{reved}} + or test {\iffieldequalstr{\xeditor type}{revtrans}} + or test {\iffieldequalstr{\xeditor type}{transcomp}} + or test {\iffieldequalstr{\xeditor type}{transed}} + or test {\iffieldequalstr{\xeditor type}{transrev}} or test {\iffieldequalstr{\xeditor type}{title}} or test {\iffieldundef{\xeditor type}}} {} @@ -1033,7 +1072,7 @@ \ifboolexpr{ togl {collection:bk} and togl {swapvol}} {\newunit}% - {\setunit{\unspace,\addspace}}} + {\setunit{\addcomma\space}}} \newbibmacro*{editorlists}[1]{% \iffieldequalstr{editortype}{#1} @@ -1065,9 +1104,9 @@ {\nopunct\printfield{editoraddon}% \clearfield{editoraddon}}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Printing Names and Dashes %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%% +%% Names and Dashes %% +%%%%%%%%%%%%%%%%%%%%%%%% \newbibmacro*{printnames+etc}{% \ifboolexpr{ togl {authposition} @@ -1170,7 +1209,8 @@ \iffieldundef{\xtitle subtitle} {} {\subtitlepunct - \printfield[noformat]{\xtitle subtitle}}}} + \printfield[noformat]{\xtitle subtitle}}% + \isdot}}% \newbibmacro*{test:titledupes}{% \iffieldsequal{title}{booktitle} @@ -1199,60 +1239,49 @@ \ifboolexpr{ togl {collection:bk} and togl {swapvol}} {\iffieldundef{shortmaintitle} - {\printfield[title]{maintitle}}% - {\printfield[title]{shortmaintitle}}} + {\printfield[title]{maintitle}\isdot}% + {\printfield[title]{shortmaintitle}\isdot}}% {\ifboolexpr{ togl {collection:ib} and togl {swapvol}} {\iffieldundef{shortbooktitle} - {\printfield[title]{booktitle}}% - {\printfield[title]{shortbooktitle}}} - {\printfield[\thefield{entrytype}]{labeltitle}}}} + {\printfield[title]{booktitle}\isdot}% + {\printfield[title]{shortbooktitle}\isdot}}% + {\printfield[\thefield{entrytype}]{labeltitle}\isdot}}} \newbibmacro*{shorttitle+crossref}{% \ifboolexpr{ togl {collection:icbk} and togl {swapvol}} {\iffieldundef{shortmaintitle} - {\printfield[title]{maintitle}}% - {\printfield[title]{shortmaintitle}}} + {\printfield[title]{maintitle}\isdot}% + {\printfield[title]{shortmaintitle}\isdot}}% {\ifboolexpr{ togl {collection:icib} and togl {swapvol}} {\iffieldundef{shortbooktitle} - {\printfield[title]{booktitle}}% - {\printfield[title]{shortbooktitle}}} - {\printfield[\thefield{entrytype}]{labeltitle}}}} + {\printfield[title]{booktitle}\isdot}% + {\printfield[title]{shortbooktitle}\isdot}}% + {\printfield[\thefield{entrytype}]{labeltitle}\isdot}}} -\newbibmacro*{booktitle+editor}[1]{% +\newbibmacro*{booktitle}{% \iffieldundef{booktitle} {} {\renewcommand*{\xtitle}{book}% \usebibmacro{longtitle+titleaddon}% - \setunit{\unspace,\addspace}% - \usebibmacro{bybookauthor+pages}% - \ifstrequal{#1}{a} - {\usebibmacro{edtrans:a}}% - {\usebibmacro{edtrans:b}}}} + \usebibmacro{bybookauthor+pages}}} -\newbibmacro*{bookbooktitle+editor}[1]{% +\newbibmacro*{bookbooktitle}[1]{% \iffieldundef{bookbooktitle} {} {\ifstrequal{#1}{in} {\newunit\bibstring{in}\space}% {}% needs '%' \renewcommand*{\xtitle}{bookbook}% - \usebibmacro{longtitle+titleaddon}% - \setunit{\unspace,\addspace}% - \usebibmacro{edtrans:b}}} + \usebibmacro{longtitle+titleaddon}}} -\newbibmacro*{maintitle+editor}{% +\newbibmacro*{maintitle}{% \iffieldundef{maintitle} {} {\renewcommand*{\xtitle}{main}% - \usebibmacro{longtitle+titleaddon}% - \iftoggle{swaptrans} - {\usebibmacro{translatortypes}% - \usebibmacro{editortypes}{maintitle}}% - {\usebibmacro{editortypes}{maintitle}% - \usebibmacro{translatortypes}}}} + \usebibmacro{longtitle+titleaddon}}} \newbibmacro*{issuetitle}{% \iffieldundef{issuetitle} @@ -1288,12 +1317,9 @@ \newbibmacro*{test:collection}{% \ifboolexpr{ test {\ifentrytype{book}} - or test {\ifentrytype{collection}} - or test {\ifentrytype{mvbook}} - or test {\ifentrytype{mvcollection}}} + or test {\ifentrytype{collection}}} {\usebibmacro{test:collection:bk}}% - {\ifboolexpr{ test {\ifentrytype{bookinbook}} - or test {\ifentrytype{inbook}} + {\ifboolexpr{ test {\ifentrytype{inbook}} or test {\ifentrytype{incollection}} or test {\ifentrytype{letter}}} {\usebibmacro{test:collection:icbk+etc}}% @@ -1321,8 +1347,7 @@ and not test {\iffieldundef{bookvolume}}} {\toggletrue{collection}% \toggletrue{collection:icbk}}% - {\ifboolexpr{ test {\ifentrytype{bookinbook}} - or test {\ifentrytype{inbook}}} + {\ifentrytype{inbook} {\usebibmacro{test:collection:ib}}% {\usebibmacro{test:collection:icib}}}} @@ -1603,7 +1628,7 @@ \DeclareBibliographyDriver{article}{% \usebibmacro{bibindex}% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \usebibmacro{articles}% \usebibmacro{colon+pages+etc}% \usebibmacro{doi+finentry+etc}}% @@ -1615,7 +1640,7 @@ \DeclareBibliographyDriver{incollection}{% \usebibmacro{bibindex}% - \usebibmacro{author+title+etc}% + \usebibmacro{author+incollection+etc}% \usebibmacro{crossref+incollections}% \usebibmacro{doi+finentry+etc}}% @@ -1629,7 +1654,7 @@ \DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \newunit \usebibmacro{websites}% \usebibmacro{issue+month+etc}{}% @@ -1637,7 +1662,7 @@ \DeclareBibliographyDriver{patent}{% \usebibmacro{bibindex}% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \newunit \printfield{number}% \newunit @@ -1653,7 +1678,7 @@ \DeclareBibliographyDriver{thesis}{% \usebibmacro{bibindex}% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \newunit \usebibmacro{inst+loc+date}% \usebibmacro{doi+finentry+etc}}% @@ -1669,11 +1694,11 @@ \usebibmacro{annotation}% \finentry}% -\newbibmacro*{author+title+ed+note}{% +\newbibmacro*{author+title+etc}{% \usebibmacro{author+bookauthor+etc}% \usebibmacro{title+labelyear}% - \usebibmacro{edtrans:a}% - \usebibmacro{note}}% + \usebibmacro{note}% + \usebibmacro{edtrans}}% \newbibmacro*{articles}{% \newunit @@ -1693,6 +1718,7 @@ \usebibmacro{periodical:number}}% {\usebibmacro{periodical:number}% \usebibmacro{issue+month+etc}{}}% + \toggletrue{edshift}% \usebibmacro{edition}{noformat}}% % If an article has an electronic article ID, don't print its page @@ -1724,53 +1750,48 @@ \usebibmacro{author+bookauthor+etc}% \ifboolexpr{ togl {collection:bk} and togl {swapvol}} - {\usebibmacro{maintitle+editor}% - \usebibmacro{note}% - \usebibmacro{edition}{}% + {\usebibmacro{maintitle+note+etc}% \usebibmacro{volume+number+etc}% \let\xtitle\empty \usebibmacro{longtitle+titleaddon}% - \setunit{\unspace,\addspace}% - \usebibmacro{byauthor}{}% - \usebibmacro{edtrans:b}% - \usebibmacro{volumes}% - \usebibmacro{bookseries}% - \usebibmacro{volume+number+etc}% - \usebibmacro{book:number}% - \usebibmacro{part}}% + \toggletrue{edshift}% + \usebibmacro{byauthor}% + \usebibmacro{edtrans}% + \usebibmacro{volumes+bookseries+etc}}% {\usebibmacro{title+labelyear}% - \usebibmacro{byauthor}{newunit}% - \usebibmacro{edtrans:a}% - \usebibmacro{editoraddon}% + \usebibmacro{byauthor}% \iffieldundef{maintitle} - {\usebibmacro{note+edition+etc}}% - {\usebibmacro{volumes}% - \usebibmacro{bookseries}% - \usebibmacro{volume+number+etc}% - \usebibmacro{book:number}% - \usebibmacro{part}% - \usebibmacro{maintitle+editor}% - \usebibmacro{note}% - \usebibmacro{edition}{}}} + {\usebibmacro{note+edition+etc}% + \usebibmacro{volumes+bookseries+etc}}% + {\usebibmacro{edtrans}% + \usebibmacro{volumes+bookseries+etc}% + \usebibmacro{maintitle+note+etc}}} \usebibmacro{date+loc+etc}% \usebibmacro{origtitle}}% -\newbibmacro*{author+title+etc}{% +\newbibmacro*{author+incollection+etc}{% \usebibmacro{test:collection}% \usebibmacro{test:bookauthor}% \ifboolexpr{ test {\ifnameundef{afterword}} and test {\ifnameundef{foreword}} - and test {\ifnameundef{introduction}}} + and test {\ifnameundef{introduction}} + and test {\ifnameundef{preface}}} {\usebibmacro{author+bookauthor+etc}% \iffieldundef{title} - {\usebibmacro{booktitle+editor}{a}}% + {\usebibmacro{booktitle}% + \usebibmacro{edtrans}}% {\ifboolexpr{ togl {collection:ib} and togl {swapvol} and not togl {collection:icib}} - {\usebibmacro{booktitle+editor}{a}}% + {\usebibmacro{booktitle}% + \usebibmacro{edtrans}}% {\usebibmacro{title+labelyear}% - \usebibmacro{byauthor+ed+chapter}}}} - {\usebibmacro{aft+fore+intro}}} + \usebibmacro{byauthor}% + \usebibmacro{edtrans}% + \usebibmacro{chapter+in}}}} + {\usebibmacro{supplement}% + \newunit + \bibstring{\cbx@bibstring}\space}}% \newbibmacro*{crossref+incollections}{% \iffieldundef{crossref} @@ -1816,7 +1837,8 @@ \setunit{\addcomma\space}% \iftoggle{firstshort} {} - {\usebibmacro{edtrans:b}}} + {\toggletrue{edshift}% + \usebibmacro{edtrans}}} \newbibmacro*{inst+loc+date}{% \usebibmacro{thesis+type}% @@ -1842,7 +1864,10 @@ \newbibmacro*{note}{% \iffieldundef{note} {} - {\newunit + {\iftoggle{edshift} + {\setunit{\addcomma\space}% + \togglefalse{edshift}}% + {\newunit}% \printfield{note}}} \newbibmacro*{part}{% @@ -1949,6 +1974,16 @@ {}} {}}} +\newbibmacro*{maintitle+note+etc}{% + \usebibmacro{maintitle}% + \usebibmacro{note}% + \usebibmacro{edition}{}% + \iftoggle{swaptrans} + {\usebibmacro{translatortypes}% + \usebibmacro{editortypes}{maintitle}}% + {\usebibmacro{editortypes}{maintitle}% + \usebibmacro{translatortypes}}} + \newbibmacro*{volume+number+etc}{% \iffieldundef{\xvolume volume} {} @@ -1971,25 +2006,41 @@ {} {\space\bibstring{of}\space}}}} -\renewbibmacro*{byauthor}[1]{% +\renewbibmacro*{byauthor}{% \ifboolexpr{ test {\ifnameundef{author}} or togl {noauth}} {} - {\ifstrequal{#1}{newunit} + {\iftoggle{edshift} + {\renewcommand*{\pluga}{% + \setunit{\addcomma\space}\bibstring{by}\space}}% {\renewcommand*{\pluga}{\newunit\bibstring{by}\space}}% - {\renewcommand*{\pluga}{\bibstring{by}\space}}% \renewcommand*{\cbx@namelist}{author}% \usebibmacro{printnames+etc}}} +\newbibmacro*{volumes+bookseries+etc}{% + \usebibmacro{volumes}% + \usebibmacro{bookseries}% + \usebibmacro{pages}% + \usebibmacro{volume+number+etc}% + \usebibmacro{book:number}% + \usebibmacro{part}}% + +\newbibmacro*{note+edition+etc}{% + \usebibmacro{note}% + \usebibmacro{edition}{}% + \usebibmacro{edtrans}}% + \newbibmacro*{edition}[1]{% \iffieldundef{edition} {} - {\newunit + {\iftoggle{edshift} + {\setunit{\addcomma\space}% + \togglefalse{edshift}}% + {\newunit}% \iffieldbibstring{edition} {\bibstring{\thefield{edition}}} {\ifstrequal{#1}{noformat} - {\setunit{\addcomma\space}% - \printfield[noformat]{edition}}% + {\printfield[noformat]{edition}}% {\printfield{edition}}}}} \newbibmacro*{date+loc+etc}{% @@ -2011,7 +2062,8 @@ \ifboolexpr{ test {\ifnamesequal{author}{bookauthor}} or test {\ifnamesequal{afterword}{bookauthor}} or test {\ifnamesequal{foreword}{bookauthor}} - or test {\ifnamesequal{introduction}{bookauthor}}} + or test {\ifnamesequal{introduction}{bookauthor}} + or test {\ifnamesequal{preface}{bookauthor}}} {\clearname{bookauthor}}% {\iftoggle{noauth} {\clearname{bookauthor}}% @@ -2020,15 +2072,13 @@ \newbibmacro*{bybookauthor+pages}{% \ifnameundef{bookauthor} {} - {\renewcommand*{\pluga}{\bibstring{by}\space}% + {\renewcommand*{\pluga}{% + \setunit{\addcomma\space}\bibstring{by}\space}% \renewcommand*{\cbx@namelist}{bookauthor}% \usebibmacro{printnames+etc}% - \usebibmacro{pages}% - \newunit}}% + \usebibmacro{pages}}} -\newbibmacro*{byauthor+ed+chapter}{% - \usebibmacro{byauthor}{newunit}% - \usebibmacro{edtrans:a}% +\newbibmacro*{chapter+in}{% \iftoggle{collection:ib} {} {\newunit @@ -2043,14 +2093,16 @@ {\ifboolexpr{ togl {collection:icbk} or togl {collection:icib}} {\usebibmacro{incollections:ic}}% - {\usebibmacro{booktitle+editor}{}% - \usebibmacro{bookbooktitle+editor}{in}% + {\usebibmacro{bookbooktitle}{in}% + \toggletrue{edshift}% + \usebibmacro{booktitle}% + \usebibmacro{note+edition+etc}% \iffieldundef{volume} {\iffieldundef{bookvolume}% {\renewcommand*{\xvolume}{bookbook}}% {\renewcommand*{\xvolume}{book}}% - \usebibmacro{note+edition+etc}}% - {\usebibmacro{note+edition+etc}}}} + \usebibmacro{volumes+bookseries+etc}}% + {\usebibmacro{volumes+bookseries+etc}}}} \usebibmacro{date+loc+etc}% \usebibmacro{origtitle}}% @@ -2070,7 +2122,8 @@ {\iftoggle{bibliography} {\setunit{\addcomma\space}% \printfield{pages}% - \clearfield{pages}}% + \clearfield{pages}% + \togglefalse{edshift}}% {}}} \newbibmacro*{review+title}{% @@ -2205,48 +2258,43 @@ \newbibmacro*{incollections:ib}{% \iftoggle{swapvol} - {\usebibmacro{note+edition+etc}% + {\usebibmacro{note}% + \usebibmacro{edition}{}% + \usebibmacro{volumes+bookseries+etc}% \let\xtitle\empty \usebibmacro{longtitle+titleaddon}% - \setunit{\unspace,\addspace}% - \usebibmacro{byauthor}{}% - \usebibmacro{edtrans:b}}% + \toggletrue{edshift}% + \usebibmacro{byauthor}% + \usebibmacro{edtrans}}% {\usebibmacro{volume+number+etc}% - \usebibmacro{booktitle+editor}{}% - \usebibmacro{note+edition+etc}}} - -\newbibmacro*{note+edition+etc}{% - \usebibmacro{note}% - \usebibmacro{edition}{}% - \usebibmacro{volumes}% - \usebibmacro{bookseries}% - \usebibmacro{pages}% - \usebibmacro{volume+number+etc}% - \usebibmacro{book:number}% - \usebibmacro{part}}% + \toggletrue{edshift}% + \usebibmacro{booktitle}% + \usebibmacro{note+edition+etc}% + \usebibmacro{volumes+bookseries+etc}}} \newbibmacro*{incollections:ic}{% \iftoggle{swapvol} {\iftoggle{collection:icbk} - {\usebibmacro{maintitle+editor}}% - {\usebibmacro{bookbooktitle+editor}{}}% + {\usebibmacro{maintitle+note+etc}}% + {\usebibmacro{bookbooktitle}{}% + \toggletrue{edshift}% + \usebibmacro{note+edition+etc}}% \renewcommand*{\xvolume}{book}% - \usebibmacro{note+edition+etc}% - \usebibmacro{booktitle+editor}{}% - \usebibmacro{pages}}% - {\usebibmacro{booktitle+editor}{}% + \usebibmacro{volumes+bookseries+etc}% + \toggletrue{edshift}% + \usebibmacro{booktitle}% + \usebibmacro{edtrans}}% + {\toggletrue{edshift}% + \usebibmacro{booktitle}% + \usebibmacro{edtrans}% \renewcommand*{\xvolume}{book}% \usebibmacro{volume+number+etc}% \iftoggle{collection:icbk} - {\usebibmacro{maintitle+editor}}% - {\usebibmacro{bookbooktitle+editor}{}}% + {\usebibmacro{maintitle+note+etc}}% + {\usebibmacro{bookbooktitle}{}% + \toggletrue{edshift}% + \usebibmacro{note+edition+etc}}% \renewcommand*{\xvolume}{book}% - \usebibmacro{note+edition+etc}}} - -\newbibmacro*{volume}{% - \iffieldundef{\xvolume volume} - {} - {\newunit - \printfield[volume]{\xvolume volume}}} + \usebibmacro{volumes+bookseries+etc}}} \endinput |