% Last modified: Tue 10 Nov 2020 05:24:28 PM CST % 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}[2020/11/10 Windy City bibliography style for biblatex] \@ifpackagelater{biblatex}{2019/08/17} {} {\PackageError{biblatex} {Outdated 'biblatex' package} {Windy City is for biblatex v3.13 and above.\MessageBreak You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak This is a fatal error. I'm aborting now.}% \endinput}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Bibliography and Entry Options %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \providetoggle{annotate} \DeclareBiblatexOption{global}[boolean]{annotate}[true]{% \settoggle{annotate}{#1}}% \DeclareBiblatexOption{global}[boolean]{collsonly}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{mincrossrefs=1}% \ExecuteBibliographyOptions{minxrefs=1}% \AtBeginBibliography{\blx@key@bibcheck{collsonly}}} {}} \providetoggle{firstshort} \DeclareBiblatexOption{global}[boolean]{firstshort}[true]{% \settoggle{firstshort}{#1}}% \providetoggle{ibid} \DeclareBiblatexOption{global}[boolean]{ibid}[true]{% \ifstrequal{#1}{true} {\toggletrue{ibid}% \toggletrue{short}}% {\togglefalse{ibid}}} \providetoggle{isbn} \DeclareBiblatexOption{entry,global}[boolean]{isbn}[true]{% \settoggle{isbn}{#1}}% \providetoggle{issn} \DeclareBiblatexOption{entry,global}[boolean]{isnn}[true]{% \settoggle{issn}{#1}}% \providetoggle{library} \DeclareBiblatexOption{entry,global}[boolean]{library}[true]{% \settoggle{library}{#1}}% \providetoggle{listvols} \DeclareBiblatexOption{entry}[boolean]{listvols}[true]{% \settoggle{listvols}{#1}}% \providetoggle{noauth} \DeclareBiblatexOption{entry}[boolean]{noauth}[true]{% \settoggle{noauth}{#1}}% \DeclareBiblatexOption{global}[boolean]{nolos}[true]{% \ifstrequal{#1}{true} {\AtBeginBibliography{\blx@key@bibcheck{nolos}}} {}} \providetoggle{nopages} \DeclareBiblatexOption{global}[boolean]{nopages}[true]{% \settoggle{nopages}{#1}}% \providetoggle{reflist} \DeclareBiblatexOption{global}[boolean]{reflist}[true]{% \ifstrequal{#1}{true} {\toggletrue{reflist}% \DeclareLabeldate{% \field{date} \field{year} \field{origdate} \field{urldate} \literal{nodate}} \ExecuteBibliographyOptions{% sorting=nyt}}% {\togglefalse{reflist}}} \providetoggle{short} \DeclareBiblatexOption{global}[boolean]{short}[true]{% \ifstrequal{#1}{true} {\toggletrue{short}% \toggletrue{firstshort}}% {\togglefalse{short}}} \providetoggle{skipdate} \DeclareBiblatexOption{entry}[boolean]{skipdate}[true]{% \settoggle{skipdate}{#1}}% \providetoggle{swapauth} \DeclareBiblatexOption{entry}[boolean]{swapauth}[true]{% \settoggle{swapauth}{#1}}% \providetoggle{swaptrans} \DeclareBiblatexOption{entry}[boolean]{swaptrans}[true]{% \settoggle{swaptrans}{#1}}% \providetoggle{swapvol} \DeclareBiblatexOption{entry,global}[boolean]{swapvol}[true]{% \settoggle{swapvol}{#1}}% % For setting 'minbibnames' and such, see CMOS, 17th ed., 14.76 and % 15.29. \ExecuteBibliographyOptions{% abbreviate=true, autocite=footnote, autopunct=true, block=none, citetracker=context, date=long, dateabbrev=false, dateusetime=true, ibidtracker=constrict, 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, sorting=nty, time=12h, timezones=true, uniquelist=minyear, uniquename=minfull, urldate=long, useeditor=true, 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 '-windycity.lbx': \DeclareLanguageMappingSuffix{-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}{% \ifentrytype{inbook} {\iffieldundef{crossref} {} {\skipentry}}% {\ifentrytype{incollection} {\iffieldundef{crossref} {} {\iffieldundef{chapter} {} {\skipentry}}}}} \defbibcheck{nolos}{% \iffieldundef{shorthand} {} {\skipentry}}% \defbibcheck{reference}{% \ifentrytype{reference} {\skipentry}% {}} %%%%%%%%%%%%%%%%%%%%%%%% %% Data Inheritance %% %%%%%%%%%%%%%%%%%%%%%%%% % As of biblatex 3.14 or biber 2.14 (or thereabouts), '\inherit' no % longer works for 'options'. \ResetDataInheritance \DefaultInheritance[\except{*}{review}{all=false}]{all=true,override=false} \DeclareDataInheritance{*}{incollection,inbook,letter,review}{% \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{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}{collection,inbook}{% \inherit{year}{bookyear} \inherit{endyear}{endbookyear}} \DeclareDataInheritance{reference}{reference}{% \inherit{author}{bookauthor}} \DeclareDataInheritance{*}{*}{% \noinherit{crossref} \noinherit{entryset} \noinherit{entrysubtype} \noinherit{execute} \noinherit{ids} \noinherit{label} \noinherit{presort} \noinherit{related} \noinherit{relatedoptions} \noinherit{relatedstring} \noinherit{relatedtype} \noinherit{shorthand} \noinherit{shorthandintro} \noinherit{sortkey} \noinherit{xref}} %%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Other Basic Settings %% %%%%%%%%%%%%%%%%%%%%%%%%%%%% \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{ibid:loccit} \providetoggle{journalfirst} \providetoggle{multicite} \providetoggle{cbx:collection} \providetoggle{cbx:first} \providetoggle{cbx:idem} \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}% \DeclareNumChars{.[]?} \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{preface}{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{preface}{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,online,reference,review] {title}{\mkbibquote{#1}} \DeclareFieldFormat[article,incollection,online,reference,review] {labeltitle}{\mkbibquote{#1}} \DeclareIndexFieldFormat[article,incollection,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 italics for it 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 %% %%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareDriverSourcemap[datatype=bibtex]{ \map{ \step[typesource=periodical, typetarget=article] \step[typesource=booklet, typetarget=book] \step[typesource=manual, typetarget=book] \step[typesource=mvbook, typetarget=book] \step[typesource=mvcollection, typetarget=book] \step[typesource=proceedings, typetarget=book] \step[typesource=report, typetarget=book] \step[typesource=techreport, typetarget=book] \step[typesource=bookinbook, typetarget=inbook] \step[typesource=conference, typetarget=incollection] \step[typesource=inproceedings, typetarget=incollection] \step[typesource=suppbook, typetarget=incollection] \step[typesource=suppcollection, typetarget=incollection] \step[typesource=electronic, typetarget=online] \step[typesource=www, typetarget=online] \step[typesource=inreference, typetarget=reference] \step[typesource=mathesis, typetarget=thesis] \step[typesource=phdthesis, typetarget=thesis]} \map{ \step[fieldsource=school, fieldtarget=institution] \step[fieldsource=address, fieldtarget=location] \step[fieldsource=journal, fieldtarget=journaltitle]}} \DeclareBibliographyAlias{collection}{book} \DeclareBibliographyAlias{cite:collection}{cite:book} \DeclareBibliographyAlias{inbook}{incollection} \DeclareBibliographyAlias{letter}{incollection} \DeclareBibliographyAlias{cite:inbook}{cite:incollection} \DeclareBibliographyAlias{cite:letter}{cite:incollection} \DeclareBibliographyAlias{unpublished}{thesis} \DeclareBibliographyAlias{cite:unpublished}{cite:thesis} \DeclareBibliographyAlias{*}{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{authpos+deflabel}% \usebibmacro{journalfirst}}% {\usebibmacro{addplus: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{collection}} or test {\ifentrytype{inbook}} or test {\ifentrytype{incollection}} )} {} {\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}}% \usebibmacro{author+bookauthor+type}}% \newbibmacro*{bookauthor+namelist}{% \ifboolexpr{ test {\ifnameundef{shortbookauthor}} or togl {bibliography}} {\renewcommand*{\cbx@namelist}{bookauthor}}% {\renewcommand*{\cbx@namelist}{shortbookauthor}}% \usebibmacro{author+bookauthor+type}}% % See notes for 'handle' and 'nameaddon'. \newbibmacro*{author+bookauthor+type}{% \iffieldundef{\cbx@namelist type} {} {\iffieldequalstr{\cbx@namelist type}{anon} {\renewcommand*{\anona}{\bibopenbracket}% \renewcommand*{\anonb}{\bibclosebracket}}% {\iffieldequalstr{\cbx@namelist type}{anon?} {\renewcommand*{\anona}{\bibopenbracket}% \renewcommand*{\anonb}{\addquestion\bibclosebracket}}% {\ifboolexpr{ test {\iffieldequalstr{\cbx@namelist type}{pseudo}} and not togl {cbx:short}} {\renewcommand*{\anonb}{\space\mkbibbrackets{\bibstring{pseudo}}}} {}}}}} % When 'journaltitle' goes in the author's position. \newbibmacro*{journalfirst}{% \ifboolexpr{ ( test {\ifentrytype{article}} or test {\ifentrytype{review}} ) and togl {bibliography}} {\toggletrue{journalfirst}% \usebibmacro{bibjournaldash}% \setunit{\space}% \usebibmacro{journallocation}% \clearlist{location}% \usebibmacro{labeldate+extradate}% \newunit}% {\usebibmacro{blogtitlefirst}}} % When 'blogtitle' goes in the author's position. \newbibmacro*{blogtitlefirst}{% \ifboolexpr{ test {\ifentrytype{online}} and togl {bibliography}} {\toggletrue{journalfirst}% \usebibmacro{bibblogdash}% \setunit{\space}% \usebibmacro{labeldate+extradate}% \newunit}% {\usebibmacro{orgfirst}}} % When 'organization' goes in the author's position. \newbibmacro*{orgfirst}{% \ifboolexpr{ test {\ifentrytype{reference}} and not test {\iflistundef{organization}}} {\printlist{organization}% \setunit{\space}% \newunit}% {}} \newbibmacro*{namehash+etc}{% \usebibmacro{printnames+etc}% \ifboolexpr{ togl {authposition}% false in 'crossref' macro or togl {multicite}} {\savefield{namehash}{\bbx@lasthash}% \usebibmacro{authpos+deflabel}% \newunit}% {\setunit{\addcomma\space}}} \newbibmacro*{supplement}{% \ifnameundef{afterword} {\ifnameundef{foreword} {\ifnameundef{introduction} {\renewcommand*{\cbx@namelist}{preface}% \renewcommand*{\cbx@bibstring}{preface}}% {\renewcommand*{\cbx@namelist}{introduction}% \renewcommand*{\cbx@bibstring}{introduction}}} {\renewcommand*{\cbx@namelist}{foreword}% \renewcommand*{\cbx@bibstring}{foreword}}} {\renewcommand*{\cbx@namelist}{afterword}% \renewcommand*{\cbx@bibstring}{afterword}}% \usebibmacro{printnames+etc}% \savefield{namehash}{\bbx@lasthash}% \usebibmacro{authpos+deflabel}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 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}% \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}}}} \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}% \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*{pluga+etc}{% \usebibmacro{edtranspunct:a}% \usebibmacro{pluga+printnames}% \usebibmacro{edtranspunct:b}}% \newbibmacro*{edtranspunct:a}{% \iftoggle{authposition} {} {\iftoggle{edshift} {\setunit{\addcomma\space}}% {\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' 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}{}% \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}{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}}% {}} \newbibmacro*{edtranspunct:c}{% \ifboolexpr{ togl {collection:bk} and togl {swapvol}} {\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*{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}}} %%%%%%%%%%%%%%%%%%%%%%%% %% 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}}} {\bibnamedash\plugb}% {\bibnamedash}}% {\usebibmacro{printnames}}} \renewcommand*{\bibnamedash}{% \rule[2.4pt]{3em}{0.2pt}% \global\toggletrue{blx@insert}}% \newbibmacro*{printnames}{% \ifnameundef{\cbx@namelist} {} {\anona\pluga\printnames[\cbx@deflabel]{% \cbx@namelist}\plugb\anonb}}% % A screen name precedes 'nameaddon' and can be omitted from short % citations. See CMOS, 17th ed., 14.209. \newbibmacro*{handle}{% \ifboolexpr{ test {\iffieldundef{handle}} or togl {cbx:short}} {} {\space \printfield[parens]{handle}% \clearfield{handle}}} % In short citations, omit addons. See CMOS, 17th ed., 14.80 and % 14.209. \newbibmacro*{nameaddon}{% \ifboolexpr{ test {\iffieldundef{nameaddon}} or togl {cbx:short}} {} {\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 a dash replaces 'journaltitle' in the author's position. \newbibmacro*{bibjournaldash}{% \ifboolexpr{ test {\iffieldequals{journaltitle}{\bbx@lasthash}} and not test \iffirstonpage} {\bibnamedash \clearfield{journaltitle}% \clearlist{location}% \newunit}% {\savefield{journaltitle}{\bbx@lasthash}% \renewcommand*{\xtitle}{journal}% \usebibmacro{longtitle+titleaddon}% \let\xtitle\empty}}% % When a dash replaces 'blogtitle' in the author's position. \newbibmacro*{bibblogdash}{% \ifboolexpr{ test {\iffieldequals{blogtitle}{\bbx@lasthash}} and not test \iffirstonpage} {\bibnamedash \clearfield{blogtitle}% \newunit}% {\savefield{blogtitle}{\bbx@lasthash}% \renewcommand*{\xtitle}{blog}% \usebibmacro{longtitle+titleaddon}% \let\xtitle\empty}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Titles and Subtitles %% %%%%%%%%%%%%%%%%%%%%%%%%%%%% \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}}% \isdot}}% \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}\isdot}% {\printfield[title]{shortmaintitle}\isdot}}% {\ifboolexpr{ togl {collection:ib} and togl {swapvol}} {\iffieldundef{shortbooktitle} {\printfield[title]{booktitle}\isdot}% {\printfield[title]{shortbooktitle}\isdot}}% {\printfield[\thefield{entrytype}]{labeltitle}\isdot}}} \newbibmacro*{shorttitle+crossref}{% \ifboolexpr{ togl {collection:icbk} and togl {swapvol}} {\iffieldundef{shortmaintitle} {\printfield[title]{maintitle}\isdot}% {\printfield[title]{shortmaintitle}\isdot}}% {\ifboolexpr{ togl {collection:icib} and togl {swapvol}} {\iffieldundef{shortbooktitle} {\printfield[title]{booktitle}\isdot}% {\printfield[title]{shortbooktitle}\isdot}}% {\printfield[\thefield{entrytype}]{labeltitle}\isdot}}} \renewbibmacro*{booktitle}{% \iffieldundef{booktitle} {} {\renewcommand*{\xtitle}{book}% \usebibmacro{longtitle+titleaddon}% \usebibmacro{bybookauthor+pages}}} \newbibmacro*{bookbooktitle}[1]{% \iffieldundef{bookbooktitle} {} {\ifstrequal{#1}{in} {\newunit\bibstring{in}\space}% {}% needs '%' \renewcommand*{\xtitle}{bookbook}% \usebibmacro{longtitle+titleaddon}}} \renewbibmacro*{maintitle}{% \iffieldundef{maintitle} {} {\renewcommand*{\xtitle}{main}% \usebibmacro{longtitle+titleaddon}}} \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}}} {\usebibmacro{test:collection:bk}}% {\ifboolexpr{ 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}}% {\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 %% %%%%%%%%%%%%%%%%%%%%%%% % The next command should work well enough for most languages but can % be overridden by lbx files. \renewcommand*{\mkdaterangefull}[2]{% \begingroup \blx@metadateinfo{#2}% \ifboolexpr{ test {\iffieldundef{#2year}} and test {\iffieldundef{#2month}}} {\blx@nounit}% {\printtext[#2date]{% \datecircaprint \iffieldundef{#2season} {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% \blx@printtime{#2}{}}% {\csuse{mkbibseasondate#1}{#2year}{#2season}}% \dateuncertainprint \dateeraprint{#2year}% \ifboolexpr{ test {\iffieldundef{#2endyear}} and test {\iffieldundef{#2endmonth}}} {} {\iffieldequalstr{#2endyear}{} {\mbox{\bibdaterangesep}}% {\bibdaterangesep \enddatecircaprint \iffieldundef{#2season} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% \blx@printtime{#2}{end}}% {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% \enddateuncertainprint \dateeraprint{#2endyear}}}}}% needs '%' \endgroup}% \newbibmacro*{issue+month+etc}[1]{% \iffieldundef{year} {\iffieldundef{month} {} {\setunit{\space}% \printtext[parens]{\printdate}}} {\ifboolexpr{ test {\iffieldundef{volume}} and test {\iffieldundef{number}}} {\iffieldundef{journal} {} {\setunit{\addcomma\space}}% \iffieldundef{month} {\usebibmacro{issue+season+year}}% {\usebibmacro{reflist+year+day}% \printdate}}% {\iffieldundef{month} {\setunit{\space}% \usebibmacro{reflist+issue+season}}% {\ifstrequal{#1}{noparens} {\usebibmacro{reflist+year+day}% \newunit \printdate}% {\usebibmacro{reflist+year+day}% \setunit{\space}% \printtext[parens]{\printdate}}}}}} \newbibmacro*{reflist+year+day}{% \ifboolexpr{ togl {bibliography} and togl {reflist} and test {\iffieldundef{day}}} {\iffieldundef{endyear} {\clearfield{year}}% {\iffieldsequal{year}{endyear} {\clearfield{year}% \clearfield{endyear}}% {}}} {}} % 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 {bibliography} and togl {reflist} and not togl {skipdate}} {\newunit \usebibmacro{reflist+origyear}% \usebibmacro{labeldate+endyear}% \printfield{extradate}% \iffieldnums{labelyear} {\bibsentence\newunit}% {\newunit}}% for 'n.d.' {}} \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+etc}% \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+incollection+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+etc}% \newunit \usebibmacro{websites}% \usebibmacro{issue+month+etc}{}% \usebibmacro{doi+finentry+etc}}% \DeclareBibliographyDriver{patent}{% \usebibmacro{bibindex}% \usebibmacro{author+title+etc}% \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+etc}% \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+etc}{% \usebibmacro{author+bookauthor+etc}% \usebibmacro{title+labelyear}% \usebibmacro{note}% \usebibmacro{edtrans}}% \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}{}}% \toggletrue{edshift}% \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{issn}% \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+note+etc}% \usebibmacro{volume+number+etc}% \let\xtitle\empty \usebibmacro{longtitle+titleaddon}% \toggletrue{edshift}% \usebibmacro{byauthor}% \usebibmacro{edtrans}% \usebibmacro{volumes+bookseries+etc}}% {\usebibmacro{title+labelyear}% \usebibmacro{byauthor}% \iffieldundef{maintitle} {\usebibmacro{note+edition+etc}% \usebibmacro{volumes+bookseries+etc}}% {\usebibmacro{edtrans}% \usebibmacro{volumes+bookseries+etc}% \usebibmacro{maintitle+note+etc}}} \usebibmacro{date+loc+etc}% \usebibmacro{origtitle}}% \newbibmacro*{author+incollection+etc}{% \usebibmacro{test:collection}% \usebibmacro{test:bookauthor}% \ifboolexpr{ test {\ifnameundef{afterword}} and test {\ifnameundef{foreword}} and test {\ifnameundef{introduction}} and test {\ifnameundef{preface}}} {\usebibmacro{author+bookauthor+etc}% \iffieldundef{title} {\usebibmacro{booktitle}% \usebibmacro{edtrans}}% {\ifboolexpr{ togl {collection:ib} and togl {swapvol} and not togl {collection:icib}} {\usebibmacro{booktitle}% \usebibmacro{edtrans}}% {\usebibmacro{title+labelyear}% \usebibmacro{byauthor}% \usebibmacro{edtrans}% \usebibmacro{chapter+in}}}} {\usebibmacro{supplement}% \newunit \bibstring{\cbx@bibstring}\space}}% \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} {} {\toggletrue{edshift}% \usebibmacro{edtrans}}} \newbibmacro*{inst+loc+date}{% \usebibmacro{thesis+type}% \setunit{\addcomma\space}% \iflistundef{institution} {\printfield{venue}}% {\printlist{institution}}% \setunit{\addcomma\space}% \printlist{location}% \setunit{\addcomma\space}% \usebibmacro{reflist+year+day}% \printdate}% %%%%%%%%%%%%%%%%%%%%%%%%% %% Third Tier Macros %% %%%%%%%%%%%%%%%%%%%%%%%%% \renewbibmacro*{annotation}{% \iftoggle{annotate} {\printfield{annotation}}% {}} \newbibmacro*{note}{% \iffieldundef{note} {} {\iftoggle{edshift} {\setunit{\addcomma\space}% \togglefalse{edshift}}% {\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*{issn}{% \iffieldundef{issn} {} {\iftoggle{bibliography} {\iftoggle{issn} {\newunit \printfield{issn}}% {}} {}}} \newbibmacro*{library}{% \iffieldundef{library} {} {\iftoggle{bibliography} {\iftoggle{library} {\newunit \printfield{library}}% {}} {}}} \newbibmacro*{maintitle+note+etc}{% \usebibmacro{maintitle}% \usebibmacro{note}% \usebibmacro{edition}{}% \iftoggle{swaptrans} {\usebibmacro{translatortypes}% \usebibmacro{editortypes}{maintitle}}% {\usebibmacro{editortypes}{maintitle}% \usebibmacro{translatortypes}}} \newbibmacro*{volume+number+etc}{% \iffieldundef{\xvolume volume} {} {\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}{% \ifboolexpr{ test {\ifnameundef{author}} or togl {noauth}} {} {\iftoggle{edshift} {\renewcommand*{\pluga}{% \setunit{\addcomma\space}\bibstring{by}\space}}% {\renewcommand*{\pluga}{\newunit\bibstring{by}\space}}% \renewcommand*{\cbx@namelist}{author}% \usebibmacro{printnames+etc}}} \newbibmacro*{volumes+bookseries+etc}{% \usebibmacro{volumes}% \usebibmacro{bookseries}% \usebibmacro{pages}% \usebibmacro{volume+number+etc}% \usebibmacro{book:number}% \usebibmacro{part}}% \newbibmacro*{note+edition+etc}{% \usebibmacro{note}% \usebibmacro{edition}{}% \usebibmacro{edtrans}}% \newbibmacro*{edition}[1]{% \iffieldundef{edition} {} {\iftoggle{edshift} {\setunit{\addcomma\space}% \togglefalse{edshift}}% {\newunit}% \iffieldbibstring{edition} {\bibstring{\thefield{edition}}} {\ifstrequal{#1}{noformat} {\printfield[noformat]{edition}}% {\printfield{edition}}}}} \newbibmacro*{date+loc+etc}{% \ifboolexpr{ test {\iflistundef{location}} and test {\iflistundef{publisher}}} {\newunit \usebibmacro{reflist+year+day}% \printdate}% {\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}} or test {\ifnamesequal{preface}{bookauthor}}} {\clearname{bookauthor}}% {\iftoggle{noauth} {\clearname{bookauthor}}% {}}} \newbibmacro*{bybookauthor+pages}{% \ifnameundef{bookauthor} {} {\renewcommand*{\pluga}{% \setunit{\addcomma\space}\bibstring{by}\space}% \renewcommand*{\cbx@namelist}{bookauthor}% \usebibmacro{printnames+etc}% \usebibmacro{pages}}} \newbibmacro*{chapter+in}{% \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{bookbooktitle}{in}% \toggletrue{edshift}% \usebibmacro{booktitle}% \usebibmacro{note+edition+etc}% \iffieldundef{volume} {\iffieldundef{bookvolume}% {\renewcommand*{\xvolume}{bookbook}}% {\renewcommand*{\xvolume}{book}}% \usebibmacro{volumes+bookseries+etc}}% {\usebibmacro{volumes+bookseries+etc}}}} \usebibmacro{date+loc+etc}% \usebibmacro{origtitle}}% \newbibmacro*{crossref}{% \renewcommand*{\cbx@deflabel}{labelname}% \global\toggletrue{cbx:short}% \entrydata{\thefield{crossref}}{% \iftoggle{reflist} {\usebibmacro{parencite:new}}% {\usebibmacro{author+bookauthor+etc}% \usebibmacro{shorttitle+crossref}}% \usebibmacro{cite:volume}}} \newbibmacro*{pages}{% \iffieldundef{pages} {} {\iftoggle{bibliography} {\setunit{\addcomma\space}% \printfield{pages}% \clearfield{pages}% \togglefalse{edshift}}% {}}} \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}% \usebibmacro{edition}{}% \usebibmacro{volumes+bookseries+etc}% \let\xtitle\empty \usebibmacro{longtitle+titleaddon}% \toggletrue{edshift}% \usebibmacro{byauthor}% \usebibmacro{edtrans}}% {\usebibmacro{volume+number+etc}% \toggletrue{edshift}% \usebibmacro{booktitle}% \usebibmacro{note+edition+etc}% \usebibmacro{volumes+bookseries+etc}}} \newbibmacro*{incollections:ic}{% \iftoggle{swapvol} {\iftoggle{collection:icbk} {\usebibmacro{maintitle+note+etc}}% {\usebibmacro{bookbooktitle}{}% \toggletrue{edshift}% \usebibmacro{note+edition+etc}}% \renewcommand*{\xvolume}{book}% \usebibmacro{volumes+bookseries+etc}% \toggletrue{edshift}% \usebibmacro{booktitle}% \usebibmacro{edtrans}}% {\toggletrue{edshift}% \usebibmacro{booktitle}% \usebibmacro{edtrans}% \renewcommand*{\xvolume}{book}% \usebibmacro{volume+number+etc}% \iftoggle{collection:icbk} {\usebibmacro{maintitle+note+etc}}% {\usebibmacro{bookbooktitle}{}% \toggletrue{edshift}% \usebibmacro{note+edition+etc}}% \renewcommand*{\xvolume}{book}% \usebibmacro{volumes+bookseries+etc}}} \endinput