diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-03 21:12:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-03 21:12:04 +0000 |
commit | 65d81bf65849e2f3f8f35e4700e69f7393d7dc30 (patch) | |
tree | 1a893408485749005f05d8cdc48acfb0d09627db /Master/texmf-dist/tex/latex/windycity | |
parent | 138cd963c48f6a40f4efc66336b25645167d4ae3 (diff) |
windycity (3may21)
git-svn-id: svn://tug.org/texlive/trunk@59067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/windycity')
5 files changed, 533 insertions, 468 deletions
diff --git a/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx b/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx index c368285793c..8d932f698f0 100644 --- a/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx +++ b/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx @@ -1,4 +1,4 @@ -% Last modified: Sat 30 Jan 2021 06:17:59 PM CST +% Last modified: Sun 02 May 2021 01:14:34 PM CDT % 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{american-windycity.lbx}[2021/01/30 Windy City +\ProvidesFile{american-windycity.lbx}[2021/05/02 Windy City localization module for biblatex] \InheritBibliographyExtras{american} \InheritBibliographyStrings{american} @@ -119,9 +119,10 @@ } \NewBibliographyString{by} -\NewBibliographyString{comped,comped+,compiler,compiler+,comprev,comprev+,comptrans,comptrans+,compup,compup+} -\NewBibliographyString{editor+,edcomp,edcomp+,edrev,edrev+,edtrans,edtrans+,edup,edup+} +\NewBibliographyString{comp,comp+,comped,comped+,compex,compex+,compiler,compiler+,comprev,comprev+,comptrans,comptrans+,compup,compup+} +\NewBibliographyString{ed,ed+,editor+,edcomp,edcomp+,edex,edex+,edrev,edrev+,edtrans,edtrans+,edup,edup+} \NewBibliographyString{expanded} +\NewBibliographyString{ex,ex+,excomp,excomp+,exed,exed+,expander,expander+,exrev,exrev+,extrans,extrans+,exup,exup+} \NewBibliographyString{noplace} \NewBibliographyString{of} \NewBibliographyString{origpub} @@ -132,15 +133,14 @@ \NewBibliographyString{pseudo} \NewBibliographyString{reprint,reprinted} \NewBibliographyString{review,reviewnoauth} -\NewBibliographyString{revcomp,revcomp+,reved,reved+,reviser,reviser+,revtrans,revtrans+,revup,revup+} +\NewBibliographyString{rev,rev+,revcomp,revcomp+,reved,reved+,revex,revex+,reviser,reviser+,revtrans,revtrans+,revup,revup+} \NewBibliographyString{revised} \NewBibliographyString{selfpub} \NewBibliographyString{special} \NewBibliographyString{subverbo,subverbos} -\NewBibliographyString{transcomp,transcomp+,transed,transed+,translator+,transrev,transrev+,transup,transup+} -\NewBibliographyString{upcomp,upcomp+,updater,updater+,uped,uped+,uprev,uprev+,uptrans,uptrans+} +\NewBibliographyString{trans,trans+,transcomp,transcomp+,transed,transed+,transex,transex+,translator+,transrev,transrev+,transup,transup+} +\NewBibliographyString{up,up+,upcomp,upcomp+,updater,updater+,uped,uped+,upex,upex+,uprev,uprev+,uptrans,uptrans+} \NewBibliographyString{updated} -\NewBibliographyString{updater} \NewBibliographyString{working} \DeclareBibliographyStrings{% @@ -151,8 +151,12 @@ by = {{by}{by}}, chapter = {{chap\adddot}{chap\adddot}}, citedas = {{hereafter cited as}{hereafter cited as}}, + comp = {{compiled by}{comp\adddot}}, + comp+ = {{compiled by}{comps\adddot}}, comped = {{compiled and edit\-ed by}{comp\adddotspace and ed\adddot}}, comped+ = {{compiled and edit\-ed by}{comps\adddotspace and eds\adddot}}, + compex = {{compiled and expanded by}{comp\adddotspace and exp\adddot}}, + compex+ = {{compiled and expanded by}{comps\adddotspace and exp\adddot}}, compiler = {{compiled by}{comp\adddot}}, compiler+ = {{compiled by}{comps\adddot}}, comprev = {{compiled and revised by}{comp\adddotspace and rev\adddot}}, @@ -161,8 +165,12 @@ comptrans+ = {{compiled and translated by}{comps\adddotspace and trans\adddot}}, compup = {{compiled and updated by}{comp\adddotspace and up\adddot}}, compup+ = {{compiled and updated by}{comps\adddotspace and up\adddot}}, + ed = {{edit\-ed by}{ed\adddot}}, + ed+ = {{edit\-ed by}{eds\adddot}}, edcomp = {{edit\-ed and compiled by}{ed\adddotspace and comp\adddot}}, edcomp+ = {{edit\-ed and compiled by}{eds\adddotspace and comps\adddot}}, + edex = {{edit\-ed and expanded by}{ed\adddotspace and exp\adddot}}, + edex+ = {{edit\-ed and expanded by}{eds\adddotspace and exp\adddot}}, edition = {{ed\adddot}{ed\adddot}}, editor = {{edit\-ed by}{ed\adddot}}, editor+ = {{edit\-ed by}{eds\adddot}}, @@ -172,7 +180,21 @@ edtrans+ = {{edit\-ed and translated by}{eds\adddotspace and trans\adddot}}, edup = {{edit\-ed and updated by}{ed\adddotspace and up\adddot}}, edup+ = {{edit\-ed and updated by}{eds\adddotspace and up\adddot}}, + ex = {{expanded by}{exp\adddot}}, + ex+ = {{expanded by}{exp\adddot}}, + excomp = {{expanded and compiled by}{exp\adddotspace and comp\adddot}}, + excomp+ = {{expanded and compiled by}{exp\adddotspace and comps\adddot}}, + exed = {{expanded and edit\-ed by}{exp\adddotspace and ed\adddot}}, + exed+ = {{expanded and edit\-ed by}{exp\adddotspace and eds\adddot}}, expanded = {{expanded edition}{exp\adddotspace ed\adddot}}, + expander = {{expanded by}{exp\adddot}}, + expander+ = {{expanded by}{exp\adddot}}, + exrev = {{expanded and revised by}{exp\adddotspace and rev\adddot}}, + exrev+ = {{expanded and revised by}{exp\adddotspace and revs\adddot}}, + extrans = {{expanded and translated by}{exp\adddotspace and trans\adddot}}, + extrans+ = {{expanded and translated by}{exp\adddotspace and trans\adddot}}, + exup = {{expanded and updated by}{exp\adddotspace and up\adddot}}, + exup+ = {{expanded and updated by}{exp\adddotspace and up\adddot}}, foreword = {{foreword to}{foreword to}}, forthcoming = {{forthcoming}{forthcoming}}, ibidem = {{ibid\adddot}{ibid\adddot}}, @@ -195,8 +217,12 @@ references = {{Bibliography}{Bibliography}}, reprint = {{reprint}{repr\adddot}}, reprinted = {{reprinted in}{reprinted in}}, + rev = {{revised by}{rev\adddot}}, + rev+ = {{revised by}{revs\adddot}}, reved = {{revised and edit\-ed by}{rev\adddotspace and ed\adddot}}, reved+ = {{revised and edit\-ed by}{revs\adddotspace and eds\adddot}}, + revex = {{revised and expanded by}{rev\adddotspace and exp\adddot}}, + revex+ = {{revised and expanded by}{revs\adddotspace and exp\adddot}}, revcomp = {{revised and compiled by}{rev\adddotspace and comp\adddot}}, revcomp+ = {{revised and compiled by}{revs\adddotspace and comps\adddot}}, review = {{review of}{review of}}, @@ -212,16 +238,22 @@ special = {{special issue}{special issue}}, subverbo = {{s\adddot v\adddot}{s\adddot v\adddot}}, subverbos = {{s\adddot vv\adddot}{s\adddot vv\adddot}}, + trans = {{translated by}{trans\adddot}}, + trans+ = {{translated by}{trans\adddot}}, transcomp = {{translated and compiled by}{trans\adddotspace and comp\adddot}}, transcomp+ = {{translated and compiled by}{trans\adddotspace and comps\adddot}}, transed = {{translated and edit\-ed by}{trans\adddotspace and ed\adddot}}, transed+ = {{translated and edit\-ed by}{trans\adddotspace and eds\adddot}}, + transex = {{translated and expanded by}{trans\adddotspace and exp\adddot}}, + transex+ = {{translated and expanded by}{trans\adddotspace and exp\adddot}}, translator = {{translated by}{trans\adddot}}, translator+ = {{translated by}{trans\adddot}}, transrev = {{translated and revised by}{trans\adddotspace and rev\adddot}}, transrev+ = {{translated and revised by}{trans\adddotspace and revs\adddot}}, transup = {{translated and updated by}{trans\adddotspace and up\adddot}}, transup+ = {{translated and updated by}{trans\adddotspace and up\adddot}}, + up = {{updated by}{up\adddot}}, + up+ = {{updated by}{up\adddot}}, upcomp = {{updated and compiled by}{up\adddotspace and comp\adddot}}, upcomp+ = {{updated and compiled by}{up\adddotspace and comps\adddot}}, updated = {{updated edition}{up\adddotspace ed\adddot}}, @@ -229,6 +261,8 @@ updater+ = {{updated by}{up\adddot}}, uped = {{updated and edit\-ed by}{up\adddotspace and ed\adddot}}, uped+ = {{updated and edit\-ed by}{up\adddotspace and eds\adddot}}, + upex = {{updated and expanded by}{up\adddotspace and exp\adddot}}, + upex+ = {{updated and expanded by}{up\adddotspace and exp\adddot}}, uprev = {{updated and revised by}{up\adddotspace and rev\adddot}}, uprev+ = {{updated and revised by}{up\adddotspace and revs\adddot}}, uptrans = {{updated and translated by}{up\adddotspace and trans\adddot}}, diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.bbx b/Master/texmf-dist/tex/latex/windycity/windycity.bbx index f52a3160f45..76b543d9a62 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.bbx +++ b/Master/texmf-dist/tex/latex/windycity/windycity.bbx @@ -1,4 +1,4 @@ -% Last modified: Sat 30 Jan 2021 06:17:53 PM CST +% Last modified: Sun 02 May 2021 01:14:55 PM CDT % 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}[2021/01/30 Windy City bibliography style +\ProvidesFile{windycity.bbx}[2021/05/02 Windy City bibliography style for biblatex] \@ifpackagelater{biblatex}{2019/08/17} {} @@ -68,14 +68,14 @@ \DeclareBiblatexOption{entry}[boolean]{listvols}[true]{% \settoggle{listvols}{#1}}% +\providetoggle{newauth} +\DeclareBiblatexOption{entry}[boolean]{newauth}[true]{% + \settoggle{newauth}{#1}}% + \providetoggle{noauth} \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}}} @@ -85,6 +85,10 @@ \DeclareBiblatexOption{global}[boolean]{nopages}[true]{% \settoggle{nopages}{#1}}% +\providetoggle{noreprint} +\DeclareBiblatexOption{entry}[boolean]{noreprint}[true]{% + \settoggle{noreprint}{#1}}% + \providetoggle{reflist} \DeclareBiblatexOption{global}[boolean]{reflist}[true]{% \ifstrequal{#1}{true} @@ -106,6 +110,9 @@ \toggletrue{shortfirst}}% {\togglefalse{short}}} +\DeclareBiblatexOption{global}[boolean]{shortafter}[true]{% + \settoggle{short}{#1}}% + \providetoggle{shortfirst} \DeclareBiblatexOption{global}[boolean]{shortfirst}[true]{% \settoggle{shortfirst}{#1}}% @@ -122,13 +129,38 @@ \DeclareBiblatexOption{entry}[boolean]{swapauth}[true]{% \settoggle{swapauth}{#1}}% -\providetoggle{newauth} -\DeclareBiblatexOption{entry}[boolean]{newauth}[true]{% - \settoggle{newauth}{#1}}% - \providetoggle{swaptrans} +\providetoggle{swaptrans:booktitle} +\providetoggle{swaptrans:bookbooktitle} +\providetoggle{swaptrans:issuetitle} +\providetoggle{swaptrans:maintitle} +\providetoggle{swaptrans:series} +\providetoggle{swaptrans:title} \DeclareBiblatexOption{entry}[boolean]{swaptrans}[true]{% - \settoggle{swaptrans}{#1}}% + \settoggle{swaptrans:title}{#1}% + \settoggle{swaptrans:booktitle}{#1}% + \settoggle{swaptrans:bookbooktitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:booktitle}[true]{% + \settoggle{swaptrans:booktitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:bookbooktitle}[true]{% + \settoggle{swaptrans:bookbooktitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:issuetitle}[true]{% + \settoggle{swaptrans:issuetitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:maintitle}[true]{% + \settoggle{swaptrans:maintitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:series}[true]{% + \settoggle{swaptrans:series}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:title}[true]{% + \settoggle{swaptrans:title}{#1}}% +% Short forms of the options above: +\DeclareBiblatexOption{entry}[boolean]{swaptrans:book}[true]{% + \settoggle{swaptrans:booktitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:bookbook}[true]{% + \settoggle{swaptrans:bookbooktitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:issue}[true]{% + \settoggle{swaptrans:issuetitle}{#1}}% +\DeclareBiblatexOption{entry}[boolean]{swaptrans:main}[true]{% + \settoggle{swaptrans:maintitle}{#1}}% \providetoggle{swapvol} \DeclareBiblatexOption{entry,global}[boolean]{swapvol}[true]{% @@ -161,9 +193,6 @@ maxbibnames=10, mincitenames=1, maxcitenames=3, -% Remember, if 'mincrossrefs' is greater than 1, and you cite just one -% entrykey in a document (or refsection, etc), the field 'crossref' is -% undefined. mincrossrefs=2, minxrefs=2, pagetracker=page, @@ -180,12 +209,7 @@ useprefix=false, usetranslator=true} -% If a document's language is English, set by babel or polyglossia or -% by biblatex when neither babel nor polyglossia has been loaded, use -% 'american-windycity.lbx': \DeclareLanguageMapping{english}{american-windycity} -% If the document's language isn't English, try to override -% 'american-windycity.lbx' with '<language>-windycity.lbx': \DeclareLanguageMappingSuffix{-windycity} \DeclareLabeldate{% 'reflist' preamble option loads an alternative @@ -278,10 +302,10 @@ \field{volume} \literal{0}}} -% Mapping for when 'journal', 'journaltitle', 'organization', or -% 'blogtitle' goes in the author's position. +% When 'journal', 'journaltitle', 'organization', or 'blogtitle' goes +% in the author's position. -\DeclareSourcemap{ +\DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map[overwrite]{ \pertype{article} @@ -310,7 +334,7 @@ } } } -\DeclareSourcemap{ +\DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map[overwrite]{ \pertype{online} @@ -337,7 +361,7 @@ } } } -\DeclareSourcemap{ +\DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map[overwrite=false]{ \pertype{inreference} @@ -359,6 +383,29 @@ } } +% Save the entry key of every editor, translator, and title. + +\DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite, foreach={title,booktitle,bookbooktitle}]{ + \step[fieldsource=entrykey] + \step[fieldset=$MAPLOOPkey, origfieldval] + \step[notfield=$MAPLOOP, final] + \step[fieldset=$MAPLOOPkey, null] + } + \map[overwrite, foreach={% + editor,editora,editorb,editorc,translator,translatora,translatorb}]{ + \step[fieldsource=entrykey] + \step[fieldset=$MAPLOOPtype, fieldvalue={,}, appendstrict] + \step[fieldset=$MAPLOOPtype, origfieldval, append] + \step[notfield=$MAPLOOP, final] + \step[fieldset=$MAPLOOPtype, null] + } + } +} + +% For 'collsonly' and 'nolos' options and the 'reference' entry type. + \defbibcheck{collsonly}{% \ifentrytype{inbook} {\iffieldundef{crossref} @@ -389,18 +436,22 @@ \ResetDataInheritance \DefaultInheritance[\except{*}{review}{all=false}]{all=true,override=false} \DeclareDataInheritance{*}{incollection,inbook,letter,review}{% + \inherit[override=true]{titlekey}{booktitlekey} + \inherit[override=true]{booktitlekey}{bookbooktitlekey} \inherit{author}{bookauthor} \inherit{authortype}{bookauthortype} \inherit{shortauthor}{shortbookauthor} - \inherit{editor}{editora} - \inherit{editora}{editorb} - \inherit{editorb}{editorc} - \inherit{editortype}{editoratype} - \inherit{editoratype}{editorbtype} - \inherit{editorbtype}{editorctype} + \inherit[override=true]{editor}{editora} + \inherit[override=true]{editora}{editorb} + \inherit[override=true]{editorb}{editorc} + \inherit[override=true]{editortype}{editoratype} + \inherit[override=true]{editoratype}{editorbtype} + \inherit[override=true]{editorbtype}{editorctype} + \inherit{editoraddon}{editoraaddon} \inherit{translator}{translatora} \inherit{translatora}{translatorb} - \inherit{translatortype}{translatoratype} + \inherit[override=true]{translatortype}{translatoratype} + \inherit[override=true]{translatoratype}{translatorbtype} \inherit{title}{booktitle} \inherit{subtitle}{booksubtitle} \inherit{titleaddon}{booktitleaddon} @@ -442,12 +493,16 @@ \let\crossreflist\empty \let\pluga\empty \let\plugb\empty -\let\xeditor\empty -\let\yeditor\empty \let\xtitle\empty \let\xvolume\empty +\let\xeditor\empty +\let\yeditor\empty +\let\edtypes\empty +\let\transtypes\empty + \providetoggle{authposition} +\providetoggle{atleastone} \providetoggle{bibliography} \providetoggle{ibid:loccit} \providetoggle{multicite} @@ -496,8 +551,6 @@ \global\togglefalse{reflist}}% {\item} -% Index names only. - \renewbibmacro*{bibindex}{% \ifbibindex {\indexnames{labelname}}% @@ -536,8 +589,8 @@ \DeclareIndexNameAlias{translator}{default} % Affixes like 'Jr.', should appear last, delimited with a comma, when -% inverted, as in a bibliography, but not otherwise, as in a note. See -% CMOS, 17th ed., 6.43 and 16.41, as well as the example in 14.75. +% the name is inverted. See CMOS, 17th ed., 6.43 and 16.41, and the +% example in 14.75. \renewbibmacro*{name:family-given}[4]{% \ifuseprefix @@ -705,14 +758,18 @@ \step[typesource=www, typetarget=online] \step[typesource=inreference, typetarget=reference] \step[typesource=mathesis, typetarget=thesis] - \step[typesource=phdthesis, typetarget=thesis]} + \step[typesource=phdthesis, typetarget=thesis] + } \map{ \step[fieldsource=school, fieldtarget=institution] \step[fieldsource=address, fieldtarget=location] - \step[fieldsource=journal, fieldtarget=journaltitle]}} + \step[fieldsource=journal, fieldtarget=journaltitle] + } +} \DeclareBibliographyAlias{collection}{book} \DeclareBibliographyAlias{cite:collection}{cite:book} +\DeclareBibliographyAlias{*}{book} \DeclareBibliographyAlias{inbook}{incollection} \DeclareBibliographyAlias{letter}{incollection} @@ -722,8 +779,6 @@ \DeclareBibliographyAlias{unpublished}{thesis} \DeclareBibliographyAlias{cite:unpublished}{cite:thesis} -\DeclareBibliographyAlias{*}{book} - %%%%%%%%%%%%%%%%%%%%%%%%% %% Author's Position %% %%%%%%%%%%%%%%%%%%%%%%%%% @@ -738,11 +793,11 @@ {\usebibmacro{authpos+deflabel}}% {\usebibmacro{author+bookauthor}% \ifnameundef{\cbx@namelist} - {\usebibmacro{edtrans:authpos}% + {\usebibmacro{editors:a}% \ifnameundef{\cbx@namelist} {\toggletrue{noauth}% \usebibmacro{authpos+deflabel}}% - {\usebibmacro{addplus:authpos}% + {\usebibmacro{addplus+etc}% \usebibmacro{namehash+etc}}} {\usebibmacro{namehash+etc}}}} @@ -824,244 +879,162 @@ % For editors and translators in the author's position. -\newbibmacro*{edtrans:authpos}{% - \togglefalse{noed}% - \togglefalse{notrans}% - \usebibmacro{test:ed:authpos}% - \usebibmacro{test:trans:authpos}% - \ifboolexpr{ togl {noed} - and togl {notrans}} - {} - {\iftoggle{noed} - {\usebibmacro{transcombos}}% - {\iftoggle{notrans} - {\usebibmacro{edcombos}}% - {\iftoggle{swaptrans} - {\usebibmacro{transcombos}}% - {\usebibmacro{edcombos}}}}}} - -\newbibmacro*{test:ed:authpos}{% - \ifboolexpr{ test {\ifnameundef{editor}} - and test {\ifnameundef{editora}}} - {\toggletrue{noed}}% - {\ifnameundef{editor} - {\usebibmacro{test:editora:authpos}}% - {\usebibmacro{test:editor:authpos}% - \iftoggle{noed} - {\global\togglefalse{noed}% - \usebibmacro{test:editora:authpos}}% - {}}}} - -\newbibmacro*{test:xeditor:a}[1]{% - \ifboolexpr{ test {\ifnameundef{\xeditor}} - or test {\iffieldequalstr{\xeditor type}{issuetitle}} - or test {\iffieldequalstr{\xeditor type}{series}}} - {\toggletrue{noed}}% - {\ifstrequal{#1}{ap}% not 'authposition' toggle - {\usebibmacro{test:xeditor:b:authpos}}% - {\usebibmacro{test:xeditor:b}}}} - -\newbibmacro*{test:xeditor:b:authpos}{% - \iffieldequalstr{\xeditor type}{maintitle} - {\iftoggle{collection:bk} - {\iftoggle{swapvol} - {} - {\toggletrue{noed}}} - {\toggletrue{noed}}} - {\ifboolexpr{ togl {collection:bk} - and togl {swapvol}} - {\toggletrue{noed}}% - {\ifboolexpr{ togl {collection:icbk} - or togl {collection:icib}} - {\ifnameundef{translator} - {} - {\toggletrue{noed}}} - {}}}} +\newbibmacro*{editors:a}{% + \usebibmacro{test:ed:a}% + \usebibmacro{test:trans:a}% + \iftoggle{swapvol} + {\ifboolexpr{ test {\ifinlist{maintitle}{\edtypes}} + or test {\ifinlist{maintitle}{\transtypes}}} + {\usebibmacro{test:swaptrans:a}{maintitle}}% + {\usebibmacro{test:swaptrans:a}{booktitle}}} + {\usebibmacro{test:swaptrans:a}{title}}} + +\newbibmacro*{test:ed:a}{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{noed}}% + {\togglefalse{noed}% + \renewcommand*{\xeditor}{##1}% + \let\edtypes\empty + \forcsvfield{\listadd\edtypes}{\xeditor type}% + \usebibmacro{test:a:types}{\edtypes}{noed}}}% needs '%' + \docsvlist{editor,editora,editorb,editorc}}% + +\newbibmacro*{test:trans:a}{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{notrans}}% + {\togglefalse{notrans}% + \renewcommand*{\yeditor}{##1}% + \let\transtypes\empty + \forcsvfield{\listadd\transtypes}{\yeditor type}% + \usebibmacro{test:a:types}{\transtypes}{notrans}}}% needs '%' + \docsvlist{translator,translatora,translatorb}}% + +\newbibmacro*{test:a:types}[2]{% + \ifboolexpr{ test {\ifinlist{issuetitle}{#1}} + or test {\ifinlist{series}{#1}}} + {\toggletrue{#2}}% + {\ifinlist{maintitle}{#1} + {\iftoggle{collection:bk} + {\iftoggle{swapvol} + {\listbreak}% + {\toggletrue{#2}}} + {\toggletrue{#2}}} + {\ifboolexpr{ togl {collection:bk} + and togl {swapvol}} + {\toggletrue{#2}}% + {\usebibmacro{test:a:keys}{#1}{#2}}}}} -\newbibmacro*{test:editor:authpos}{% - \renewcommand*{\xeditor}{editor}% - \usebibmacro{test:xeditor:a}{ap}% - \iftoggle{noed} - {} +\newbibmacro*{test:a:keys}[2]{% + \xifinlist{\thefield{\xtitle titlekey}}{#1} {\ifboolexpr{ togl {collection:ib} - and togl {swapvol} - and not test {\ifnameundef{editora}}} - {\toggletrue{noed}}% + and togl {swapvol}} + {\toggletrue{#2}}% {\ifboolexpr{ togl {swapvol} and ( togl {collection:icbk} or togl {collection:icib} )} - {\toggletrue{noed}}% - {}}}} + {\toggletrue{#2}}% + {\listbreak}}} + {\listbreak}}% + +\newbibmacro*{test:swaptrans:a}[1]{% + \iftoggle{swaptrans:#1} + {\toggletrue{swaptrans}% + \iftoggle{notrans} + {\usebibmacro{ed:a:combos}}% + {\usebibmacro{trans:a:combos}}% + \togglefalse{swaptrans}}% + {\iftoggle{noed} + {\usebibmacro{trans:a:combos}}% + {\usebibmacro{ed:a:combos}}}} -\newbibmacro*{test:editora:authpos}{% - \renewcommand*{\xeditor}{editora}% - \usebibmacro{test:xeditor:a}{ap}% +\newbibmacro*{ed:a:combos}{% \iftoggle{noed} {} - {\ifboolexpr{ togl {collection:ib} - and not togl {swapvol} - and test {\ifnameundef{editor}}} - {\toggletrue{noed}}% - {}}} - -\newbibmacro*{test:trans:authpos}{% - \usebibmacro{trans+transa+transb}% - \ifnameundef{\yeditor} - {\toggletrue{notrans}}% - {\iffieldequalstr{translatortype}{maintitle} - {\ifboolexpr{ togl {collection:bk} - and togl {swapvol}} - {} - {\toggletrue{notrans}}} - {\iffieldequalstr{translatoratype}{maintitle} - {\ifboolexpr{ togl {collection:icbk} - and togl {swapvol}} - {} - {\toggletrue{notrans}}} - {}}}} - -\newbibmacro*{trans+transa+transb}{% - \ifnameundef{translator} - {\ifnameundef{translatora} - {\renewcommand*{\yeditor}{translatorb}}% - {\renewcommand*{\yeditor}{translatora}}} - {\renewcommand*{\yeditor}{translator}}} - -\newbibmacro*{transcombos}{% - \renewcommand*{\cbx@namelist}{\yeditor}% - \ifnamesequal{\xeditor}{\yeditor} - {\clearname{\xeditor}% - \ifboolexpr{ test {\iffieldstart{editortype}{c}} - or test {\iffieldequalstr{\xeditor type}{transcomp}}} - {\renewcommand*{\cbx@bibstring}{transcomp}}% - {\ifboolexpr{ test {\iffieldstart{\xeditor type}{r}} - or test {\iffieldequalstr{\xeditor type}{transrev}}} - {\renewcommand*{\cbx@bibstring}{transrev}}% - {\ifboolexpr{ test {\iffieldstart{\xeditor type}{u}} - or test {\iffieldequalstr{\xeditor type}{transup}}} - {\renewcommand*{\cbx@bibstring}{transup}}% - {\renewcommand*{\cbx@bibstring}{transed}}}}} - {\renewcommand*{\cbx@bibstring}{translator}}} - -\newbibmacro*{edcombos}{% - \renewcommand*{\cbx@namelist}{\xeditor}% - \ifnamesequal{\xeditor}{\yeditor} - {\clearname{\yeditor}% - \usebibmacro{edcombos:trans}}% - {\usebibmacro{edcombos:notrans}}} - -\newbibmacro*{edcombos:trans}{% - \iffieldstart{\xeditor type}{c} - {\renewcommand*{\cbx@bibstring}{comptrans}}% - {\iffieldstart{\xeditor type}{r} - {\renewcommand*{\cbx@bibstring}{revtrans}}% - {\iffieldstart{\xeditor type}{u} - {\renewcommand*{\cbx@bibstring}{uptrans}}% - {\iffieldequalstr{\xeditor type}{transcomp} - {\renewcommand*{\cbx@bibstring}{transcomp}}% - {\iffieldequalstr{\xeditor type}{transed} - {\renewcommand*{\cbx@bibstring}{transed}}% - {\iffieldequalstr{\xeditor type}{transrev} - {\renewcommand*{\cbx@bibstring}{transrev}}% - {\iffieldequalstr{\xeditor type}{transup} - {\renewcommand*{\cbx@bibstring}{transup}}% - {\renewcommand*{\cbx@bibstring}{edtrans}}}}}}}}} - -\newbibmacro*{edcombos:notrans}{% - \iffieldequalstr{\xeditor type}{compiler} - {\renewcommand*{\cbx@bibstring}{compiler}}% - {\iffieldequalstr{\xeditor type}{reviser} - {\renewcommand*{\cbx@bibstring}{reviser}}% - {\iffieldequalstr{\xeditor type}{updater} - {\renewcommand*{\cbx@bibstring}{updater}}% - {\iffieldequalstr{\xeditor type}{comped} - {\renewcommand*{\cbx@bibstring}{comped}}% - {\iffieldequalstr{\xeditor type}{comprev} - {\renewcommand*{\cbx@bibstring}{comprev}}% - {\iffieldequalstr{\xeditor type}{compup} - {\renewcommand*{\cbx@bibstring}{compup}}% - {\iffieldequalstr{\xeditor type}{edcomp} - {\renewcommand*{\cbx@bibstring}{edcomp}}% - {\iffieldequalstr{\xeditor type}{edrev} - {\renewcommand*{\cbx@bibstring}{edrev}}% - {\iffieldequalstr{\xeditor type}{edup} - {\renewcommand*{\cbx@bibstring}{edup}}% - {\iffieldequalstr{\xeditor type}{revcomp} - {\renewcommand*{\cbx@bibstring}{revcomp}}% - {\iffieldequalstr{\xeditor type}{reved} - {\renewcommand*{\cbx@bibstring}{reved}}% - {\iffieldequalstr{\xeditor type}{revup} - {\renewcommand*{\cbx@bibstring}{revup}}% - {\iffieldequalstr{\xeditor type}{upcomp} - {\renewcommand*{\cbx@bibstring}{upcomp}}% - {\iffieldequalstr{\xeditor type}{uped} - {\renewcommand*{\cbx@bibstring}{uped}}% - {\iffieldequalstr{\xeditor type}{uprev} - {\renewcommand*{\cbx@bibstring}{uprev}}% - {\renewcommand*{\cbx@bibstring}{editor}}}}}}}}}}}}}}}}} - -% Thanks to David Fussner's biblatex-chicago for pointing me to this -% command by Philipp Lehman. Source: -% https://groups.google.com/forum/#!topic/comp.text.tex/kG003fkZK1I - -\newrobustcmd*{\iffieldstart}[2]{% - \iffieldundef{#1} - {\@secondoftwo}% originally '\@gobbletwo' - {\begingroup - \edef\@tempa{% - \long\def\noexpand\iffieldstart@i####1\detokenize{#2}####2}% - \@tempa\@nil{\endgroup\ifblank{##1}}% - \savefield*{#1}{\@tempa}% - \expandafter\iffieldstart@i\detokenize - \expandafter\expandafter\expandafter{% - \expandafter\@tempa\detokenize{#2}}\@nil}}% - -\newbibmacro*{addplus:authpos}{% - \iftoggle{cbx:short} - {} - {\usebibmacro{addplus}% - \renewcommand*{\plugb}{% - \addcomma\space\bibsstring{\cbx@bibstring}}}} + {\usebibmacro{edcombos:a}}} -\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}{% - \iftoggle{swaptrans} - {\usebibmacro{transcombos+etc}% - \usebibmacro{edcombos+etc}}% - {\usebibmacro{edcombos+etc}% - \usebibmacro{transcombos+etc}}% - \usebibmacro{editoraddon}}% - -\newbibmacro*{transcombos+etc}{% - \togglefalse{noed}% - \togglefalse{notrans}% - \usebibmacro{test:ed}% - \usebibmacro{test:trans}% +\newbibmacro*{trans:a:combos}{% \iftoggle{notrans} {} - {\usebibmacro{transcombos}% - \usebibmacro{pluga+etc}}} - -\newbibmacro*{edcombos+etc}{% - \togglefalse{noed}% - \togglefalse{notrans}% - \usebibmacro{test:ed}% - \usebibmacro{test:trans}% + {\usebibmacro{transcombos:a}}} + +% For editors and translators after the author's position. + +\newbibmacro*{editors:b}{% + \usebibmacro{test:ed:b}% + \usebibmacro{test:trans:b}% + \ifdefstring{\xtitle}{book} + {\usebibmacro{test:swaptrans:b}{booktitle}}% + {\ifdefstring{\xtitle}{bookbook} + {\usebibmacro{test:swaptrans:b}{bookbooktitle}}% + {\usebibmacro{test:swaptrans:b}{title}}}} + +\newbibmacro*{test:ed:b}{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{noed}}% + {\togglefalse{noed}% + \renewcommand*{\xeditor}{##1}% + \let\edtypes\empty + \forcsvfield{\listadd\edtypes}{\xeditor type}% + \usebibmacro{test:b:types}{\edtypes}{noed}}}% needs '%' + \docsvlist{editor,editora,editorb,editorc}}% + +\newbibmacro*{test:trans:b}{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{notrans}}% + {\togglefalse{notrans}% + \renewcommand*{\yeditor}{##1}% + \let\transtypes\empty + \forcsvfield{\listadd\transtypes}{\yeditor type}% + \usebibmacro{test:b:types}{\transtypes}{notrans}}}% needs '%' + \docsvlist{translator,translatora,translatorb}}% + +\newbibmacro*{test:b:types}[2]{% + \ifboolexpr{ test {\ifinlist{issuetitle}{#1}} + or test {\ifinlist{maintitle}{#1}} + or test {\ifinlist{series}{#1}}} + {\toggletrue{#2}}% + {\ifinlist{booktitle}{#1} + {\ifdefstring{\xtitle}{book} + {\usebibmacro{test:b:keys}{#1}{#2}}% + {\toggletrue{#2}}} + {\ifinlist{bookbooktitle}{#1} + {\ifdefstring{\xtitle}{bookbook} + {\usebibmacro{test:b:keys}{#1}{#2}}% + {\toggletrue{#2}}} + {\usebibmacro{test:b:keys}{#1}{#2}}}}} + +\newbibmacro*{test:b:keys}[2]{% + \xifinlist{\thefield{\xtitle titlekey}}{#1} + {\listbreak}% + {\toggletrue{#2}}} + +\newbibmacro*{test:swaptrans:b}[1]{% + \iftoggle{swaptrans:#1} + {\toggletrue{swaptrans}% + \usebibmacro{trans:b:combos}% + \usebibmacro{ed:b:combos}% + \togglefalse{swaptrans}}% + {\usebibmacro{ed:b:combos}% + \usebibmacro{trans:b:combos}}} + +\newbibmacro*{ed:b:combos}{% \iftoggle{noed} + {\usebibmacro{ed:b:second}}% + {\usebibmacro{edcombos:a}% + \usebibmacro{pluga+etc}% + \usebibmacro{editoraddon}{editor}% + \usebibmacro{editoraddon}{editora}% + \usebibmacro{ed:b:second}% + \usebibmacro{editoraddon}{editora}}} + +\newbibmacro*{trans:b:combos}{% + \iftoggle{notrans} {} - {\usebibmacro{edcombos}% + {\usebibmacro{transcombos:a}% \usebibmacro{pluga+etc}}} \newbibmacro*{pluga+etc}{% @@ -1086,141 +1059,64 @@ {\setunit{\addcomma\space}}% {\newunit}}% -% Tests for 'edtrans' macro. - -\newbibmacro*{test:ed}{% - \iftoggle{edshift} - {\usebibmacro{eda+edb+edc}}% - {\ifnameundef{editor} - {\usebibmacro{test:editora}}% - {\usebibmacro{test:editor}% - \iftoggle{noed} - {\togglefalse{noed}% - \usebibmacro{test:editora}}% - {}}}} - -\newbibmacro*{eda+edb+edc}{% - \ifnameundef{editor} - {\ifnameundef{editora} - {\ifnameundef{editorb} - {\renewcommand*{\xeditor}{editorc}}% - {\renewcommand*{\xeditor}{editorb}}% - \usebibmacro{test:editorb}}% - {\usebibmacro{test:editora}% - \iftoggle{noed} - {\togglefalse{noed}% - \renewcommand*{\xeditor}{editorb}% - \usebibmacro{test:editorb}}% - {}}} - {\usebibmacro{test:editor}% - \iftoggle{noed} - {\togglefalse{noed}% - \usebibmacro{test:editora}}% - {}}} - -\newbibmacro*{test:editor}{% - \renewcommand*{\xeditor}{editor}% - \usebibmacro{test:xeditor:a}{}% +\newbibmacro*{ed:b:second}{% + \usebibmacro{test:ed:b}% \iftoggle{noed} {} - {\ifdefstring{\xtitle}{book} - {\toggletrue{noed}}% - {}}} + {\usebibmacro{edcombos:a}% + \usebibmacro{pluga+etc}}} -\newbibmacro*{test:editora}{% - \renewcommand*{\xeditor}{editora}% - \usebibmacro{test:xeditor:a}{}% +% For editors and translators of an 'issuetitle', 'maintitle', or 'series'. + +\newbibmacro*{editors:c}[1]{% + \usebibmacro{test:ed:c}{#1}% + \usebibmacro{test:trans:c}{#1}% + \iftoggle{swaptrans:#1} + {\toggletrue{swaptrans}% + \usebibmacro{trans:c:combos}% + \usebibmacro{ed:c:combos}{#1}% + \togglefalse{swaptrans}}% + {\usebibmacro{ed:c:combos}{#1}% + \usebibmacro{trans:c:combos}}} + +\newbibmacro*{test:ed:c}[1]{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{noed}}% + {\togglefalse{noed}% + \renewcommand*{\xeditor}{##1}% + \let\edtypes\empty + \forcsvfield{\listadd\edtypes}{\xeditor type}% + \ifinlist{#1}{\edtypes} + {\listbreak}% + {\toggletrue{noed}}}}% needs '%' + \docsvlist{editor,editora,editorb,editorc}}% + +\newbibmacro*{test:trans:c}[1]{% + \renewcommand*{\do}[1]{% + \ifnameundef{##1} + {\toggletrue{notrans}}% + {\togglefalse{notrans}% + \renewcommand*{\yeditor}{##1}% + \let\transtypes\empty + \forcsvfield{\listadd\transtypes}{\yeditor type}% + \ifinlist{#1}{\transtypes} + {\listbreak}% + {\toggletrue{notrans}}}}% needs '%' + \docsvlist{translator,translatora,translatorb}}% + +\newbibmacro*{ed:c:combos}[1]{% \iftoggle{noed} {} - {\ifboolexpr{ test {\ifdefempty{\xtitle}} - and ( togl {collection:ib} - or togl {collection:icbk} - or togl {collection:icib} - or not togl {collection} )} - {\toggletrue{noed}}% - {\ifboolexpr{ test {\ifdefstring{\xtitle}{bookbook}} - and togl {swapvol} - and ( togl {collection:icib} - or togl {collection:icbk} )} - {\toggletrue{noed}}% - {}}}} - -\newbibmacro*{test:editorb}{% - \usebibmacro{test:xeditor:a}{}% - \iftoggle{collection:icib} - {\ifdefstring{\xtitle}{book} - {\toggletrue{noed}}% - {}} - {}} - -\newbibmacro*{test:xeditor:b}{% - \iffieldequalstr{\xeditor type}{maintitle} - {\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}{compup}} - 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}{edup}} - 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}{revup}} - or test {\iffieldequalstr{\xeditor type}{transcomp}} - or test {\iffieldequalstr{\xeditor type}{transed}} - or test {\iffieldequalstr{\xeditor type}{transrev}} - or test {\iffieldequalstr{\xeditor type}{transup}} - or test {\iffieldequalstr{\xeditor type}{updater}} - or test {\iffieldequalstr{\xeditor type}{upcomp}} - or test {\iffieldequalstr{\xeditor type}{uped}} - or test {\iffieldequalstr{\xeditor type}{uprev}} - or test {\iffieldequalstr{\xeditor type}{uptrans}} - or test {\iffieldequalstr{\xeditor type}{title}} - or test {\iffieldundef{\xeditor type}}} - {} - {\toggletrue{noed}}} - {}}} - -\newbibmacro*{test:trans}{% - \usebibmacro{trans+transa+transb}% - \ifnameundef{\yeditor} - {\toggletrue{notrans}}% - {\iffieldequalstr{\yeditor type}{maintitle} - {\toggletrue{notrans}}% - {\ifdefstring{\yeditor}{translatorb} - {\ifboolexpr{ test {\ifdefempty{\xtitle}} - or test {\ifdefstring{\xtitle}{book}}} - {\toggletrue{notrans}}% - {}} - {\ifdefstring{\yeditor}{translatora} - {\ifboolexpr{ test {\ifdefempty{\xtitle}} - or test {\ifdefstring{\xtitle}{bookbook}}} - {\toggletrue{notrans}}% - {}} - {\ifboolexpr{ togl {collection} - and togl {swapvol} - and test {\ifdefstring{\xtitle}{book}}} - {\toggletrue{notrans}}% - {}}}}}} - -% For editors of an 'issuetitle', 'maintitle', or 'series'. - -\newbibmacro*{editortypes}[1]{% - \ifboolexpr{ test {\iffieldequalstr{editortype}{#1}} - or test {\iffieldequalstr{editoratype}{#1}} - or test {\iffieldequalstr{editorbtype}{#1}} - or test {\iffieldequalstr{editorctype}{#1}}} {\usebibmacro{edtranspunct:c}% - \renewcommand*{\cbx@bibstring}{editor}% - \usebibmacro{editorlists}{#1}% - \usebibmacro{pluga+printnames}}% - {}} + \usebibmacro{edcombos:a}% + \usebibmacro{pluga+printnames}% + \setunit{\addcomma\space}% + \usebibmacro{editoraddon}{editor}% + \usebibmacro{editoraddon}{editora}% + \usebibmacro{ed:c:second}{#1}% + \setunit{\addcomma\space}% + \usebibmacro{editoraddon}{editora}}} \newbibmacro*{edtranspunct:c}{% \ifboolexpr{ togl {collection:bk} @@ -1228,41 +1124,163 @@ {\newunit}% {\setunit{\addcomma\space}}} -\newbibmacro*{editorlists}[1]{% - \iffieldequalstr{editortype}{#1} - {\renewcommand*{\cbx@namelist}{editor}}% - {\iffieldequalstr{editoratype}{#1} - {\renewcommand*{\cbx@namelist}{editora}}% - {\iffieldequalstr{editorbtype}{#1} - {\renewcommand*{\cbx@namelist}{editorb}}% - {\renewcommand*{\cbx@namelist}{editorc}}}}} - -% For translators of a 'maintitle'. +\newbibmacro*{trans:c:combos}{% + \iftoggle{notrans} + {} + {\usebibmacro{edtranspunct:c}% + \usebibmacro{transcombos:a}% + \usebibmacro{pluga+printnames}}} -\newbibmacro*{translatortypes}{% - \ifboolexpr{ test {\iffieldequalstr{translatortype}{maintitle}} - or test {\iffieldequalstr{translatoratype}{maintitle}}} +\newbibmacro*{ed:c:second}[1]{% + \usebibmacro{test:ed:c}{#1}% + \iftoggle{noed} + {} {\usebibmacro{edtranspunct:c}% - \renewcommand*{\cbx@bibstring}{translator}% - \iffieldequalstr{translatortype}{maintitle} - {\renewcommand*{\cbx@namelist}{translator}}% - {\renewcommand*{\cbx@namelist}{translatora}}% - \usebibmacro{pluga+printnames}}% - {}} + \usebibmacro{edcombos:a}% + \usebibmacro{pluga+printnames}}} + +% Macros common to 'editors:a', 'editors:b', and 'editors:c'. -% A catchall for additional editorial information about a 'title'. +\newbibmacro*{edcombos:a}{% + \renewcommand*{\cbx@namelist}{\xeditor}% + \ifnamesequal{\xeditor}{\yeditor} + {\clearname{\yeditor}% + \toggletrue{notrans}% + \usebibmacro{edcombos:b}{\edtypes}{edtrans}% + \iftoggle{atleastone} + {} + {\usebibmacro{edcombos:b}{\transtypes}{edtrans}}} + {\usebibmacro{edcombos:c}}} -\newbibmacro*{editoraddon}{% - \iffieldundef{editoraddon} +\newbibmacro*{transcombos:a}{% + \renewcommand*{\cbx@namelist}{\yeditor}% + \ifnamesequal{\xeditor}{\yeditor} + {\clearname{\xeditor}% + \toggletrue{noed}% + \usebibmacro{transcombos:b}{\edtypes}{transed}% + \iftoggle{atleastone} + {} + {\usebibmacro{transcombos:b}{\transtypes}{transed}}} + {\usebibmacro{transcombos:c}}} + +\newbibmacro*{edcombos:b}[2]{% + \togglefalse{atleastone}% + \renewcommand*{\do}[1]{% + \ifinlist{##1}{#1} + {\toggletrue{atleastone}% + \listbreak}% + {}}% needs '%' + \docsvlist{comptrans,comp,compiler,comped,compex,comprev,compup,transcomp}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{comptrans}}% + {\docsvlist{extrans,ex,excomp,exed,expander,exrev,exup,transex}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{extrans}}% + {\docsvlist{revtrans,rev,revcomp,reved,revex,reviser,revup,transrev}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{revtrans}}% + {\docsvlist{uptrans,up,upcomp,updater,uped,upex,uprev,transup}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{uptrans}}% + {\renewcommand*{\cbx@bibstring}{#2}}}}}} + +\newbibmacro*{edcombos:c}{% + \renewcommand*{\do}[1]{% + \ifboolexpr{ test {\ifinlist{##1}{\edtypes}} + or test {\ifstrequal{##1}{editor}}} + {\usebibmacro{swapstrings}{##1}% + \listbreak}% + {}}% needs '%' + \docsvlist{comp,comped,compex,compiler,comprev,comptrans,compup,ed,edcomp,edex,edrev,edtrans,edup, + ex,excomp,exed,expander,exrev,extrans,exup,rev,revcomp,reved,revex,reviser,revtrans, + revup,transcomp,transed,transex,transrev,transup,up,upcomp,updater,uped,upex,uprev, + uptrans,editor}}% + +\newbibmacro*{transcombos:b}[2]{% + \togglefalse{atleastone}% + \renewcommand*{\do}[1]{% + \ifinlist{##1}{#1} + {\toggletrue{atleastone}% + \listbreak}% + {}}% needs '%' + \docsvlist{transcomp,comp,comped,compex,compiler,comprev,comptrans,compup}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{transcomp}}% + {\docsvlist{transex,ex,excomp,exed,expander,exrev,extrans,exup}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{transex}}% + {\docsvlist{transrev,rev,revcomp,reved,revex,reviser,revtrans,revup}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{transrev}}% + {\docsvlist{transup,up,upcomp,updater,uped,upex,uprev,uptrans}% + \iftoggle{atleastone} + {\renewcommand*{\cbx@bibstring}{transup}}% + {\renewcommand*{\cbx@bibstring}{#2}}}}}} + +\newbibmacro*{transcombos:c}{% + \renewcommand*{\do}[1]{% + \ifboolexpr{ test {\ifinlist{##1}{\transtypes}} + or test {\ifstrequal{##1}{translator}}} + {\usebibmacro{swapstrings}{##1}% + \listbreak}% + {}}% needs '%' + \docsvlist{comptrans,edtrans,extrans,revtrans,transcomp,transed,transex,transrev,transup,uptrans, + translator}}% + +\newbibmacro*{swapstrings}[1]{% + \iftoggle{swaptrans} + {\ifstrequal{#1}{comptrans} + {\renewcommand*{\cbx@bibstring}{transcomp}}% + {\ifstrequal{#1}{edtrans} + {\renewcommand*{\cbx@bibstring}{transed}}% + {\ifstrequal{#1}{extrans} + {\renewcommand*{\cbx@bibstring}{transex}}% + {\ifstrequal{#1}{revtrans} + {\renewcommand*{\cbx@bibstring}{transrev}}% + {\ifstrequal{#1}{transcomp} + {\renewcommand*{\cbx@bibstring}{comptrans}}% + {\ifstrequal{#1}{transed} + {\renewcommand*{\cbx@bibstring}{edtrans}}% + {\ifstrequal{#1}{transex} + {\renewcommand*{\cbx@bibstring}{extrans}}% + {\ifstrequal{#1}{transrev} + {\renewcommand*{\cbx@bibstring}{revtrans}}% + {\ifstrequal{#1}{transup} + {\renewcommand*{\cbx@bibstring}{uptrans}}% + {\ifstrequal{#1}{uptrans} + {\renewcommand*{\cbx@bibstring}{transup}}% + {\renewcommand*{\cbx@bibstring}{#1}}}}}}}}}}}} + {\renewcommand*{\cbx@bibstring}{#1}}} + +\newbibmacro*{addplus+etc}{% + \iftoggle{cbx:short} {} - {\nopunct\printfield{editoraddon}% - \clearfield{editoraddon}}} + {\usebibmacro{addplus}% + \renewcommand*{\plugb}{% + \addcomma\space\bibsstring{\cbx@bibstring}}}} + +\newbibmacro*{addplus}{% + \ifnameundef{\xeditor} + {\ifnameundef{\yeditor} + {} + {\ifnumgreater{\value{\yeditor}}{1} + {\edef\cbx@bibstring{\cbx@bibstring +}}% + {}}} + {\ifnumgreater{\value{\xeditor}}{1} + {\edef\cbx@bibstring{\cbx@bibstring +}}% + {}}} + +\newbibmacro*{editoraddon}[1]{% + \ifboolexpr{ test {\iffieldundef{#1addon}} + or not test {\ifdefstring{\xeditor}{#1}}} + {} + {\nopunct\printfield{#1addon}% + \clearfield{#1addon}}} %%%%%%%%%%%%%%%%%%%%%%%% %% Names and Dashes %% %%%%%%%%%%%%%%%%%%%%%%%% -% HERE \newbibmacro*{printnames+etc}{% \ifboolexpr{ togl {authposition} and togl {bibliography}} @@ -1304,7 +1322,7 @@ \printfield[parens]{handle}% \clearfield{handle}}} -% In short citations, omit addons. See CMOS, 17th ed., 14.80 and +% Omit addons in short citations. See CMOS, 17th ed., 14.80 and % 14.209. \newbibmacro*{nameaddon}{% @@ -1333,7 +1351,7 @@ \let\anona\empty \let\anonb\empty \let\pluga\empty - \let\plugb\empty}% + \let\plugb\empty} %%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Titles and Subtitles %% @@ -1442,7 +1460,7 @@ {\bibstring{in}\space \renewcommand*{\xtitle}{issue}% \usebibmacro{longtitle+titleaddon}% - \usebibmacro{editortypes}{issuetitle}}% + \usebibmacro{editors:c}{issuetitle}}% \newunit\bibstring{special}% \setunit{\addcomma\space}}} @@ -1886,7 +1904,7 @@ \usebibmacro{author+bookauthor+etc}% \usebibmacro{title+labelyear}% \usebibmacro{note}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% \newbibmacro*{articles}{% \newunit @@ -1947,14 +1965,14 @@ \usebibmacro{longtitle+titleaddon}% \toggletrue{edshift}% \usebibmacro{byauthor}% - \usebibmacro{edtrans}% + \usebibmacro{editors:b}% \usebibmacro{volumes+bookseries+etc}}% {\usebibmacro{title+labelyear}% \usebibmacro{byauthor}% \iffieldundef{maintitle} {\usebibmacro{note+edition+etc}% \usebibmacro{volumes+bookseries+etc}}% - {\usebibmacro{edtrans}% + {\usebibmacro{editors:b}% \usebibmacro{volumes+bookseries+etc}% \usebibmacro{maintitle+note+etc}}} \usebibmacro{date+loc+etc}% @@ -1970,15 +1988,15 @@ {\usebibmacro{author+bookauthor+etc}% \iffieldundef{title} {\usebibmacro{booktitle}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% {\ifboolexpr{ togl {collection:ib} and togl {swapvol} and not togl {collection:icib}} {\usebibmacro{booktitle}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% {\usebibmacro{title+labelyear}% \usebibmacro{byauthor}% - \usebibmacro{edtrans}% + \usebibmacro{editors:b}% \usebibmacro{chapter+in}}}} {\usebibmacro{supplement}% \newunit @@ -1996,7 +2014,7 @@ \ifcsdef{c@\thefield{crossref}} {\setcounter{\thefield{crossref}}{0}}% {\newcounter{\thefield{crossref}}}% needs '%' - \usebibmacro{incollections}}}} + \usebibmacro{incollections}}}} \newbibmacro*{websites}{% \ifboolexpr{ test {\iffieldundef{blogtitle}} @@ -2029,7 +2047,7 @@ \iftoggle{shortfirst} {} {\toggletrue{edshift}% - \usebibmacro{edtrans}}} + \usebibmacro{editors:b}}} \newbibmacro*{inst+loc+date}{% \usebibmacro{thesis+type}% @@ -2095,7 +2113,7 @@ \printfield{series}}% \isdot\addcomma \usebibmacro{seriesaddon}% - \usebibmacro{editortypes}{series}% + \usebibmacro{editors:c}{series}% \newunit}}% \newbibmacro*{volume}{% @@ -2197,11 +2215,7 @@ \usebibmacro{maintitle}% \usebibmacro{note}% \usebibmacro{edition}{}% - \iftoggle{swaptrans} - {\usebibmacro{translatortypes}% - \usebibmacro{editortypes}{maintitle}}% - {\usebibmacro{editortypes}{maintitle}% - \usebibmacro{translatortypes}}} + \usebibmacro{editors:c}{maintitle}}% \newbibmacro*{volume+number+etc}{% \iffieldundef{\xvolume volume} @@ -2247,14 +2261,13 @@ \newbibmacro*{note+edition+etc}{% \usebibmacro{note}% \usebibmacro{edition}{}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% \newbibmacro*{edition}[1]{% \iffieldundef{edition} {} {\iftoggle{edshift} - {\setunit{\addcomma\space}% - \togglefalse{edshift}}% + {\setunit{\addcomma\space}}% {\newunit}% \iffieldbibstring{edition} {\bibstring{\thefield{edition}}} @@ -2431,8 +2444,7 @@ \newunit \printfield{series}% \usebibmacro{seriesaddon}% - \usebibmacro{editortypes}{series}% - \setunit{\addcomma\space}}} + \usebibmacro{editors:c}{series}}} \newbibmacro*{seriesaddon}{% \iffieldundef{seriesaddon} @@ -2468,10 +2480,8 @@ {}} \newbibmacro*{other:number}{% - \ifboolexpr{ test {\iffieldequalstr{editortype}{series}} - or test {\iffieldequalstr{editoratype}{series}} - or test {\iffieldequalstr{editorbtype}{series}} - or test {\iffieldequalstr{editorctype}{series}}} + \ifboolexpr{ test {\ifinlist{series}{\edtypes}} + or test {\ifinlist{series}{\transtypes}}} {\setunit{\addcomma\space}% \printfield{number}}% {\setunit{\addspace}% not '\setunit{\space}' @@ -2513,7 +2523,7 @@ \usebibmacro{longtitle+titleaddon}% \toggletrue{edshift}% \usebibmacro{byauthor}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% {\usebibmacro{volume+number+etc}% \toggletrue{edshift}% \usebibmacro{booktitle}% @@ -2531,10 +2541,10 @@ \usebibmacro{volumes+bookseries+etc}% \toggletrue{edshift}% \usebibmacro{booktitle}% - \usebibmacro{edtrans}}% + \usebibmacro{editors:b}}% {\toggletrue{edshift}% \usebibmacro{booktitle}% - \usebibmacro{edtrans}% + \usebibmacro{editors:b}% \renewcommand*{\xvolume}{book}% \usebibmacro{volume+number+etc}% \iftoggle{collection:icbk} diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.cbx b/Master/texmf-dist/tex/latex/windycity/windycity.cbx index bb0ca85e87b..f73248dcf5c 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.cbx +++ b/Master/texmf-dist/tex/latex/windycity/windycity.cbx @@ -1,4 +1,4 @@ -% Last modified: Sat 30 Jan 2021 06:17:55 PM CST +% Last modified: Sun 02 May 2021 01:14:43 PM CDT % 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.cbx}[2021/01/30 Windy City citation style for +\ProvidesFile{windycity.cbx}[2021/05/02 Windy City citation style for biblatex] \@ifpackagelater{biblatex}{2019/08/17} {} @@ -360,6 +360,22 @@ {} {\newunit}}% +% Thanks to David Fussner's biblatex-chicago for pointing me to this +% command by Philipp Lehman. Source: +% https://groups.google.com/forum/#!topic/comp.text.tex/kG003fkZK1I + +\newrobustcmd*{\iffieldstart}[2]{% + \iffieldundef{#1} + {\@secondoftwo}% originally '\@gobbletwo' + {\begingroup + \edef\@tempa{% + \long\def\noexpand\iffieldstart@i####1\detokenize{#2}####2}% + \@tempa\@nil{\endgroup\ifblank{##1}}% + \savefield*{#1}{\@tempa}% + \expandafter\iffieldstart@i\detokenize + \expandafter\expandafter\expandafter{% + \expandafter\@tempa\detokenize{#2}}\@nil}}% + \newbibmacro*{volume+page}{% \iffieldundef{volume} {} diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.dbx b/Master/texmf-dist/tex/latex/windycity/windycity.dbx index 51a83057e7e..1bdbc03b64b 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.dbx +++ b/Master/texmf-dist/tex/latex/windycity/windycity.dbx @@ -1,4 +1,4 @@ -\ProvidesFile{windycity.dbx}[2021/01/30 Windy City data model file for +\ProvidesFile{windycity.dbx}[2021/05/02 Windy City data model file for biblatex] \DeclareDatamodelFields[type=field,datatype=literal]{% blogsubtitle, @@ -6,10 +6,13 @@ blogtitleaddon, bookauthortype, bookbooktitle, - bookbookvolume, bookvolume, + bookbookvolume, + booktitlekey, + bookbooktitlekey, bookyear, editoraddon, + editoraaddon, endbookyear, handle, seriesaddon, @@ -17,8 +20,10 @@ shortbooktitle, shortmaintitle, shortorganization, + titlekey, + translatortype, translatoratype, - translatortype} + translatorbtype} \DeclareDatamodelFields[type=list,datatype=name]{% preface, shortbookauthor, diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.sty b/Master/texmf-dist/tex/latex/windycity/windycity.sty index 718c4f61805..c001e45902a 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.sty +++ b/Master/texmf-dist/tex/latex/windycity/windycity.sty @@ -1,4 +1,4 @@ -% Last modified: Tue 10 Nov 2020 07:45:15 AM CST +% Last modified: Tue 13 Apr 2021 05:25:58 PM CDT \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{windycity} \RequirePackage{ifxetex} @@ -164,17 +164,17 @@ \defbibheading{biblist}{% \newpage - \begin{center}\section*{Abbreviations}\end{center} + \section*{Abbreviations} \addcontentsline{toc}{section}{Abbreviations} \markright{Abbreviations}}% \defbibheading{bibliography}{% \newpage - \begin{center}\section*{Bibliography (Standard Format)}\end{center} + \section*{Bibliography (Standard Format)} \addcontentsline{toc}{section}{Bibliography (Standard Format)} \markright{Bibliography}}% \defbibheading{references}{% \newpage - \begin{center}\section*{References (Author-Date Format)}\end{center} + \section*{References (Author-Date Format)} \addcontentsline{toc}{section}{References (Author-Date Format)} \markright{References}}% \defbibheading{none}{}% |