summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/windycity/american-windycity.lbx124
-rw-r--r--Master/texmf-dist/tex/latex/windycity/windycity.bbx2237
-rw-r--r--Master/texmf-dist/tex/latex/windycity/windycity.cbx490
3 files changed, 2851 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx b/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx
new file mode 100644
index 00000000000..284fa58298d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/windycity/american-windycity.lbx
@@ -0,0 +1,124 @@
+% Last modified: Mon 11 Feb 2019 05:36:39 PM CST
+
+% Copyright (c) 2018 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.
+%
+% The LPPL maintenance status of this software is 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a particular
+% purpose.
+
+\ProvidesFile{american.lbx}
+[\abx@lbxid]
+
+\InheritBibliographyExtras{american}
+\InheritBibliographyStrings{american}
+
+% The code below comes from english.lbx. The only change is to remove
+% '\parentext{}' from '\mkbibtimezone{\thefield{#4}'.
+
+\DeclareBibliographyExtras{%
+ \expandafter\protected\expandafter\def\csname mkbibtime12h\endcsname#1#2#3#4{%
+ \stripzeros{\mktimehh{\thefield{#1}}}%
+ \bibtimesep
+ \forcezerosmdt{\thefield{#2}}%
+ \iffieldundef{#3}{}
+ {\bibtimesep
+ \forcezerosmdt{\thefield{#3}}}%
+ \space
+ \ifnumless{\thefield{#1}}{12}
+ {\bibstring{am}}
+ {\bibstring{pm}}%
+ \iffieldundef{#4}{}
+ {\space\bibtimezonesep
+ \mkbibtimezone{\thefield{#4}}}}%
+}
+
+\NewBibliographyString{bibnamedash}
+\NewBibliographyString{by}
+\NewBibliographyString{compiler}
+\NewBibliographyString{compiler+}
+\NewBibliographyString{comptrans}
+\NewBibliographyString{comptrans+}
+\NewBibliographyString{editor+}
+\NewBibliographyString{edtrans}
+\NewBibliographyString{edtrans+}
+\NewBibliographyString{expanded}
+\NewBibliographyString{noplace}
+\NewBibliographyString{of}
+\NewBibliographyString{origpub}
+\NewBibliographyString{part}
+\NewBibliographyString{revised}
+\NewBibliographyString{review}
+\NewBibliographyString{reviewnoauth}
+\NewBibliographyString{reprint}
+\NewBibliographyString{reprinted}
+\NewBibliographyString{selfpub}
+\NewBibliographyString{special}
+\NewBibliographyString{subverbo}
+\NewBibliographyString{subverbos}
+\NewBibliographyString{transcomp}
+\NewBibliographyString{transcomp+}
+\NewBibliographyString{transed}
+\NewBibliographyString{transed+}
+
+\DeclareBibliographyStrings{%
+ am = {{a\adddot m\adddot}{a\adddot m\adddot}},
+ afterword = {{afterword to}{afterword to}},
+ andothers = {{et\addabbrvspace al\adddot}{et\addabbrvspace al\adddot}},
+ by = {{by}{by}},
+ bibnamedash = {{\rule[2.4pt]{3em}{0.2pt}}{\rule[2.4pt]{3em}{0.2pt}}},
+ bibliography = {{Bibliography}{Bibliography}},
+ chapter = {{chap\adddot}{chap\adddot}},
+ citedas = {{hereafter cited as}{hereafter cited as}},
+ compiler = {{compiled by}{comp\adddot}},
+ compiler+ = {{compiled by}{comps\adddot}},
+ comptrans = {{compiled and translated by}{comp\adddotspace and trans\adddot}},
+ comptrans+ = {{compiled and translated by}{comps\adddotspace and trans\adddot}},
+ edition = {{ed\adddot}{ed\adddot}},
+ editor = {{edit\-ed by}{ed\adddot}},
+ editor+ = {{edit\-ed by}{eds\adddot}},
+ edtrans = {{edit\-ed and translated by}{ed\adddotspace and trans\adddot}},
+ edtrans+ = {{edit\-ed and translated by}{eds\adddotspace and trans\adddot}},
+ expanded = {{exp\adddotspace ed\adddot}{exp\adddotspace ed\adddot}},
+ foreword = {{foreword to}{foreword to}},
+ forthcoming = {{forthcoming}{forthcoming}},
+ in = {{in}{in}},
+ introduction = {{introduction to}{introduction to}},
+ ibidem = {{ibid\adddot}{ibid\adddot}},
+ mathesis = {{master's thesis}{master's thesis}},
+ nodate = {{\lowercase{n}\adddot d\adddot}{\lowercase{n}\adddot d\adddot}},
+ noplace = {{N\adddot p\adddot}{n\adddot p\adddot}},
+ of = {{of}{of}},
+ origpub = {{originally published as}{orig\adddotspace published as}},
+ page = {{Page}{Page}}, % assures proper case in 'pageref'
+ pages = {{Pages}{Pages}}, % assures proper case in 'pageref'
+ phdthesis = {{PhD diss\adddot}{PhD diss\adddot}},
+ pm = {{p\adddot m\adddot}{p\adddot m\adddot}},
+ references = {{Bibliography}{Bibliography}},
+ reprint = {{reprint}{repr\adddot}},
+ reprinted = {{reprinted in}{reprinted in}},
+ review = {{review of}{review of}},
+ reviewnoauth = {{unsigned review of}{unsigned review of}},
+ revised = {{rev\adddotspace ed\adddot}{rev\adddotspace ed\adddot}},
+ selfpub = {{Self-published}{self-pub\adddot}},
+ special = {{special issue}{special issue}},
+ subverbo = {{s\adddot v\adddot}{s\adddot v\adddot}},
+ subverbos = {{s\adddot vv\adddot}{s\adddot vv\adddot}},
+ transcomp = {{translated and compiled by}{trans\adddotspace and comp\adddot}},
+ transcomp+ = {{translated and compiled by}{trans\adddotspace and comps\adddot}},
+ transed = {{translated and edited by}{trans\adddotspace and ed\adddot}},
+ transed+ = {{translated and edited by}{trans\adddotspace and eds\adddot}},
+ translator = {{translated by}{trans\adddot}},
+ part = {{pt\adddot}{pt\adddot}},
+ urlseen = {{accessed}{accessed}},
+ volume = {{vol\adddot}{vol\adddot}},
+ volumes = {{vols\adddot}{vols\adddot}}
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.bbx b/Master/texmf-dist/tex/latex/windycity/windycity.bbx
new file mode 100644
index 00000000000..d9584ac81a5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/windycity/windycity.bbx
@@ -0,0 +1,2237 @@
+% Last modified: Wed 27 Mar 2019 10:37:54 AM 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.
+%
+% The LPPL maintenance status of this software is 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a particular
+% purpose.
+
+\ProvidesFile{windycity.bbx}[Windy City style for biblatex]
+\@ifpackagelater{biblatex}{2017/11/04}
+ {}
+ {\PackageError{biblatex}
+ {Outdated 'biblatex' package}
+ {Windy City 2019-03-27 is for biblatex v3.8 and above.\MessageBreak
+ You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak
+ This is a fatal error. I'm aborting now.}%
+ \endinput}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bibliography and Entry Options %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\providetoggle{anonauth}
+\DeclareEntryOption{anonauth}[true]{%
+ \ifstrequal{#1}{true}
+ {\renewcommand*{\anona}{\bibopenbracket}%
+ \renewcommand*{\anonb}{\bibclosebracket}}%
+ {}}
+
+\providetoggle{anonqauth}
+\DeclareEntryOption{anonqauth}[true]{%
+ \ifstrequal{#1}{true}
+ {\renewcommand*{\anona}{\bibopenbracket}%
+ \renewcommand*{\anonb}{\addquestion\bibclosebracket}}%
+ {}}
+
+\providetoggle{annotate}
+\DeclareBibliographyOption[boolean]{annotate}[true]{%
+ \global\settoggle{annotate}{#1}}%
+
+\DeclareBibliographyOption{collsonly}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{mincrossrefs=1}%
+ \ExecuteBibliographyOptions{minxrefs=1}%
+ \AtBeginBibliography{\blx@key@bibcheck{collsonly}}}
+ {}}
+
+\providetoggle{firstshort}
+\DeclareBibliographyOption[boolean]{firstshort}[true]{%
+ \global\settoggle{firstshort}{#1}}%
+
+\providetoggle{ibid}
+\DeclareBibliographyOption{ibid}[true]{%
+ \ifstrequal{#1}{true}
+ {\global\toggletrue{ibid}%
+ \global\toggletrue{short}}%
+ {\global\togglefalse{ibid}}}
+
+\providetoggle{isbn}
+\DeclareBibliographyOption[boolean]{isbn}[true]{%
+ \global\settoggle{isbn}{#1}}%
+\DeclareEntryOption[boolean]{isbn}[true]{%
+ \settoggle{isbn}{#1}}%
+
+\providetoggle{library}
+\DeclareBibliographyOption[boolean]{library}[true]{%
+ \global\settoggle{library}{#1}}%
+\DeclareEntryOption[boolean]{library}[true]{%
+ \settoggle{library}{#1}}%
+
+\providetoggle{listvols}
+\DeclareEntryOption[boolean]{listvols}[true]{%
+ \settoggle{listvols}{#1}}%
+
+\providetoggle{noauth}
+\DeclareEntryOption[boolean]{noauth}[true]{%
+ \settoggle{noauth}{#1}}%
+
+\DeclareBibliographyOption{nolos}[true]{%
+ \ifstrequal{#1}{true}
+ {\AtBeginBibliography{\blx@key@bibcheck{nolos}}}
+ {}}
+
+\providetoggle{reflist}
+\DeclareBibliographyOption{reflist}[true]{%
+ \ifstrequal{#1}{true}
+ {\global\toggletrue{reflist}%
+ \DeclareLabeldate{%
+ \field{date}
+ \field{year}
+ \field{origdate}
+ \field{urldate}
+ \literal{nodate}}
+ \ExecuteBibliographyOptions{%
+ autocite=inline,
+ sorting=nyt}}%
+ {\global\togglefalse{reflist}%
+ \ExecuteBibliographyOptions{%
+ autocite=footnote,
+ sorting=nty}}}
+
+\providetoggle{short}
+\DeclareBibliographyOption{short}[true]{%
+ \ifstrequal{#1}{true}
+ {\global\toggletrue{short}%
+ \global\toggletrue{firstshort}}%
+ {\global\togglefalse{short}}}
+
+\providetoggle{skipdate}
+\DeclareEntryOption[boolean]{skipdate}[true]{%
+ \settoggle{skipdate}{#1}}%
+
+\providetoggle{swapauth}
+\DeclareEntryOption[boolean]{swapauth}[true]{%
+ \settoggle{swapauth}{#1}}%
+
+\providetoggle{swaptrans}
+\DeclareEntryOption[boolean]{swaptrans}[true]{%
+ \settoggle{swaptrans}{#1}}%
+
+\providetoggle{swapvol}
+\DeclareBibliographyOption[boolean]{swapvol}[true]{%
+ \global\settoggle{swapvol}{#1}}%
+\DeclareEntryOption[boolean]{swapvol}[true]{%
+ \settoggle{swapvol}{#1}}%
+
+% For setting 'minbibnames' and such, see CMOS, 17th ed., 14.76 and
+% 15.29.
+
+\ExecuteBibliographyOptions{%
+ abbreviate=true,
+ autopunct=true,
+ block=none,
+ citetracker=constrict,
+ date=long,
+ dateabbrev=false,
+ dateusetime=true,
+ ibidtracker=constrict,
+% Just one use of '\ifciteidem'. See note in windycity.cbx.
+ idemtracker=false,
+ indexing=true,
+ labeldateparts=true,
+ loccittracker=constrict,
+ minbibnames=7,
+ 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,
+ parentracker=true,
+ sortcites=false,
+ time=12h,
+ timezones=true,
+ uniquelist=minyear,
+ uniquename=minfull,
+ urldate=long,
+ useeditor=true,
+ useprefix=false,
+ usetranslator=true}
+
+\DeclareLanguageMapping{english}{american-windycity}
+\DeclareLabeldate{% 'reflist' preamble option loads an alternative
+ \field{bookyear}
+ \field{date}
+ \field{year}
+ \field{origdate}
+ \field{urldate}
+ \literal{nodate}}
+\DeclareLabelname{%
+ \field{author}
+ \field{editor}
+ \field{translator}
+ \field{editora}
+ \field{translatora}}
+\DeclareLabelname[inbook,incollection]{%
+ \field{author}
+ \field{bookauthor}
+ \field{editor}
+ \field{translator}
+ \field{editora}
+ \field{translatora}}
+\DeclareSortingTemplate{nty}{%
+ \sort{\field{presort}}
+ \sort[final]{\field{sortkey}}
+ \sort{%
+ \field{sortname}
+ \field{author}
+ \field{bookauthor}
+ \field{editor}
+ \field{translator}
+ \field{editora}
+ \field{sorttitle}
+ \field{title}
+ \field{booktitle}
+ \field{bookbooktitle}
+ \field{blogtitle}
+ \field{journaltitle}}
+ \sort{%
+ \field{sorttitle}
+ \field{title}
+ \field{booktitle}
+ \field{bookbooktitle}
+ \field{blogtitle}
+ \field{journaltitle}}
+ \sort{%
+ \field{sortyear}
+ \field{year}
+ \field{labelyear}}
+ \sort{%
+ \field[padside=left,padwidth=4,padchar=0]{volume}
+ \literal{0000}}}
+\DeclareSortingTemplate{nyt}{%
+ \sort{\field{presort}}
+ \sort[final]{\field{sortkey}}
+ \sort{%
+ \field{sortname}
+ \field{author}
+ \field{bookauthor}
+ \field{editor}
+ \field{translator}
+ \field{editora}
+ \field{sorttitle}
+ \field{title}
+ \field{booktitle}
+ \field{bookbooktitle}
+ \field{blogtitle}
+ \field{journaltitle}}
+ \sort{%
+ \field{sortyear}
+ \field{origyear}
+ \field{labelyear}
+ \field{year}}
+ \sort{%
+ \field{sorttitle}
+ \field{title}
+ \field{booktitle}
+ \field{bookbooktitle}
+ \field{blogtitle}
+ \field{journaltitle}}
+ \sort{%
+ \field[padside=left,padwidth=4,padchar=0]{volume}
+ \literal{0000}}}
+
+\defbibcheck{collsonly}{%
+ \ifboolexpr{ test {\ifentrytype{bookinbook}}
+ or test {\ifentrytype{inbook}}}
+ {\iffieldundef{crossref}
+ {}
+ {\skipentry}}%
+ {\ifentrytype{incollection}
+ {\iffieldundef{crossref}
+ {}
+ {\iffieldundef{chapter}
+ {}
+ {\skipentry}}}}}
+\defbibcheck{nolos}{%
+ \iffieldundef{shorthand}
+ {}
+ {\skipentry}}%
+\defbibcheck{reference}{%
+ \ifentrytype{reference}
+ {\skipentry}%
+ {\ifentrytype{inreference}
+ {\skipentry}%
+ {}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%
+%% Data Inheritance %%
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+\ResetDataInheritance
+\DefaultInheritance[\except{*}{review}{all=false}]{all=true,override=false}
+\DeclareDataInheritance{*}{%
+ incollection,inbook,bookinbook,inproceedings,letter,suppbook,review}{%
+ \inherit{author}{bookauthor}
+ \inherit{shortauthor}{shortbookauthor}
+ \inherit{editor}{editora}
+ \inherit{editora}{editorb}
+ \inherit{editorb}{editorc}
+ \inherit{editortype}{editoratype}
+ \inherit{editoratype}{editorbtype}
+ \inherit{editorbtype}{editorctype}
+ \inherit{translator}{translatora}
+ \inherit{translatora}{translatorb}
+ \inherit{translatortype}{translatoratype}
+ \inherit{title}{booktitle}
+ \inherit{subtitle}{booksubtitle}
+ \inherit{titleaddon}{booktitleaddon}
+ \inherit{shorttitle}{shortbooktitle}
+ \inherit{booktitle}{bookbooktitle}
+ \inherit{volume}{bookvolume}
+ \inherit{bookvolume}{bookbookvolume}
+ \inherit{options}{options}}
+\DeclareDataInheritance{collection}{bookinbook,collection,inbook}{%
+ \inherit{year}{bookyear}
+ \inherit{endyear}{endbookyear}}
+
+%%%%%%%%%%%%%%%%%%%
+%% Preliminary %%
+%%%%%%%%%%%%%%%%%%%
+
+\let\cbx@bibstring\empty
+\let\cbx@deflabel\empty
+\let\cbx@keyhash\empty
+\let\cbx@namelist\empty
+\let\anona\empty
+\let\anonb\empty
+\let\crossreflist\empty
+\let\pluga\empty
+\let\plugb\empty
+\let\xeditor\empty
+\let\yeditor\empty
+\let\xtitle\empty
+\let\xvolume\empty
+
+\providetoggle{authposition}
+\providetoggle{bibliography}
+\providetoggle{journalfirst}
+\providetoggle{multicite}
+\providetoggle{cbx@first}
+\providetoggle{cbx@loccit}
+\providetoggle{cbx@short}
+
+\providetoggle{collection}
+\providetoggle{collection:bk}
+\providetoggle{collection:ib}
+\providetoggle{collection:icbk}
+\providetoggle{collection:icib}
+
+\providetoggle{edshift}
+\providetoggle{noed}
+\providetoggle{notrans}
+
+\newcommand*{\AtBeginLists}{%
+ \renewcommand*{\newunitpunct}{\addperiod\space}%
+ \let\bibstring\biblstring
+ \global\undef\bbx@lasthash
+ \blx@key@bibcheck{reference}}%
+
+\newcommand*{\AtEveryItem}{%
+ \global\toggletrue{authposition}%
+ \global\togglefalse{cbx@short}}%
+
+\AtBeginBibliography{\AtBeginLists}%
+\AtBeginShorthands{\AtBeginLists}%
+\AtEveryBibitem{%
+ \global\toggletrue{bibliography}%
+ \AtEveryItem}%
+\AtEveryLositem{\AtEveryItem}%
+
+\defbibenvironment{reflist}
+ {\global\toggletrue{reflist}%
+ \list{}{%
+ \leftmargin\bibhang
+ \itemindent-\leftmargin
+ \itemsep\bibitemsep
+ \parsep\bibparsep}}
+ {\endlist
+ \global\togglefalse{reflist}}%
+ {\item}
+
+% Index names only.
+
+\renewbibmacro*{bibindex}{%
+ \ifbibindex
+ {\indexnames{labelname}}%
+ {}}
+\renewbibmacro*{citeindex}{%
+ \ifciteindex
+ {\indexnames{labelname}}%
+ {}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Field Formats for Names %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareNameAlias{author}{sortname}
+\DeclareNameAlias{afterword}{sortname}
+\DeclareNameAlias{bookauthor}{sortname}
+\DeclareNameAlias{editor}{sortname}
+\DeclareNameAlias{editora}{sortname}
+\DeclareNameAlias{editorb}{sortname}
+\DeclareNameAlias{editorc}{sortname}
+\DeclareNameAlias{foreword}{sortname}
+\DeclareNameAlias{introduction}{sortname}
+\DeclareNameAlias{translator}{sortname}
+
+\DeclareIndexNameAlias{author}{default}
+\DeclareIndexNameAlias{afterword}{default}
+\DeclareIndexNameAlias{bookauthor}{default}
+\DeclareIndexNameAlias{editor}{default}
+\DeclareIndexNameAlias{editora}{default}
+\DeclareIndexNameAlias{editorb}{default}
+\DeclareIndexNameAlias{editorc}{default}
+\DeclareIndexNameAlias{foreword}{default}
+\DeclareIndexNameAlias{introduction}{default}
+\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.
+
+\renewbibmacro*{name:family-given}[4]{%
+ \ifuseprefix
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifdefvoid{#3}{}{%
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{#3}\isdot}%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
+ \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \mkbibnamefamily{#1}\isdot
+ \ifboolexpe{%
+ test {\ifdefvoid{#2}}
+ and
+ test {\ifdefvoid{#3}}}
+ {}
+ {\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
+ \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+ \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
+
+\renewcommand*{\mkbibindexname}[4]{%
+ \ifuseprefix
+ {\ifdefvoid{#3}{}{#3 }%
+ \@firstofone #1% remove spurious braces
+ \ifdefvoid{#4}{}{ #4}%
+ \ifdefvoid{#2}{}{, #2}%
+ \actualoperator
+ \ifdefvoid{#3}{}{\MakeCapital{#3} }%
+ #1%
+ \ifdefvoid{#4}{}{ #4}%
+ \ifdefvoid{#2}{}{, #2}}
+ {\@firstofone #1% remove spurious braces
+ \ifboolexpe{%
+ test {\ifdefvoid{#2}}
+ and
+ test {\ifdefvoid{#3}}}
+ {}
+ {,}%
+ \ifdefvoid{#2}{}{ #2}%
+ \ifdefvoid{#3}{}{ #3}%
+ \ifdefvoid{#4}{}{, #4}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Field Formats for Titles %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareFieldFormat{blogtitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{bookbooktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{labeltitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{maintitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{shortbooktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{title}{\mkbibemph{#1}}
+
+\DeclareIndexFieldFormat{indextitle}{%
+ \usebibmacro{index:title}{\index}{\mkbibemph{#1}}}
+\renewbibmacro*{index:title}[2]{%
+ \usebibmacro{index:field}{#1}{\thefield{indexsorttitle}}{#2}}%
+
+\DeclareFieldFormat{blogtitleaddon}{\mkbibparens{#1}}
+\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
+
+\DeclareFieldFormat[%
+ article,incollection,inreference,inproceedings,online,reference,review]
+ {title}{\mkbibquote{#1}}
+\DeclareFieldFormat[%
+ article,incollection,inreference,inproceedings,online,reference,review]
+ {labeltitle}{\mkbibquote{#1}}
+\DeclareIndexFieldFormat[%
+ article,incollection,inreference,inproceedings,online,reference,review]
+ {indextitle}{\usebibmacro{index:title}{\index}{\mkbibquote{#1}}}
+
+\DeclareFieldAlias[inbook]{title}{title}
+\DeclareFieldAlias[inbook]{labeltitle}{labeltitle}
+\DeclareIndexFieldAlias[inbook]{indextitle}{indextitle}
+\DeclareFieldAlias[book]{origtitle}{title}
+
+\DeclareFieldFormat{chapter}{\bibstring{chapter}\space #1}
+\DeclareFieldFormat{issuetitle}{\ifcapital{\MakeCapital{#1}}{#1}}
+\DeclareFieldFormat[letter,misc,patent]{title}{#1}
+\DeclareFieldFormat[letter,misc,patent]{labeltitle}{#1}
+\DeclareFieldFormat[thesis,unpublished]{title}{%
+ \iftoggle{bibliography}
+ {\mkbibquote{#1}}%
+ {\iftoggle{cbx@short}
+ {\mkbibquote{#1}}%
+ {\mkbibquote{#1}\nopunct}}}
+\DeclareFieldFormat[thesis]{labeltitle}{%
+ \iftoggle{bibliography}
+ {\mkbibquote{#1}}%
+ {\iftoggle{cbx@short}
+ {\mkbibquote{#1}}%
+ {\mkbibquote{#1}\nopunct}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Other Field Formats %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareFieldFormat{addendum}{\ifcapital{\MakeCapital{#1}}{#1}}%
+\DeclareFieldFormat{annotation}{\\[\bibitemsep] #1}
+\DeclareFieldAlias{doi}{url}
+\DeclareFieldFormat{edition}{%
+ \ifinteger{#1}
+ {\mkbibordedition{#1}~\bibstring{edition}}%
+ {\ifcapital{\MakeCapital{#1}}{#1}}}
+\DeclareFieldFormat{endmonth}{\mkbibmonth{#1}}%
+\DeclareFieldFormat{howpublished}{\ifcapital{\MakeCapital{#1}}{#1}}%
+\DeclareFieldFormat{issue}{\MakeCapital{#1}}% always capitalize
+\DeclareFieldFormat{journum}{%
+ \ifnumeral{#1}
+ {no\adddotspace\printfield{number}}%
+ {nos\adddotspace\printfield{number}}}
+\DeclareFieldFormat{labelyear}{%
+ \ifboolexpr{ test {\iffieldundef{year}}
+ and test {\iffieldundef{bookyear}}}
+ {\biblcstring{#1}}%
+ {\ifbibstring{#1}{\bibstring{#1}}{\stripzeros{#1}}}}
+\DeclareListFormat{location}{#1}%
+\DeclareFieldFormat{month}{\mkbibmonth{#1}}%
+\DeclareFieldFormat{note}{\ifcapital{\MakeCapital{#1}}{#1}}%
+\DeclareFieldFormat{pages}{#1}
+\DeclareFieldFormat{part}{\bibstring{part}\space#1}
+\DeclareFieldFormat{postnote}{#1}
+\DeclareListFormat{publisher}{#1}
+\DeclareFieldFormat{season}{\MakeCapital{#1}}% always capitalize
+
+% A shorthand should be italicized if the title that it abbreviates is
+% also italicized. See CMOS, 17th ed., 14.60. Set this in the
+% bibliography database with '\emph{}' or '\mkbibemph{}'.
+
+\DeclareFieldFormat{shorthand}{#1}
+\DeclareFieldFormat{shorthandintro}{%
+ \ifcapital{\MakeCapital{#1}}{#1}}%
+\DeclareFieldFormat{shorthandwidth}{#1}
+\DeclareFieldFormat{type}{\ifcapital{\MakeCapital{#1}}{#1}}%
+\DeclareFieldFormat{url}{\url{#1}}
+\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bibliography Aliases %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareBibliographyAlias{periodical}{article}
+\DeclareBibliographyAlias{cite:periodical}{cite:article}
+
+\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 %%
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand*{\revsdnamedelim}{%
+ \iftoggle{bibliography}
+ {\addcomma}%
+ {}}
+
+\newbibmacro*{author+bookauthor+etc}{%
+ \iftoggle{noauth}
+ {\usebibmacro{authpos+deflabel}}%
+ {\usebibmacro{author+bookauthor}%
+ \ifnameundef{\cbx@namelist}
+ {\usebibmacro{edtrans:authpos}%
+ \ifnameundef{\cbx@namelist}
+ {\toggletrue{noauth}%
+ \usebibmacro{journalfirst}}%
+ {\usebibmacro{edscomps:authpos}%
+ \usebibmacro{namehash+etc}}}%
+ {\usebibmacro{namehash+etc}}}}
+
+\newbibmacro*{authpos+deflabel}{%
+ \global\togglefalse{authposition}%
+ \renewcommand*{\cbx@deflabel}{default}}%
+
+\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}} )}
+ {}
+ {\ifboolexpr{ togl {collection:ib}
+ and togl {swapvol}}
+ {\usebibmacro{bookauthor+namelist}}%
+ {\ifnameundef{author}
+ {\usebibmacro{bookauthor+namelist}}%
+ {\usebibmacro{author+namelist}}}}}
+
+\newbibmacro*{author+namelist}{%
+ \ifboolexpr{ test {\ifnameundef{shortauthor}}
+ or togl {bibliography}}
+ {\renewcommand*{\cbx@namelist}{author}}%
+ {\renewcommand*{\cbx@namelist}{shortauthor}}}
+
+\newbibmacro*{bookauthor+namelist}{%
+ \ifboolexpr{ test {\ifnameundef{shortbookauthor}}
+ or togl {bibliography}}
+ {\renewcommand*{\cbx@namelist}{bookauthor}}%
+ {\renewcommand*{\cbx@namelist}{shortbookauthor}}}
+
+% When 'journaltitle' or 'blogtitle' goes in the author's position.
+
+\newbibmacro*{journalfirst}{%
+ \usebibmacro{authpos+deflabel}%
+ \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}%
+ {\ifboolexpr{ test {\ifentrytype{online}}
+ and togl {bibliography}}
+ {\toggletrue{journalfirst}%
+ \usebibmacro{bibblogdash}%
+ \setunit{\space}%
+ \usebibmacro{labeldate+extradate}%
+ \newunit}%
+ {}}}
+
+\newbibmacro*{namehash+etc}{%
+ \usebibmacro{printnames+etc}%
+ \iftoggle{authposition}% false in 'crossref' macro
+ {\savefield{namehash}{\bbx@lasthash}%
+ \usebibmacro{authpos+deflabel}%
+ \newunit}%
+ {\setunit{\addcomma\space}}}
+
+\newbibmacro*{aft+fore+intro}{%
+ \ifnameundef{afterword}
+ {\ifnameundef{foreword}
+ {\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}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Editors and Translators %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% 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*{test:editor:authpos}{%
+ \renewcommand*{\xeditor}{editor}%
+ \usebibmacro{test:xeditor:a}{ap}%
+ \iftoggle{noed}
+ {}
+ {\ifboolexpr{ togl {collection:ib}
+ and togl {swapvol}
+ and not test {\ifnameundef{editora}}}
+ {\toggletrue{noed}}%
+ {\ifboolexpr{ togl {swapvol}
+ and ( togl {collection:icbk}
+ or togl {collection:icib} )}
+ {\toggletrue{noed}}%
+ {}}}}
+
+\newbibmacro*{test:editora:authpos}{%
+ \renewcommand*{\xeditor}{editora}%
+ \usebibmacro{test:xeditor:a}{ap}%
+ \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}%
+ \iffieldequalstr{\xeditor type}{compiler}
+ {\renewcommand*{\cbx@bibstring}{transcomp}}%
+ {\renewcommand*{\cbx@bibstring}{transed}}}
+ {\renewcommand*{\cbx@bibstring}{translator}}}
+
+\newbibmacro*{edcombos}{%
+ \renewcommand*{\cbx@namelist}{\xeditor}%
+ \ifnamesequal{\xeditor}{\yeditor}
+ {\clearname{\yeditor}%
+ \iffieldequalstr{\xeditor type}{compiler}
+ {\renewcommand*{\cbx@bibstring}{comptrans}}%
+ {\renewcommand*{\cbx@bibstring}{edtrans}}}%
+ {\iffieldequalstr{\xeditor type}{compiler}
+ {\renewcommand*{\cbx@bibstring}{compiler}}%
+ {\renewcommand*{\cbx@bibstring}{editor}}}}
+
+\newbibmacro*{edscomps:authpos}{%
+ \iftoggle{cbx@short}
+ {}
+ {\usebibmacro{edscomps}%
+ \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}
+ {\edef\cbx@bibstring{\cbx@bibstring +}}%
+ {}}}}
+
+% For editors and translators not in the author's position.
+
+\newbibmacro*{edtrans:a}{%
+ \iftoggle{swaptrans}
+ {\usebibmacro{transcombos+etc}%
+ \usebibmacro{edcombos+etc}}%
+ {\usebibmacro{edcombos+etc}%
+ \usebibmacro{transcombos+etc}}}
+
+\newbibmacro*{transcombos+etc}{%
+ \togglefalse{noed}%
+ \togglefalse{notrans}%
+ \usebibmacro{test:ed}%
+ \usebibmacro{test:trans}%
+ \iftoggle{notrans}
+ {}
+ {\usebibmacro{transcombos}%
+ \usebibmacro{pluga+etc}}}
+
+\newbibmacro*{edcombos+etc}{%
+ \togglefalse{noed}%
+ \togglefalse{notrans}%
+ \usebibmacro{test:ed}%
+ \usebibmacro{test:trans}%
+ \iftoggle{noed}
+ {}
+ {\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}}
+ {}
+ {\newunit}}%
+
+\newbibmacro*{pluga+printnames}{%
+ \renewcommand*{\pluga}{%
+ \bibstring{\cbx@bibstring}\space}%
+ \usebibmacro{printnames+etc}}%
+
+\newbibmacro*{edtranspunct:b}{%
+ \iftoggle{edshift}
+ {\setunit{\addcomma\space}}%
+ {\newunit}}%
+
+% Tests for 'edtrans:a' and 'edtrans:b' macros.
+
+\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}{}%
+ \iftoggle{noed}
+ {}
+ {\ifdefstring{\xtitle}{book}
+ {\toggletrue{noed}}%
+ {}}}
+
+\newbibmacro*{test:editora}{%
+ \renewcommand*{\xeditor}{editora}%
+ \usebibmacro{test:xeditor:a}{}%
+ \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}{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}}%
+ {}}
+
+\newbibmacro*{edtranspunct:c}{%
+ \ifboolexpr{ togl {collection:bk}
+ and togl {swapvol}}
+ {\newunit}%
+ {\setunit{\unspace,\addspace}}}
+
+\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*{translatortypes}{%
+ \ifboolexpr{ test {\iffieldequalstr{translatortype}{maintitle}}
+ or test {\iffieldequalstr{translatoratype}{maintitle}}}
+ {\usebibmacro{edtranspunct:c}%
+ \renewcommand*{\cbx@bibstring}{translator}%
+ \iffieldequalstr{translatortype}{maintitle}
+ {\renewcommand*{\cbx@namelist}{translator}}%
+ {\renewcommand*{\cbx@namelist}{translatora}}%
+ \usebibmacro{pluga+printnames}}%
+ {}}
+
+% A catchall for additional editorial information about a 'title'.
+
+\newbibmacro*{editoraddon}{%
+ \iffieldundef{editoraddon}
+ {}
+ {\nopunct\printfield{editoraddon}%
+ \clearfield{editoraddon}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Printing Names and Dashes %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{printnames+etc}{%
+ \ifboolexpr{ togl {authposition}
+ and togl {bibliography}}
+ {\usebibmacro{bibnamedash+printnames}}%
+ {\usebibmacro{printnames}}%
+ \usebibmacro{handle}%
+ \usebibmacro{nameaddon}%
+ \usebibmacro{a:labeldate+extradate}%
+ \usebibmacro{clearnames+empty}}%
+
+\newbibmacro*{bibnamedash+printnames}{%
+ \ifboolexpr{ test {\iffieldequals{namehash}{\bbx@lasthash}}
+ and not test \iffirstonpage}
+ {\ifboolexpr{ test {\ifnameundef{author}}
+ and test {\ifnameundef{bookauthor}}}
+ {\bibstring{bibnamedash}\plugb}%
+ {\bibstring{bibnamedash}}}
+ {\usebibmacro{printnames}}}
+
+\newbibmacro*{printnames}{%
+ \ifnameundef{\cbx@namelist}
+ {}
+ {\anona\pluga\printnames[\cbx@deflabel]{%
+ \cbx@namelist}\plugb\anonb}}%
+
+% A screen name precedes 'nameaddon'. See CMOS, 17th ed., 14.208.
+
+\newbibmacro*{handle}{%
+ \iffieldundef{handle}
+ {}
+ {\space
+ \printfield[parens]{handle}%
+ \clearfield{handle}}}
+
+\newbibmacro*{nameaddon}{%
+ \iffieldundef{nameaddon}
+ {}
+ {\space
+ \printfield[brackets]{nameaddon}%
+ \clearfield{nameaddon}}}
+
+\newbibmacro*{clearnames+empty}{%
+ \clearname{\cbx@namelist}%
+ \let\cbx@namelist\empty
+ \let\anona\empty
+ \let\anonb\empty
+ \let\pluga\empty
+ \let\plugb\empty}%
+
+% When 'journaltitle' goes in the author's position.
+
+\newbibmacro*{bibjournaldash}{%
+ \ifboolexpr{ test {\iffieldequals{journaltitle}{\bbx@lasthash}}
+ and not test \iffirstonpage}
+ {\bibstring{bibnamedash}%
+ \clearfield{journaltitle}%
+ \clearlist{location}%
+ \newunit}%
+ {\savefield{journaltitle}{\bbx@lasthash}%
+ \renewcommand*{\xtitle}{journal}%
+ \usebibmacro{longtitle+titleaddon}%
+ \let\xtitle\empty}}%
+
+% When 'blogtitle' goes in the author's position. This should only
+% apply when a blog has changed urls or host organizations.
+
+\newbibmacro*{bibblogdash}{%
+ \ifboolexpr{ test {\iffieldequals{blogtitle}{\bbx@lasthash}}
+ and not test \iffirstonpage}
+ {\bibstring{bibnamedash}%
+ \clearfield{blogtitle}%
+ \newunit}%
+ {\savefield{blogtitle}{\bbx@lasthash}%
+ \renewcommand*{\xtitle}{blog}%
+ \usebibmacro{longtitle+titleaddon}%
+ \let\xtitle\empty}}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Titles and Subtitles %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand*{\subtitlepunct}{\ifterm{\space}{:\space}}%
+
+\newbibmacro*{longtitle+titleaddon}{%
+ \iffieldundef{\xtitle title}
+ {}
+ {\usebibmacro{longtitle}%
+ \usebibmacro{titleaddon}%
+ \usebibmacro{test:titledupes}%
+ \clearfield{\xtitle title}}}
+
+\newbibmacro*{longtitle}{%
+ \printtext[\xtitle title]{%
+ \printfield[noformat]{\xtitle title}%
+ \iffieldundef{\xtitle subtitle}
+ {}
+ {\subtitlepunct
+ \printfield[noformat]{\xtitle subtitle}}}}
+
+\newbibmacro*{test:titledupes}{%
+ \iffieldsequal{title}{booktitle}
+ {\ifboolexpr{ test {\iffieldundef{subtitle}}
+ or test {\iffieldsequal{subtitle}{booksubtitle}}}
+ {\clearfield{booktitle}}%
+ {}}
+ {}}
+
+\newbibmacro*{titleaddon}{%
+ \iffieldundef{\xtitle titleaddon}
+ {}
+ {\addspace% '\space' has issues with quotation marks
+ \printfield{\xtitle titleaddon}}}
+
+\newbibmacro*{title+labelyear}{%
+ \iftoggle{bibliography}
+ {\usebibmacro{longtitle+titleaddon}%
+ \usebibmacro{b:labeldate+extradate}}%
+ {\ifboolexpr{ test \ifciteseen
+ or togl {firstshort}}
+ {\usebibmacro{shorttitle}}%
+ {\usebibmacro{longtitle+titleaddon}}}}
+
+\newbibmacro*{shorttitle}{%
+ \ifboolexpr{ togl {collection:bk}
+ and togl {swapvol}}
+ {\iffieldundef{shortmaintitle}
+ {\printfield[title]{maintitle}}%
+ {\printfield[title]{shortmaintitle}}}
+ {\ifboolexpr{ togl {collection:ib}
+ and togl {swapvol}}
+ {\iffieldundef{shortbooktitle}
+ {\printfield[title]{booktitle}}%
+ {\printfield[title]{shortbooktitle}}}
+ {\printfield[\thefield{entrytype}]{labeltitle}}}}
+
+\newbibmacro*{shorttitle+crossref}{%
+ \ifboolexpr{ togl {collection:icbk}
+ and togl {swapvol}}
+ {\iffieldundef{shortmaintitle}
+ {\printfield[title]{maintitle}}%
+ {\printfield[title]{shortmaintitle}}}
+ {\ifboolexpr{ togl {collection:icib}
+ and togl {swapvol}}
+ {\iffieldundef{shortbooktitle}
+ {\printfield[title]{booktitle}}%
+ {\printfield[title]{shortbooktitle}}}
+ {\printfield[\thefield{entrytype}]{labeltitle}}}}
+
+\newbibmacro*{booktitle+editor}[1]{%
+ \iffieldundef{booktitle}
+ {}
+ {\renewcommand*{\xtitle}{book}%
+ \usebibmacro{longtitle+titleaddon}%
+ \setunit{\unspace,\addspace}%
+ \usebibmacro{bybookauthor+pages}%
+ \ifstrequal{#1}{a}
+ {\usebibmacro{edtrans:a}}%
+ {\usebibmacro{edtrans:b}}}}
+
+\newbibmacro*{bookbooktitle+editor}[1]{%
+ \iffieldundef{bookbooktitle}
+ {}
+ {\ifstrequal{#1}{in}
+ {\newunit\bibstring{in}\space}%
+ {}% needs '%'
+ \renewcommand*{\xtitle}{bookbook}%
+ \usebibmacro{longtitle+titleaddon}%
+ \setunit{\unspace,\addspace}%
+ \usebibmacro{edtrans:b}}}
+
+\newbibmacro*{maintitle+editor}{%
+ \iffieldundef{maintitle}
+ {}
+ {\renewcommand*{\xtitle}{main}%
+ \usebibmacro{longtitle+titleaddon}%
+ \iftoggle{swaptrans}
+ {\usebibmacro{translatortypes}%
+ \usebibmacro{editortypes}{maintitle}}%
+ {\usebibmacro{editortypes}{maintitle}%
+ \usebibmacro{translatortypes}}}}
+
+\newbibmacro*{issuetitle}{%
+ \iffieldundef{issuetitle}
+ {}
+ {\iffieldequalstr{issuetitle}{special issue}
+ {}
+ {\bibstring{in}\space
+ \renewcommand*{\xtitle}{issue}%
+ \usebibmacro{longtitle+titleaddon}%
+ \usebibmacro{editortypes}{issuetitle}}%
+ \newunit\bibstring{special}%
+ \setunit{\addcomma\space}}}
+
+\newbibmacro*{origtitle}{%
+ \iffieldundef{origtitle}
+ {}
+ {\newunit
+ \bibstring{origpub}%
+ \space
+ \renewcommand*{\xtitle}{orig}%
+ \usebibmacro{longtitle+titleaddon}%
+ \setunit{\addspace}% not '\setunit{\space}'
+ \printtext[parens]{%
+ \usebibmacro{origlocation}%
+ \usebibmacro{origpublisher}%
+ \iftoggle{reflist}
+ {}
+ {\usebibmacro{origyear+origendyear}}}}}
+
+%%%%%%%%%%%%%%%%%%%
+%% Collections %%
+%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{test:collection}{%
+ \ifboolexpr{ test {\ifentrytype{book}}
+ or test {\ifentrytype{collection}}
+ or test {\ifentrytype{mvbook}}
+ or test {\ifentrytype{mvcollection}}}
+ {\usebibmacro{test:collection:bk}}%
+ {\ifboolexpr{ test {\ifentrytype{bookinbook}}
+ or test {\ifentrytype{inbook}}
+ or test {\ifentrytype{incollection}}
+ or test {\ifentrytype{letter}}}
+ {\usebibmacro{test:collection:icbk+etc}}%
+ {}}}
+
+\newbibmacro*{test:collection:bk}{%
+ \ifboolexpr{ test {\iffieldundef{booktitle}}
+ and test {\iffieldundef{bookbooktitle}}
+ and test {\iffieldundef{bookvolume}}
+ and test {\iffieldundef{bookbookvolume}}
+ and not test {\iffieldundef{title}}
+ and not test {\iffieldundef{maintitle}}
+ and not test {\iffieldundef{volume}}}
+ {\toggletrue{collection}%
+ \toggletrue{collection:bk}}%
+ {}}
+
+\newbibmacro*{test:collection:icbk+etc}{%
+ \ifboolexpr{ test {\iffieldundef{bookbooktitle}}
+ and test {\iffieldundef{volume}}
+ and test {\iffieldundef{bookbookvolume}}
+ and not test {\iffieldundef{title}}
+ and not test {\iffieldundef{booktitle}}
+ and not test {\iffieldundef{maintitle}}
+ and not test {\iffieldundef{bookvolume}}}
+ {\toggletrue{collection}%
+ \toggletrue{collection:icbk}}%
+ {\ifboolexpr{ test {\ifentrytype{bookinbook}}
+ or test {\ifentrytype{inbook}}}
+ {\usebibmacro{test:collection:ib}}%
+ {\usebibmacro{test:collection:icib}}}}
+
+\newbibmacro*{test:collection:ib}{%
+ \ifboolexpr{ test {\iffieldundef{maintitle}}
+ and test {\iffieldundef{bookbooktitle}}
+ and test {\iffieldundef{bookvolume}}
+ and test {\iffieldundef{bookbookvolume}}
+ and not test {\iffieldundef{title}}
+ and not test {\iffieldundef{booktitle}}
+ and not test {\iffieldundef{volume}}}
+ {\toggletrue{collection}%
+ \toggletrue{collection:ib}}%
+ {}}
+
+\newbibmacro*{test:collection:icib}{%
+ \ifboolexpr{ test {\iffieldundef{maintitle}}
+ and test {\iffieldundef{volume}}
+ and test {\iffieldundef{bookbookvolume}}
+ and not test {\iffieldundef{booktitle}}
+ and not test {\iffieldundef{bookbooktitle}}
+ and not test {\iffieldundef{bookvolume}}}
+ {\toggletrue{collection}%
+ \toggletrue{collection:icib}}%
+ {}}
+
+%%%%%%%%%%%%%%%%%%%%%%%
+%% Dates and Times %%
+%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{issue+month+etc}[1]{%
+ \iffieldundef{year}
+ {\iffieldundef{month}
+ {}
+ {\setunit{\space}%
+ \printtext[parens]{\usebibmacro{month+endmonth}}}}
+ {\ifboolexpr{ test {\iffieldundef{volume}}
+ and test {\iffieldundef{number}}}
+ {\iffieldundef{journal}
+ {}
+ {\setunit{\addcomma\space}}%
+ \iffieldundef{month}
+ {\usebibmacro{issue+season+year}}%
+ {\usebibmacro{month+day+year}}}
+ {\iffieldundef{month}
+ {\setunit{\space}%
+ \usebibmacro{reflist+issue+season}}%
+ {\ifstrequal{#1}{noparens}
+ {\newunit
+ \usebibmacro{month+day+year}}%
+ {\setunit{\space}%
+ \printtext[parens]{%
+ \usebibmacro{month+day+year}}}}}}}
+
+\newbibmacro*{month+day+year}{%
+ \usebibmacro{month+endmonth}%
+ \usebibmacro{reflist+day+year}}%
+
+\newbibmacro*{month+endmonth}{%
+ \iffieldundef{month}
+ {}
+ {\printfield{month}%
+ \ifboolexpr{ test {\iffieldundef{endmonth}}
+ or test {\iffieldsequal{month}{endmonth}}}
+ {}
+ {\addslash\printfield{endmonth}}}}
+
+\newbibmacro*{reflist+day+year}{%
+ \ifboolexpr{ togl {bibliography}
+ and togl {reflist}}
+ {\iffieldundef{day}
+ {}
+ {\usebibmacro{day+endday+year}}}
+ {\iffieldundef{day}
+ {\addspace
+ \printfield{year}}%
+ {\usebibmacro{day+endday+year}}}}
+
+\newbibmacro*{day+endday+year}{%
+ \usebibmacro{day+endday}%
+ \addcomma\space
+ \printfield{year}%
+ \usebibmacro{hour+minute+timezone}}%
+
+\newbibmacro*{day+endday}{%
+ \iffieldundef{day}
+ {}
+ {\addspace
+ \stripzeros{\thefield{day}}%
+ \iffieldundef{endday}
+ {}
+ {\textendash\stripzeros{\thefield{endday}}}}}
+
+\newbibmacro*{hour+minute+timezone}{%
+ \iffieldundef{hour}
+ {}
+ {\addcomma\space
+ \printtime}}%
+
+% Treat 'season' as an alternative for 'issue'.
+
+\newbibmacro*{reflist+issue+season}{%
+ \ifboolexpr{ togl {bibliography}
+ and togl {reflist}}
+ {\ifboolexpr{ test {\iffieldundef{issue}}
+ and test {\iffieldundef{season}}}
+ {}
+ {\setunit{\space}%
+ \iffieldundef{issue}
+ {\printtext[parens]{\printfield{season}}}
+ {\printtext[parens]{\printfield{issue}}}}}
+ {\setunit{\space}%
+ \printtext[parens]{\usebibmacro{issue+season+year}}}}
+
+\newbibmacro*{issue+season+year}{%
+ \ifboolexpr{ test {\iffieldundef{issue}}
+ and test {\iffieldundef{season}}}
+ {\printfield{year}}%
+ {\iffieldundef{issue}
+ {\printfield{season}%
+ \space
+ \printfield{year}}%
+ {\printfield{issue}%
+ \space
+ \printfield{year}}}}
+
+% Per CMOS, 17th ed., 14.119, print the publication year of the
+% last-mentioned title.
+
+\newbibmacro*{year+bookyear}{%
+ \ifboolexpr{ togl {bibliography}
+ and togl {reflist}}
+ {\ifboolexpr{ test {\iffieldundef{bookyear}}
+ or test {\iffieldundef{year}}
+ or test {\iffieldsequal{year}{bookyear}}
+ or not test {\iffieldequalstr{labeldatesource}{bookyear}}}
+ {}
+ {\printfield{bookyear}%
+ \usebibmacro{endbookyear}}}
+ {\ifboolexpr{ test {\iffieldundef{year}}
+ and test {\iffieldundef{bookyear}}}
+ {\bibstring{nodate}}%
+ {\iffieldundef{bookyear}
+ {\printfield{year}%
+ \usebibmacro{endyear}}%
+ {\ifboolexpr{ togl {collection}
+ and togl {swapvol}
+ and not test {\iffieldundef{year}}}
+ {\printfield{year}%
+ \usebibmacro{endyear}}%
+ {\printfield{bookyear}%
+ \usebibmacro{endbookyear}}}}}}
+
+\newbibmacro*{endyear}{%
+ \iffieldundef{endyear}
+ {}
+ {\iffieldsequal{year}{endyear}
+ {}
+ {\textendash\printfield{endyear}}}}
+
+\newbibmacro*{endbookyear}{%
+ \iffieldundef{endbookyear}
+ {}
+ {\iffieldsequal{bookyear}{endbookyear}
+ {}
+ {\textendash\printfield{endbookyear}}}}
+
+\newbibmacro*{origyear+origendyear}{%
+ \iffieldundef{origyear}
+ {}
+ {\printfield{origyear}%
+ \ifboolexpr{ test {\iffieldundef{endorigyear}}
+ or test {\iffieldsequal{origyear}{endorigyear}}}
+ {}
+ {\textendash\printfield{endorigyear}}}}
+
+% For reference lists.
+
+\newbibmacro*{a:labeldate+extradate}{%
+ \ifboolexpr{ togl {noauth}
+ or not togl {authposition}}
+ {}
+ {\usebibmacro{labeldate+extradate}}}
+
+\newbibmacro*{b:labeldate+extradate}{%
+ \ifboolexpr{ togl {noauth}
+ and not togl {journalfirst}}
+ {\usebibmacro{labeldate+extradate}}%
+ {}}
+
+\newbibmacro*{labeldate+extradate}{%
+ \ifboolexpr{ togl {reflist}
+ and not togl {skipdate}}
+ {\newunit
+ \usebibmacro{reflist+origyear}%
+ \usebibmacro{labeldate+endyear}%
+ \printfield{extradate}%
+ \ifboolexpr{ test {\iffieldundef{year}}
+ or test {\ifnumeral{\thefield{year}}}}
+ {\newunit}%
+ {\bibsentence\newunit}}% if year enclosed in brackets
+ {}}
+
+\newbibmacro*{reflist+origyear}{%
+ \iffieldundef{origyear}
+ {}
+ {\printtext[parens]{\usebibmacro{origyear+origendyear}}%
+ \space}}%
+
+% The next macro helps bib environments that use the 'reflist' toggle
+% (see the 'reflist' bib environment set elsewhere in this file).
+% Since they can't use the 'reflist' preamble option, they can't load
+% the DeclareLabeldate for reference lists. The macro below makes the
+% output consistent in those cases but can cause problems with
+% sorting. Resolve them with '\sortyear'. Also, end dates go here. See
+% CMOS, 17th ed., 15.37 and 15.41. Although '\printlabeldate' prints
+% them, the workaround needs to run 'endyear', which can cause
+% problems not only with sorting but with 'extralabeldate'.
+
+\newbibmacro*{labeldate+endyear}{%
+ \iffieldequalstr{labeldatesource}{bookyear}
+ {\iffieldundef{year}
+ {\printlabeldate}%
+ {\printfield{year}%
+ \usebibmacro{endyear}}}
+ {\printlabeldate}}%
+
+%%%%%%%%%%%%%%%%%
+%% Locations %%
+%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{loc+pub+year}{%
+ \usebibmacro{loc+pub}{1}%
+ \ifnumgreater{\value{publisher}}{1}
+ {\setunit{\addsemicolon\space}%
+ \usebibmacro{loc+pub}{2}}%
+ {}
+ \setunit{\addcomma\space}%
+ \usebibmacro{year+bookyear}}%
+
+\newbibmacro*{loc+pub}[1]{%
+ \usebibmacro{location}{#1}%
+ \setunit{\addcolon\space}%
+ \printlist[publisher][#1-#1]{publisher}}%
+
+\newbibmacro*{location}[1]{%
+ \ifboolexpr{ test {\iflistundef{location}}
+ and test {\iffieldundef{howpublished}}
+ and test {\iffieldundef{url}}
+ and test {\iffieldundef{doi}}}
+ {\bibstring{noplace}}%
+ {\printlist[location][#1-#1]{location}}}
+
+\newbibmacro*{origlocation}{%
+ \iflistundef{origlocation}
+ {}
+ {\printlist{origlocation}%
+ \iflistundef{origpublisher}
+ {\setunit{\addcomma\space}}%
+ {\setunit{\addcolon\space}}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bibliography Drivers %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareBibliographyDriver{shorthand}{%
+ \usedriver
+ {\DeclareNameAlias{author}{sortname}}%
+ {\thefield{entrytype}}%
+ \iftoggle{annotate}
+ {\global\togglefalse{annotate}%
+ \usebibmacro{pageref+finentry}%
+ \global\toggletrue{annotate}}%
+ {\usebibmacro{pageref+finentry}}}
+
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+title+ed+note}%
+ \usebibmacro{articles}%
+ \usebibmacro{colon+pages+etc}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+collection+etc}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{incollection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+title+etc}%
+ \usebibmacro{crossref+incollections}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{misc}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+bookauthor+etc}%
+ \usebibmacro{title+labelyear}%
+ \newunit
+ \printfield{userb}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{online}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+title+ed+note}%
+ \newunit
+ \usebibmacro{websites}%
+ \usebibmacro{issue+month+etc}{}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+title+ed+note}%
+ \newunit
+ \printfield{number}%
+ \newunit
+ \printfield{addendum}%
+ \usebibmacro{pageref+finentry}}%
+
+\DeclareBibliographyDriver{review}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{reviews}%
+ \usebibmacro{articles}%
+ \usebibmacro{colon+pages+etc}%
+ \usebibmacro{doi+finentry+etc}}%
+
+\DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{author+title+ed+note}%
+ \newunit
+ \usebibmacro{inst+loc+date}%
+ \usebibmacro{doi+finentry+etc}}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Second Tier Macros %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{pageref+finentry}{%
+ \newunit
+ \usebibmacro{pageref}%
+ \newunit
+ \usebibmacro{annotation}%
+ \finentry}%
+
+\newbibmacro*{author+title+ed+note}{%
+ \usebibmacro{author+bookauthor+etc}%
+ \usebibmacro{title+labelyear}%
+ \usebibmacro{edtrans:a}%
+ \usebibmacro{note}}%
+
+\newbibmacro*{articles}{%
+ \newunit
+ \usebibmacro{part}%
+ \usebibmacro{issuetitle}%
+ \renewcommand*{\xtitle}{journal}%
+ \usebibmacro{longtitle+titleaddon}%
+ \usebibmacro{journalseries}%
+ \setunit{\space}%
+ \usebibmacro{journallocation}%
+ \printfield[noformat]{volume}%
+ \iftoggle{journalfirst}
+ {\newunit}%
+ {\setunit{\addcomma\space}}%
+ \iffieldequalstr{type}{newsmag}
+ {\usebibmacro{issue+month+etc}{noparens}%
+ \usebibmacro{periodical:number}}%
+ {\usebibmacro{periodical:number}%
+ \usebibmacro{issue+month+etc}{}}%
+ \usebibmacro{edition}{noformat}}%
+
+% If an article has an electronic article ID, don't print its page
+% range in the bibliography. See CMOS, 17th ed., 14.174.
+
+\newbibmacro*{colon+pages+etc}{%
+ \ifboolexpr{ test {\iffieldundef{pages}}
+ or not test {\iffieldundef{eid}}}
+ {}
+ {\iftoggle{reflist}
+ {\ifboolexpr{test {\iffieldundef{number}}
+ and test {\iffieldundef{month}}
+ and test {\iffieldundef{issue}}
+ and test {\iffieldundef{season}}}
+ {\setunit{\addcolon}%
+ \printfield{pages}}%
+ {\setunit{\addcolon\space}%
+ \printfield{pages}}}
+ {\usebibmacro{colon+pages}}}}
+
+\newbibmacro*{doi+finentry+etc}{%
+ \usebibmacro{doi+url+etc}%
+ \usebibmacro{isbn}%
+ \usebibmacro{library}%
+ \usebibmacro{pageref+finentry}}%
+
+\newbibmacro*{author+collection+etc}{%
+ \usebibmacro{test:collection}%
+ \usebibmacro{author+bookauthor+etc}%
+ \ifboolexpr{ togl {collection:bk}
+ and togl {swapvol}}
+ {\usebibmacro{maintitle+editor}%
+ \usebibmacro{note}%
+ \usebibmacro{edition}{}%
+ \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}}%
+ {\usebibmacro{title+labelyear}%
+ \usebibmacro{byauthor}{newunit}%
+ \usebibmacro{edtrans:a}%
+ \usebibmacro{editoraddon}%
+ \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{date+loc+etc}%
+ \usebibmacro{origtitle}}%
+
+\newbibmacro*{author+title+etc}{%
+ \usebibmacro{test:collection}%
+ \usebibmacro{test:bookauthor}%
+ \ifboolexpr{ test {\ifnameundef{afterword}}
+ and test {\ifnameundef{foreword}}
+ and test {\ifnameundef{introduction}}}
+ {\usebibmacro{author+bookauthor+etc}%
+ \iffieldundef{title}
+ {\usebibmacro{booktitle+editor}{a}}%
+ {\ifboolexpr{ togl {collection:ib}
+ and togl {swapvol}
+ and not togl {collection:icib}}
+ {\usebibmacro{booktitle+editor}{a}}%
+ {\usebibmacro{title+labelyear}%
+ \usebibmacro{byauthor+ed+chapter}}}}
+ {\usebibmacro{aft+fore+intro}}}
+
+\newbibmacro*{crossref+incollections}{%
+ \iffieldundef{crossref}
+ {\usebibmacro{incollections}}%
+ {\xifinlist{\thefield{crossref}}{\crossreflist}
+ {\ifnumgreater{\value{\thefield{crossref}}}{0}
+ {\usebibmacro{crossref}%
+ \usebibmacro{pages}}%
+ {\usebibmacro{incollections}}}
+ {\listxadd{\crossreflist}{\thefield{crossref}}%
+ \ifcsdef{c@\thefield{crossref}}
+ {\setcounter{\thefield{crossref}}{0}}%
+ {\newcounter{\thefield{crossref}}}% needs '%'
+ \usebibmacro{incollections}}}}
+
+\newbibmacro*{websites}{%
+ \ifboolexpr{ test {\iffieldundef{blogtitle}}
+ and test {\iffieldundef{journaltitle}}
+ and test {\iflistundef{organization}}}
+ {}
+ {\renewcommand*{\xtitle}{blog}%
+ \usebibmacro{longtitle+titleaddon}%
+ \newunit
+ \renewcommand*{\xtitle}{journal}%
+ \usebibmacro{longtitle+titleaddon}%
+ \newunit
+ \printlist{organization}%
+ \setunit{\addcomma\space}}}
+
+\newbibmacro*{reviews}{%
+ \ifboolexpr{ test {\ifnameundef{author}}
+ and not test {\ifnameundef{bookauthor}}}
+ {\savename{bookauthor}{\reviewee}%
+ \clearname{bookauthor}}%
+ {\let\reviewee\empty}%
+ \usebibmacro{author+bookauthor+etc}%
+ \iffieldundef{title}
+ {}
+ {\usebibmacro{title+labelyear}%
+ \newunit}%
+ \usebibmacro{note}%
+ \usebibmacro{review+title}%
+ \setunit{\addcomma\space}%
+ \iftoggle{firstshort}
+ {}
+ {\usebibmacro{edtrans:b}}}
+
+\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{month+day+year}}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Third Tier Macros %%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewbibmacro*{annotation}{%
+ \iftoggle{annotate}
+ {\printfield{annotation}}%
+ {}}
+
+\newbibmacro*{note}{%
+ \iffieldundef{note}
+ {}
+ {\newunit
+ \printfield{note}}}
+
+\newbibmacro*{part}{%
+ \iffieldundef{part}
+ {}
+ {\setunit{\addcomma\space}%
+ \iffieldnum{part}
+ {\printfield{part}}%
+ {\printfield[noformat]{part}}%
+ \setunit{\addcomma\space}%
+ \clearfield{part}}}
+
+\newbibmacro*{journalseries}{%
+ \iffieldundef{series}
+ {}
+ {\iflistundef{location}
+ {\setunit{\addcomma\space}%
+ \printfield{series}}%
+ {\setunit{\space}%
+ \printfield{series}}%
+ \isdot\addcomma
+ \usebibmacro{seriesaddon}%
+ \usebibmacro{editortypes}{series}%
+ \newunit}}%
+
+\newbibmacro*{journallocation}{%
+ \iflistundef{location}
+ {}
+ {\nopunct\printtext[parens]{%
+ \printlist{location}}\space}}%
+
+% On how to format the issue number of periodicals, see CMOS, 17th
+% ed., 14.171 and 15.47.
+
+\newbibmacro*{periodical:number}{%
+ \iffieldundef{number}
+ {}
+ {\ifboolexpr{ togl {bibliography}
+ and togl {reflist}
+ and test {\iffieldundef{issue}}
+ and test {\iffieldundef{season}}
+ and test {\iffieldundef{month}}
+ and not test {\iffieldundef{volume}}}
+ {\setunit{\space}%
+ \printfield[parens]{number}}%
+ {\setunit{\addcomma\space}%
+ \printfield[journum]{number}}}}
+
+\newbibmacro*{colon+pages}{%
+ \ifboolexpr{ test {\iffieldundef{month}}
+ and test {\iffieldundef{year}}
+ and test {\iffieldundef{issue}}}
+ {\setunit{\addcolon}%
+ \printfield{pages}}%
+ {\ifboolexpr{ test {\iffieldundef{month}}
+ and test {\iffieldundef{year}}}
+ {\setunit{\addcolon\space}%
+ \printfield{pages}}%
+ {\ifboolexpr{ test {\iffieldundef{number}}
+ and test {\iffieldundef{volume}}}
+ {\setunit{\addcomma\space}%
+ \printfield{pages}}%
+ {\setunit{\addcolon\space}%
+ \printfield{pages}}}}}
+
+\newbibmacro*{doi+url+etc}{%
+ \ifboolexpr{ test {\iffieldundef{howpublished}}
+ and test {\iffieldundef{url}}
+ and test {\iffieldundef{doi}}
+ and test {\iffieldundef{addendum}}
+ or ( togl {firstshort} and not togl {bibliography} )}
+ {}
+ {\usebibmacro{eid}%
+ \newunit
+ \printfield{howpublished}%
+ \newunit
+ \printurldate
+ \newunit
+ \printfield[noformat]{version}%
+ \newunit
+ \printfield{url}%
+ \newunit
+ \printfield{doi}%
+ \newunit
+ \printfield{addendum}}}
+
+\newbibmacro*{isbn}{%
+ \iffieldundef{isbn}
+ {}
+ {\iftoggle{bibliography}
+ {\iftoggle{isbn}
+ {\newunit
+ \printfield{isbn}}%
+ {}}
+ {}}}
+
+\newbibmacro*{library}{%
+ \iffieldundef{library}
+ {}
+ {\iftoggle{bibliography}
+ {\iftoggle{library}
+ {\newunit
+ \printfield{library}}%
+ {}}
+ {}}}
+
+\newbibmacro*{volume+number+etc}{%
+ \iffieldundef{\xvolume volume}
+ {}
+ {\usebibmacro{swapvol+pages}%
+ \iffieldundef{series}
+ {\newunit}%
+ {\setunit{\addcomma\space}}%
+ \iffieldnum{\xvolume volume}
+ {\printfield[volume]{\xvolume volume}%
+ \usebibmacro{volume:number}}%
+ {\bibstring{volumes}\space
+ \printfield[noformat]{\xvolume volume}}%
+ \clearfield{\xvolume volume}%
+ \usebibmacro{part}%
+ \iftoggle{collection}
+ {\iftoggle{swapvol}
+ {\addcomma\space}%
+ {\space\bibstring{of}\space}}%
+ {\iffieldundef{maintitle}
+ {}
+ {\space\bibstring{of}\space}}}}
+
+\renewbibmacro*{byauthor}[1]{%
+ \ifboolexpr{ test {\ifnameundef{author}}
+ or togl {noauth}}
+ {}
+ {\ifstrequal{#1}{newunit}
+ {\renewcommand*{\pluga}{\newunit\bibstring{by}\space}}%
+ {\renewcommand*{\pluga}{\bibstring{by}\space}}%
+ \renewcommand*{\cbx@namelist}{author}%
+ \usebibmacro{printnames+etc}}}
+
+\newbibmacro*{edition}[1]{%
+ \iffieldundef{edition}
+ {}
+ {\newunit
+ \iffieldbibstring{edition}
+ {\bibstring{\thefield{edition}}}
+ {\ifstrequal{#1}{noformat}
+ {\setunit{\addcomma\space}%
+ \printfield[noformat]{edition}}%
+ {\printfield{edition}}}}}
+
+\newbibmacro*{date+loc+etc}{%
+ \ifboolexpr{ test {\iflistundef{location}}
+ and test {\iflistundef{publisher}}}
+ {\newunit
+ \usebibmacro{month+day+year}}%
+ {\iffieldundef{origtitle}
+ {\iftoggle{bibliography}
+ {\newunit
+ \usebibmacro{orig+etc}}%
+ {\setunit{\addspace}% not '\setunit{\space}'
+ \printtext[parens]{\usebibmacro{orig+etc}}}}
+ {\newunit
+ \usebibmacro{loc+pub+year}}}}
+
+\newbibmacro*{test:bookauthor}{%
+ \ifboolexpr{ test {\ifnamesequal{author}{bookauthor}}
+ or test {\ifnamesequal{afterword}{bookauthor}}
+ or test {\ifnamesequal{foreword}{bookauthor}}
+ or test {\ifnamesequal{introduction}{bookauthor}}}
+ {\clearname{bookauthor}}%
+ {\iftoggle{noauth}
+ {\clearname{bookauthor}}%
+ {}}}
+
+\newbibmacro*{bybookauthor+pages}{%
+ \ifnameundef{bookauthor}
+ {}
+ {\renewcommand*{\pluga}{\bibstring{by}\space}%
+ \renewcommand*{\cbx@namelist}{bookauthor}%
+ \usebibmacro{printnames+etc}%
+ \usebibmacro{pages}%
+ \newunit}}%
+
+\newbibmacro*{byauthor+ed+chapter}{%
+ \usebibmacro{byauthor}{newunit}%
+ \usebibmacro{edtrans:a}%
+ \iftoggle{collection:ib}
+ {}
+ {\newunit
+ \iffieldundef{chapter}
+ {\bibstring{in}\space}%
+ {\printfield{chapter}\space
+ \bibstring{in}\space}}}
+
+\newbibmacro*{incollections}{%
+ \iftoggle{collection:ib}
+ {\usebibmacro{incollections:ib}}%
+ {\ifboolexpr{ togl {collection:icbk}
+ or togl {collection:icib}}
+ {\usebibmacro{incollections:ic}}%
+ {\usebibmacro{booktitle+editor}{}%
+ \usebibmacro{bookbooktitle+editor}{in}%
+ \iffieldundef{volume}
+ {\iffieldundef{bookvolume}%
+ {\renewcommand*{\xvolume}{bookbook}}%
+ {\renewcommand*{\xvolume}{book}}%
+ \usebibmacro{note+edition+etc}}%
+ {\usebibmacro{note+edition+etc}}}}
+ \usebibmacro{date+loc+etc}%
+ \usebibmacro{origtitle}}%
+
+\newbibmacro*{crossref}{%
+ \renewcommand*{\cbx@deflabel}{labelname}%
+ \global\toggletrue{cbx@short}%
+ \entrydata{\thefield{crossref}}{%
+ \iftoggle{reflist}
+ {\usebibmacro{parencite:long}}%
+ {\usebibmacro{author+bookauthor+etc}%
+ \usebibmacro{shorttitle+crossref}}%
+ \usebibmacro{cite:volume}}}
+
+\newbibmacro*{pages}{%
+ \iffieldundef{pages}
+ {}
+ {\iftoggle{bibliography}
+ {\setunit{\addcomma\space}%
+ \printfield{pages}%
+ \clearfield{pages}}%
+ {}}}
+
+\newbibmacro*{review+title}{%
+ \iftoggle{noauth}
+ {\bibcpstring{reviewnoauth}}%
+ {\bibstring{review}}%
+ \space
+ \renewcommand*{\xtitle}{book}%
+ \usebibmacro{title+labelyear}%
+ \iftoggle{firstshort}
+ {\clearfield{booktitle}}%
+ {\setunit{\addcomma\space}%
+ \ifdefempty{\reviewee}
+ {}
+ {\restorename{bookauthor}{\reviewee}}%
+ \renewcommand*{\pluga}{\bibstring{by}\space}%
+ \renewcommand*{\cbx@namelist}{bookauthor}%
+ \usebibmacro{printnames+etc}}}
+
+\newbibmacro*{thesis+type}{%
+ \ifentrytype{mathesis}
+ {\bibstring{mathesis}}%
+ {\ifentrytype{phdthesis}
+ {\bibstring{phdthesis}}%
+ {\iffieldundef{type}
+ {}
+ {\iffieldbibstring{type}
+ {\bibstring{\thefield{type}}}
+ {\printfield{type}}}}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Fourth and Higher Tier Macros %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{eid}{%
+ \iffieldundef{eid}
+ {}
+ {\iftoggle{bibliography}
+ {\setunit{\addcolon\space}}%
+ {\newunit}%
+ \printfield{eid}}}
+
+\newbibmacro*{volumes}{%
+ \iffieldundef{volumes}
+ {}
+ {\ifboolexpr{ togl {collection}
+ or ( not togl {bibliography}
+ and not togl {listvols}
+ and not test {\iffieldundef{postnote}} )}
+ {}
+ {\newunit
+ \printfield{volumes}%
+ \clearfield{volumes}}}}
+
+\newbibmacro*{bookseries}{%
+ \iffieldundef{series}
+ {}
+ {\usebibmacro{pages}%
+ \newunit
+ \printfield{series}%
+ \usebibmacro{seriesaddon}%
+ \usebibmacro{editortypes}{series}%
+ \setunit{\addcomma\space}}}
+
+\newbibmacro*{seriesaddon}{%
+ \iffieldundef{seriesaddon}
+ {}
+ {\addcomma\space
+ \printfield{seriesaddon}%
+ \isdot\addcomma}}%
+
+\newbibmacro*{swapvol+pages}{%
+ \ifboolexpr{ togl {collection}
+ and togl {swapvol}}
+ {}
+ {\usebibmacro{pages}}}
+
+\newbibmacro*{volume:number}{%
+ \iffieldundef{number}
+ {}
+ {\addcomma\space
+ \printfield[journum]{number}%
+ \clearfield{number}}}
+
+\newbibmacro*{book:number}{%
+ \iffieldundef{number}
+ {}
+ {\ifentrytype{letter}
+ {\usebibmacro{letter:number}}%
+ {\usebibmacro{other:number}}}}
+
+\newbibmacro*{letter:number}{%
+ \iftoggle{bibliography}
+ {\setunit{\addcomma\space}%
+ \printfield[journum]{number}}%
+ {}}
+
+\newbibmacro*{other:number}{%
+ \ifboolexpr{ test {\iffieldequalstr{editortype}{series}}
+ or test {\iffieldequalstr{editoratype}{series}}
+ or test {\iffieldequalstr{editorbtype}{series}}
+ or test {\iffieldequalstr{editorctype}{series}}}
+ {\setunit{\addcomma\space}%
+ \printfield{number}}%
+ {\setunit{\addspace}% not '\setunit{\space}'
+ \printfield{number}}}
+
+\newbibmacro*{orig+etc}{%
+ \usebibmacro{origlocation}%
+ \usebibmacro{origpublisher}%
+ \iftoggle{reflist}
+ {}
+ {\usebibmacro{origyear+origendyear}}%
+ \usebibmacro{reprint}%
+ \usebibmacro{loc+pub+year}}%
+
+\newbibmacro*{origpublisher}{%
+ \iflistundef{origpublisher}
+ {}
+ {\printlist{origpublisher}%
+ \setunit{\addcomma\space}}}
+
+\newbibmacro*{reprint}{%
+ \ifboolexpr{ test {\iffieldundef{origyear}}
+ and test {\iflistundef{origpublisher}}}
+ {}
+ {\iftoggle{bibliography}
+ {\newunit}%
+ {\setunit{\addsemicolon\space}}%
+ \bibstring{reprint}%
+ \addcomma\space}}%
+
+\newbibmacro*{incollections:ib}{%
+ \iftoggle{swapvol}
+ {\usebibmacro{note+edition+etc}%
+ \let\xtitle\empty
+ \usebibmacro{longtitle+titleaddon}%
+ \setunit{\unspace,\addspace}%
+ \usebibmacro{byauthor}{}%
+ \usebibmacro{edtrans:b}}%
+ {\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}}%
+
+\newbibmacro*{incollections:ic}{%
+ \iftoggle{swapvol}
+ {\iftoggle{collection:icbk}
+ {\usebibmacro{maintitle+editor}}%
+ {\usebibmacro{bookbooktitle+editor}{}}%
+ \renewcommand*{\xvolume}{book}%
+ \usebibmacro{note+edition+etc}%
+ \usebibmacro{booktitle+editor}{}%
+ \usebibmacro{pages}}%
+ {\usebibmacro{booktitle+editor}{}%
+ \renewcommand*{\xvolume}{book}%
+ \usebibmacro{volume+number+etc}%
+ \iftoggle{collection:icbk}
+ {\usebibmacro{maintitle+editor}}%
+ {\usebibmacro{bookbooktitle+editor}{}}%
+ \renewcommand*{\xvolume}{book}%
+ \usebibmacro{note+edition+etc}}}
+
+\newbibmacro*{volume}{%
+ \iffieldundef{\xvolume volume}
+ {}
+ {\newunit
+ \printfield[volume]{\xvolume volume}}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.cbx b/Master/texmf-dist/tex/latex/windycity/windycity.cbx
new file mode 100644
index 00000000000..a33e9e13b6b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/windycity/windycity.cbx
@@ -0,0 +1,490 @@
+% Last modified: Wed 27 Mar 2019 10:38:04 AM 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.
+%
+% The LPPL maintenance status of this software is 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a particular
+% purpose.
+
+\ProvidesFile{windycity.cbx}[Windy City style for biblatex]
+\@ifpackagelater{biblatex}{2017/11/04}
+ {}
+ {\PackageError{biblatex}
+ {Outdated 'biblatex' package}
+ {Windy City 2019-03-27 is for biblatex v3.8 and above.\MessageBreak
+ You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak
+ This is a fatal error. I'm aborting now.}%
+ \endinput}%
+
+% This file contains material only for formatting notes and
+% parenthetical citations. For content that is also used for
+% bibliographies and reference lists, see windycity.bbx.
+
+%%%%%%%%%%%%%%%%%%%
+%% Preliminary %%
+%%%%%%%%%%%%%%%%%%%
+
+\InitializeCitationStyle{\let\crossreflist\empty}%
+\DeclareAutoPunctuation{.,;:!?}
+\DeclareCitePunctuationPosition{cite}{r}
+\AtEveryCite{%
+ \global\togglefalse{bibliography}%
+ \global\togglefalse{multicite}%
+ \global\togglefalse{cbx@first}%
+ \global\togglefalse{cbx@loccit}%
+ \AtEveryItem}%
+\AtEveryMultiCite{\toggletrue{multicite}}%
+
+% To facilitate uniform output, citations in notes always end with
+% '\addperiod' (see cite:postnote). This makes '\footcite{something}'
+% and '\footnote{\cite{something}}' functionally equivalent. To
+% prevent an extra period from printing in very rare cases, as when
+% '\footcite{something}' ends with a capital letter, remove
+% '\addperiod' from the commands below:
+
+\renewcommand{\bibfootnotewrapper}[1]{%
+ \bibsentence#1}%
+\renewcommand{\bibendnotewrapper}[1]{%
+ \bibsentence#1}%
+
+% Protect commas against abbreviation dots and terminal punctuation
+% marks. Note '\addspace'. Using '\space' there causes problems.
+
+\renewcommand*{\newunitpunct}{\ifterm{,\addspace}{\addcomma\space}}%
+
+% Prevents errant space after a colon.
+
+\renewcommand*{\multicitedelim}{\setunit{\addsemicolon\space}}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Citation Commands %%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {\multicitedelim}%
+ {\usebibmacro{cite:postnote}}%
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \toggletrue{noauth}%
+ \usebibmacro{cite}}%
+ {\multicitedelim}%
+ {\usebibmacro{cite:postnote}}%
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\bibsentence\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {\multicitedelim}%
+ {\usebibmacro{cite:postnote}}%
+
+\DeclareCiteCommand*{\footcite}[\mkbibfootnote]
+ {\bibsentence\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \toggletrue{noauth}%
+ \usebibmacro{cite}}%
+ {\multicitedelim}%
+ {\usebibmacro{cite:postnote}}%
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{parencite}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}%
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \toggletrue{noauth}%
+ \usebibmacro{parencite}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Parenthetical Citations %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{parencite}{%
+ \usebibmacro{test:collection}%
+ \usebibmacro{test:crossref}%
+ \ifboolexpr{ test \ifciteibid
+ and not test \iffirstonpage}
+ {\iffieldundef{postnote}
+ {\printtext[bibhyperref]{%
+ \usebibmacro{parencite:date}%
+ \usebibmacro{cite:volume}}}
+ {}}
+ {\printtext[bibhyperref]{%
+ \usebibmacro{parencite:long}%
+ \usebibmacro{cite:volume}}}}
+
+% See note for 'crossref+long'.
+
+\newbibmacro*{test:crossref}{%
+ \ifboolexpr{ test {\iffieldundef{crossref}}
+ or test {\iffieldundef{title}}}
+ {}
+ {\xifinlist{\thefield{crossref}}{\crossreflist}
+ {\stepcounter{\thefield{crossref}}}
+ {\listxadd{\crossreflist}{\thefield{crossref}}%
+ \ifcsdef{c@\thefield{crossref}}
+ {\setcounter{\thefield{crossref}}{0}}%
+ {\newcounter{\thefield{crossref}}}}}}
+
+\newbibmacro*{parencite:date}{%
+ \iffieldundef{labelyear}
+ {}
+ {\usebibmacro{parencite:origyear}%
+ \ifboolexpr{ test {\iffieldundef{year}}
+ or test {\iffieldequalstr{year}{forthcoming}}}
+ {\addcomma}%
+ {}% needs '%'
+ \usebibmacro{labeldate+endyear}%
+ \printfield{extradate}}}
+
+\newbibmacro*{parencite:origyear}{%
+ \iffieldundef{origyear}
+ {}
+ {\printfield[brackets]{origyear}%
+ \space}}%
+
+\newbibmacro*{parencite:long}{%
+ \iffieldundef{shorthand}
+ {\usebibmacro{parencite:auth+title}}%
+ {\printfield{shorthand}}%
+ \setunit{\addspace}% not '\setunit{\space}'
+ \usebibmacro{parencite:date}}%
+
+\newbibmacro*{parencite:auth+title}{%
+ \iftoggle{noauth}
+ {}
+ {\ifboolexpr{ test {\ifnameundef{labelname}}
+ or test {\iffieldundef{labelyear}}}
+ {\iffieldundef{label}
+ {\usebibmacro{parencite:journal}}%
+ {\printfield{label}}}
+ {\global\toggletrue{cbx@short}%
+ \renewcommand*{\cbx@deflabel}{labelname}%
+ \clearfield{handle}%
+ \clearfield{nameaddon}%
+ \usebibmacro{author+bookauthor+etc}}}}
+
+\newbibmacro*{parencite:journal}{%
+ {\ifentrytype{article}
+ {\iffieldundef{shortjournal}
+ {\renewcommand*{\xtitle}{journal}%
+ \usebibmacro{longtitle}}%
+ {\printfield[journal]{shortjournal}}}
+ {\printfield[citetitle]{labeltitle}}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Citations in Notes %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newbibmacro*{cite}{%
+ \usebibmacro{test:multicite}%
+ \ifciteseen
+ {\usebibmacro{test:collection}%
+ \renewcommand*{\cbx@deflabel}{labelname}%
+ \printtext[bibhyperref]{\usebibmacro{cite:seen}}}
+ {\printtext[bibhyperref]{\usebibmacro{cite:new}}}% needs '%'
+ \usebibmacro{savefields}}%
+
+\newbibmacro*{test:multicite}{%
+ \ifboolexpr{ test {\iffieldequals{namehash}{\bbx@lasthash}}
+ and togl {multicite}
+ and togl {short}}
+ {\toggletrue{noauth}}%
+ {}}
+
+\newbibmacro*{cite:seen}{%
+ \iffieldundef{shorthand}
+ {\ifboolexpr{ test \ifciteibid
+ and togl {short}
+ and not test \iffirstonpage}
+ {\usebibmacro{cite:ibid}}%
+ {\usebibmacro{cite:short}}}
+ {\printfield{shorthand}%
+ \usebibmacro{cite:volume}}}
+
+\newbibmacro*{cite:ibid}{%
+ \iftoggle{ibid}
+ {\bibcpstring{ibidem}%
+ \ifloccit
+ {\global\toggletrue{cbx@loccit}}%
+ {\usebibmacro{cite:volume}}}
+ {\global\toggletrue{cbx@short}%
+ \ifentrytype{review}
+ {\usebibmacro{ibid:review}}%
+ {\usebibmacro{author+bookauthor+etc}%
+ \iftoggle{noauth}
+ {\usebibmacro{title+labelyear}}%
+ {}% needs '%'
+ \usebibmacro{cite:volume}}}}
+
+\newbibmacro*{ibid:review}{%
+ \ifnameundef{author}
+ {\bibcpstring{reviewnoauth}%
+ \space
+ \usebibmacro{title+labelyear}}%
+ {\usebibmacro{author+bookauthor+etc}}%
+ \usebibmacro{cite:volume}}%
+
+\newbibmacro*{cite:short}{%
+ \global\toggletrue{cbx@short}%
+ \ifentrytype{review}
+ {\usebibmacro{short:review}}%
+ {\usebibmacro{author+bookauthor+etc}%
+ \usebibmacro{title+labelyear}%
+ \usebibmacro{cite:volume}}}
+
+\newbibmacro*{short:review}{%
+ \ifnameundef{author}
+ {\bibcpstring{reviewnoauth}}%
+ {\usebibmacro{author+bookauthor+etc}%
+ \bibstring{review}}%
+ \space
+ \renewcommand*{\xtitle}{book}%
+ \usebibmacro{title+labelyear}%
+ \usebibmacro{cite:volume}}%
+
+\newbibmacro*{cite:volume}{%
+ \newunit
+ \iftoggle{swapvol}
+ {\ifboolexpr{ togl {collection:bk}
+ or togl {collection:ib}}
+ {\usebibmacro{volume+page}}%
+ {}}
+ {}}
+
+\newbibmacro*{volume+page}{%
+ \iffieldundef{volume}
+ {}
+ {\iffieldpages{postnote}
+ {\printfield[noformat]{volume}%
+ \addcolon}%
+ {\printfield{volume}}}}
+
+\newbibmacro*{cite:new}{%
+ \global\toggletrue{cbx@first}%
+ \usebibmacro{deflabel}%
+ \iftoggle{firstshort}
+ {\usebibmacro{cite:short}}%
+ {\usebibmacro{crossref+long}}}
+
+% By default, idemtracker is 'false'. As such, '\ifciteidem' returns
+% false. With idemtracker set to 'true' (or to some value that implies
+% 'true') the test below will print 'labelname' if it matches that of
+% the previous citation.
+
+\newbibmacro*{deflabel}{%
+ \ifboolexpr{ test {\ifciteidem}
+ or togl {firstshort}}
+ {\renewcommand*{\cbx@deflabel}{labelname}}%
+ {\renewcommand*{\cbx@deflabel}{default}}}
+
+% Checking for 'title' below helps if you cross-reference volumes to a
+% collection with entries containing just 'volume' and 'crossref'
+% fields. Perhaps justifiable in very rare cases.
+
+\newbibmacro*{crossref+long}{%
+ \ifboolexpr{ test {\iffieldundef{crossref}}
+ or test {\iffieldundef{title}}}
+ {\usebibmacro{cite:long}}%
+ {\xifinlist{\thefield{crossref}}{\crossreflist}
+ {\stepcounter{\thefield{crossref}}%
+ \usebibmacro{author+title+etc}%
+ \usebibmacro{crossref}}%
+ {\listxadd{\crossreflist}{\thefield{crossref}}%
+ \ifcsdef{c@\thefield{crossref}}
+ {\setcounter{\thefield{crossref}}{0}}%
+ {\newcounter{\thefield{crossref}}}
+ \usebibmacro{cite:long}}}}
+
+\newbibmacro*{cite:long}{%
+ \printtext{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}%
+ {cite:\thefield{entrytype}}}}
+
+\newbibmacro*{savefields}{%
+ \iffieldundef{crossref}
+ {\let\cbx@keyhash\empty}%
+ {\savefield{crossref}{\cbx@keyhash}}}
+
+% See CMOS, 17th ed., 14.174, 14.177, 14.185, and 14.188.
+
+\newbibmacro*{colon+comma+etc}{%
+ \ifboolexpr{ test {\iffieldundef{pages}}
+ and test {\iffieldundef{postnote}}}
+ {}
+ {\ifboolexpr{ test {\iffieldundef{year}}
+ and test {\iffieldundef{month}}
+ and test {\iffieldundef{issue}}}
+ {\setunit{\addcolon}}%
+ {\ifboolexpr{ test {\iffieldundef{number}}
+ and test {\iffieldundef{volume}}}
+ {\newunit}%
+ {\setunit{\addcolon\space}}}}}
+
+%%%%%%%%%%%%%%%%
+%% Postnote %%
+%%%%%%%%%%%%%%%%
+
+\newbibmacro*{cite:postnote}{%
+ \usebibmacro{postnote+etc}%
+ \usebibmacro{postpunct+etc}}%
+
+\newbibmacro*{postnote+etc}{%
+ \ifboolexpr{ togl {cbx@loccit}
+ and togl {ibid}}
+ {}
+ {\iftoggle{cbx@first}
+ {\usebibmacro{postnote:first}%
+ \usebibmacro{shorthand+intro}}%
+ {\usebibmacro{postnote}}}}
+
+\newbibmacro*{postnote:first}{%
+ \ifboolexpr{ test {\iffieldundef{postnote}}
+ and test {\iffieldundef{pages}}
+ and test {\iffieldundef{url}}}
+ {\usebibmacro{doi+url+etc}}%
+ {\usebibmacro{cite:pages}%
+ \usebibmacro{postnote}%
+ \usebibmacro{doi+url+etc}}}
+
+% If the postnote is empty, print the page ranges of journal articles.
+% See CMOS, 17th ed., 14.153, 14.167, and 14.174. As for incollection
+% and inbook entries, 14.106 seems to suggest the same, but the
+% example in 14.30 suggests otherwise. The examples in 14.108 only
+% muddy the waters further. For magazines, CMOS is clear that the
+% range can be left out. To do so, simply omit it from your
+% bibliography database.
+
+\newbibmacro*{cite:pages}{%
+ \iffieldundef{pages}
+ {}
+ {\ifboolexpr{ test {\ifentrytype{article}}
+ or test {\ifentrytype{review}}}
+ {\iffieldundef{postnote}
+ {\printtext[bibhyperref]{\printfield{pages}}}
+ {}}
+ {}}}
+
+\renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}
+ {}
+ {\printtext[bibhyperref]{\printfield{postnote}}}}
+
+\newbibmacro*{shorthand+intro}{%
+ \iffieldundef{shorthand}
+ {}
+ {\iffieldundef{shorthandintro}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \bibstring{citedas}\space
+ \printfield{shorthand}}}
+ {\setunit{\addspace}%
+ \printfield{shorthandintro}}}}
+
+\newbibmacro*{postpunct+etc}{%
+ \iflastcitekey
+ {\iffieldundef{postpunct}
+ {\addperiod}%
+ {}}
+ {}}
+
+\newbibmacro*{refworks}{%
+ \ifboolexpr{ test {\iffieldundef{howpublished}}
+ and test {\iffieldundef{year}}}
+ {}
+ {\setunit{\addspace}%
+ \iffieldundef{howpublished}
+ {\printtext[parens]{\printfield{year}}}
+ {\global\togglefalse{cbx@first}%
+ \printtext[parens]{%
+ \printfield{howpublished}%
+ \newunit
+ \printfield{version}%
+ \newunit
+ \printfield{year}}}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Bibliography Drivers for Notes %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareBibliographyDriver{cite:article}{%
+ \usebibmacro{author+title+ed+note}%
+ \usebibmacro{articles}%
+ \usebibmacro{colon+comma+etc}}%
+
+\DeclareBibliographyDriver{cite:book}{%
+ \usebibmacro{author+collection+etc}%
+ \newunit
+ \usebibmacro{volume+page}}%
+
+\DeclareBibliographyDriver{cite:incollection}{%
+ \ifentrytype{letter}
+ {\toggletrue{noauth}}%
+ {}% needs '%'
+ \usebibmacro{author+title+etc}%
+ \usebibmacro{incollections}%
+ \newunit
+ \usebibmacro{volume+page}}%
+
+\DeclareBibliographyDriver{cite:misc}{%
+ \usebibmacro{author+bookauthor+etc}%
+ \usebibmacro{title+labelyear}%
+ \newunit
+ \printfield{usera}%
+ \newunit}%
+
+\DeclareBibliographyDriver{cite:online}{%
+ \usebibmacro{author+title+ed+note}%
+ \setunit*{\newunitpunct}% needs '*'
+ \usebibmacro{websites}%
+ \usebibmacro{issue+month+etc}{}%
+ \newunit}%
+
+\DeclareBibliographyDriver{cite:patent}{%
+ \usebibmacro{author+title+ed+note}%
+ \newunit
+ \printfield{number}%
+ \newunit}%
+
+\DeclareBibliographyDriver{cite:reference}{%
+ \printlist{organization}%
+ \usebibmacro{edition}{}%
+ \usebibmacro{refworks}%
+ \newunit
+ \bibstring{subverbo}\space
+ \usebibmacro{longtitle+titleaddon}%
+ \newunit
+ \renewcommand*{\pluga}{\bibstring{by}\space}%
+ \renewcommand*{\cbx@namelist}{author}%
+ \usebibmacro{printnames+etc}}%
+
+\DeclareBibliographyDriver{cite:review}{%
+ \usebibmacro{reviews}%
+ \usebibmacro{articles}%
+ \usebibmacro{colon+comma+etc}}%
+
+\DeclareBibliographyDriver{cite:thesis}{%
+ \usebibmacro{author+title+ed+note}%
+ \setunit{\addspace}% not '\setunit{\space}'
+ \printtext[parens]{\usebibmacro{inst+loc+date}}%
+ \newunit}%
+
+\endinput