From 236222daf66574317ed37f1a93119fd2f44d68bf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 10 Jun 2016 23:19:01 +0000 Subject: biblatex-chicago (7jun16) git-svn-id: svn://tug.org/texlive/trunk@41351 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/biblatex-chicago/biblatex-chicago.sty | 15 +- .../biblatex-chicago/chicago-authordate-trad.cbx | 2621 +---------------- .../latex/biblatex-chicago/chicago-authordate.bbx | 1251 +++++--- .../latex/biblatex-chicago/chicago-authordate.cbx | 2586 +--------------- .../biblatex-chicago/chicago-dates-common.cbx | 3075 ++++++++++++++++++++ .../tex/latex/biblatex-chicago/chicago-notes.bbx | 939 ++++-- .../tex/latex/biblatex-chicago/chicago-notes.cbx | 2452 +++++++++++----- .../tex/latex/biblatex-chicago/cms-american.lbx | 62 +- .../tex/latex/biblatex-chicago/cms-british.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-finnish.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-french.lbx | 71 +- .../tex/latex/biblatex-chicago/cms-german.lbx | 69 +- .../tex/latex/biblatex-chicago/cms-icelandic.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-ngerman.lbx | 69 +- .../tex/latex/biblatex-chicago/cms-norsk.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-norwegian.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-nynorsk.lbx | 58 +- .../tex/latex/biblatex-chicago/cms-swedish.lbx | 762 +++++ .../tex/latex/biblatex-chicago/cmsdocs.sty | 384 +++ 19 files changed, 8058 insertions(+), 6646 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-chicago/cms-swedish.lbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-chicago/cmsdocs.sty (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago') diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty b/Master/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty index 86f8a1d82f4..364211e22d5 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty @@ -1,4 +1,4 @@ -% $Id: biblatex-chicago.sty,v 0.1.1.57 2016/05/08 19:58:55 dfussner Exp $ +% $Id: biblatex-chicago.sty,v 0.1.1.59 2016/06/01 12:49:51 dfussner Exp $ % Copyright (c) 2009-2016 David Fussner. This package is % author-maintained. @@ -13,7 +13,7 @@ % but not limited to, the implied warranties of merchantability and % fitness for a particular purpose. -\ProvidesPackage{biblatex-chicago}[2016/03/15 v 3.3 biblatex style] +\ProvidesPackage{biblatex-chicago}[2016/06/01 v 3.4 biblatex style] \RequirePackage{etoolbox} @@ -51,7 +51,7 @@ \RequirePackage[style=chicago-authordate]{biblatex}% \ExecuteBibliographyOptions{% pagetracker=true,autocite=inline,alldates=comp, - uniquename=minfull,useeditor=true,usetranslator=true,usecompiler=true, + uniquename=minfull,useeditor=true,usetranslator=true,usenamec=true, ibidtracker=constrict,sorting=cms,punctfont,cmslos=true,nodates, uniquelist=minyear,maxbibnames=10,minbibnames=7,sortcase=false, abbreviate=false,dateabbrev=false,avdate=true}} @@ -61,14 +61,14 @@ \ExecuteBibliographyOptions{% pagetracker=true,autocite=footnote,abbreviate=false,alldates=comp, citetracker=true,ibidtracker=constrict,usetranslator=true, - usecompiler=true,loccittracker=constrict,dateabbrev=false, + usenamec=true,loccittracker=constrict,dateabbrev=false, maxbibnames=10,minbibnames=7,sorting=\cms@choose,sortcase=false}} \def\cms@authordatetrad{% \RequirePackage[style=chicago-authordate-trad]{biblatex}% \ExecuteBibliographyOptions{% pagetracker=true,autocite=inline,alldates=comp, - uniquename=minfull,useeditor=true,usetranslator=true,usecompiler=true, + uniquename=minfull,useeditor=true,usetranslator=true,usenamec=true, ibidtracker=constrict,sorting=cms,punctfont,cmslos=true,nodates, uniquelist=minyear,maxbibnames=10,minbibnames=7,sortcase=false, abbreviate=false,dateabbrev=false,avdate=true}} @@ -101,6 +101,10 @@ \setlength{\bibhang}{2em} \setlength{\lositemsep}{0.25\baselineskip plus 0.25\baselineskip} +\setcounter{biburllcpenalty}{5000} +\setcounter{biburlucpenalty}{9000} +\setcounter{biburlnumpenalty}{9000} + \renewcommand*{\bibnamedash}{\rule[.4ex]{3em}{.6pt}} \iftoggle{cms@nomark} @@ -139,6 +143,7 @@ \DeclareLanguageMapping{icelandic}{cms-icelandic} \DeclareLanguageMapping{norsk}{cms-norsk} \DeclareLanguageMapping{nynorsk}{cms-nynorsk} +\DeclareLanguageMapping{swedish}{cms-swedish} \ifundef\bbl@loaded{\let\bbl@loaded\@empty}{}% For old versions of babel diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx index 77f95a52929..296810b80e9 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx @@ -1,1316 +1,19 @@ -% $Id: chicago-authordate-trad.cbx,v 0.8.2.5 2016/03/18 18:46:43 dfussner Exp $ +% $Id: chicago-authordate-trad.cbx,v 0.8.3.9 2016/06/07 09:29:05 dfussner Exp $ % This is a biblatex citation style file, adapted from Lehman's % authoryear-comp.cbx. It is heavily modified, with the intention of % providing inline citations (and a reference list) for the -% author-date style of the Chicago Manual of Style, 16th edition. +% author-date (trad) style of the Chicago Manual of Style, 16th edition. -\ProvidesFile{chicago-authordate-trad.cbx}[2016/03/18 v 2.9a biblatex +\ProvidesFile{chicago-authordate-trad.cbx}[2016/06/07 v 3.4 biblatex citation style] -%%%% Biblatex initialization + Chicago options + Toggles %%%% - -\newbool{cbx:parens} - -\providecommand*{\mkibid}[1]{#1} - -\providetoggle{cms@inlineibid} -\providetoggle{cms@origlabel} -\providetoggle{cms@bothlabelold} -\providetoggle{cms@bothlabelnew} -\providetoggle{cms@fulldate} -\providetoggle{cms@reprint} -\providetoggle{cms@switchdates} -\providetoggle{cms@los} -%\providetoggle{cms@oneyear} -\providetoggle{cms@avdate} -\providetoggle{cms@ordate} -\providetoggle{cms@nodates} -\providetoggle{cms@authorparens} -\providetoggle{cms@datedash} -\providetoggle{cms@modpostnote} - -\providetoggle{cms@url}% These are for the field-exclusion options -\providetoggle{cms@doi} -\providetoggle{cms@doionly} -\providetoggle{cms@eprint} -\providetoggle{cms@isbn} -\providetoggle{cms@numbermonth} -\providetoggle{cms@bookpages} -\providetoggle{cms@hidevolumes}% Modify Volume fix -\providetoggle{cms@comprange} - -\providetoggle{cms@jrcomma}% Comma after Jr./Sr. - -\providetoggle{cms@headlessnote}% Keep -\providetoggle{cms@noibid}% Keep -\providetoggle{cms@usecompiler}% Keep -\providetoggle{cms@origpublished}% Keep -\providetoggle{cms@annotation}% Keep -\providetoggle{cms@postposit}% Keep -\providetoggle{cms@fullshhand}% -\providetoggle{cms@vol}% -\providetoggle{cms@crossref}% -\providetoggle{cms@bookcrossref} - -\AtEveryCitekey{% - \iffieldundef{userc}% - {}% - {\nocite{\thefield{userc}}}% - \iffieldequalstr{pubstate}{reprint}% - {\toggletrue{cms@reprint}}% - {\togglefalse{cms@reprint}}}% - -\DeclareBibliographyOption{avdate}[true]{% - \ifcsdef{cms@opt@avdate@#1}% - {\csuse{cms@opt@avdate@#1}} - {\blx@err@invopt{avdate=#1}{}}} -\def\cms@opt@avdate@true{% - \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 - {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. - {\DeclareLabeldate[music,review,video]{\field{eventyear}% - \field{origyear} \field{year} \field{urlyear}}}% - {\DeclareLabelyear[music,review,video]{\field{eventyear}% - \field{origyear} \field{year} \field{urlyear}}}}% - {\DeclareLabelyear[music,review,video]{eventyear,origyear,year,urlyear}}% - \toggletrue{cms@avdate}}% -\def\cms@opt@avdate@false{% - \togglefalse{cms@avdate}} - -\DeclareBibliographyOption{cmsdate}[off]{% Trying to implement origyear as - \ifcsdef{cms@global@cmsdate@#1}% labelyear. Sorting will be an issue. - {\csuse{cms@global@cmsdate@#1}} - {\blx@err@invopt{cmsdate=#1}{}}} -\def\cms@global@cmsdate@on{% - \toggletrue{cms@origlabel}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@new{% - \toggletrue{cms@bothlabelnew}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@old{% - \toggletrue{cms@bothlabelold}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@both{% - \toggletrue{cms@bothlabelold}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@full{}% -\def\cms@global@cmsdate@off{} - -\DeclareBibliographyOption{cmsorigdate}[true]{% ??? Also need new macros - \ifcsdef{cms@opt@origdate@#1}% for printing dates. Worth it ??? - {\csuse{cms@opt@origdate@#1}}% - {\blx@err@invopt{cmsorigdate=#1}{}}} -\def\cms@opt@origdate@true{% - \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 - {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. - {\DeclareLabeldate{\field{origyear} \field{year}% - \field{eventyear} \field{urlyear}}% - \DeclareLabeldate[patent]{\field{year} \field{eventyear}% - \field{origyear} \field{urlyear}}}% - {\DeclareLabelyear{\field{origyear} \field{year}% - \field{eventyear} \field{urlyear}}% - \DeclareLabelyear[patent]{\field{year} \field{eventyear}% - \field{origyear} \field{urlyear}}}}% - {\DeclareLabelyear{origyear,year,eventyear,urlyear}% - \DeclareLabelyear[patent]{year,eventyear,origyear,urlyear}}% - \global\toggletrue{cms@ordate}}% -\def\cms@opt@origdate@false{\togglefalse{cms@ordate}}% - -\DeclareEntryOption{cmsdate}[off]{% Trying to implement origyear as - \ifcsdef{cms@opt@cmsdate@#1}% labelyear. Sorting will be an issue. - {\iftoggle{cms@origlabel} - {\togglefalse{cms@origlabel}% - \def\@cms@tempdate{cms@origlabel}}% - {\iftoggle{cms@bothlabelnew}% - {\togglefalse{cms@bothlabelnew}% - \def\@cms@tempdate{cms@bothlabelnew}}% - {\iftoggle{cms@bothlabelold}% - {\togglefalse{cms@bothlabelold}% - \def\@cms@tempdate{cms@bothlabelold}}% - {}}}% - \csuse{cms@opt@cmsdate@#1}}% - {\blx@err@invopt{cmsdate=#1}{}}} -\def\cms@opt@cmsdate@on{% - \toggletrue{cms@origlabel}} -\def\cms@opt@cmsdate@new{% - \toggletrue{cms@bothlabelnew}} -\def\cms@opt@cmsdate@old{% - \toggletrue{cms@bothlabelold}} -\def\cms@opt@cmsdate@both{% - \toggletrue{cms@bothlabelold}} -\def\cms@opt@cmsdate@full{% - \toggletrue{cms@fulldate}} -\def\cms@opt@cmsdate@off{} - -\DeclareBibliographyOption{annotation}[true]{% - \global\toggletrue{cms@annotation}} - -\DeclareBibliographyOption{cmslos}[true]{% - \global\settoggle{cms@los}{#1}} - -\DeclareBibliographyOption{noibid}[true]{% - \global\toggletrue{cms@noibid}} - -\DeclareBibliographyOption{compresspages}[true]{% - \ifcsdef{cms@opt@crange@#1}% - {\csuse{cms@opt@crange@#1}}% - {\blx@err@invopt{compresspages=#1}{}}}% -\def\cms@opt@crange@true{% - \global\toggletrue{cms@comprange}% - \setcounter{mincomprange}{100}% - \setcounter{mincompwidth}{10}% -}% -\def\cms@opt@crange@false{}% - -\DeclareBibliographyOption{postnotepunct}[true]{% - \ifcsdef{cms@opt@ppunct@#1}% - {\csuse{cms@opt@ppunct@#1}}% - {\blx@err@invopt{postnotepunct=#1}{}}}% -\def\cms@opt@ppunct@true{% - \global\toggletrue{cms@modpostnote}}% -\def\cms@opt@ppunct@false{}% - -\DeclareBibliographyOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} - -\DeclareBibliographyOption{nodates}[true]{% - \settoggle{cms@nodates}{#1}} - -\DeclareEntryOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} - -\DeclareBibliographyOption{juniorcomma}[true]{% - \settoggle{cms@jrcomma}{#1}} - -\DeclareEntryOption{juniorcomma}[true]{% - \settoggle{cms@jrcomma}{#1}} - -\DeclareBibliographyOption{shorthandfull}[true]{% - \settoggle{cms@fullshhand}{#1}} +\RequireCitationStyle{chicago-dates-common} + +%%%% Trad-only Option %%%% \DeclareBibliographyOption{headline}[true]{% \renewcommand{\MakeSentenceCase}{\@ifstar\relax\relax}} -\DeclareBibliographyOption{longcrossref}[false]{% - \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} -\def\cms@opt@lxref@none{% - \togglefalse{cms@crossref}% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@lxref@true{% - \toggletrue{cms@crossref}}% -\def\cms@opt@lxref@false{% - \togglefalse{cms@crossref}}% -\def\cms@opt@lxref@notes{% - \togglefalse{cms@crossref}}% -\def\cms@opt@lxref@bib{% - \toggletrue{cms@crossref}}% - -\DeclareEntryOption{longcrossref}[false]{% - \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} - -\DeclareBibliographyOption{booklongxref}[true]{% - \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} - {\blx@err@invopt{booklongxref=#1}{}}}% -\def\cms@opt@bklxref@true{% - \toggletrue{cms@bookcrossref}}% -\def\cms@opt@bklxref@false{% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@bklxref@notes{% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@bklxref@bib{% - \toggletrue{cms@bookcrossref}}% - -\DeclareEntryOption{booklongxref}[true]{% - \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} - {\blx@err@invopt{booklongxref=#1}{}}}% - -% The field-exclusion options % - -\DeclareBibliographyOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} -\DeclareBibliographyOption{url}[true]{% - \settoggle{cms@url}{#1}} -\DeclareBibliographyOption{doi}[true]{% - \ifcsdef{cms@opt@doi@#1}% - {\csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} -\def\cms@opt@doi@true{% - \toggletrue{cms@doi}} -\def\cms@opt@doi@false{% - \togglefalse{cms@doi}} -\def\cms@opt@doi@only{% - \toggletrue{cms@doionly}} -\DeclareBibliographyOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} -\DeclareBibliographyOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} -\DeclareBibliographyOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} -\DeclareBibliographyOption{includeall}[true]{% - \settoggle{cms@isbn}{#1}% - \settoggle{cms@url}{#1}% - \settoggle{cms@doi}{#1}% - \settoggle{cms@eprint}{#1}% - \settoggle{cms@numbermonth}{#1}% - \settoggle{cms@bookpages}{#1}} -\DeclareBibliographyOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} - -\DeclareEntryOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} -\DeclareEntryOption{url}[true]{% - \settoggle{cms@url}{#1}} -\DeclareEntryOption{doi}[true]{% - \ifcsdef{cms@opt@doi@#1}% - {\iftoggle{cms@doi}% - {\togglefalse{cms@doi}% - \iftoggle{cms@doionly}% - {\togglefalse{cms@doionly}}% !! - {}}% - {\toggletrue{cms@doi}}% !! - \csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} -\DeclareEntryOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} -\DeclareEntryOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} -\DeclareEntryOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} -\DeclareEntryOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} - -\ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref}% - -\@ifpackagelater{biblatex}{2013/03/30}% For biblatex 2.6 ff. -{\ExecuteBibliographyOptions{labeldate=true}}% -{\ExecuteBibliographyOptions{labelyear=true}}% - -\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff. -{\global\toggletrue{cms@datedash}}% -{\global\togglefalse{cms@datedash}}% - -\DeclareDataInheritance{collection}{suppcollection}{% - \inherit{title}{title} - \inherit{subtitle}{subtitle} - \inherit{titleaddon}{titleaddon}} - -\DeclareDataInheritance{mvbook}{incollection}{% - \inherit{title}{maintitle} - \inherit{subtitle}{mainsubtitle} - \inherit{titleaddon}{maintitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{book}{incollection}{% - \inherit{title}{booktitle} - \inherit{subtitle}{booksubtitle} - \inherit{titleaddon}{booktitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{book,collection}{letter}{% - \inherit{title}{booktitle} - \inherit{subtitle}{booksubtitle} - \inherit{titleaddon}{booktitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{mvbook,mvcollection}{letter}{% - \inherit{title}{maintitle} - \inherit{subtitle}{mainsubtitle} - \inherit{titleaddon}{maintitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{*}{*}{% - \noinherit{namea} - \noinherit{nameb} - \noinherit{sortyear} - \noinherit{sortname} - \noinherit{sorttitle}} - -\DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}% -{*}{% ??? - \noinherit{year} - \noinherit{month} - \noinherit{day} - \noinherit{endyear} - \noinherit{endmonth} - \noinherit{endday} - \noinherit{origyear} - \noinherit{origmonth} - \noinherit{origday} - \noinherit{origendyear} - \noinherit{origendmonth} - \noinherit{origendday}} - -% More authordate options % - -\DeclareSortingScheme{cms}{ - \sort{ - \field{presort} - } - \sort[final]{ - \field{sortkey} - } - \sort{ - \name{sortname} - \name{author} - \name{namea} - \name{editor} - \name{nameb} - \name{translator} - \name{namec} - \field{sorttitle} - \field{journaltitle} - \list{organization} - \field{title} - } - \sort{ - \field{sortyear} - \field{labelyear} - \field{year} - \field{origyear} - } - \sort{ - \field{sorttitle} - \field{title} - } - \sort{ - \field[padside=left,padwidth=4,padchar=0]{volume} - \literal{0000} - } -} - -\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4 -{\DeclareLabelname{\field{shortauthor} \field{author}% - \field{shorteditor} \field{namea} \field{editor}% - \field{nameb} \field{translator} \field{namec}}} -{\DeclareLabelname{shortauthor,author,shorteditor,namea,% - editor,nameb,translator,namec}} - -\DeclareEntryOption{switchdates}[true]{% - \settoggle{cms@switchdates}{#1}} - -\DeclareBibliographyOption{strict}[true]{% - \let\splitfootnoterule\footnoterule - \renewcommand\footnoterule{}% - \advance\skip\footins 4\p@\@plus2\p@\relax - \gdef\split@prev{0} - \let\pagefootnoterule\footnoterule - % \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@} - \def\footnoterule{\relax - \ifnum\split@prev=\z@ - \pagefootnoterule - \else - \splitfootnoterule - \fi - \xdef\split@prev{\the\insertpenalties}% - }} - -\protected\def\blx@newcunit{% - \global\let\blx@unitpunct\newcunitpunct - \global\toggletrue{blx@unit}}% - -\appto\blx@blxinit{% - \let\newcunit\blx@newcunit} - -\newcommand*{\newcunitpunct}{\addcomma\space} - -\def\mkbibcurdinal#1{% - \@tempcnta0#1 \the\@tempcnta}% - -\@ifpackagelater{biblatex}{2011/01/04} -{} -{\PackageError{biblatex} - {Outdated 'biblatex' package} - {The Chicago style requires biblatex v1.1 or later.\MessageBreak - You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak - This is a fatal error. I'm aborting now.}% - \endinput} - -% American-specific punctuation change for 16th edition % - -\DefineBibliographyExtras{american}{% - \DeclarePunctuationPairs{comma}{*!?}} - -%%%% Initialize and define bibstrings %%%% - -% \NewBibliographyString{origpubyear} % Already in .lbx files? - -% \DefineBibliographyStrings{american}{% -% origpubyear = {first published\addspace},} - -%%%% This one needed for 16th edition. Others in cms-*.lbx %%%% - -%%%% Macros from authoryear-comp.cbx, revised for CMS %%%% - -\newbibmacro*{cite:init}{% - \ifnumless{\value{multicitecount}}{2} - {\global\boolfalse{cbx:parens}% - \global\undef\cbx@lasthash - \global\undef\cbx@lastyear} - {\iffieldundef{prenote} - {} - {\global\undef\cbx@lasthash - \global\undef\cbx@lastyear}}} - -\newbibmacro*{cite:reinit}{% - \global\undef\cbx@lasthash - \global\undef\cbx@lastyear} - -\newbibmacro*{backref+check}{% - \ifbibliography% - {\backtrackerfalse}% - {}} - -\newbibmacro*{cite}{% - \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} - {\usebibmacro{cite:ibid}}% - {\iffieldequalstr{entrysubtype}{classical}% Similar to notes+bib - {\iffieldundef{shorthand}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% Simplified for CMS - {\usebibmacro{cite:label}% - \setunit{\addspace}% - \usebibmacro{cite:reinit}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cite:label}} - {\iffieldequals{namehash}{\cbx@lastyear}% - {}% - {\usebibmacro{cmsbracketname}% For names in [] - \ifentrytype{customc}% - {\newcunit}% - {\setunit{\addspace}}}% - \usebibmacro{cite:label}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {\savefield{namehash}{\cbx@lastyear}}}}}% - {\usebibmacro{cite:shorthand+title}}} - {\iffieldundef{shorthand}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% Simplified for CMS - {\usebibmacro{cite:label}% - \setunit{\addspace}% - \usebibmacro{cmscitesortdate}% - \usebibmacro{cite:reinit}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cmscitesortdate}} - {\iffieldequals{namehash}{\cbx@lastyear}% Is this right? - {}% - {\usebibmacro{cmsbracketname}% - \setunit{\nameyeardelim}}% - \usebibmacro{cmscitesortdate}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {\savefield{namehash}{\cbx@lastyear}}}}}% - {\usebibmacro{cite:shorthand}}}}% - \setunit{\multicitedelim}}% ??? - -\newbibmacro*{cmsbracketname}{% - \iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{labelname}% - \bibrightbracket}% - {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{labelname}?% - \bibrightbracket}% - {\printnames{labelname}}}} - -\newbibmacro*{citeyear}{% - \iffieldequalstr{entrysubtype}{classical}% - {\iffieldundef{shorthand}% - {\usebibmacro{citeyear:noshort}}% - {\iftoggle{cms@los}% - {\usebibmacro{citeyear:noshort}}% - {\usebibmacro{cite:shorthand+title}}}}% - {\iffieldundef{shorthand}% - {\usebibmacro{citeyear:noshort}}% - {\iftoggle{cms@los}% - {\usebibmacro{citeyear:noshort}}% - {\usebibmacro{cite:shorthand}}}}% - \setunit{\multicitedelim}} - -\newbibmacro*{citeyear:noshort}{% - \iffieldequalstr{entrysubtype}{classical}% Altered for CMS - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {}}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cmscitesortdate}} - {\usebibmacro{cmscitesortdate}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {}}}}% - -\newbibmacro*{textcite}{% - \iftoggle{cms@los}% - {\usebibmacro{textcite:authshort}}% - {\usebibmacro{textcite:citeshort}}} - -\newbibmacro*{textcite:authshort}{% - \iffieldequals{namehash}{\cbx@lasthash} - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}}% - {\iffieldundef{shorthand} - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% - {\iffieldequalstr{entrysubtype}{classical}% - {\setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}} - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \usebibmacro{cmscitesortdate}}} - {\printnames{labelname}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}} - {\usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}} - {\printfield{shorthand}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}}% - {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}} - {\usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}% - \stepcounter{textcitecount}}% Added ??? - \setunit{% - \ifbool{cbx:parens}% - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}% Not \multicitedelim ??? - -\newbibmacro*{textcite:citeshort}{% - \iffieldequals{namehash}{\cbx@lasthash} - {\iffieldundef{shorthand} - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}} - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \printtext[bibhyperref]{% - \printfield{shorthand}}}}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% - {\iffieldundef{shorthand} - {\iffieldequalstr{entrysubtype}{classical}% - {\setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}} - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \usebibmacro{cmscitesortdate}}} - {\printtext[bibhyperref]{% - \printfield{shorthand}}}} - {\printnames{labelname}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \iffieldundef{shorthand} - {\iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}} - {\usebibmacro{cmscitesortdate}}}% - {\printtext[bibhyperref]{% - \printfield{shorthand}}}% - \savefield{namehash}{\cbx@lasthash}}% - \stepcounter{textcitecount}}% Added ??? - \setunit{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}% Not \multicitedelim ??? - -\newbibmacro*{textcite:postnote}{% - \iffieldundef{postnote}% - {}% - {\savefield{namehash}{\cbx@lastyear}% - \setunit{\postnotewrapper}% - \printfield{postnote}}% - \ifthenelse{\value{multicitecount}=\value{multicitetotal}}% - {\setunit{}% - \printtext{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}}}% - {\setunit{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}}% Not \multicitedelim ??? - -\newbibmacro*{cite:shorthand}{% - \iftoggle{cms@los}% - {\iffieldequals{namehash}{\cbx@lasthash}% - {\printtext[bibhyperref]{% - \setunit{\compcitedelim}% - \usebibmacro{cmscitesortdate}}} - {\printtext[bibhyperref]{% - \printfield{shorthand}% - \setunit{\nameyeardelim}% - \usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}}% - {\printtext[bibhyperref]{\printfield{shorthand}}% - \usebibmacro{cite:reinit}}} - -\newbibmacro*{cite:shorthand+title}{% - \iftoggle{cms@los}% - {\iffieldequals{namehash}{\cbx@lasthash}% - {\printtext[bibhyperref]{% - \setunit{\compcitedelim}% - \usebibmacro{cite:label}}} - {\printtext[bibhyperref]{% - \printfield{shorthand}% - \setunit{\nameyeardelim}% - \usebibmacro{cite:label}}% - \savefield{namehash}{\cbx@lasthash}}}% - {\printtext[bibhyperref]{\printfield{shorthand}}% - \usebibmacro{cite:reinit}}} - -\newbibmacro*{cite:label}{% Test this - \iffieldundef{label}% - {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% - \ifentrytype{periodical}}% Simplifies .bib creation - {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}}}% - {\ifentrytype{manual}% - {\printtext[bibhyperref]{\printlist{organization}}}% - {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}}}% - {\printtext[bibhyperref]{\printfield{label}}}} - -\newbibmacro*{cite:labelyear+extrayear}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - }% - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\usebibmacro{cite:standard+labelyear+extrayear}}}} - -\newbibmacro*{cite:standard+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{year}% - {\iffieldundef{eventyear} - {\iffieldundef{origyear}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cite:origfirst+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{origyear}% - {\iffieldundef{year} - {\iffieldundef{eventyear}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cite:av+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{eventyear}% - {\iffieldundef{origyear} - {\iffieldundef{year}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cmscitesortdate}{% Attempt to solve date-related problems - \ifboolexpr{% - test {\iffieldundef{origyear}}% - or - not test {\iffieldint{origyear}}% - }% - {\usebibmacro{cmsciteyear}}% - {\iffieldint{year}% - {\ifboolexpr{% Needed for date ranges - test {\iffieldundef{endyear}}% - or - not test {\iffieldnum{endyear}}% - }% - {\ifthenelse{\thefield{origyear}>\thefield{year}}% - {\toggletrue{cms@switchdates}% - \usebibmacro{cmsciteyear}}% - {\usebibmacro{cmsciteyear}}}% - {\ifthenelse{\thefield{origyear}>\thefield{endyear}}% - {\toggletrue{cms@switchdates}% - \usebibmacro{cmsciteyear}}% - {\usebibmacro{cmsciteyear}}}}% - {\usebibmacro{cmsciteyear}}}} - -\newbibmacro*{cmsciteyear}{% - \iftoggle{cms@origlabel}% - {\usebibmacro{cite:origyear+labelyear}}% - {\iftoggle{cms@bothlabelnew}% - {\usebibmacro{cite:bothyear+oldstyle}}% - {\iftoggle{cms@bothlabelold}% - {\usebibmacro{cite:bothyear+oldstyle}}% - {\iftoggle{cms@fulldate}% - {\newcunit\printdate}% - {\usebibmacro{cite:labelyear+extrayear}}}}}% - \ifcsdef{@cms@tempdate}% - {\toggletrue{\@cms@tempdate}}% - {}} - -\newbibmacro*{cite:origyear+labelyear}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - } - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@switchdates}% - {\usebibmacro{cite:labelyear+extrayear}} - {\iffieldundef{origyear}% - {\iftoggle{cms@ordate}% ??? - {}% - {\clearfield{extrayear}}% - \usebibmacro{cite:standard+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \usebibmacro{origyear+endyear}}}}}}} - -\newbibmacro*{cite:bothyear+oldstyle}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - } - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@switchdates}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{cite:labelyear+extrayear}% - \bibcloseparen% - \addspace\usebibmacro{origyear+endyear}}}% - {\iffieldundef{origyear}% ??? - {\iftoggle{cms@ordate}% - {}% - {\clearfield{extrayear}}% - \usebibmacro{cite:standard+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% Added test for year field ??? - {\iffieldundef{year}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{cite:origfirst+labelyear+extrayear}% - \bibcloseparen% - \setunit{\addspace}%\addspace% ??? - \usebibmacro{year+endyear}}}}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{origyear+endyear}% - \bibcloseparen% - \clearfield{extrayear}\addspace% - \usebibmacro{cite:standard+labelyear+extrayear}}}}}}} - -\newbibmacro*{cite:save}{% - \savefield{entrykey}{\cbx@lastkey}} - -\newbibmacro*{cite:ibid}{% - \iftoggle{cms@noibid}% - {\blx@ibidreset% - \usebibmacro{cite}}% - {\ifthenelse{\iffieldundef{prenote}\AND% - \iffieldundef{postnote}}% - {\blx@ibidreset% - \usebibmacro{cite}% - \PackageWarning{biblatex-chicago}% - {Empty Ibidem citation}}% - {\toggletrue{cms@inlineibid}}}} - -%%%% Citation Commands, internal and external %%%% - -\DeclareCiteCommand{\cite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand*{\cite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{citeyear}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\parencite}[\mkbibparens] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\setunit{\multicitedelim} - {\usebibmacro{postnote}} - -\DeclareCiteCommand*{\parencite}[\mkbibparens] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{citeyear}} - {}%\setunit{\multicitedelim} - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\footcite}[\mkbibfootnote] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {} - {\usebibmacro{postnote}} - -%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% - -\DeclareCiteCommand{\cbx@textcite} - {\usebibmacro{cite:init}} - {\usebibmacro{citeindex}% - \usebibmacro{textcite}} - {} - {\usebibmacro{textcite:postnote}} - -\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite] - {\gdef\cbx@savedkeys{}% - \citetrackerfalse% - \pagetrackerfalse% - \DeferNextCitekeyHook% - \usebibmacro{cite:init}} - {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} - {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% - \global\clearfield{multipostnote}} - {}% - \xappto\cbx@savedkeys{\thefield{entrykey},}% - \iffieldequals{namehash}{\cbx@lasthash} - {} - {\stepcounter{textcitetotal}% - \savefield{namehash}{\cbx@lasthash}}} - {} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} - -\newrobustcmd{\cbx@textcite@init}[2]{% - \setcounter{textcitetotal}{0}% - \setcounter{textcitecount}{0}% - \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} - -\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{} - -\let\cbx@textcites@init\cbx@textcite@init -\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{} - -\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}% - {\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}% - {\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]% - {\footcitetext}{\setunit{\multicitedelim}} - -\DeclareCiteCommand{\bibxrefcite} -{\usebibmacro{cite:init}% - \usebibmacro{backref+check}}%\usebibmacro{clearalmostall}} (?) - {\usebibmacro{xref-in:}% - \blx@ibidreset% For authordate style - \usebibmacro{cite}} - {} - {} - -\DeclareCiteCommand{\origfullcite} -{\usebibmacro{backref+check}% - \nopunct\unspace% - \savebibmacro{cmsbibsortdate}% - \renewbibmacro*{cmsbibsortdate}{}}% - {\usedriver - {\DeclareNameAlias{sortname}{default}\clearfield{postnote} - \clearname{author}\clearfield{userf}%\toggletrue{cms@fullnote}% - \toggletrue{cms@headlessnote}\frenchspacing}% - {\thefield{entrytype}}% - \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% - {\multicitedelim}% - {\restorebibmacro{cmsbibsortdate}} - -\DeclareCiteCommand{\origpublcite}% Similar to above, w/o title. -{\usebibmacro{backref+check}% - \nopunct\unspace% - \savebibmacro{cmsbibsortdate}% - \renewbibmacro*{cmsbibsortdate}{}}% - {\usedriver - {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% - \usebibmacro{clearpublin}% - \toggletrue{cms@headlessnote}%\toggletrue{cms@fullnote}% - \toggletrue{cms@origpublished}\frenchspacing}% - {\thefield{entrytype}}% - \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% - {\multicitedelim}% - {\restorebibmacro{cmsbibsortdate}} - -%%%% List Formats %%%% - -\DeclareListFormat{language}{% - \ifthenelse{\value{listcount}=1}% - {\bibleftbracket\bibstring{inlang}%\addspace - for inflected langs. - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}% - \ifthenelse{\value{listtotal}=1}% - {\bibrightbracket}% - {}}% - {\ifthenelse{\value{listcount}=\value{listtotal}}% - {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}% - \bibrightbracket}% - {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}}}% - \usebibmacro{langlist:andothers}} - -\DeclareListFormat{publisher}{% - \ifthenelse{\value{listtotal}<2}% - {#1\isdot}% - {\ifthenelse{\value{listcount}=1}% - {#1}% - {\multipubsdelim #1\isdot}}} - -\DeclareListFormat{periodplace}{\mkbibparens{#1}} - -\DeclareListFormat{lista}{% - \ifthenelse{\value{listtotal}<2} - {s\adddot v\adddot\addspace\mkbibquote{#1\isdot}}% - {\ifthenelse{\value{listcount}=1}% - {s\adddot vv\adddot\addspace \mkbibquote{#1\isdot}\addcomma}% - {\ifthenelse{\value{listcount}<\value{listtotal}}% - {\addspace\mkbibquote{#1\isdot}\addcomma}% - {\addspace\mkbibquote{#1\isdot}}}}} - %%%% Field Formats -- Title, Citetitle, Lostitle %%%% \DeclareFieldFormat{title}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} @@ -1319,6 +22,8 @@ citation style] \DeclareFieldFormat{lostitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} +\DeclareFieldFormat{subtitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} + \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {title}{% @@ -1334,11 +39,23 @@ citation style] [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {lostitle}{\MakeSentenceCase*{#1}} +\DeclareFieldFormat +[article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] +{subtitle}{% + \iffieldundef{subtitle}% + {}% + {\MakeSentenceCase*{#1}}} + \DeclareFieldFormat[artwork,image]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} +\DeclareFieldFormat[artwork,image]{subtitle}{% + \iffieldundef{entrysubtype}% + {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% + {\MakeSentenceCase*{#1}\isdot}} + \DeclareFieldAlias[artwork]{citetitle}[artwork]{title} \DeclareFieldAlias[artwork]{lostitle}[artwork]{title} @@ -1349,6 +66,8 @@ citation style] \DeclareFieldFormat[periodical]{lostitle}{\mkbibemph{#1}\isdot} +\DeclareFieldFormat[periodical]{subtitle}{\mkbibemph{#1}\isdot} + \DeclareFieldAlias[image]{citetitle}[artwork]{title} \DeclareFieldAlias[image]{lostitle}[artwork]{title} @@ -1359,54 +78,7 @@ citation style] \DeclareFieldFormat[letter]{lostitle}{#1\isdot} -\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}\isdot} - -\iftoggle{cms@comprange}% Audrey Boruvka's code from StackExchange -{\patchcmd{\blx@comprange@check}% - {\blx@comprange@comp{#1}{#2}}% - {\blx@tempcnta=#1% - \divide\blx@tempcnta100% - \multiply\blx@tempcnta100% - \ifnumequal{\blx@tempcnta}{#1}% - {\blx@range@out@value{#1\bibrangedash#2}}% - {\blx@comprange@comp{#1}{#2}}}% - {}{}}{}% - -\DeclareFieldFormat{postnote}{% Changed for page compression option - \iftoggle{cms@comprange}% - {\iffieldundef{pagination}% - {\mkcomprange{#1}}% - {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% - {\iffieldundef{pagination}% - {#1}% - {\mkpageprefix[pagination]{#1}}}}% - -\DeclareFieldFormat[inreference]{postnote}{% - \iftoggle{cms@comprange}% - {\iffieldundef{pagination}% - {s\adddot v\adddot\addspace\mkbibquote{#1}}% - {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% - {\iffieldundef{pagination}% - {s\adddot v\adddot\addspace\mkbibquote{#1}}% - {\mkpageprefix[pagination]{#1}}}}% - -\DeclareFieldFormat{pages}{% - \iftoggle{cms@comprange}% - {\iffieldundef{bookpagination}% - {\mkcomprange{#1}\isdot}% - {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}}% - {\iffieldundef{bookpagination}% - {#1\isdot}% - {\mkpageprefix[bookpagination]{#1}}}}% - -\DeclareFieldFormat{bibnote}{\MakeCapital{#1}} - -\DeclareFieldFormat{edlang}{% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{ed#1} - {\bibstring{ed#1}} - {\ifcapital{\MakeCapital{#1}}{#1}}}} +\DeclareFieldFormat[letter]{subtitle}{#1\isdot} \DeclareFieldFormat[suppbook,suppcollection]{title}{% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} @@ -1418,21 +90,8 @@ citation style] \addspace% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} -\DeclareFieldFormat[customc]{title}{% - \iffieldundef{nameaddon}% - {\mkbibemph{\bibstring{see}}% - \addspace% - #1}% - {#1}} - -\DeclareFieldFormat[customc]{citetitle}{% - \ifnameundef{author}% - {#1} - {\iffieldundef{nameaddon}% - {\mkbibemph{\bibstring{see}}% - \addspace% - #1}% - {\printfield{nameaddon}\addspace #1}}} +\DeclareFieldFormat[suppbook,suppcollection]{subtitle}{% + \mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{lostitle} @@ -1445,6 +104,11 @@ citation style] \DeclareFieldAlias[misc]{lostitle}[misc]{title} +\DeclareFieldFormat[misc]{subtitle}{% + \iffieldundef{entrysubtype}% + {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% + {\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}} + \DeclareFieldFormat[review,suppperiodical]{title}{% \ifcapital{\MakeCapital{#1\isdot}}% {#1\isdot}} @@ -1457,10 +121,18 @@ citation style] \DeclareFieldAlias[suppperiodical]{lostitle}[review]{title} +\DeclareFieldFormat[review,suppperiodical]{subtitle}{% + \ifcapital{\MakeCapital{#1\isdot}}% + {#1\isdot}} + \DeclareFieldFormat{booktitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{maintitle}{\mkbibemph{\MakeSentenceCase*{#1}}} +\DeclareFieldFormat{booksubtitle}{\mkbibemph{\MakeSentenceCase*{#1}}} + +\DeclareFieldFormat{mainsubtitle}{\mkbibemph{\MakeSentenceCase*{#1}}} + \DeclareFieldFormat[audio,music,video]{title}{% \iffieldundef{booktitle}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% @@ -1478,729 +150,31 @@ citation style] \DeclareFieldAlias[audio]{lostitle}[video]{title} -%%%% Other Field Formats %%%% - -\DeclareNumChars*{:}% - -\DeclareFieldFormat{letterday}{\mkbibcurdinal{#1}} - -\DeclareFieldFormat{note}{% - \ifcapital{\MakeCapital{#1}}{#1}}% - -\DeclareFieldFormat -[audio,manual,music,patent,report,suppbook,suppcollection,video] -{type}{% - \ifbibstring{#1}% - {\bibstring{#1}}% - {\ifcapital% - {\MakeCapital{#1}}% - {#1}}} - -\DeclareFieldFormat[artwork,image]{type}{% - \ifcapital% - {\MakeCapital{#1}}% - {#1}} - -\DeclareFieldFormat{url}{\url{#1}} - -\DeclareFieldFormat{doi}{% - \textrm{doi}\addcolon - \ifhyperref - {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}} - {\nolinkurl{#1}}} - -\DeclareFieldFormat[music]{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% - \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{origyear}% - \OR\NOT\iffieldundef{urlmonth}\OR\NOT\iffieldundef{eventmonth}% - \OR\NOT\iffieldundef{origmonth}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% - \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{urlmonth}% - \OR\NOT\iffieldundef{eventmonth}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat{urldate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{urldate}{% 16th ed. - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[music]{urldate}{% 16th ed. - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}% - \OR\NOT\iffieldundef{origyear}}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[music]{origdate}{% 16th ed. - \iftoggle{cms@reprint}% Date fix - {#1}% - {\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{recorded}\space #1}% - {\printfield{userd}\addspace #1}}} - -\DeclareFieldFormat[music]{eventdate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{recorded}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{eventdate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{broadcast}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldAlias{userd}{titleaddon}% 16th ed. - -\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?! - -\DeclareFieldFormat[review]{nameaddon}{#1\bibsentence}% 16th ed. - -\DeclareFieldFormat[customc]{nameaddon}{% For cross-refs - \ifbibstring{#1}% - {\mkbibemph{\bibstring{#1}}}% - {#1}}% - -\DeclareFieldFormat{edition}{% New in 0.8 - \ifinteger{#1} - {\mkbibordedition{#1}~\bibstring{edition}}% - {\ifcapital - {\MakeCapital{#1\isdot}}% - {#1\isdot}}} - -\DeclareFieldFormat{usere}{[#1]} % Better than mkbibbrackets? - -\DeclareFieldFormat{titleaddon}{% - \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}%\custpunctc? - -\DeclareFieldAlias{booktitleaddon}{titleaddon} - -\DeclareFieldAlias{maintitleaddon}{titleaddon} +\DeclareFieldFormat[audio,music,video]{subtitle}{% + \iffieldundef{booktitle}% + {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% + {\MakeSentenceCase*{#1}\isdot}} \DeclareFieldFormat{issuetitle}{\MakeSentenceCase*{#1\isdot}} -\DeclareFieldFormat{jourser}{% - \ifinteger{#1}% - {\mkbibordseries{#1}% - \addnbspace% - \bibstring{jourser}}% - {\ifbibstring{#1}{\bibstring{#1}}{#1}}} - -\DeclareFieldFormat{journum}{% Revised for 0.9.5 - \ifboolexpr{% - test {\ifnumerals{#1}}% - and - not test {\ifnumeral{#1}}% - }% - {\bibstring{numbers}\addspace #1}% - {\bibstring{number}\addspace #1}} - -\DeclareFieldFormat{sernum}{% - \ifnumeral{#1}% - {\addnbspace #1}% - {\addcomma\addspace #1}} - -\DeclareFieldFormat{addendum}{% - \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} - -% This works better here than in the entrytail macro -- userf use is -% no longer a problem, though the page breaking still isn't ideal. - -\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1} - -\DeclareFieldFormat{part}{% - \ifnumerals{#1}% - {\addcomma\addspace\bibstring{partvolume}~#1}% - {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}} - -\DeclareFieldAlias[review]{volume}[article]{volume} - -\DeclareFieldAlias[suppperiodical]{volume}[article]{volume} - -%%%% Commands, for users and internal %%%% - -\newcommand*{\cbytypeeditor}{% Needed? - \iffieldundef{editortype} - {\bibstring{cbytypeeditor}} - {\bibstring{cbytype\thefield{editortype}}}} - -\renewcommand*{\multicitedelim}{\addsemicolon\space} - -\renewcommand*{\iffinalcitedelim}{% - \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} - -\renewcommand*{\nameyeardelim}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\addcomma\addspace}% - {\iffieldundef{origyear}% Is this test correct? - {\iffieldundef{year}% - {\addspace} - {\NumCheckSetup{\renewcommand{\mkbibbrackets}{\expandonce}% - \DeclareNumChars*{[?]s}}% For bracketed dates, and decades. - \iffieldnums{year}% This one works. - {\addspace}% - {\addcomma\addspace}}}% 16th ed. wants comma before n.d. - {\addspace}}} - -\newcommand{\classicpunct}{% - \ifthenelse{\iffieldequalstr{entrysubtype}{classical}\OR% - \ifentrytype{letter}}% - {\setunit*{\addspace}}% - {\setunit*{\addcomma\addspace}}} - -\newcommand{\postvolpunct}{\addcolon}% - -\newcommand{\parttrans}{% - {\bibstring{bytranslator}\space}}% - -\newcommand{\partedit}{% - \iftoggle{cms@postposit}% Kludge to make it work in French. - {\bibstring{byeditoralt}\addspace}% - {\bibstring{byeditor}\addspace}}% - -\newcommand{\partcomp}{% - {\bibstring{bycompiler}\space}}% - -\newcommand{\parteditandcomp}{% - {\bibstring{byeditorcp}\space}}% - -\newcommand{\parttransandcomp}{% - {\bibstring{bytranslatorcp}\space}}% - -\newcommand{\partedittransandcomp}{% - {\bibstring{byeditortrcp}\space}}% - -\newcommand{\parteditandtrans}{% - {\bibstring{byeditortr}\space}}% - -\newcommand{\reprint}{\bibstring{reprint}}% - -\newcommand*{\multipubsdelim}{\addnbspace/\addspace} - -\newcommand*{\multilocsdelim}{% - \ifthenelse{\value{listcount}<\value{liststop}}% - {\ifthenelse{\numexpr\value{listcount}+1<\value{liststop}}% - {\addcomma\addspace}% - {\ifthenelse{\value{liststop}>2}% - {\addcomma\addspace\bibstring{and}\addspace}% - {\addspace\bibstring{and}\addspace}}}% - {}} - -\newcommand*{\multilangdelim}{% - \ifthenelse{\value{listtotal}<3}% - {\addspace\bibstring{and}\addspace}% - {\ifthenelse{\value{listcount}<\value{listtotal}}% - {\addcomma\addspace}% - {\addcomma\addspace\bibstring{and}\addspace}}} - -\renewcommand*{\postnotedelim}{% - \iftoggle{cms@inlineibid}% - {\togglefalse{cms@inlineibid}% - \iffieldundef{prenote}% Bug fix - {}% - {\addspace}}% - {\iffieldequalstr{entrysubtype}{classical}% For Notes+Bib, too? - {\NumCheckSetup{\DeclareNumChars*{abcdeABCDE}}% - \iffieldpages{postnote}% - {\addspace}% - {\addcomma\addspace}}% - {\addcomma\addspace}}} - -\newcommand*{\postnotewrapper}{% - \iftoggle{cms@modpostnote}% - {\ifboolexpr{% - test {\iffieldstart{postnote}{,}}% - or - test {\iffieldstart{postnote}{\bibrangessep}}% - }% - {\addcomma}% w/ or w/o \addspace? - {\ifboolexpr{% - test {\iffieldstart{postnote}{;}}% - or - test {\iffieldstart{postnote}{:}}% - or - test {\iffieldstart{postnote}{.}}% - }% - {}{\postnotedelim}}}% - {\postnotedelim}}% - -\newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from - \begingroup% comp.text.tex - \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} - -\newcommand*{\editordelim}{% Otherwise you get an inaccurate comma. - \iffieldequalstr{editortype}{none}% - {\addperiod\addspace}% - {\addcomma\addspace}} - -\newcommand*{\lbx@cfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{cfrom\thefield{origlanguage}}}}% - {\unspace}} - -\@ifpackagelater{biblatex}{2011/11/12} -{\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}} -{\@ifpackagelater{biblatex}{2011/07/28} - {\newcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}}% - {\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}}} - -\renewcommand*{\lbx@lfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\biblstring{from\thefield{origlanguage}}}}% - {\unspace}} - -\renewcommand*{\lbx@sfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibsstring{from\thefield{origlanguage}}}}% - {\unspace}} +\DeclareFieldFormat{issuesubtitle}{\MakeSentenceCase*{#1\isdot}} %%%% Formatting macros, called both by cbx and bbx %%%% -\newbibmacro*{finentry}{%{\finentry} To make annotated bibliography - \ifbibliography - {\usebibmacro{entrytail}}% - {}% - \finentry} - -\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography - \newunit\newblock - \iftoggle{cms@annotation}% - {\usebibmacro{annotation}% - \newunit\newblock} - {}}% - -\newbibmacro*{author+holder}{% - \ifnameundef{author} - {\let\bbx@lasthash\undefined} - {\usebibmacro{author/editor}% - \ifthenelse{\ifnameundef{holder}\OR - \ifnamesequal{author}{holder}} - {} - {\setunit{\addspace}% - \printtext[parens]{\printnames{holder}}}}} - -\renewbibmacro*{byauthor}{% - \ifthenelse{\ifuseauthor\OR - \ifnameundef{author}} - {} - {\bibstring{by}\addspace - \printnames[byauthor]{author}}} - -\newbibmacro*{byauthorpunct}{% - \ifthenelse{\ifuseauthor\OR\ifnameundef{author}}% - {\addperiod\addspace}% - {\newcunit}} - -\renewbibmacro*{bybookauthor}{% - \ifnameundef{bookauthor} - {} - {\ifnamesequal{author}{bookauthor} - {} - {\bibstring{by}\addspace\printnames[default]{bookauthor}% - \newcunit\newblock}}} - -\newbibmacro*{editorpunct}{% - \ifthenelse{\(\iffieldundef{booktitle}\AND% - \iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)% - \OR\iffieldsequal{booktitle}{title}% Changed these for crossrefed - \OR\iffieldsequal{maintitle}{title}}% entries. Create problems? - {\ifentrytype{video}% - {\newcunit\newblock}% - {\newunit\newblock}}% - {\newcunit\newblock}} - -\newbibmacro*{edition}{% - \printfield{edition}% - \clearfield{edition}}% - -\newbibmacro*{inforaft}{% - \ifnameundef{introduction}% - {\ifnameundef{afterword}% - {\ifnameundef{foreword}% - {\printfield{type}}% - {\bibstring{forewordto}% - \clearname{foreword}}}% - {\bibstring{afterwordto}% - \clearname{afterword}}}% - {\bibstring{introductionto}% - \clearname{introduction}}} - -\newbibmacro*{langlist:andothers}{% - \ifthenelse{\value{listcount}=\value{liststop}\AND - \ifmoreitems} - {\ifnum\value{liststop}>1 \finalandcomma\fi - \andmoredelim\bibstring{andmore}\bibrightbracket} - {}} - -\newbibmacro*{reference+title}{% - \ifthenelse{\iffieldequals{title}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% - {\usebibmacro{italtitle+stitle}% - \savefield{title}{\bbx@lasthash}}} - -\newbibmacro*{mag+news+author}{% - \ifnameundef{author}% - {\ifthenelse{\iffieldequals{journaltitle}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% - {\usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \savefield{journaltitle}{\bbx@lasthash}}}% - {\usebibmacro{author}}} - -\newbibmacro*{cmag+news+author}{% - \ifnameundef{author}% - {\usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}}% - {\usebibmacro{author}}} - -\newbibmacro*{type+inst+year}{% - \printfield{type} - \newcunit - \printlist{institution}% - \setunit*{\addcomma\space}% - \printfield{year}} - -\newbibmacro*{institution+organization}{% - \iflistundef{organization}% - {\iflistundef{institution}% - {}% - {\printlist{institution}}}% - {\printlist{organization}% - \newcunit% - \printlist{institution}}} - -\newbibmacro*{author+org}{% - \ifnameundef{author}% - {\ifnameundef{editor}% - {\iflistundef{organization}% - {\let\bbx@lasthash\undefined}% - {\ifboolexpr{ - test {\iflistequals{organization}{\bbx@lasthash}}% - and - not test {\iffirstonpage}% - }% - {\bibnamedash\addperiod\addspace}% - {\iftoggle{cms@authorparens}% - {\bibopenparen\printlist{organization}\bibcloseparen}% - {\printlist{organization}}% - \savelist{organization}{\bbx@lasthash}}}}% - {\usebibmacro{editor}}}% - {\usebibmacro{author/editor}}} - -\newbibmacro*{cbytypestrg}[2]{% - \iffieldundef{#1type} - {\bibstring{by#2}} - {\bibstring{by\thefield{#1type}}}} - -\newbibmacro*{cbyeditor}{% - \ifnameundef{editor} - {} - {\usebibmacro{cbytypestrg}{editor}{editor}% - \setunit{\addspace}% - \printnames[byeditor]{editor}% - \newcunit}% - \usebibmacro{cbyeditorx}} - -\newbibmacro*{cbyeditorx}{% - \ifnameundef{editora} - {} - {\usebibmacro{cbytypestrg}{editora}{editor}% - \setunit{\addspace}% - \printnames[byeditora]{editora}% - \newcunit}% - \ifnameundef{editorb} - {} - {\usebibmacro{cbytypestrg}{editorb}{editor}% - \setunit{\addspace}% - \printnames[byeditorb]{editorb}% - \newcunit}% - \ifnameundef{editorc} - {} - {\usebibmacro{cbytypestrg}{editorc}{editor}% - \setunit{\addspace}% - \printnames[byeditorc]{editorc}% - \newcunit}} - -\newbibmacro*{cbytranslator}{% - \ifnameundef{translator} - {} - {\bibstring{bytranslator}% - \addspace - \printnames[bytranslator]{translator}}} - -\newbibmacro*{cbycompiler}{% - \ifnameundef{namec} - {} - {\bibstring{cbycompiler}\addspace - \printnames[bycompiler]{namec}}} - -\newbibmacro*{cbyredactor}{% - \ifnameundef{redactor} - {} - {\bibstring{cbyredactor}\addspace - \printnames[byredactor]{redactor}}} - -\newbibmacro*{cwithcommentator}{% - \ifnameundef{commentator} - {} - {\bibstring{withcommentator}\addspace - \printnames[withcommentator]{commentator}}} - -\newbibmacro*{cwithannotator}{% - \ifnameundef{annotator} - {} - {\bibstring{withannotator}\addspace - \printnames[withannotator]{annotator}}} - -\newbibmacro*{cwithintroduction}{% - \ifnameundef{introduction} - {} - {\bibstring{withintroduction}\addspace - \printnames[withintroduction]{introduction}}} - -\newbibmacro*{cwithforeword}{% - \ifnameundef{foreword} - {} - {\bibstring{withforeword}\addspace - \printnames[withforeword]{foreword}}} - -\newbibmacro*{cwithafterword}{% - \ifnameundef{afterword} - {} - {\bibstring{withafterword}\addspace - \printnames[withafterword]{afterword}}} - -\newbibmacro*{cbyeditor+others}{% - \ifthenelse{\NOT\ifnameundef{editor}\AND - \(\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}\)} - {\def\@tempa{cbyeditor}% - \ifnamesequal{editor}{translator} - {\edef\@tempa{\@tempa tr}% - \clearname{translator}} - {}% - \ifnamesequal{editor}{namec} - {\edef\@tempa{\@tempa cp}% - \clearname{namec}} - {}% - \ifnamesequal{editor}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{editor}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{editor}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{editor}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{editor}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[byeditor]{editor}% - \clearname{editor}% - \newcunit% - \usebibmacro{cbyeditorx}}% - {\usebibmacro{cbyeditor}}% - \usebibmacro{cbytranslator+others}} - -\newbibmacro*{cbytranslator+others}{% - \ifnameundef{translator} - {} - {\def\@tempa{cbytranslator}% - \ifnamesequal{translator}{namec} - {\edef\@tempa{\@tempa cp}% - \clearname{namec}} - {}% - \ifnamesequal{translator}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{translator}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{translator}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{translator}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{translator}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[bytranslator]{translator}% - \clearname{translator}% - \newcunit}% - \usebibmacro{cbycompiler+others}} - -\newbibmacro*{cbycompiler+others}{% - \ifnameundef{namec} - {} - {\def\@tempa{cbycompiler}% - \ifnamesequal{namec}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{namec}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{namec}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{namec}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{namec}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[bycompiler]{namec}% - \clearname{namec}% - \newcunit}% - \usebibmacro{cbyothers}} - -\newbibmacro*{cbyothers}{% - \usebibmacro{cbytranslator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cbycompiler}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cbyredactor}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithcommentator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithannotator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithintroduction}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithforeword}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithafterword}} - -\newbibmacro*{cms-in:}{% Fix for 0.9a compat. - \iftoggle{cms@origpublished}% - {}% - {\bibstring{in}% - \setunit{\addspace}}} - -\newbibmacro*{xref-in:}{% - \iffieldundef{volume}{}{\savefield{volume}{\cbx@incollvol}}% - \iffieldundef{part}{}{\savefield{part}{\cbx@incollpart}}% - \usebibmacro{cms-in:}} - -\newbibmacro*{chapincoll}{% - \iffieldundef{chapter}% - {} - {\printfield{chapter}\addspace}} - -\newbibmacro*{chapinscore}{% - \iffieldundef{chapter}% - {\ifthenelse{\ifentrytype{music}% - \AND\NOT\iffieldundef{booktitle}}% - {\bibstring{on}\setunit{\addspace}}% - {}}% - {\printfield{chapter}% - \addspace\bibstring{of}\setunit{\addspace}}} - -\newbibmacro*{music+ser+num}{% - \iffieldundef{series}% - {\iffieldundef{number}% - {}% - {\printfield{number}}} - {\printfield{series}% - \setunit{\addspace}% - \printfield{number}}}% - -\newbibmacro*{music+publisher}{% - \iffieldundef{howpublished}% - {\iffieldundef{pubstate}% - {}% - {\printfield{pubstate}}}% - {\printfield{howpublished}}}% - -\newbibmacro*{music+origdate}{% - \iftoggle{cms@reprint}% 16th ed. - {}% - {\iftoggle{cms@switchdates}% Date fix - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\usebibmacro{cmsorigdate}}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {}% - {\usebibmacro{cmsorigdate}}}}}% - -\newbibmacro*{music+eventdate}{% Date fix - \ifthenelse{\iffieldundef{eventyear}\AND\iffieldundef{eventmonth}}% - {}% - {\printeventdate}} - -\newbibmacro*{ser+num}{% - \printfield{series}% - \printfield[sernum]{number}% - \newunit} - \newbibmacro*{video+title}{% - \printtext{% + \iffieldundef{title}% + {}% + {\printtext{% \printfield{title}% \setunit{\addcolon\addspace}% - \printfield[title]{subtitle}}} + \printfield[subtitle]{subtitle}}}} \newbibmacro*{italtitle+stitle}{% \printtext{% \printfield{title}% \setunit{\addcolon\addspace}% - \printfield[title]{subtitle}}% - \newunit\newblock% + \printfield[subtitle]{subtitle}}% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -2210,19 +184,14 @@ citation style] \printtext{% \printfield{title}% \setunit{\addcolon\addspace}% - \printfield[title]{subtitle}}% - \newunit%\setunit{\addcomma\addspace} + \printfield[subtitle]{subtitle}}% + \setunit{\ptitleaddonpunct}%\setunit{\addcomma\addspace} \printfield{titleaddon}% }%\newcunit\newblock -\newbibmacro*{language+transtitle}{% - \iffieldundef{usere}% - {\printlist[][-\value{listtotal}]{language}}% - {\printfield{usere}}} - \newbibmacro*{issuetitle}{% \iffieldundef{issuetitle}% - {} + {}% {\ifthenelse{\ifentrytype{article}\OR% \ifentrytype{review}\OR% \ifentrytype{suppperiodical}}% This test is for @@ -2231,384 +200,114 @@ citation style] \printtext{% \printfield{issuetitle}% \setunit{\addcolon\addspace}% - \printfield[issuetitle]{issuesubtitle}}}} - -\newbibmacro*{publ+loc+year}{% - \printlist{location}% - \iflistundef{publisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}% - \printlist{publisher}% - \setunit*{\addcomma\addspace} - \usebibmacro{date}% For the author-date style. Tricky. -}% - -\newbibmacro*{origpubl+loc+year}{% 16th ed. - \printlist{origlocation}% - \iflistundef{origpublisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}% - \printlist{origpublisher}% -% \setunit*{\addcomma\addspace}% -% \usebibmacro{cmsorigdate}% -} - -\newbibmacro*{howpubl+loc+year}{% - \printlist{location}% - \iffieldundef{howpublished}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% - \printfield{howpublished}% - \setunit*{\addcomma\space}% - \usebibmacro{date}% -}% - -\newbibmacro*{inst+loc+year}{% - \printlist{location}% - \iflistundef{institution}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% - \printlist{institution}% - \setunit*{\addcomma\space}% - \usebibmacro{date}% -}% - -\newbibmacro*{originally+published+as}{% Punctuation fix now in - \iffieldundef{userf}% \origfullcite for 0.8e. - {\iffieldundef{reprinttitle}% - {} - {\bibstring{origpublin}% - \origpublcite{\thefield{reprinttitle}}% - \newunit}} - {\iffieldundef{origlanguage}% - {\bibstring{origpub}% - \origfullcite{\thefield{userf}} - \newunit}% - {\iftoggle{cms@postposit}% - {\bibstring{origedition}% - \setunit{\addspace}% - \printfield[edlang]{origlanguage}% - \addcolon% - \origfullcite{\thefield{userf}}% - \newunit}% - {\printfield[edlang]{origlanguage}% - \setunit{\addspace}% - \bibstring{origedition}% - \origfullcite{\thefield{userf}} - \newunit}}}} - -\newbibmacro*{org+publ+loc+year}{% What was wrong with \ifthenelse here? - \printlist{location}% - \iflistundef{organization}% - {\iflistundef{publisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}}% - {\setunit*{\addcolon\addspace}}% - \printlist{organization}% - \setunit*{\addcomma\space}% - \printlist{publisher}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}} - -\newbibmacro*{year+in+parens}{% - \iffieldundef{volume}% - {noformat}% - {parens}} - -\newbibmacro*{letter+date}{% New for 0.9 - \iflistundef{origlocation}% - {}% - {\printlist{origlocation}% - \newcunit\newblock}% - \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {}% - {\cms@datelong}}} + \printfield[issuesubtitle]{issuesubtitle}}}} -\newbibmacro*{unpubl+letter+date}{% For the Misc type. - \iflistundef{origlocation}% - {}% - {\printlist{origlocation}% - \newcunit\newblock}% - \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {\printdate}% For interviews and other dated non-letters - {\cms@datelong}}} - -\newbibmacro*{cmsbookdate}{% - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{origyear}}% - {\newunit}% - {\iftoggle{cms@switchdates}% - {\iffieldundef{origyear}% - {\newunit}% - {\newcunit\printorigdate}}% - {\iffieldundef{year}% - {\newunit}% - {\newcunit\printdate}}}} - -\renewbibmacro*{date}{% Adding the test solved some issues in 0.9 with - \iftoggle{cms@switchdates} - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth} - \AND\iffieldundef{origday}}% - {}% - {\printorigdate}}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month} - \AND\iffieldundef{day}}% punctuation in some entry types (Misc). The - {}% whole \printdate thing may need further work. - {\printdate}}} - -\newcommand*{\cms@datelong}{% Modified for 0.9 - \iffieldundef{origmonth}% - {\printfield{origyear}}% - {\printfield[letterday]{origday}\setunit{\nobreakspace}% - \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% - \printfield{origyear}}}% - -\newcommand*{\cms@datelongalt}{% Modified for 0.9 - \iffieldundef{month}% - {\printfield{year}}% - {\printfield[letterday]{day}\setunit{\nobreakspace}% - \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% - \printfield{year}}}% - -\newcommand*{\letterdatelong}{% Modified for 0.9 - \iftoggle{cms@switchdates}% This one for users - {\iffieldundef{year}% Previous two for internal use - {}% - {\iffieldundef{month}% - {\printfield{year}}% - {\printfield[letterday]{day}\setunit{\nobreakspace}% - \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% - \printfield{year}}}}% - {\iffieldundef{origyear}% - {}% - {\iffieldundef{origmonth}% - {\printfield{origyear}}% - {\printfield[letterday]{origday}\setunit{\nobreakspace}% - \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% - \printfield{origyear}}}}}% - -\newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, - \printtext{% article subtype - \printfield{title}% - \setunit{\addcolon\addspace}% - \printfield[title]{subtitle}}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \setunit*{\addspace}% - \iffieldundef{series} - {} - {\newcunit - \printfield[jourser]{series}% - \newcunit}%\setunit*{\addspace}? - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}}% - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}% need * here? - \printfield[journum]{number}% - \clearfield{number}% - \setunit{\addcomma\addspace}}% - \printfield{eid}% - \newunit} - -\newbibmacro*{journal+sub}{% - \iffieldundef{journaltitle} - {} - {\printtext[journaltitle]{% - \printfield[noformat]{journaltitle}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{journalsubtitle}}}} - -\newbibmacro*{chap+pag}{% - \printfield{chapter}% - \setunit*{\addcomma\space}% - \printfield{pages}} - -\newbibmacro*{mag+news+date}{% - \ifnameundef{author}% - {\usebibmacro{date+issue}}% - {\usebibmacro{mag+date+issue}}} - -\newbibmacro*{date+issue}{% - \iffieldundef{issue} - {\iffieldundef{number}% - {\usebibmacro{date}}% - {\iftoggle{cms@numbermonth}% - {\usebibmacro{date}}% - {\usebibmacro{cmsyear}}% - \setunit*{\addcomma\addspace}% Starred version for when the - \printfield[journum]{number}}}% month isn't printed because of - {\printfield{issue}% the toggle. - \setunit{\addspace}% - \usebibmacro{cmsyear}}} - -\newbibmacro*{mag+date+issue}{% - \usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \newcunit\newblock - \printfield{usera}% For network ID and possible section of newspaper. - \newcunit\newblock - \usebibmacro{date+issue}} - -\newbibmacro*{cmsyear}{% - \iftoggle{cms@switchdates}% - {\printfield{origyear}}% - {\printfield{year}}} - -\newbibmacro*{cmsorigdate}{% New for 0.9 - \iftoggle{cms@switchdates}% - {\printdate}% - {\printorigdate}} - -\newbibmacro*{periodical+date+issue}{% For periodical type & - \printtext[title]{% magazine subtype - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \newcunit\newblock - \printfield{usera}% For network ID and possible section of newspaper. - \newcunit\newblock - \usebibmacro{date+issue}} - -\renewbibmacro*{postnote}{% - \iffieldundef{postnote}% - {}% - {\setunit{\postnotewrapper}% - \printfield{postnote}}} - -\newbibmacro*{part+editor+translator}{% - \ifnameundef{namea}% - {\ifnameundef{nameb}% - {} - {\bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}% -{\ifnamesequal{namea}{nameb}% - {\bibstring{byeditortr}\space% - \printnames[byeditor]{namea}}% - {\bibstring{byeditor}\space% - \printnames[byeditor]{namea}% - \ifnameundef{nameb}% - {} - {\newunit - \bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}}} - -\newbibmacro*{compilestrg}{% - \ifthenelse{\value{namec}>1\OR\ifandothers{namec}} - {\bibstring{compilers}} - {\bibstring{compiler}} - \clearname{namec}} - -\newbibmacro*{transstrg}{% - \ifthenelse{\value{translator}>1\OR\ifandothers{translator}} - {\ifnamesequal{translator}{namec}% - {\bibstring{transcompilers}% - \clearname{namec}}% - {\bibstring{translators}}}% - {\ifnamesequal{translator}{namec}% - {\bibstring{transcompiler}% - \clearname{namec}}% - {\bibstring{translator}}} - \clearname{translator}} - -\newbibmacro*{parttransstrg}{% - \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}} - {\ifnamesequal{nameb}{namec}% - {\bibstring{transcompilers}% - \clearname{namec}}% - {\bibstring{translators}}}% - {\ifnamesequal{nameb}{namec}% - {\bibstring{transcompiler}% - \clearname{namec}}% - {\bibstring{translator}}} - \clearname{nameb}} - -\newbibmacro*{editstrg}{% Test added for 0.9 - \ifthenelse{\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}} - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} - {\bibstring{editortranscompilers}% - \clearname{translator}% - \clearname{namec}}% - {\ifnamesequal{editor}{namec}% - {\bibstring{editorcompilers}% - \clearname{namec}}% - {\ifnamesequal{editor}{translator}% - {\bibstring{editortranslators}% - \clearname{translator}}% - {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} - {\bibstring{editortranscompiler}% - \clearname{translator}% - \clearname{namec}}% - {\ifnamesequal{editor}{namec}% - {\bibstring{editorcompiler}% - \clearname{namec}}% - {\ifnamesequal{editor}{translator}% - {\bibstring{editortranslator}% - \clearname{translator}}% - {\bibstring{editor}}}}}}% - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\bibstring{\thefield{editortype}s}} - {\bibstring{\thefield{editortype}}}} - \clearname{editor}} - -\newbibmacro*{parteditstrg}{% - \ifthenelse{\value{namea}>1\OR\ifandothers{namea}} - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} - {\bibstring{editortranscompilers}% - \clearname{nameb}% - \clearname{namec}}% - {\ifnamesequal{namea}{namec}% - {\bibstring{editorcompilers}% - \clearname{namec}}% - {\ifnamesequal{namea}{nameb}% - {\bibstring{editortranslators}% - \clearname{nameb}}% - {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} - {\bibstring{editortranscompiler}% - \clearname{nameb}% - \clearname{namec}}% - {\ifnamesequal{namea}{namec}% - {\bibstring{editorcompiler}% - \clearname{namec}}% - {\ifnamesequal{namea}{nameb}% - {\bibstring{editortranslator}% - \clearname{nameb}}% - {\bibstring{editor}}}}}% - \clearname{namea}} - -\newbibmacro*{clearpublin}{% - \clearname{author}% - \clearname{namea}% - \clearname{nameb}% - \clearfield{nameaddon}% - \ifthenelse{\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR% - \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR% - \ifentrytype{mvreference}}% - {}% - {\clearfield{title}% - \clearfield{subtitle}% - \clearfield{titleaddon}}% - \clearfield{reprinttitle}% - \clearfield{usere}% - \clearlist{language}% -} +%%%% Related macros that can't reside in common.cbx %%%% + +\DeclareFieldFormat{title:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibemph{\MakeSentenceCase*{#1}}} + +\DeclareFieldFormat{ititle:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \MakeSentenceCase*{#1}} + +\DeclareFieldFormat{jtitle:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibemph{#1}} + +\DeclareFieldFormat{chapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1\addspace\bibstring{in}} + +\DeclareFieldFormat{avchapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1} + +\DeclareFieldFormat{sjtnoformat}{#1} +\DeclareFieldFormat{stnoformat}{#1} +\DeclareFieldFormat{jtnoformat}{#1} +\DeclareFieldFormat{jtsnoformat}{#1} +\DeclareFieldFormat{tnoformat}{#1} + +\newbibmacro*{cms:titlehook}{% Needed for the full drivers in reprintfrom + \ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR% + \ifentrytype{inbook}\OR\ifentrytype{incollection}\OR% + \ifentrytype{inproceedings}\OR\ifentrytype{letter}\OR% + \ifentrytype{music}\OR\ifentrytype{video}\)}% + {\iffieldundef{issuetitle}% + {\iffieldundef{title}% + {\iffieldundef{booktitle}% + {\iffieldundef{maintitle}% + {\iffieldundef{journaltitle}% + {}% + {\DeclareFieldAlias{jtnoformat}{jtitle:hook}% + \DeclareFieldAlias{sjtnoformat}{title}% + \DeclareFieldAlias{journaltitle}{default}% + \DeclareFieldAlias{shortjournal}{series}% + \DeclareFieldAlias{jtsnoformat}{jtitle:hook}}}% + {\DeclareFieldAlias{maintitle}{title:hook}}}% + {\DeclareFieldAlias{booktitle}{title:hook}}}% + {\DeclareFieldAlias{tnoformat}{jtitle:hook}% + \DeclareFieldAlias{stnoformat}{citetitle}% + \DeclareFieldAlias[video]{title}{title:hook}% + \DeclareFieldAlias[audio]{title}{title:hook}% + \DeclareFieldAlias[music]{title}{title:hook}% + \DeclareFieldAlias{title}{title:hook}% + \DeclareFieldAlias[periodical]{shorttitle}{series}}}% + {\DeclareFieldAlias{issuetitle}{ititle:hook}}}% + {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% + \ifentrytype{video}}% + {\iffieldundef{title}% + {\DeclareFieldAlias{chapter}{avchapter:hook}}% + {\DeclareFieldAlias[video]{title}{title:hook}% + \DeclareFieldAlias[audio]{title}{title:hook}% + \DeclareFieldAlias[music]{title}{title:hook}}}% + {\DeclareFieldAlias{chapter}{chapter:hook}}}}% \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx index 3db9745b33e..f864ea55b06 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx @@ -1,15 +1,20 @@ -% $Id: chicago-authordate.bbx,v 0.8.2.9 2016/03/21 18:06:54 dfussner Exp $ +% $Id: chicago-authordate.bbx,v 0.8.2.22 2016/06/07 08:46:51 dfussner Exp $ % This is a biblatex style file, adapted mainly from Lehman's % standard.bbx and from chicago-notes.bbx. It provides the % reference list formatting for the Chicago author-date style. -\ProvidesFile{chicago-authordate.bbx}[2016/03/21 v 2.9a biblatex +\ProvidesFile{chicago-authordate.bbx}[2016/06/07 v 3.4 biblatex bibliography style] %%%% Initialize and format bibliography and los %%%% +\providetoggle{cms@citejtabb}% Here for Sourcemap declaration +\providetoggle{cms@bibjtabb}% + \DeclareFieldFormat{shorthandwidth}{#1} +\DeclareFieldFormat{shortjournalwidth}{\mkbibemph{\textbf{#1}}\isdot} + \newlength{\lositemsep} \defbibenvironment{bibliography}% New for 0.9a @@ -76,6 +81,62 @@ bibliography style] {\endlist\nopunct\vspace{-\baselineskip}}% Kludges for endnotes {\item} +\defbibenvironment{shortjournal}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.7\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist} + {\item} + +\defbibenvironment{sjnotes}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\footnotesize% + \setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.3\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist} + {\item} + +\defbibenvironment{sjendnotes}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\enotesize% + \setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.3\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist\nopunct\vspace{-\baselineskip}} + {\item} + +\defbibcheck{shortjournal}{% Only one list + \iffieldundef{shortjournal}% + {\skipentry}% + {\ifcsdef{\strfield{shortjournal}=\strfield{journaltitle}}% + {\skipentry}% + {\savefieldcs{shortjournal}% + {\strfield{shortjournal}=\strfield{journaltitle}}}}}% + +% \defbibcheck{shortjournal}{% Multiple lists +% \ifcsdef{cms@shjour}% +% {\iffieldequals{shortjournal}{\cms@shjour}% +% {\skipentry}% +% {\savefield{shortjournal}{\cms@shjour}}}% +% {\savefield{shortjournal}{\cms@shjour}}} + \AtBeginBibliography{% \togglefalse{cms@headlessnote}}% @@ -104,12 +165,12 @@ bibliography style] \usebibmacro{name:hook}{#3#1}% \ifblank{#3}{}{% \ifcapital - {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{\MakeCapital{#3}}\isdot}% {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\addhighpenspace}}% \mkbibnamelast{#1}\isdot \ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#2}\isdot}% - \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}} + \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}% {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% \mkbibnamelast{#1}\isdot% @@ -124,8 +185,8 @@ bibliography style] \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\addlowpenspace}% \ifblank{#3}{}{% \mkbibnameprefix{#3}\isdot - \ifpunctmark{'} - {} + \ifpunctmark{'}% + {}% {\ifuseprefix{\addhighpenspace}{\addlowpenspace}}}% \mkbibnamelast{#1}\isdot \ifblank{#4}{}{% @@ -133,37 +194,37 @@ bibliography style] {\ifnumeral{#4}% {\addlowpenspace\mkbibnameaffix{#4}\isdot}% {\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot% - \ifboolexpr{ + \ifboolexpr{% test{\ifnumless{\value{listcount}}{\value{listtotal}}}% and test{\ifnumless{\value{listcount}}{\value{maxnames}}}% - } + }% {\addcomma}% {}}}% - {\addlowpenspace\mkbibnameaffix{#4}\isdot}}} + {\addlowpenspace\mkbibnameaffix{#4}\isdot}}}% \@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3 {\renewbibmacro*{name:family-given}[4]{% - \ifuseprefix% + \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% \ifdefvoid{#3}{}{% - \ifcapital% - {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + \ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot}% {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% - \mkbibnamefamily{#1}\isdot% + \mkbibnamefamily{#1}\isdot \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% - \mkbibnamefamily{#1}\isdot% + \mkbibnamefamily{#1}\isdot \ifboolexpr{% test {\ifdefvoid{#2}}% and test {\ifdefvoid{#3}}% }% - {}{\revsdnamepunct}% + {}{\revsdnamepunct}% \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}% \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}% @@ -173,11 +234,11 @@ bibliography style] \usebibmacro{name:hook}{#2#3#1}% \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}% \ifdefvoid{#3}{}{% - \mkbibnameprefix{#3}\isdot% - \ifprefchar% + \mkbibnameprefix{#3}\isdot + \ifprefchar {}% {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% - \mkbibnamefamily{#1}\isdot% + \mkbibnamefamily{#1}\isdot \ifdefvoid{#4}{}{% \iftoggle{cms@jrcomma}% {\ifnumeral{#4}% @@ -187,93 +248,43 @@ bibliography style] test{\ifnumless{\value{listcount}}{\value{listtotal}}}% and test{\ifnumless{\value{listcount}}{\value{maxnames}}}% - } + }% {\revsdnamepunct}% {}}}% {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}}{}% -\newbibmacro*{author/editors/translators}{% - \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}% - {\usebibmacro{author}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}% - {\usebibmacro{parteditor}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}% - {\usebibmacro{editor}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}% - {\usebibmacro{parttranslator}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}% - {\usebibmacro{translator}}% - {\ifnameundef{namec}% - {\let\bbx@lasthash\undefined}% - {\usebibmacro{compiler}}}}}}}} - \renewbibmacro*{author/editor}{% - \ifuseauthor% - {\usebibmacro{author}}% + \ifboolexpr{% + test {\ifuseauthor}% + or + togl {cms@headlessnote}% + }% + {\usebibmacro{author}}% + {\ifusenamea% + {\usebibmacro{pickeditor}}% {\ifuseeditor% - {\ifnameundef{namea}% - {\usebibmacro{moreeditor}}% - {\usebibmacro{parteditor}}}% - {\ifusetranslator% - {\ifnameundef{nameb}% + {\usebibmacro{moreeditor}}% + {\ifusenameb% + {\usebibmacro{picktranslator}}% + {\ifusetranslator% {\usebibmacro{moretranslator}}% - {\usebibmacro{parttranslator}}}% - {\iftoggle{cms@usecompiler}% - {\usebibmacro{compiler}}% - {\let\bbx@lasthash\undefined% - \settoggle{cms@usecompiler}{true}}}}}} + {\ifusenamec% + {\usebibmacro{compiler}}% + {\let\bbx@lasthash\undefined}}}}}}}% \renewbibmacro*{author}{% \iftoggle{cms@headlessnote}% {\usebibmacro{justauthor}}% {\usebibmacro{moreauthor}}} -\newbibmacro*{allauthor}{% - \ifnameundef{author}% - {\ifnameundef{editor}% - {\ifnameundef{translator}% - {\ifnameundef{namec}% - {\let\bbx@lasthash\undefined}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames[sortname]{namec}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{compilestrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames[sortname]{translator}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{transstrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames{editor}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{editstrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\iffieldundef{nameaddon}% - {\bibnamedash\addperiod\addspace} - {\bibnamedash\addspace}}% - {\iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{author}\bibrightbracket% - \savefield{namehash}{\bbx@lasthash}}% - {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{author}\addquestion\bibrightbracket% - \savefield{namehash}{\bbx@lasthash}}% - {\printnames{author}% - \savefield{namehash}{\bbx@lasthash}}}}}} - \newbibmacro*{justauthor}{% - \ifnameundef{author} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} + \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}% + {\let\bbx@lasthash\undefined}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% {\iffieldundef{nameaddon}% - {\bibnamedash\addperiod\addspace} - {\bibnamedash\addspace}} + {\bibnamedash\addperiod\addspace}% + {\bibnamedash\addspace}}% {\iffieldequalstr{authortype}{anon}% {\bibleftbracket\printnames{author}\bibrightbracket% \savefield{fullhash}{\bbx@lasthash}}% @@ -284,7 +295,7 @@ bibliography style] \savefield{fullhash}{\bbx@lasthash}}}}}} \newbibmacro*{moreauthor}{% - \ifnameundef{author}% + \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}% {\usebibmacro{pickeditor}}% {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% \iffirstonpage}% @@ -303,15 +314,15 @@ bibliography style] \savefield{fullhash}{\bbx@lasthash}}}}}} \newbibmacro*{pickeditor}{% - \ifnameundef{namea} + \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% {\usebibmacro{moreeditor}}% {\usebibmacro{parteditor}}} \newbibmacro*{moreeditor}{% - \ifnameundef{editor} - {\usebibmacro{picktranslator}} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} + \ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}% + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% {\bibnamedash\editordelim}% {\iftoggle{cms@authorparens}% {\bibopenparen\printnames{editor}% @@ -321,74 +332,86 @@ bibliography style] \usebibmacro{editstrg}}} \renewbibmacro*{editor}{% - \ifnameundef{editor} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\editordelim} - {\iftoggle{cms@authorparens}% - {\bibopenparen\printnames{editor}% - \bibcloseparen\editordelim}% - {\printnames{editor}\editordelim}% + \iftoggle{cms@headlessnote}% + {}% + {\ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% + {\ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}% + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\editordelim}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames{editor}% + \bibcloseparen\editordelim}% + {\printnames{editor}\editordelim}% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{editstrg}}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\nameadelim}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames[sortname]{namea}% + \bibcloseparen\nameadelim}% + {\printnames[sortname]{namea}\nameadelim}% \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{editstrg}}} + \usebibmacro{parteditstrg}}}} \newbibmacro*{parteditor}{% - \ifnameundef{namea} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\iftoggle{cms@authorparens}% - {\bibopenparen\printnames[sortname]{namea}% - \bibcloseparen\addcomma\space}% - {\printnames[sortname]{namea}\addcomma\space}% - \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{parteditstrg}}} + \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\nameadelim}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames[sortname]{namea}% + \bibcloseparen\nameadelim}% + {\printnames[sortname]{namea}\nameadelim}% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{parteditstrg}}} \newbibmacro*{picktranslator}{% - \ifnameundef{nameb} + \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}% {\usebibmacro{moretranslator}}% {\usebibmacro{parttranslator}}} \newbibmacro*{moretranslator}{% - \ifnameundef{translator} - {\usebibmacro{compiler}} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\iftoggle{cms@authorparens}% - {\bibopenparen\printnames[sortname]{translator}% - \bibcloseparen\addcomma\space}% - {\printnames[sortname]{translator}\addcomma\space}% - \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{transstrg}}} + \ifthenelse{\ifnameundef{translator}\OR\NOT\ifusetranslator}% + {\usebibmacro{compiler}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames[sortname]{translator}% + \bibcloseparen\addcomma\addspace}% + {\printnames[sortname]{translator}\addcomma\addspace}% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{transstrg}}} \newbibmacro*{parttranslator}{% - \ifnameundef{nameb} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\iftoggle{cms@authorparens}% - {\bibopenparen\printnames[sortname]{nameb}% - \bibcloseparen\addcomma\space}% - {\printnames[sortname]{nameb}\addcomma\space}% - \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{parttransstrg}}} + \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}% + {\usebibmacro{compiler}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames[sortname]{nameb}% + \bibcloseparen\addcomma\addspace}% + {\printnames[sortname]{nameb}\addcomma\addspace}% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{parttransstrg}}} \newbibmacro*{compiler}{% - \ifnameundef{namec} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\iftoggle{cms@authorparens}% - {\bibopenparen\printnames[sortname]{namec}% - \bibcloseparen\addcomma\space}% - {\printnames[sortname]{namec}\addcomma\space}% - \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{compilestrg}}} + \ifthenelse{\ifnameundef{namec}\OR\NOT\ifusenamec}% + {\let\bbx@lasthash\undefined}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printnames[sortname]{namec}% + \bibcloseparen\addcomma\addspace}% + {\printnames[sortname]{namec}\addcomma\addspace}% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{compilestrg}}} \renewcommand*{\revsdnamedelim}{\addcomma} @@ -400,7 +423,7 @@ bibliography style] \DeclareBibliographyDriver{shorthand}{% \iftoggle{cms@los}% - {\ifnameundef{labelname} + {\ifnameundef{labelname}% {\mkbibemph{\bibstring{see}}% \addspace% \usebibmacro{shorthand:label}}% @@ -412,14 +435,14 @@ bibliography style] {\usedriver{\frenchspacing}% {\thefield{entrytype}}% \finentry}% - {\ifnameundef{labelname} + {\ifnameundef{labelname}% {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% \ifentrytype{periodical}}% {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}% \newcunit}}% {\ifentrytype{manual}% {\printtext[bibhyperref]{\printlist{organization}\newcunit}}% - {}}} + {}}}% {\usebibmacro{author/editor}% \setunit{\addcomma\space}}% \printfield[lostitle]{title}% @@ -427,7 +450,7 @@ bibliography style] \DeclareBibliographyDriver{shorthands}{% biblatex < 2.9 \iftoggle{cms@los}% - {\ifnameundef{labelname} + {\ifnameundef{labelname}% {\mkbibemph{\bibstring{see}}% \addspace% \usebibmacro{shorthand:label}}% @@ -439,19 +462,45 @@ bibliography style] {\usedriver{\frenchspacing}% {\thefield{entrytype}}% \finentry}% - {\ifnameundef{labelname} + {\ifnameundef{labelname}% {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% \ifentrytype{periodical}}% {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}% \newcunit}}% {\ifentrytype{manual}% {\printtext[bibhyperref]{\printlist{organization}\newcunit}}% - {}}} + {}}}% {\usebibmacro{author/editor}% \setunit{\addcomma\space}}% \printfield[lostitle]{title}% \finentry}}} +\DeclareBibliographyDriver{shortjournal}{% + \iffieldundef{journaltitle}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}}% + {\printtext[journaltitle]{% + \printfield[jtnoformat]{journaltitle}% + \setunit{\addcolon\addspace}% + \printfield[sjtnoformat]{journalsubtitle}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}}% + \finentry}% + +\DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \pertype{periodical} + \step[fieldsource=shorttitle, final] + \step[fieldset=shortjournal, origfieldval] + } + } +}% + \DeclareBibliographyDriver{article}{% \iffieldequalstr{entrysubtype}{magazine}% {\usebibmacro{bibindex}% @@ -465,6 +514,8 @@ bibliography style] \setunit{\addspace}% \usebibmacro{language+transtitle}% \newunit\newblock% + \usebibmacro{byauthor}% + \newunit\newblock \usebibmacro{part+editor+translator}% \newunit\newblock% \usebibmacro{bibreprint}% @@ -490,6 +541,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} {\usebibmacro{bibindex}% @@ -529,6 +585,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -571,6 +632,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -581,10 +647,20 @@ bibliography style] \setunit{\addspace}% \printfield{nameaddon}% \newunit\newblock - \ifundef\bbx@lasthash{\usebibmacro{italtitle+stitle}}{}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + and + not test {\iffieldundef{title}}% + }% + {\usebibmacro{italtitle+stitle}}{}% \usebibmacro{cmsbibsortdate}% \newunit\newblock - \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + or + test {\iffieldundef{title}}% + }% + {}{\usebibmacro{italtitle+stitle}}% \newunit\newblock% 16th ed. \usebibmacro{byauthor}% \newunit\newblock @@ -592,7 +668,7 @@ bibliography style] \newcunit%\setunit{\addperiod\addspace}% \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\setunit{\addperiod\addspace}}% Fix customc? {\setunit{\addcomma\addspace}}% \iffieldundef{edition}% @@ -602,27 +678,29 @@ bibliography style] \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}}% \newcunit\newblock \usebibmacro{volume+pages}% \newunit\newblock @@ -651,6 +729,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% @@ -672,7 +755,7 @@ bibliography style] {\usebibmacro{edition}}}% {}% \newunit\newblock% 16th ed. - \usebibmacro{byauthor} + \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{part+editor+translator}% \newunit\newblock @@ -724,32 +807,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -792,7 +890,7 @@ bibliography style] {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -820,32 +918,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -878,6 +991,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -893,6 +1011,8 @@ bibliography style] \newunit\newblock \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}% \newunit\newblock + \usebibmacro{part+editor+translator}% + \newunit\newblock \ifboolexpr{% test {\iffieldundef{crossref}}% or @@ -909,7 +1029,7 @@ bibliography style] {}% {\usebibmacro{edition}}% \usebibmacro{editorpunct}% - \usebibmacro{bytranslator+others}% + \usebibmacro{byeditor+others}% \newunit \usebibmacro{volume+or+volumes}% \newunit\newblock @@ -934,32 +1054,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1011,6 +1146,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1029,16 +1169,16 @@ bibliography style] \usebibmacro{byauthor}% \setunit{\addperiod\addspace}% \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@crossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@crossref}% - } + }% {\setunit{\addperiod\addspace}% \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% @@ -1073,32 +1213,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1117,16 +1272,16 @@ bibliography style] \usebibmacro{byauthor}% \setunit{\addperiod\addspace}% \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@crossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@crossref}% - } + }% {\setunit{\addperiod\addspace}% Moved here. \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% @@ -1161,32 +1316,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1205,16 +1375,16 @@ bibliography style] \usebibmacro{byauthor}% \setunit{\addperiod\addspace}% \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@crossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@crossref}% - } + }% {\setunit{\addperiod\addspace}% \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% @@ -1242,32 +1412,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1292,7 +1477,7 @@ bibliography style] {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -1329,6 +1514,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1343,7 +1533,7 @@ bibliography style] \newunit\newblock \printtext[title]{% \printfield[noformat]{title}}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit*{\addcomma\addspace}% \usebibmacro{letter+date}% @@ -1352,16 +1542,16 @@ bibliography style] \newunit\newblock%\bibsentence \usebibmacro{part+editor+translator}% \setunit*{\addperiod\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@crossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@crossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% \newcunit @@ -1393,32 +1583,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\newunit}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\newunit}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1459,6 +1664,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1479,7 +1689,7 @@ bibliography style] {\printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -1515,6 +1725,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1525,10 +1740,20 @@ bibliography style] \setunit{\addspace}% \printfield{nameaddon}% \newunit\newblock - \ifundef\bbx@lasthash{\usebibmacro{italtitle+stitle}}{}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + and + not test {\iffieldundef{title}}% + }% + {\usebibmacro{italtitle+stitle}}{}% \usebibmacro{cmsbibsortdate}% \newunit\newblock - \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + or + test {\iffieldundef{title}}% + }% + {}{\usebibmacro{italtitle+stitle}}% \newunit% 16th ed. \usebibmacro{byauthor}% \newunit\newblock @@ -1538,7 +1763,7 @@ bibliography style] \newunit\newblock \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\newunit}% Fix customc? {\newcunit}% \iffieldundef{edition}% @@ -1548,27 +1773,29 @@ bibliography style] \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{ctitleaddonpunct}% + \printfield{maintitleaddon}}}% \newcunit\newblock \usebibmacro{volume+pages}% \newunit\newblock @@ -1604,6 +1831,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1657,6 +1889,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1675,8 +1912,8 @@ bibliography style] \printfield{type}% \setunit{\addspace}% \printfield{number}% - \iflistundef{location} - {} + \iflistundef{location}% + {}% {\setunit*{\addspace}% \printtext[parens]{% \printlist[][-\value{listtotal}]{location}}}% @@ -1709,6 +1946,11 @@ bibliography style] \usebibmacro{bib+doi+url}% \newunit\newblock \usebibmacro{pageref}% + \iftoggle{cms@related}% + {\newunit% + \usebibmacro{related:init}% + \usebibmacro{related}}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{periodical}{% @@ -1718,11 +1960,15 @@ bibliography style] \setunit{\addspace}% \printfield{nameaddon}% \newunit\newblock - \ifundef\bbx@lasthash{% - \printtext[title]{% magazine subtype - \printfield[noformat]{title}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + and + not togl {cms@origpublished}% + }% + {\printtext[title]{% magazine subtype + \printfield[tnoformat]{title}% \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% + \printfield[stnoformat]{subtitle}}% \setunit*{\addspace}% \printlist[periodplace]{location}% \clearlist{location}% @@ -1756,6 +2002,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} {\usebibmacro{bibindex}% @@ -1763,11 +2014,15 @@ bibliography style] \setunit{\addspace}% \printfield{nameaddon}% \newunit\newblock - \ifundef\bbx@lasthash{% - \printtext[title]{% magazine subtype - \printfield[noformat]{title}% + \ifboolexpr{% + test {\ifundef{\bbx@lasthash}}% + and + not togl {cms@origpublished}% + }% + {\printtext[title]{% magazine subtype + \printfield[tnoformat]{title}% \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% + \printfield[stnoformat]{subtitle}}% \setunit*{\addspace}% \printlist[periodplace]{location}% \clearlist{location}% @@ -1801,6 +2056,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1816,6 +2076,8 @@ bibliography style] \newunit\newblock \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}% \newunit\newblock + \usebibmacro{part+editor+translator}% + \newunit\newblock \ifboolexpr{% test {\iffieldundef{crossref}}% or @@ -1827,6 +2089,8 @@ bibliography style] togl {cms@bookcrossref}% }% {\usebibmacro{mtitle+mstitle+vol+part+title+stitle}% + \usebibmacro{editorpunct}% + \usebibmacro{byeditor+others}% \newunit\newblock \usebibmacro{volume+or+volumes}% \newunit\newblock @@ -1849,32 +2113,47 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% - \bibxrefcite{\thefield{xref}} + \bibxrefcite{\thefield{xref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{bibprexref}% \bibxrefcite{\thefield{crossref}}% \usebibmacro{bibpostxref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1899,7 +2178,7 @@ bibliography style] {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -1927,6 +2206,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1967,6 +2251,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1991,13 +2280,15 @@ bibliography style] {\printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \setunit{\addspace}% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \newcunit\newblock \usebibmacro{music+eventdate}% 16th ed. \setunit{\addspace}% \usebibmacro{language+transtitle}% \newunit\newblock% + \usebibmacro{byauthor}% + \newunit\newblock \usebibmacro{part+editor+translator}% \newunit\newblock% \usebibmacro{bibreprint}% @@ -2007,7 +2298,7 @@ bibliography style] \usebibmacro{editorpunct}%\newunit\newblock \printfield{note}% \setunit*{\addcomma\addspace}\newblock% - \iffieldequalstr{entrysubtype}{magazine} + \iffieldequalstr{entrysubtype}{magazine}% {\usebibmacro{mag+news+date}% \newcunit\newblock \usebibmacro{chap+pag}}% @@ -2025,6 +2316,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -2041,7 +2337,7 @@ bibliography style] \usebibmacro{italtitle+stitle}% \newcunit\newblock \usebibmacro{bybookauthor}% - \clearname{bookauthor} + \clearname{bookauthor}% \newunit\newblock}{}% \usebibmacro{cmsbibsortdate}% \newunit\newblock @@ -2091,6 +2387,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -2125,6 +2426,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -2161,6 +2467,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -2174,19 +2485,19 @@ bibliography style] \ifundef\bbx@lasthash{% \usebibmacro{video+title}% Simplifies trad style \iffieldundef{booktitle}% Comma after italics, period after quotes - {\newcunit} - {\newunit}%\setunit{\addspace}\newblock% + {\setunit{\ctitleaddonpunct}}% + {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock% \printfield{titleaddon}%\usebibmacro{title+stitle}% \setunit{\addspace}\newblock%\bibsentence - \usebibmacro{language+transtitle} + \usebibmacro{language+transtitle}% \newunit\newblock}{}% \usebibmacro{cmsbibsortdate}% \newunit\newblock \ifundef\bbx@lasthash{}{% \usebibmacro{video+title}% Simplifies trad style \iffieldundef{booktitle}% Comma after italics, period after quotes - {\newcunit} - {\newunit}%\setunit{\addspace}\newblock% + {\setunit{\ctitleaddonpunct}}% + {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock% \printfield{titleaddon}%\usebibmacro{title+stitle}% \setunit{\addspace}\newblock%\bibsentence \usebibmacro{language+transtitle}}% @@ -2197,7 +2508,7 @@ bibliography style] \setunit{\addperiod\addspace}% \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\setunit{\addperiod\addspace}}% Fix customc? {\setunit{\addcomma\addspace}}% \iffieldundef{edition}% @@ -2207,27 +2518,29 @@ bibliography style] \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}}% \newcunit\newblock \usebibmacro{volume+pages}% \newunit\newblock @@ -2255,6 +2568,11 @@ bibliography style] \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% @@ -2273,20 +2591,32 @@ bibliography style] {\printfield{doi}% \setunit*{\addperiod\addspace}\newblock% \clearfield{url}}}% - {\iftoggle{cms@doi}% + {\ifboolexpr{% + togl {cms@doi}% + and + not test {\iffieldundef{doi}}% + }% {\printfield{doi}% \setunit*{\addperiod\addspace}\newblock}% {}}% - \iftoggle{cms@eprint}% + \ifboolexpr{% + togl {cms@eprint}% + and + not test {\iffieldundef{eprint}}% + }% {\usebibmacro{eprint}% \setunit*{\addperiod\addspace}\newblock}% {}% - \iftoggle{cms@url}% + \ifboolexpr{% + togl {cms@url}% + and + not test {\iffieldundef{url}}% + }% {\printfield{url}}% {}}% \newbibmacro*{shorthand:author}{% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{shorthand}}% or not togl {cms@los}% @@ -2312,6 +2642,8 @@ bibliography style] or test {\ifentrytype{review}}% or + test {\ifentrytype{suppperiodical}}% + or test {\ifentrytype{video}}% ) and @@ -2325,7 +2657,7 @@ bibliography style] \newbibmacro*{standard+labelyear+extrayear}{% \ifthenelse{\iffieldundef{labelyear}\OR% \iffieldequalstr{labelyear}{nodate}}% or new declaration ??? - {\ifboolexpr{ + {\ifboolexpr{% test {\ifentrytype{misc}}% or test {\ifentrytype{inreference}}% @@ -2338,7 +2670,7 @@ bibliography style] {}% {\bibstring{nodate}}}% {\iffieldundef{year}% - {\iffieldundef{eventyear} + {\iffieldundef{eventyear}% {\iffieldundef{origyear}% {\printfield{labelyear}% \iffieldundef{extrayear}% @@ -2347,11 +2679,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{urlendyear}% {\clearfield{urlyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{urlendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{urlyear}}% {\iffieldundef{urlmonth}% @@ -2366,11 +2698,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{origendyear}% {\clearfield{origyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{origendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{origyear}}% {\iffieldundef{origmonth}% @@ -2385,11 +2717,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{eventendyear}% {\clearfield{eventyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{eventendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{eventyear}}% {\iffieldundef{eventmonth}% @@ -2404,23 +2736,23 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{endyear}% DATE FIX {\clearfield{year}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{endyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{year}}% {\iffieldundef{month}% {\clearfield{year}}% {\iffieldsequal{year}{endyear}% {\clearfield{year}\clearfield{endyear}}% - {}}}}}}} + {}}}}}}}% \newbibmacro*{origfirst+labelyear+extrayear}{% \ifthenelse{\iffieldundef{labelyear}\OR% \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifentrytype{misc}}% or test {\ifentrytype{inreference}}% @@ -2433,7 +2765,7 @@ bibliography style] {}% {\bibstring{nodate}}}% {\iffieldundef{origyear}% - {\iffieldundef{year} + {\iffieldundef{year}% {\iffieldundef{eventyear}% {\printfield{labelyear}% \iffieldundef{extrayear}% @@ -2442,11 +2774,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{urlendyear}% {\clearfield{urlyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{urlendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{urlyear}}% {\iffieldundef{urlmonth}% @@ -2461,11 +2793,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{eventendyear}% {\clearfield{eventyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{eventendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{eventyear}}% {\iffieldundef{eventmonth}% @@ -2480,11 +2812,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{endyear}% {\clearfield{year}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{endyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{year}}% {\iffieldundef{month}% @@ -2499,23 +2831,23 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{origendyear}% DATE FIX {\clearfield{origyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{origendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{origyear}}% {\iffieldundef{origmonth}% {\clearfield{origyear}}% {\iffieldsequal{origyear}{origendyear}% {\clearfield{origyear}\clearfield{origendyear}}% - {}}}}}}} + {}}}}}}}% \newbibmacro*{av+labelyear+extrayear}{% \ifthenelse{\iffieldundef{labelyear}\OR% \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifentrytype{misc}}% or test {\ifentrytype{inreference}}% @@ -2528,7 +2860,7 @@ bibliography style] {}% {\bibstring{nodate}}}% {\iffieldundef{eventyear}% - {\iffieldundef{origyear} + {\iffieldundef{origyear}% {\iffieldundef{year}% {\printfield{labelyear}% \iffieldundef{extrayear}% @@ -2537,11 +2869,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{urlendyear}% {\clearfield{urlyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{urlendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{urlyear}}% {\iffieldundef{urlmonth}% @@ -2556,11 +2888,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{endyear}% {\clearfield{year}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{endyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{year}}% {\iffieldundef{month}% @@ -2575,11 +2907,11 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{origendyear}% {\clearfield{origyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{origendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{origyear}}% {\iffieldundef{origmonth}% @@ -2594,18 +2926,18 @@ bibliography style] \printfield{extrayear}}% \iffieldundef{eventendyear}% DATE FIX {\clearfield{eventyear}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldequalstr{eventendyear}{}}% and not togl {cms@datedash}% - } + }% {\mbox{\bibdatedash}% \clearfield{eventyear}}% {\iffieldundef{eventmonth}% {\clearfield{eventyear}}% {\iffieldsequal{eventyear}{eventendyear}% {\clearfield{eventyear}\clearfield{eventendyear}}% - {}}}}}}} + {}}}}}}}% \newbibmacro*{origyear+endyear}{% \printfield{origyear}% @@ -2660,7 +2992,7 @@ bibliography style] {\usebibmacro{labelyear+extrayear}}}}% \ifcsdef{@cms@tempdate}% {\toggletrue{\@cms@tempdate}}% - {}} + {}}% \newbibmacro*{origyear+labelyear}{% \ifboolexpr{ ( @@ -2668,11 +3000,13 @@ bibliography style] or test {\ifentrytype{review}}% or + test {\ifentrytype{suppperiodical}}% + or test {\ifentrytype{video}}% ) and togl {cms@avdate}% - } + }% {\usebibmacro{av+labelyear+extrayear}}% {\iftoggle{cms@switchdates}% {\usebibmacro{labelyear+extrayear}}% @@ -2684,7 +3018,7 @@ bibliography style] {\iftoggle{cms@ordate}% {\usebibmacro{origfirst+labelyear+extrayear}}% {\usebibmacro{origyear+endyear}% - \clearfield{origyear}}}}}} + \clearfield{origyear}}}}}}% \newbibmacro*{bothyear+oldstyle}{% \ifboolexpr{ ( @@ -2692,11 +3026,13 @@ bibliography style] or test {\ifentrytype{review}}% or + test {\ifentrytype{suppperiodical}}% + or test {\ifentrytype{video}}% ) and togl {cms@avdate}% - } + }% {\usebibmacro{av+labelyear+extrayear}}% \clearfield local to \printtext {\iftoggle{cms@switchdates}% {\printtext{% @@ -2706,7 +3042,7 @@ bibliography style] \setunit{\addspace}\usebibmacro{origyear+endyear}}% \clearfield{year}% \clearfield{origyear}}% - {\iffieldundef{origyear} + {\iffieldundef{origyear}% {\iftoggle{cms@ordate}% {}% {\clearfield{extrayear}}% @@ -2727,7 +3063,7 @@ bibliography style] \clearfield{extrayear}\setunit*{\addspace}% \usebibmacro{standard+labelyear+extrayear}}}% \clearfield{origyear}% - \clearfield{year}}}}} + \clearfield{year}}}}}% \newbibmacro*{pubstate}{% \iftoggle{cms@reprint}% @@ -2736,19 +3072,19 @@ bibliography style] {}% {\printtext{% 16th ed. \usebibmacro{choosepubstring}% - \printdate\addperiod}\nopunct}} + \printdate}}}% Need \addperiod & \nopunct ?? {\iffieldundef{origyear}% {}% {\printtext{% 16th ed. \usebibmacro{choosepubstring}% - \printorigdate\addperiod}\nopunct}}}% - {\printfield{pubstate}}} + \printorigdate}}}}% Need \addperiod & \nopunct ?? + {\printfield{pubstate}}}% \newbibmacro*{choosepubstring}{% \ifthenelse{\ifentrytype{video}\OR% \ifentrytype{music}}% {\bibstring{origreleaseyear}}% - {\bibstring{origpubyearalt}}}% + {\bibstring{origpubyear}}}% \newbibmacro*{bibreprint}{% \iftoggle{cms@reprint}% @@ -2757,14 +3093,14 @@ bibliography style] {\iftoggle{cms@switchdates}% {\bibstring{reprint}\newcunit}% 16th ed. {}}}% - {}} + {}}% \newbibmacro*{volume+pages}{% Volume fix (modified) - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{maintitle}}% or togl {cms@vol}% - } + }% {\global\togglefalse{cms@vol}% \ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% {\printfield{pages}% @@ -2785,7 +3121,7 @@ bibliography style] \printfield{part}% \newcunit% \printfield{pages}}}}% - {\ifboolexpr{ + {\ifboolexpr{% togl {cms@hidevolumes}% and ( @@ -2809,14 +3145,14 @@ bibliography style] {\iffieldundef{part}% {}% {\newcunit\printfield{part}}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollvol}}% and test {\iffieldequalcs{volume}{cbx@incollvol}}% }% {\iffieldundef{part}% {}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollpart}}% and test {\iffieldequalcs{part}{cbx@incollpart}}% @@ -2830,14 +3166,14 @@ bibliography style] {\iffieldundef{part}% {\newcunit\printfield{pages}}% {\newcunit\printfield{part}\newcunit\printfield{pages}}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollvol}}% and test {\iffieldequalcs{volume}{cbx@incollvol}}% }% {\iffieldundef{part}% {\newcunit\printfield{pages}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollpart}}% and test {\iffieldequalcs{part}{cbx@incollpart}}% @@ -2858,12 +3194,16 @@ bibliography style] \newcunit% \printfield{pages}}}}}}% {\newcunit\printfield{chapter}}% + \iftoggle{cms@xrefurl}% + {\newunit% + \usebibmacro{bib+doi+url}}% + {}% \ifcsdef{cbx@incollpgref}% Here we print and clear the child's {\restorelist{pageref}{\cbx@incollpgref}% backrefs \newunit% \usebibmacro{pageref}% \global\let\cbx@incollpgref\undefined}% - {}} + {}}% \newbibmacro*{volume+or+volumes}{% Volume fix (modified) \iffieldundef{maintitle}% @@ -2871,7 +3211,7 @@ bibliography style] {\printfield{volumes}}% {\printfield{volume}% \printfield{part}}}% - {\ifboolexpr{ + {\ifboolexpr{% togl {cms@hidevolumes}% and ( @@ -2884,31 +3224,33 @@ bibliography style] {\printfield{volumes}}}} \newbibmacro*{mtitle+mstitle+vol+part+title+stitle}{% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% Test ??? - {\usebibmacro{cms-in:}% Volume-less treatment? + {\iffieldundef{title}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% Volume-less treatment? \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}}}% \newbibmacro*{btitle+bstitle}{% InIn fix from N&B - \iffieldundef{booktitle} - {} + \iffieldundef{booktitle}% + {}% {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% \ifentrytype{video}}% {}% @@ -2916,44 +3258,44 @@ bibliography style] \printtext{% \printfield{booktitle}% \setunit{\addcolon\addspace}% - \printfield[booktitle]{booksubtitle}}% - \newcunit + \printfield[booksubtitle]{booksubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{booktitleaddon}% - \setunit*{\addcomma\addspace}}} + \setunit*{\addcomma\addspace}}}% \newbibmacro*{mtitle+mstitle+vol+part+btitle+bstitle}{% \usebibmacro{btitle+bstitle}% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)\OR% \(\iffieldundef{booktitle}\AND\NOT\ifentrytype{bookinbook}\)}% {\usebibmacro{cms-in:}% Volume-less treatment? \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}% - \toggletrue{cms@vol}} + \toggletrue{cms@vol}}% {\printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext{% \printfield{maintitle}% \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}}} + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}}}% \newbibmacro*{cjournal+ser+vol+num}{% Moved to bbx \usebibmacro{journal+sub}% \setunit*{\addspace}% \printlist[periodplace]{location}% \setunit*{\addspace}% - \iffieldundef{series} - {} + \iffieldundef{series}% + {}% {\newcunit \printfield[jourser]{series}% \newcunit}%\setunit*{\addspace}? @@ -2962,7 +3304,7 @@ bibliography style] {\newcunit% \printfield[journum]{number}% \clearfield{number}% - \setunit{\addcomma\addspace}} + \setunit{\addcomma\addspace}}% {\printfield[jourvol]{volume}% \setunit{\addcomma\addspace}}}% {\printfield[jourvol]{volume}% @@ -2971,78 +3313,78 @@ bibliography style] \clearfield{number}% \setunit{\addcomma\addspace}}% need * here? \printfield{eid}% - \newunit} + \newunit}% \newbibmacro*{journal+issue+year+pages}{% \iftoggle{cms@numbermonth}{}{\clearfield{month}}% \usebibmacro{cjournal+ser+vol+num}% \setunit{\addspace}% - \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month} - \AND\iffieldundef{number}}% - {\ifthenelse{\iffieldundef{bookpagination}\AND\NOT% + \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}% + \AND\iffieldundef{number}\AND\iffieldundef{year}}% Test year for + {\ifthenelse{\iffieldundef{bookpagination}\AND\NOT% related entries?? \iffieldundef{volume}}% Removed kludge for French colon spacing? {\setunit{\postvolpunct}}% {\setunit{\addcolon\addspace}}}% This may not be universally correct. {\printtext[parens]{% Perhaps if it's wrong use magazine subtype? - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{date}% \printfield{number}}% {\printfield{issue}% \setunit{\addspace}% \usebibmacro{cmsyear}}}% - \setunit{\addcolon\addspace}} - \printfield{pages}} + \setunit{\addcolon\addspace}}% + \printfield{pages}}% \newbibmacro*{periodical+issue+year+pages}{% \iftoggle{cms@numbermonth}{}{\clearfield{month}}% \usebibmacro{cperiodical+ser+vol+num}% \setunit{\addspace}% - \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month} - \AND\iffieldundef{number}}% + \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}% + \AND\iffieldundef{number}\AND\iffieldundef{year}}% See prev. macro {\ifthenelse{\iffieldundef{bookpagination}\AND\NOT% \iffieldundef{volume}}% Removed kludge for French ??? {\setunit{\postvolpunct}}% {\setunit{\addcolon\addspace}}}% {\printtext[parens]{% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{date}% \printfield{number}}% {\printfield{issue}% \setunit{\addspace}% \usebibmacro{cmsyear}}}% - \setunit{\addcolon\addspace}} - \printfield{pages}} + \setunit{\addcolon\addspace}}% + \printfield{pages}}% \newbibmacro*{bycompiler}{% - \ifnameundef{namec} - {} + \ifnameundef{namec}% + {}% {\bibstring{bycompiler}\addspace \printnames[bycompiler]{namec}}} \renewbibmacro*{byeditor}{% - \ifnameundef{editor} - {} + \ifnameundef{editor}% + {}% {\usebibmacro{cbytypestrg}{editor}{editor}% \setunit{\addspace}% \printnames[byeditor]{editor}% \usebibmacro{editorpunct}}% - \usebibmacro{byeditorx}} + \usebibmacro{byeditorx}}% \renewbibmacro*{byeditorx}{% - \ifnameundef{editora} - {} + \ifnameundef{editora}% + {}% {\usebibmacro{cbytypestrg}{editora}{editor}% \setunit{\addspace}% \printnames[byeditora]{editora}% \usebibmacro{editorpunct}}% - \ifnameundef{editorb} - {} + \ifnameundef{editorb}% + {}% {\usebibmacro{cbytypestrg}{editorb}{editor}% \setunit{\addspace}% \printnames[byeditorb]{editorb}% \usebibmacro{editorpunct}}% - \ifnameundef{editorc} - {} + \ifnameundef{editorc}% + {}% {\usebibmacro{cbytypestrg}{editorc}{editor}% \setunit{\addspace}% \printnames[byeditorc]{editorc}% @@ -3051,32 +3393,32 @@ bibliography style] \renewbibmacro*{byeditor+others}{% \ifthenelse{\NOT\ifnameundef{editor}\AND \(\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}\)} + \iffieldequalstr{editortype}{editor}\)}% {\def\@tempa{byeditor}% - \ifnamesequal{editor}{translator} + \ifnamesequal{editor}{translator}% {\edef\@tempa{\@tempa tr}% - \clearname{translator}} + \clearname{translator}}% {}% - \ifnamesequal{editor}{namec} + \ifnamesequal{editor}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{editor}{commentator} + \ifnamesequal{editor}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{editor}{annotator} + \clearname{commentator}}% + {\ifnamesequal{editor}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{editor}{introduction} + \ifnamesequal{editor}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{editor}{foreword} + \clearname{introduction}}% + {\ifnamesequal{editor}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{editor}{afterword} + \clearname{foreword}}% + {\ifnamesequal{editor}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% \bibstring{\@tempa}% \setunit{\addspace}% @@ -3085,65 +3427,65 @@ bibliography style] \usebibmacro{editorpunct}% \usebibmacro{byeditorx}}% {\usebibmacro{byeditor}}% - \usebibmacro{bytranslator+others}} + \usebibmacro{bytranslator+others}}% \renewbibmacro*{bytranslator+others}{% - \ifnameundef{translator} - {} + \ifnameundef{translator}% + {}% {\def\@tempa{bytranslator}% - \ifnamesequal{translator}{namec} + \ifnamesequal{translator}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{translator}{commentator} + \ifnamesequal{translator}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{translator}{annotator} + \clearname{commentator}}% + {\ifnamesequal{translator}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{translator}{introduction} + \ifnamesequal{translator}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{translator}{foreword} + \clearname{introduction}}% + {\ifnamesequal{translator}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{translator}{afterword} + \clearname{foreword}}% + {\ifnamesequal{translator}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% \bibstring{\@tempa}\space \printnames[bytranslator]{translator}% \clearname{translator}% \usebibmacro{editorpunct}}% - \usebibmacro{bycompiler+others}} + \usebibmacro{bycompiler+others}}% \newbibmacro*{bycompiler+others}{% - \ifnameundef{namec} - {} + \ifnameundef{namec}% + {}% {\def\@tempa{bycompiler}% - \ifnamesequal{namec}{commentator} + \ifnamesequal{namec}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{namec}{annotator} + \clearname{commentator}}% + {\ifnamesequal{namec}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{namec}{introduction} + \ifnamesequal{namec}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{namec}{foreword} + \clearname{introduction}}% + {\ifnamesequal{namec}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{namec}{afterword} + \clearname{foreword}}% + {\ifnamesequal{namec}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% \bibstring{\@tempa}\space \printnames[bycompiler]{namec}% \clearname{namec}% \usebibmacro{editorpunct}}% - \usebibmacro{byothers}} + \usebibmacro{byothers}}% \newbibmacro*{byothers}{% Changed for 0.9 \usebibmacro{cbytranslator}% @@ -3160,6 +3502,83 @@ bibliography style] \usebibmacro{editorpunct}% \usebibmacro{withforeword}% \usebibmacro{editorpunct}% - \usebibmacro{withafterword}} + \usebibmacro{withafterword}}% + +%%%% Related functionality from standard.bbx %%%% + +\newcounter{bbx:relatedcount} +\newcounter{bbx:relatedtotal} + +\newbibmacro*{related:init}{% + \csundef{bbx:relatedloop}} + +\newbibmacro*{begrelated}{\ifcsdef{bbx@lasthash}% + {\let\cms@related@hash\bbx@lasthash}{}}% +\newbibmacro*{endrelated}{\ifcsdef{cms@related@hash}% + {\global\let\bbx@lasthash\cms@related@hash% + \let\cms@related@hash\undefined}{}}% +\newbibmacro*{begrelatedloop}{} +\newbibmacro*{endrelatedloop}{} + +\def\ifrelatedloop{% + \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}% + or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}% + +\newbibmacro*{related}{% + \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }% + {}% + {\usebibmacro{begrelated}% + \def\bbx@tempa{}% + \setcounter{bbx:relatedtotal}{0}% + \def\do##1{% + \entrydata{##1}{% + \ifrelatedloop + {}% + {\stepcounter{bbx:relatedtotal}% + \gappto{\bbx@tempa}{##1,}}}}% + \docsvfield{related}% + \restorefield{related}{\bbx@tempa}% + \ifnumgreater{\value{bbx:relatedtotal}}{0}% + {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}% + \iffieldundef{clonesourcekey}% + {}% + {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}% + \setcounter{bbx:relatedcount}{0}% + \def\do{% + \stepcounter{bbx:relatedcount}% + \ifnumgreater{\value{bbx:relatedcount}}{1}% + {\printtext{\relateddelim}}% + {}}% + \ifbibmacroundef{related:\strfield{relatedtype}}% + {\appto{\do}{\usebibmacro{related:default}}}% + {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}% + \iffieldformatundef{related:\strfield{relatedtype}}% + {\def\bbx@tempa{related}}% + {\def\bbx@tempa{related:\strfield{relatedtype}}}% + \iffieldformatundef{relatedstring:\strfield{relatedtype}}% + {\def\bbx@tempb{relatedstring:default}}% + {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}% + \printtext[\bbx@tempa]{% + \usebibmacro{begrelatedloop}% + \iffieldundef{relatedstring}% + {\ifboolexpr{% + test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}% + and + test {\ifbibxstring{\thefield{relatedtype}s}}% + }% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedtype}s}}}% + {\iffieldbibstring{relatedtype}% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedtype}}}}% + {}}}% + {\iffieldbibstring{relatedstring}% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedstring}}}}% + {\printfield[\bbx@tempb]{relatedstring}}}% + \docsvfield{related}% + \usebibmacro{endrelatedloop}}}% + {}% + \usebibmacro{endrelated}}}% \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.cbx index bea3e54af0b..df02300309f 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.cbx @@ -1,1312 +1,13 @@ -% $Id: chicago-authordate.cbx,v 0.8.2.7 2016/03/18 18:46:17 dfussner Exp $ +% $Id: chicago-authordate.cbx,v 0.8.3.12 2016/06/07 09:26:22 dfussner Exp $ % This is a biblatex citation style file, adapted from Lehman's % authoryear-comp.cbx. It is heavily modified, with the intention of % providing inline citations (and a reference list) for the % author-date style of the Chicago Manual of Style, 16th edition. -\ProvidesFile{chicago-authordate.cbx}[2016/03/18 v 2.9a biblatex +\ProvidesFile{chicago-authordate.cbx}[2016/06/07 v 3.4 biblatex citation style] -%%%% Biblatex initialization + Chicago options + Toggles %%%% - -\newbool{cbx:parens} - -\providecommand*{\mkibid}[1]{#1} - -\providetoggle{cms@inlineibid} -\providetoggle{cms@origlabel} -\providetoggle{cms@bothlabelold} -\providetoggle{cms@bothlabelnew} -\providetoggle{cms@fulldate} -\providetoggle{cms@reprint} -\providetoggle{cms@switchdates} -\providetoggle{cms@los} -%\providetoggle{cms@oneyear} -\providetoggle{cms@avdate} -\providetoggle{cms@ordate} -\providetoggle{cms@nodates} -\providetoggle{cms@authorparens} -\providetoggle{cms@datedash} -\providetoggle{cms@modpostnote} - -\providetoggle{cms@url}% These are for the field-exclusion options -\providetoggle{cms@doi} -\providetoggle{cms@doionly} -\providetoggle{cms@eprint} -\providetoggle{cms@isbn} -\providetoggle{cms@numbermonth} -\providetoggle{cms@bookpages} -\providetoggle{cms@hidevolumes}% Modify Volume fix -\providetoggle{cms@comprange} - -\providetoggle{cms@jrcomma}% Comma after Jr./Sr. - -\providetoggle{cms@headlessnote}% Keep -\providetoggle{cms@noibid}% Keep -\providetoggle{cms@usecompiler}% Keep -\providetoggle{cms@origpublished}% Keep -\providetoggle{cms@annotation}% Keep -\providetoggle{cms@postposit}% Keep -\providetoggle{cms@fullshhand}% -\providetoggle{cms@vol}% -\providetoggle{cms@crossref}% -\providetoggle{cms@bookcrossref} - -\AtEveryCitekey{% - \iffieldundef{userc}% - {}% - {\nocite{\thefield{userc}}}% - \iffieldequalstr{pubstate}{reprint}% - {\toggletrue{cms@reprint}}% - {\togglefalse{cms@reprint}}}% - -\DeclareBibliographyOption{avdate}[true]{% - \ifcsdef{cms@opt@avdate@#1}% - {\csuse{cms@opt@avdate@#1}} - {\blx@err@invopt{avdate=#1}{}}} -\def\cms@opt@avdate@true{% - \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 - {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. - {\DeclareLabeldate[music,review,video]{\field{eventyear}% - \field{origyear} \field{year} \field{urlyear}}}% - {\DeclareLabelyear[music,review,video]{\field{eventyear}% - \field{origyear} \field{year} \field{urlyear}}}}% - {\DeclareLabelyear[music,review,video]{eventyear,origyear,year,urlyear}}% - \toggletrue{cms@avdate}}% -\def\cms@opt@avdate@false{% - \togglefalse{cms@avdate}} - -\DeclareBibliographyOption{cmsdate}[off]{% Trying to implement origyear as - \ifcsdef{cms@global@cmsdate@#1}% labelyear. Sorting will be an issue. - {\csuse{cms@global@cmsdate@#1}} - {\blx@err@invopt{cmsdate=#1}{}}} -\def\cms@global@cmsdate@on{% - \toggletrue{cms@origlabel}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@new{% - \toggletrue{cms@bothlabelnew}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@old{% - \toggletrue{cms@bothlabelold}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@both{% - \toggletrue{cms@bothlabelold}% - \ExecuteBibliographyOptions{cmsorigdate=true}} -\def\cms@global@cmsdate@full{}% -\def\cms@global@cmsdate@off{} - -\DeclareBibliographyOption{cmsorigdate}[true]{% ??? Also need new macros - \ifcsdef{cms@opt@origdate@#1}% for printing dates. Worth it ??? - {\csuse{cms@opt@origdate@#1}}% - {\blx@err@invopt{cmsorigdate=#1}{}}} -\def\cms@opt@origdate@true{% - \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 - {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. - {\DeclareLabeldate{\field{origyear} \field{year}% - \field{eventyear} \field{urlyear}}% - \DeclareLabeldate[patent]{\field{year} \field{eventyear}% - \field{origyear} \field{urlyear}}}% - {\DeclareLabelyear{\field{origyear} \field{year}% - \field{eventyear} \field{urlyear}}% - \DeclareLabelyear[patent]{\field{year} \field{eventyear}% - \field{origyear} \field{urlyear}}}}% - {\DeclareLabelyear{origyear,year,eventyear,urlyear}% - \DeclareLabelyear[patent]{year,eventyear,origyear,urlyear}}% - \global\toggletrue{cms@ordate}}% -\def\cms@opt@origdate@false{\togglefalse{cms@ordate}}% - -\DeclareEntryOption{cmsdate}[off]{% Trying to implement origyear as - \ifcsdef{cms@opt@cmsdate@#1}% labelyear. Sorting will be an issue. - {\iftoggle{cms@origlabel} - {\togglefalse{cms@origlabel}% - \def\@cms@tempdate{cms@origlabel}}% - {\iftoggle{cms@bothlabelnew}% - {\togglefalse{cms@bothlabelnew}% - \def\@cms@tempdate{cms@bothlabelnew}}% - {\iftoggle{cms@bothlabelold}% - {\togglefalse{cms@bothlabelold}% - \def\@cms@tempdate{cms@bothlabelold}}% - {}}}% - \csuse{cms@opt@cmsdate@#1}}% - {\blx@err@invopt{cmsdate=#1}{}}} -\def\cms@opt@cmsdate@on{% - \toggletrue{cms@origlabel}} -\def\cms@opt@cmsdate@new{% - \toggletrue{cms@bothlabelnew}} -\def\cms@opt@cmsdate@old{% - \toggletrue{cms@bothlabelold}} -\def\cms@opt@cmsdate@both{% - \toggletrue{cms@bothlabelold}} -\def\cms@opt@cmsdate@full{% - \toggletrue{cms@fulldate}} -\def\cms@opt@cmsdate@off{} - -\DeclareBibliographyOption{annotation}[true]{% - \global\toggletrue{cms@annotation}} - -\DeclareBibliographyOption{cmslos}[true]{% - \global\settoggle{cms@los}{#1}} - -\DeclareBibliographyOption{noibid}[true]{% - \global\toggletrue{cms@noibid}} - -\DeclareBibliographyOption{compresspages}[true]{% - \ifcsdef{cms@opt@crange@#1}% - {\csuse{cms@opt@crange@#1}}% - {\blx@err@invopt{compresspages=#1}{}}}% -\def\cms@opt@crange@true{% - \global\toggletrue{cms@comprange}% - \setcounter{mincomprange}{100}% - \setcounter{mincompwidth}{10}% -}% -\def\cms@opt@crange@false{}% - -\DeclareBibliographyOption{postnotepunct}[true]{% - \ifcsdef{cms@opt@ppunct@#1}% - {\csuse{cms@opt@ppunct@#1}}% - {\blx@err@invopt{postnotepunct=#1}{}}}% -\def\cms@opt@ppunct@true{% - \global\toggletrue{cms@modpostnote}}% -\def\cms@opt@ppunct@false{}% - -\DeclareBibliographyOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} - -\DeclareBibliographyOption{nodates}[true]{% - \settoggle{cms@nodates}{#1}} - -\DeclareEntryOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} - -\DeclareBibliographyOption{juniorcomma}[true]{% - \settoggle{cms@jrcomma}{#1}} - -\DeclareEntryOption{juniorcomma}[true]{% - \settoggle{cms@jrcomma}{#1}} - -\DeclareBibliographyOption{shorthandfull}[true]{% - \settoggle{cms@fullshhand}{#1}} - -\DeclareBibliographyOption{longcrossref}[false]{% - \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} -\def\cms@opt@lxref@none{% - \togglefalse{cms@crossref}% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@lxref@true{% - \toggletrue{cms@crossref}}% -\def\cms@opt@lxref@false{% - \togglefalse{cms@crossref}}% -\def\cms@opt@lxref@notes{% - \togglefalse{cms@crossref}}% -\def\cms@opt@lxref@bib{% - \toggletrue{cms@crossref}}% - -\DeclareEntryOption{longcrossref}[false]{% - \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} - -\DeclareBibliographyOption{booklongxref}[true]{% - \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} - {\blx@err@invopt{booklongxref=#1}{}}}% -\def\cms@opt@bklxref@true{% - \toggletrue{cms@bookcrossref}}% -\def\cms@opt@bklxref@false{% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@bklxref@notes{% - \togglefalse{cms@bookcrossref}}% -\def\cms@opt@bklxref@bib{% - \toggletrue{cms@bookcrossref}}% - -\DeclareEntryOption{booklongxref}[true]{% - \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} - {\blx@err@invopt{booklongxref=#1}{}}}% - -% The field-exclusion options % - -\DeclareBibliographyOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} -\DeclareBibliographyOption{url}[true]{% - \settoggle{cms@url}{#1}} -\DeclareBibliographyOption{doi}[true]{% - \ifcsdef{cms@opt@doi@#1}% - {\csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} -\def\cms@opt@doi@true{% - \toggletrue{cms@doi}} -\def\cms@opt@doi@false{% - \togglefalse{cms@doi}} -\def\cms@opt@doi@only{% - \toggletrue{cms@doionly}} -\DeclareBibliographyOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} -\DeclareBibliographyOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} -\DeclareBibliographyOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} -\DeclareBibliographyOption{includeall}[true]{% - \settoggle{cms@isbn}{#1}% - \settoggle{cms@url}{#1}% - \settoggle{cms@doi}{#1}% - \settoggle{cms@eprint}{#1}% - \settoggle{cms@numbermonth}{#1}% - \settoggle{cms@bookpages}{#1}} -\DeclareBibliographyOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} - -\DeclareEntryOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} -\DeclareEntryOption{doi}[true]{% - \ifcsdef{cms@opt@doi@#1}% - {\iftoggle{cms@doi}% - {\togglefalse{cms@doi}% - \iftoggle{cms@doionly}% - {\togglefalse{cms@doionly}}% !! - {}}% - {\toggletrue{cms@doi}}% !! - \csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} -\DeclareEntryOption{url}[true]{% - \settoggle{cms@url}{#1}} -\DeclareEntryOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} -\DeclareEntryOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} -\DeclareEntryOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} -\DeclareEntryOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} - -\ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref}% - -\@ifpackagelater{biblatex}{2013/03/30}% For biblatex 2.6 ff. -{\ExecuteBibliographyOptions{labeldate=true}}% -{\ExecuteBibliographyOptions{labelyear=true}}% - -\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff. -{\global\toggletrue{cms@datedash}}% -{\global\togglefalse{cms@datedash}}% - -\DeclareDataInheritance{collection}{suppcollection}{% - \inherit{title}{title} - \inherit{subtitle}{subtitle} - \inherit{titleaddon}{titleaddon}} - -\DeclareDataInheritance{mvbook}{incollection}{% - \inherit{title}{maintitle} - \inherit{subtitle}{mainsubtitle} - \inherit{titleaddon}{maintitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{book}{incollection}{% - \inherit{title}{booktitle} - \inherit{subtitle}{booksubtitle} - \inherit{titleaddon}{booktitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{book,collection}{letter}{% - \inherit{title}{booktitle} - \inherit{subtitle}{booksubtitle} - \inherit{titleaddon}{booktitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{mvbook,mvcollection}{letter}{% - \inherit{title}{maintitle} - \inherit{subtitle}{mainsubtitle} - \inherit{titleaddon}{maintitleaddon} - \noinherit{shorttitle} - \noinherit{sorttitle} - \noinherit{indextitle} - \noinherit{indexsorttitle} -} - -\DeclareDataInheritance{*}{*}{% - \noinherit{namea} - \noinherit{nameb} - \noinherit{sortyear} - \noinherit{sortname} - \noinherit{sorttitle}} - -\DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}% -{*}{% ??? - \noinherit{year} - \noinherit{month} - \noinherit{day} - \noinherit{endyear} - \noinherit{endmonth} - \noinherit{endday} - \noinherit{origyear} - \noinherit{origmonth} - \noinherit{origday} - \noinherit{origendyear} - \noinherit{origendmonth} - \noinherit{origendday}} - -% More authordate options % - -\DeclareSortingScheme{cms}{ - \sort{ - \field{presort} - } - \sort[final]{ - \field{sortkey} - } - \sort{ - \name{sortname} - \name{author} - \name{namea} - \name{editor} - \name{nameb} - \name{translator} - \name{namec} - \field{sorttitle} - \field{journaltitle} - \list{organization} - \field{title} - } - \sort{ - \field{sortyear} - \field{labelyear} - \field{year} - \field{origyear} - } - \sort{ - \field{sorttitle} - \field{title} - } - \sort{ - \field[padside=left,padwidth=4,padchar=0]{volume} - \literal{0000} - } -} - -\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4 -{\DeclareLabelname{\field{shortauthor} \field{author}% - \field{shorteditor} \field{namea} \field{editor}% - \field{nameb} \field{translator} \field{namec}}} -{\DeclareLabelname{shortauthor,author,shorteditor,namea,% - editor,nameb,translator,namec}} - -\DeclareEntryOption{switchdates}[true]{% - \settoggle{cms@switchdates}{#1}} - -\DeclareBibliographyOption{strict}[true]{% - \let\splitfootnoterule\footnoterule - \renewcommand\footnoterule{}% - \advance\skip\footins 4\p@\@plus2\p@\relax - \gdef\split@prev{0} - \let\pagefootnoterule\footnoterule - % \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@} - \def\footnoterule{\relax - \ifnum\split@prev=\z@ - \pagefootnoterule - \else - \splitfootnoterule - \fi - \xdef\split@prev{\the\insertpenalties}% - }} - -\protected\def\blx@newcunit{% - \global\let\blx@unitpunct\newcunitpunct - \global\toggletrue{blx@unit}}% - -\appto\blx@blxinit{% - \let\newcunit\blx@newcunit} - -\newcommand*{\newcunitpunct}{\addcomma\space} - -\def\mkbibcurdinal#1{% - \@tempcnta0#1 \the\@tempcnta}% - -\@ifpackagelater{biblatex}{2011/01/04} -{} -{\PackageError{biblatex} - {Outdated 'biblatex' package} - {The Chicago style requires biblatex v1.1 or later.\MessageBreak - You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak - This is a fatal error. I'm aborting now.}% - \endinput} - -% American-specific punctuation change for 16th edition % - -\DefineBibliographyExtras{american}{% - \DeclarePunctuationPairs{comma}{*!?}} - -%%%% Initialize and define bibstrings %%%% - -% \NewBibliographyString{origpubyear} % Already in .lbx files? - -% \DefineBibliographyStrings{american}{% -% origpubyear = {first published\addspace},} - -%%%% This one needed for 16th edition. Others in cms-*.lbx %%%% - -%%%% Macros from authoryear-comp.cbx, revised for CMS %%%% - -\newbibmacro*{cite:init}{% - \ifnumless{\value{multicitecount}}{2} - {\global\boolfalse{cbx:parens}% - \global\undef\cbx@lasthash - \global\undef\cbx@lastyear} - {\iffieldundef{prenote} - {} - {\global\undef\cbx@lasthash - \global\undef\cbx@lastyear}}} - -\newbibmacro*{cite:reinit}{% - \global\undef\cbx@lasthash - \global\undef\cbx@lastyear} - -\newbibmacro*{backref+check}{% - \ifbibliography% - {\backtrackerfalse}% - {}} - -\newbibmacro*{cite}{% - \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} - {\usebibmacro{cite:ibid}}% - {\iffieldequalstr{entrysubtype}{classical}% Similar to notes+bib - {\iffieldundef{shorthand}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% Simplified for CMS - {\usebibmacro{cite:label}% - \setunit{\addspace}% - \usebibmacro{cite:reinit}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cite:label}} - {\iffieldequals{namehash}{\cbx@lastyear}% - {}% - {\usebibmacro{cmsbracketname}% For names in [] - \ifentrytype{customc}% - {\newcunit}% - {\setunit{\addspace}}}% - \usebibmacro{cite:label}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {\savefield{namehash}{\cbx@lastyear}}}}}% - {\usebibmacro{cite:shorthand+title}}} - {\iffieldundef{shorthand}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% Simplified for CMS - {\usebibmacro{cite:label}% - \setunit{\addspace}% - \usebibmacro{cmscitesortdate}% - \usebibmacro{cite:reinit}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cmscitesortdate}} - {\iffieldequals{namehash}{\cbx@lastyear}% Is this right? - {}% - {\usebibmacro{cmsbracketname}% - \setunit{\nameyeardelim}}% - \usebibmacro{cmscitesortdate}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {\savefield{namehash}{\cbx@lastyear}}}}}% - {\usebibmacro{cite:shorthand}}}}% - \setunit{\multicitedelim}}% ??? - -\newbibmacro*{cmsbracketname}{% - \iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{labelname}% - \bibrightbracket}% - {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{labelname}?% - \bibrightbracket}% - {\printnames{labelname}}}} - -\newbibmacro*{citeyear}{% - \iffieldequalstr{entrysubtype}{classical}% - {\iffieldundef{shorthand}% - {\usebibmacro{citeyear:noshort}}% - {\iftoggle{cms@los}% - {\usebibmacro{citeyear:noshort}}% - {\usebibmacro{cite:shorthand+title}}}}% - {\iffieldundef{shorthand}% - {\usebibmacro{citeyear:noshort}}% - {\iftoggle{cms@los}% - {\usebibmacro{citeyear:noshort}}% - {\usebibmacro{cite:shorthand}}}}% - \setunit{\multicitedelim}} - -\newbibmacro*{citeyear:noshort}{% - \iffieldequalstr{entrysubtype}{classical}% Altered for CMS - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {}}} - {\iffieldequals{namehash}{\cbx@lasthash}% - {\iffieldundef{postnote}% - {\setunit{\compcitedelim}}% - {}% - \usebibmacro{cmscitesortdate}} - {\usebibmacro{cmscitesortdate}% - \iffieldundef{postnote}% - {\savefield{namehash}{\cbx@lasthash}}% - {}}}}% - -\newbibmacro*{textcite}{% - \iftoggle{cms@los}% - {\usebibmacro{textcite:authshort}}% - {\usebibmacro{textcite:citeshort}}} - -\newbibmacro*{textcite:authshort}{% - \iffieldequals{namehash}{\cbx@lasthash} - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}}% - {\iffieldundef{shorthand} - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% - {\iffieldequalstr{entrysubtype}{classical}% - {\setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}}% - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}}% - {}% - \usebibmacro{cmscitesortdate}}} - {\printnames{labelname}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}}% - {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}}% - {\printfield{shorthand}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}}% - {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}% - \stepcounter{textcitecount}}% Added ??? - \setunit{% - \ifbool{cbx:parens}% - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}% Not \multicitedelim ??? - -\newbibmacro*{textcite:citeshort}{% - \iffieldequals{namehash}{\cbx@lasthash} - {\iffieldundef{shorthand} - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}}% - {\iffieldundef{postnote}% - {\iffieldequals{namehash}{\cbx@lastyear}% - {\setunit{\multicitedelim}% - \global\undef\cbx@lastyear}% - {\setunit{\compcitedelim}}}% - {\setunit{\multicitedelim}}% - \printtext[bibhyperref]{% - \printfield{shorthand}}}}% - {\ifthenelse{\ifnameundef{labelname}\OR - \ifentrytype{inreference}\OR - \ifentrytype{reference}\OR - \ifentrytype{mvreference}}% - {\iffieldundef{shorthand} - {\iffieldequalstr{entrysubtype}{classical}% - {\setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1}% - {\usebibmacro{prenote}}% - {}% - \usebibmacro{cite:label}} - {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}}% - {}% - \usebibmacro{cmscitesortdate}}}% - {\printtext[bibhyperref]{% - \printfield{shorthand}}}} - {\printnames{labelname}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}}% - {}% - \iffieldundef{shorthand} - {\iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% - {\usebibmacro{cmscitesortdate}}}% - {\printtext[bibhyperref]{% - \printfield{shorthand}}}% - \savefield{namehash}{\cbx@lasthash}}% - \stepcounter{textcitecount}}% Added ??? - \setunit{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}% Not \multicitedelim ??? - -\newbibmacro*{textcite:postnote}{% - \iffieldundef{postnote}% - {}% - {\savefield{namehash}{\cbx@lastyear}% - \setunit{\postnotewrapper}%delim}% - \printfield{postnote}}% - \ifthenelse{\value{multicitecount}=\value{multicitetotal}}% - {\setunit{}% - \printtext{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}}}% - {\setunit{% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}}% - {}% - \textcitedelim}}}% Not \multicitedelim ??? - -\newbibmacro*{cite:shorthand}{% - \iftoggle{cms@los}% - {\iffieldequals{namehash}{\cbx@lasthash}% - {\printtext[bibhyperref]{% - \setunit{\compcitedelim}% - \usebibmacro{cmscitesortdate}}} - {\printtext[bibhyperref]{% - \printfield{shorthand}% - \setunit{\nameyeardelim}% - \usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}}% - {\printtext[bibhyperref]{\printfield{shorthand}}% - \usebibmacro{cite:reinit}}} - -\newbibmacro*{cite:shorthand+title}{% - \iftoggle{cms@los}% - {\iffieldequals{namehash}{\cbx@lasthash}% - {\printtext[bibhyperref]{% - \setunit{\compcitedelim}% - \usebibmacro{cite:label}}} - {\printtext[bibhyperref]{% - \printfield{shorthand}% - \setunit{\nameyeardelim}% - \usebibmacro{cite:label}}% - \savefield{namehash}{\cbx@lasthash}}}% - {\printtext[bibhyperref]{\printfield{shorthand}}% - \usebibmacro{cite:reinit}}} - -\newbibmacro*{cite:label}{% Test this - \iffieldundef{label}% - {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% - \ifentrytype{periodical}}% Simplifies .bib creation - {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}}}% - {\ifentrytype{manual}% - {\printtext[bibhyperref]{\printlist{organization}}}% - {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}}}% - {\printtext[bibhyperref]{\printfield{label}}}} - -\newbibmacro*{cite:labelyear+extrayear}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - }% - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\usebibmacro{cite:standard+labelyear+extrayear}}}} - -\newbibmacro*{cite:standard+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{year}% - {\iffieldundef{eventyear} - {\iffieldundef{origyear}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cite:origfirst+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{origyear}% - {\iffieldundef{year} - {\iffieldundef{eventyear}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cite:av+labelyear+extrayear}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\ifboolexpr{ - test {\ifentrytype{misc}}% - or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% - or - not togl {cms@nodates}% - }% - {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% - \iffieldundef{eventyear}% - {\iffieldundef{origyear} - {\iffieldundef{year}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{urlendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{urlendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}% - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{ - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}} - {\printfield{labelyear}% - \iffieldundef{extrayear}% - {}% - {\setunit*{}% - \printfield{extrayear}}% - \iffieldundef{eventendyear}% DATE FIX - {}% - {\ifboolexpr{ - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - } - {\mbox{\bibdatedash}}% - {}}}}}} - -\newbibmacro*{cmscitesortdate}{% Attempt to solve date-related problems - \ifboolexpr{% - test {\iffieldundef{origyear}}% - or - not test {\iffieldint{origyear}}% - }% - {\usebibmacro{cmsciteyear}}% - {\iffieldint{year}% - {\ifboolexpr{% Needed for date ranges - test {\iffieldundef{endyear}}% - or - not test {\iffieldnum{endyear}}% - }% - {\ifthenelse{\thefield{origyear}>\thefield{year}}% - {\toggletrue{cms@switchdates}% - \usebibmacro{cmsciteyear}}% - {\usebibmacro{cmsciteyear}}}% - {\ifthenelse{\thefield{origyear}>\thefield{endyear}}% - {\toggletrue{cms@switchdates}% - \usebibmacro{cmsciteyear}}% - {\usebibmacro{cmsciteyear}}}}% - {\usebibmacro{cmsciteyear}}}} - -\newbibmacro*{cmsciteyear}{% - \iftoggle{cms@origlabel}% - {\usebibmacro{cite:origyear+labelyear}}% - {\iftoggle{cms@bothlabelnew}% - {\usebibmacro{cite:bothyear+oldstyle}}% - {\iftoggle{cms@bothlabelold}% - {\usebibmacro{cite:bothyear+oldstyle}}% - {\iftoggle{cms@fulldate}% - {\newcunit\printdate}% - {\usebibmacro{cite:labelyear+extrayear}}}}}% - \ifcsdef{@cms@tempdate}% - {\toggletrue{\@cms@tempdate}}% - {}} - -\newbibmacro*{cite:origyear+labelyear}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - } - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@switchdates}% - {\usebibmacro{cite:labelyear+extrayear}}% - {\iffieldundef{origyear}% - {\iftoggle{cms@ordate}% ??? - {}% - {\clearfield{extrayear}}% - \usebibmacro{cite:standard+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \usebibmacro{origyear+endyear}}}}}}} - -\newbibmacro*{cite:bothyear+oldstyle}{% - \ifboolexpr{ ( - test {\ifentrytype{music}}% - or - test {\ifentrytype{review}}% - or - test {\ifentrytype{video}}% - ) - and - togl {cms@avdate}% - } - {\usebibmacro{cite:av+labelyear+extrayear}}% - {\iftoggle{cms@switchdates}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{cite:labelyear+extrayear}% - \bibcloseparen% - \addspace\usebibmacro{origyear+endyear}}}% - {\iffieldundef{origyear}% ??? - {\iftoggle{cms@ordate}% - {}% - {\clearfield{extrayear}}% - \usebibmacro{cite:standard+labelyear+extrayear}}% - {\iftoggle{cms@ordate}% Added test for year field ??? - {\iffieldundef{year}% - {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{cite:origfirst+labelyear+extrayear}% - \bibcloseparen% - \setunit{\addspace}%\addspace% ??? - \usebibmacro{year+endyear}}}}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{origyear+endyear}% - \bibcloseparen% - \clearfield{extrayear}\addspace% - \usebibmacro{cite:standard+labelyear+extrayear}}}}}}} - -\newbibmacro*{cite:save}{% - \savefield{entrykey}{\cbx@lastkey}} - -\newbibmacro*{cite:ibid}{% - \iftoggle{cms@noibid}% - {\blx@ibidreset% - \usebibmacro{cite}}% - {\ifthenelse{\iffieldundef{prenote}\AND% - \iffieldundef{postnote}}% - {\blx@ibidreset% - \usebibmacro{cite}% - \PackageWarning{biblatex-chicago}% - {Empty Ibidem citation}}% - {\toggletrue{cms@inlineibid}}}} - -%%%% Citation Commands, internal and external %%%% - -\DeclareCiteCommand{\cite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand*{\cite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{citeyear}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\parencite}[\mkbibparens] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\setunit{\multicitedelim} - {\usebibmacro{postnote}} - -\DeclareCiteCommand*{\parencite}[\mkbibparens] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{citeyear}} - {}%\setunit{\multicitedelim} - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\footcite}[\mkbibfootnote] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {}%\multicitedelim - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext] - {\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {} - {\usebibmacro{postnote}} - -%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% - -\DeclareCiteCommand{\cbx@textcite} - {\usebibmacro{cite:init}} - {\usebibmacro{citeindex}% - \usebibmacro{textcite}} - {} - {\usebibmacro{textcite:postnote}} - -\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite] - {\gdef\cbx@savedkeys{}% - \citetrackerfalse% - \pagetrackerfalse% - \DeferNextCitekeyHook% - \usebibmacro{cite:init}} - {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} - {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% - \global\clearfield{multipostnote}} - {}% - \xappto\cbx@savedkeys{\thefield{entrykey},}% - \iffieldequals{namehash}{\cbx@lasthash} - {} - {\stepcounter{textcitetotal}% - \savefield{namehash}{\cbx@lasthash}}} - {} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} - -\newrobustcmd{\cbx@textcite@init}[2]{% - \setcounter{textcitetotal}{0}% - \setcounter{textcitecount}{0}% - \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} - -\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{} - -\let\cbx@textcites@init\cbx@textcite@init -\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{} - -\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}% - {\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}% - {\setunit{\multicitedelim}} - -\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]% - {\footcitetext}{\setunit{\multicitedelim}} - -\DeclareCiteCommand{\bibxrefcite} - {\usebibmacro{cite:init}% - \usebibmacro{backref+check}}%\usebibmacro{clearalmostall}} (?) - {\usebibmacro{xref-in:}% - \blx@ibidreset% For authordate style - \usebibmacro{cite}} - {} - {} - -\DeclareCiteCommand{\origfullcite} - {\usebibmacro{backref+check}% - \nopunct\unspace% - \savebibmacro{cmsbibsortdate}% - \renewbibmacro*{cmsbibsortdate}{}}% - {\usedriver - {\DeclareNameAlias{sortname}{default}\clearfield{postnote} - \clearname{author}\clearfield{userf}%\toggletrue{cms@fullnote}% - \toggletrue{cms@headlessnote}\frenchspacing}% - {\thefield{entrytype}}% - \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% - {\multicitedelim}% - {\restorebibmacro{cmsbibsortdate}} - -\DeclareCiteCommand{\origpublcite}% Similar to above, w/o title. - {\usebibmacro{backref+check}% - \nopunct\unspace% - \savebibmacro{cmsbibsortdate}% - \renewbibmacro*{cmsbibsortdate}{}}% - {\usedriver - {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% - \usebibmacro{clearpublin}% - \toggletrue{cms@headlessnote}%\toggletrue{cms@fullnote}% - \toggletrue{cms@origpublished}\frenchspacing}% - {\thefield{entrytype}}% - \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% - {\multicitedelim}% - {\restorebibmacro{cmsbibsortdate}} - -%%%% List Formats %%%% - -\DeclareListFormat{language}{% - \ifthenelse{\value{listcount}=1}% - {\bibleftbracket\bibstring{inlang}%\addspace - for inflected langs. - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}% - \ifthenelse{\value{listtotal}=1}% - {\bibrightbracket}% - {}}% - {\ifthenelse{\value{listcount}=\value{listtotal}}% - {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}% - \bibrightbracket}% - {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} - {#1}}}}% - \usebibmacro{langlist:andothers}} - -\DeclareListFormat{publisher}{% - \ifthenelse{\value{listtotal}<2}% - {#1\isdot}% - {\ifthenelse{\value{listcount}=1}% - {#1}% - {\multipubsdelim #1\isdot}}} - -\DeclareListFormat{periodplace}{\mkbibparens{#1}} - -\DeclareListFormat{lista}{% - \ifthenelse{\value{listtotal}<2} - {s\adddot v\adddot\addspace\mkbibquote{#1\isdot}}% - {\ifthenelse{\value{listcount}=1}% - {s\adddot vv\adddot\addspace \mkbibquote{#1\isdot}\addcomma}% - {\ifthenelse{\value{listcount}<\value{listtotal}}% - {\addspace\mkbibquote{#1\isdot}\addcomma}% - {\addspace\mkbibquote{#1\isdot}}}}} +\RequireCitationStyle{chicago-dates-common} %%%% Field Formats -- Title, Citetitle, Lostitle %%%% @@ -1356,55 +57,6 @@ citation style] \DeclareFieldFormat[letter,patent]{lostitle}{#1\isdot} -\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}\isdot} - -\iftoggle{cms@comprange}% Audrey Boruvka's code from StackExchange -{\patchcmd{\blx@comprange@check}% - {\blx@comprange@comp{#1}{#2}}% - {\blx@tempcnta=#1% - \divide\blx@tempcnta100% - \multiply\blx@tempcnta100% - \ifnumequal{\blx@tempcnta}{#1}% - {\blx@range@out@value{#1\bibrangedash#2}}% - {\blx@comprange@comp{#1}{#2}}}% - {}{}}{}% - -\DeclareFieldFormat{postnote}{% Changed for page compression option - \iftoggle{cms@comprange}% - {\iffieldundef{pagination}% - {\mkcomprange{#1}}% - {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% - {\iffieldundef{pagination}% - {#1}% - {\mkpageprefix[pagination]{#1}}}}% - -\DeclareFieldFormat[inreference]{postnote}{% - \iftoggle{cms@comprange}% - {\iffieldundef{pagination}% - {s\adddot v\adddot\addspace\mkbibquote{#1}}% - {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% - {\iffieldundef{pagination}% - {s\adddot v\adddot\addspace\mkbibquote{#1}}% - {\mkpageprefix[pagination]{#1}}}}% - -\DeclareFieldFormat{pages}{% - \iftoggle{cms@comprange}% - {\iffieldundef{bookpagination}% - {\mkcomprange{#1}\isdot}% - {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}}% - {\iffieldundef{bookpagination}% - {#1\isdot}% - {\mkpageprefix[bookpagination]{#1}}}}% - -\DeclareFieldFormat{bibnote}{\MakeCapital{#1}} - -\DeclareFieldFormat{edlang}{% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{ed#1} - {\bibstring{ed#1}} - {\ifcapital{\MakeCapital{#1}}{#1}}}} - \DeclareFieldFormat[suppbook,suppcollection]{title}{\mkbibemph{#1}\isdot} \DeclareFieldAlias[suppbook]{citetitle}[suppbook]{lostitle} @@ -1414,22 +66,6 @@ citation style] \addspace% \mkbibemph{#1}\isdot} -\DeclareFieldFormat[customc]{title}{% - \iffieldundef{nameaddon}% - {\mkbibemph{\bibstring{see}}% - \addspace% - #1}% - {#1}} - -\DeclareFieldFormat[customc]{citetitle}{% - \ifnameundef{author}% - {#1} - {\iffieldundef{nameaddon}% - {\mkbibemph{\bibstring{see}}% - \addspace% - #1}% - {\printfield{nameaddon}\addspace #1}}} - \DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{lostitle} \DeclareFieldFormat[misc]{title}{% @@ -1457,6 +93,10 @@ citation style] \DeclareFieldFormat{maintitle}{\mkbibemph{#1}} +\DeclareFieldFormat{booksubtitle}{\mkbibemph{#1}} + +\DeclareFieldFormat{mainsubtitle}{\mkbibemph{#1}} + \DeclareFieldFormat[audio,music,video]{title}{% \iffieldundef{booktitle}% {\mkbibemph{#1}\isdot}% @@ -1474,729 +114,24 @@ citation style] \DeclareFieldAlias[audio]{lostitle}[audio]{title} -%%%% Other Field Formats %%%% - -\DeclareNumChars*{:}% - -\DeclareFieldFormat{letterday}{\mkbibcurdinal{#1}} - -\DeclareFieldFormat{note}{% - \ifcapital{\MakeCapital{#1}}{#1}}% - -\DeclareFieldFormat -[audio,manual,music.patent,report,suppbook,suppcollection,thesis,video] -{type}{% - \ifbibstring{#1}% - {\bibstring{#1}}% - {\ifcapital% - {\MakeCapital{#1\isdot}}% - {#1\isdot}}} - -\DeclareFieldFormat[artwork,image]{type}{% - \ifcapital% - {\MakeCapital{#1}}% - {#1}} - -\DeclareFieldFormat{url}{\url{#1}} - -\DeclareFieldFormat{doi}{% - \textrm{doi}\addcolon - \ifhyperref - {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}} - {\nolinkurl{#1}}} - -\DeclareFieldFormat[music]{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% - \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{origyear}% - \OR\NOT\iffieldundef{urlmonth}\OR\NOT\iffieldundef{eventmonth}% - \OR\NOT\iffieldundef{origmonth}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% - \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{urlmonth}% - \OR\NOT\iffieldundef{eventmonth}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat{date}{% Generalize userd ??? - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}}% - {#1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat{urldate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{urldate}{% 16th ed. - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[music]{urldate}{% 16th ed. - \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}% - \OR\NOT\iffieldundef{origyear}}% - {\bibstring{urlseen}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[music]{origdate}{% 16th ed. - \iftoggle{cms@reprint}% Date fix - {#1}% - {\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{recorded}\space #1}% - {\printfield{userd}\addspace #1}}} - -\DeclareFieldFormat[music]{eventdate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{recorded}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldFormat[video]{eventdate}{% 16th ed. - \iffieldundef{userd}% - {\bibstring{broadcast}\space #1}% - {\printfield{userd}\addspace #1}} - -\DeclareFieldAlias{userd}{titleaddon}% 16th ed. - -\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?! - -\DeclareFieldFormat[review]{nameaddon}{#1\bibsentence}% 16th ed. - -\DeclareFieldFormat[customc]{nameaddon}{% For cross-refs - \ifbibstring{#1}% - {\mkbibemph{\bibstring{#1}}}% - {#1}}% - -\DeclareFieldFormat{edition}{% New in 0.8 - \ifinteger{#1} - {\mkbibordedition{#1}~\bibstring{edition}}% - {\ifcapital - {\MakeCapital{#1\isdot}}% - {#1\isdot}}} - -\DeclareFieldFormat{usere}{[#1]} % Better than mkbibbrackets? - -\DeclareFieldFormat{titleaddon}{% - \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}%\custpunctc? - -\DeclareFieldAlias{booktitleaddon}{titleaddon} - -\DeclareFieldAlias{maintitleaddon}{titleaddon} - \DeclareFieldFormat{issuetitle}{\mkbibquote{#1\isdot}} -\DeclareFieldFormat{jourser}{% - \ifinteger{#1}% - {\mkbibordseries{#1}% - \addnbspace% - \bibstring{jourser}}% - {\ifbibstring{#1}{\bibstring{#1}}{#1}}} - -\DeclareFieldFormat{journum}{% Revised for 0.9.5 - \ifboolexpr{% - test {\ifnumerals{#1}}% - and - not test {\ifnumeral{#1}}% - }% - {\bibstring{numbers}\addspace #1}% - {\bibstring{number}\addspace #1}} - -\DeclareFieldFormat{sernum}{% - \ifnumeral{#1}% - {\addnbspace #1}% - {\addcomma\addspace #1}} - -\DeclareFieldFormat{addendum}{% - \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} - -% This works better here than in the entrytail macro -- userf use is -% no longer a problem, though the page breaking still isn't ideal. - -\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1} - -\DeclareFieldFormat{part}{% - \ifnumerals{#1}% - {\addcomma\addspace\bibstring{partvolume}~#1}% - {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}} - -\DeclareFieldAlias[review]{volume}[article]{volume} - -\DeclareFieldAlias[suppperiodical]{volume}[article]{volume} - -%%%% Commands, for users and internal %%%% - -\newcommand*{\cbytypeeditor}{% Needed? - \iffieldundef{editortype} - {\bibstring{cbytypeeditor}} - {\bibstring{cbytype\thefield{editortype}}}} - -\renewcommand*{\multicitedelim}{\addsemicolon\space} - -\renewcommand*{\iffinalcitedelim}{% - \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} - -\renewcommand*{\nameyeardelim}{% - \ifthenelse{\iffieldundef{labelyear}\OR% - \iffieldequalstr{labelyear}{nodate}}% - {\addcomma\addspace}% - {\iffieldundef{origyear}% Is this test correct? - {\iffieldundef{year}% - {\addspace} - {\NumCheckSetup{\renewcommand{\mkbibbrackets}{\expandonce}% - \DeclareNumChars*{[?]s}}% For bracketed dates, and decades. - \iffieldnums{year}% This one works. - {\addspace}% - {\addcomma\addspace}}}% 16th ed. wants comma before n.d. - {\addspace}}} - -\newcommand{\classicpunct}{% - \ifthenelse{\iffieldequalstr{entrysubtype}{classical}\OR% - \ifentrytype{letter}}% - {\setunit*{\addspace}}% - {\setunit*{\addcomma\addspace}}} - -\newcommand{\postvolpunct}{\addcolon}% - -\newcommand{\parttrans}{% - {\bibstring{bytranslator}\space}}% - -\newcommand{\partedit}{% - \iftoggle{cms@postposit}% Kludge to make it work in French. - {\bibstring{byeditoralt}\addspace}% - {\bibstring{byeditor}\addspace}}% - -\newcommand{\partcomp}{% - {\bibstring{bycompiler}\space}}% - -\newcommand{\parteditandcomp}{% - {\bibstring{byeditorcp}\space}}% - -\newcommand{\parttransandcomp}{% - {\bibstring{bytranslatorcp}\space}}% - -\newcommand{\partedittransandcomp}{% - {\bibstring{byeditortrcp}\space}}% - -\newcommand{\parteditandtrans}{% - {\bibstring{byeditortr}\space}}% - -\newcommand{\reprint}{\bibstring{reprint}}% - -\newcommand*{\multipubsdelim}{\addnbspace/\addspace} - -\newcommand*{\multilocsdelim}{% - \ifthenelse{\value{listcount}<\value{liststop}}% - {\ifthenelse{\numexpr\value{listcount}+1<\value{liststop}}% - {\addcomma\addspace}% - {\ifthenelse{\value{liststop}>2}% - {\addcomma\addspace\bibstring{and}\addspace}% - {\addspace\bibstring{and}\addspace}}}% - {}} - -\newcommand*{\multilangdelim}{% - \ifthenelse{\value{listtotal}<3}% - {\addspace\bibstring{and}\addspace}% - {\ifthenelse{\value{listcount}<\value{listtotal}}% - {\addcomma\addspace}% - {\addcomma\addspace\bibstring{and}\addspace}}} - -\renewcommand*{\postnotedelim}{% - \iftoggle{cms@inlineibid}% - {\togglefalse{cms@inlineibid}% - \iffieldundef{prenote}% Bug fix - {}% - {\addspace}}% - {\iffieldequalstr{entrysubtype}{classical}% For Notes+Bib, too? - {\NumCheckSetup{\DeclareNumChars*{abcdeABCDE}}% - \iffieldpages{postnote}% - {\addspace}% - {\addcomma\addspace}}% - {\addcomma\addspace}}} - -\newcommand*{\postnotewrapper}{% - \iftoggle{cms@modpostnote}% - {\ifboolexpr{% - test {\iffieldstart{postnote}{,}}% - or - test {\iffieldstart{postnote}{\bibrangessep}}% - }% - {\addcomma}% w/ or w/o \addspace? - {\ifboolexpr{% - test {\iffieldstart{postnote}{;}}% - or - test {\iffieldstart{postnote}{:}}% - or - test {\iffieldstart{postnote}{.}}% - }% - {}{\postnotedelim}}}% - {\postnotedelim}}% - -\newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from - \begingroup% comp.text.tex - \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} - -\newcommand*{\editordelim}{% Otherwise you get an inaccurate comma. - \iffieldequalstr{editortype}{none}% - {\addperiod\addspace}% - {\addcomma\addspace}} - -\newcommand*{\lbx@cfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{cfrom\thefield{origlanguage}}}}% - {\unspace}} - -\@ifpackagelater{biblatex}{2011/11/12} -{\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}} -{\@ifpackagelater{biblatex}{2011/07/28} - {\newcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}}% - {\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}}} - -\renewcommand*{\lbx@lfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\biblstring{from\thefield{origlanguage}}}}% - {\unspace}} - -\renewcommand*{\lbx@sfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} - {\bibsstring{from\thefield{origlanguage}}}}% - {\unspace}} - %%%% Formatting macros, called both by cbx and bbx %%%% -\newbibmacro*{finentry}{%{\finentry} To make annotated bibliography - \ifbibliography - {\usebibmacro{entrytail}}% - {}% - \finentry} - -\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography - \newunit\newblock - \iftoggle{cms@annotation}% - {\usebibmacro{annotation}% - \newunit\newblock} - {}}% - -\newbibmacro*{author+holder}{% - \ifnameundef{author} - {\let\bbx@lasthash\undefined} - {\usebibmacro{author/editor}% - \ifthenelse{\ifnameundef{holder}\OR - \ifnamesequal{author}{holder}} - {} - {\setunit{\addspace}% - \printtext[parens]{\printnames{holder}}}}} - -\renewbibmacro*{byauthor}{% - \ifthenelse{\ifuseauthor\OR - \ifnameundef{author}} - {} - {\bibstring{by}\addspace - \printnames[byauthor]{author}}} - -\newbibmacro*{byauthorpunct}{% - \ifthenelse{\ifuseauthor\OR\ifnameundef{author}}% - {\addperiod\addspace}% - {\newcunit}} - -\renewbibmacro*{bybookauthor}{% - \ifnameundef{bookauthor} - {} - {\ifnamesequal{author}{bookauthor} - {} - {\bibstring{by}\addspace\printnames[default]{bookauthor}% - \newcunit\newblock}}} - -\newbibmacro*{editorpunct}{% - \ifthenelse{\(\iffieldundef{booktitle}\AND% - \iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)% - \OR\iffieldsequal{booktitle}{title}% Changed these for crossrefed - \OR\iffieldsequal{maintitle}{title}}% entries. Create problems? - {\ifentrytype{video}% - {\newcunit\newblock}% - {\newunit\newblock}}% - {\newcunit\newblock}} - -\newbibmacro*{edition}{% - \printfield{edition}% - \clearfield{edition}}% - -\newbibmacro*{inforaft}{% - \ifnameundef{introduction}% - {\ifnameundef{afterword}% - {\ifnameundef{foreword}% - {\printfield{type}}% - {\bibstring{forewordto}% - \clearname{foreword}}}% - {\bibstring{afterwordto}% - \clearname{afterword}}}% - {\bibstring{introductionto}% - \clearname{introduction}}} - -\newbibmacro*{langlist:andothers}{% - \ifthenelse{\value{listcount}=\value{liststop}\AND - \ifmoreitems} - {\ifnum\value{liststop}>1 \finalandcomma\fi - \andmoredelim\bibstring{andmore}\bibrightbracket} - {}} - -\newbibmacro*{reference+title}{% - \ifthenelse{\iffieldequals{title}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% - {\usebibmacro{italtitle+stitle}% - \savefield{title}{\bbx@lasthash}}} - -\newbibmacro*{mag+news+author}{% - \ifnameundef{author}% - {\ifthenelse{\iffieldequals{journaltitle}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% - {\usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \savefield{journaltitle}{\bbx@lasthash}}}% - {\usebibmacro{author}}} - -\newbibmacro*{cmag+news+author}{% - \ifnameundef{author}% - {\usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}}% - {\usebibmacro{author}}} - -\newbibmacro*{type+inst+year}{% - \printfield{type} - \newcunit - \printlist{institution}% - \setunit*{\addcomma\space}% - \printfield{year}} - -\newbibmacro*{institution+organization}{% - \iflistundef{organization}% - {\iflistundef{institution}% - {}% - {\printlist{institution}}}% - {\printlist{organization}% - \newcunit% - \printlist{institution}}} - -\newbibmacro*{author+org}{% - \ifnameundef{author}% - {\ifnameundef{editor}% - {\iflistundef{organization}% - {\let\bbx@lasthash\undefined}% - {\ifboolexpr{ - test {\iflistequals{organization}{\bbx@lasthash}}% - and - not test {\iffirstonpage}% - }% - {\bibnamedash\addperiod\addspace}% - {\iftoggle{cms@authorparens}% - {\bibopenparen\printlist{organization}\bibcloseparen}% - {\printlist{organization}}% - \savelist{organization}{\bbx@lasthash}}}}% - {\usebibmacro{editor}}}% - {\usebibmacro{author/editor}}} - -\newbibmacro*{cbytypestrg}[2]{% - \iffieldundef{#1type} - {\bibstring{by#2}} - {\bibstring{by\thefield{#1type}}}} - -\newbibmacro*{cbyeditor}{% - \ifnameundef{editor} - {} - {\usebibmacro{cbytypestrg}{editor}{editor}% - \setunit{\addspace}% - \printnames[byeditor]{editor}% - \newcunit}% - \usebibmacro{cbyeditorx}} - -\newbibmacro*{cbyeditorx}{% - \ifnameundef{editora} - {} - {\usebibmacro{cbytypestrg}{editora}{editor}% - \setunit{\addspace}% - \printnames[byeditora]{editora}% - \newcunit}% - \ifnameundef{editorb} - {} - {\usebibmacro{cbytypestrg}{editorb}{editor}% - \setunit{\addspace}% - \printnames[byeditorb]{editorb}% - \newcunit}% - \ifnameundef{editorc} - {} - {\usebibmacro{cbytypestrg}{editorc}{editor}% - \setunit{\addspace}% - \printnames[byeditorc]{editorc}% - \newcunit}} - -\newbibmacro*{cbytranslator}{% - \ifnameundef{translator} - {} - {\bibstring{bytranslator}% - \addspace - \printnames[bytranslator]{translator}}} - -\newbibmacro*{cbycompiler}{% - \ifnameundef{namec} - {} - {\bibstring{cbycompiler}\addspace - \printnames[bycompiler]{namec}}} - -\newbibmacro*{cbyredactor}{% - \ifnameundef{redactor} - {} - {\bibstring{cbyredactor}\addspace - \printnames[byredactor]{redactor}}} - -\newbibmacro*{cwithcommentator}{% - \ifnameundef{commentator} - {} - {\bibstring{withcommentator}\addspace - \printnames[withcommentator]{commentator}}} - -\newbibmacro*{cwithannotator}{% - \ifnameundef{annotator} - {} - {\bibstring{withannotator}\addspace - \printnames[withannotator]{annotator}}} - -\newbibmacro*{cwithintroduction}{% - \ifnameundef{introduction} - {} - {\bibstring{withintroduction}\addspace - \printnames[withintroduction]{introduction}}} - -\newbibmacro*{cwithforeword}{% - \ifnameundef{foreword} - {} - {\bibstring{withforeword}\addspace - \printnames[withforeword]{foreword}}} - -\newbibmacro*{cwithafterword}{% - \ifnameundef{afterword} - {} - {\bibstring{withafterword}\addspace - \printnames[withafterword]{afterword}}} - -\newbibmacro*{cbyeditor+others}{% - \ifthenelse{\NOT\ifnameundef{editor}\AND - \(\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}\)} - {\def\@tempa{cbyeditor}% - \ifnamesequal{editor}{translator} - {\edef\@tempa{\@tempa tr}% - \clearname{translator}} - {}% - \ifnamesequal{editor}{namec} - {\edef\@tempa{\@tempa cp}% - \clearname{namec}} - {}% - \ifnamesequal{editor}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{editor}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{editor}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{editor}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{editor}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[byeditor]{editor}% - \clearname{editor}% - \newcunit% - \usebibmacro{cbyeditorx}}% - {\usebibmacro{cbyeditor}}% - \usebibmacro{cbytranslator+others}} - -\newbibmacro*{cbytranslator+others}{% - \ifnameundef{translator} - {} - {\def\@tempa{cbytranslator}% - \ifnamesequal{translator}{namec} - {\edef\@tempa{\@tempa cp}% - \clearname{namec}} - {}% - \ifnamesequal{translator}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{translator}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{translator}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{translator}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{translator}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[bytranslator]{translator}% - \clearname{translator}% - \newcunit}% - \usebibmacro{cbycompiler+others}} - -\newbibmacro*{cbycompiler+others}{% - \ifnameundef{namec} - {} - {\def\@tempa{cbycompiler}% - \ifnamesequal{namec}{commentator} - {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{namec}{annotator} - {\edef\@tempa{\@tempa an}% - \clearname{annotator}} - {}}% - \ifnamesequal{namec}{introduction} - {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{namec}{foreword} - {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{namec}{afterword} - {\edef\@tempa{\@tempa af}% - \clearname{afterword}} - {}}}% - \bibstring{\@tempa}\space - \printnames[bycompiler]{namec}% - \clearname{namec}% - \newcunit}% - \usebibmacro{cbyothers}} - -\newbibmacro*{cbyothers}{% - \usebibmacro{cbytranslator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cbycompiler}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cbyredactor}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithcommentator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithannotator}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithintroduction}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithforeword}% - \setunit*{\addcomma\addspace}% - \usebibmacro{cwithafterword}} - -\newbibmacro*{cms-in:}{% Fix for 0.9a compat. - \iftoggle{cms@origpublished}% - {}% - {\bibstring{in}% - \setunit{\addspace}}} - -\newbibmacro*{xref-in:}{% - \iffieldundef{volume}{}{\savefield{volume}{\cbx@incollvol}}% - \iffieldundef{part}{}{\savefield{part}{\cbx@incollpart}}% - \usebibmacro{cms-in:}} - -\newbibmacro*{chapincoll}{% - \iffieldundef{chapter}% - {} - {\printfield{chapter}\addspace}} - -\newbibmacro*{chapinscore}{% - \iffieldundef{chapter}% - {\ifthenelse{\ifentrytype{music}% - \AND\NOT\iffieldundef{booktitle}}% - {\bibstring{on}\setunit{\addspace}}% - {}}% - {\printfield{chapter}% - \addspace\bibstring{of}\setunit{\addspace}}} - -\newbibmacro*{music+ser+num}{% - \iffieldundef{series}% - {\iffieldundef{number}% - {}% - {\printfield{number}}} - {\printfield{series}% - \setunit{\addspace}% - \printfield{number}}}% - -\newbibmacro*{music+publisher}{% - \iffieldundef{howpublished}% - {\iffieldundef{pubstate}% - {}% - {\printfield{pubstate}}}% - {\printfield{howpublished}}}% - -\newbibmacro*{music+origdate}{% - \iftoggle{cms@reprint}% 16th ed. - {}% - {\iftoggle{cms@switchdates}% Date fix - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\usebibmacro{cmsorigdate}}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {}% - {\usebibmacro{cmsorigdate}}}}}% - -\newbibmacro*{music+eventdate}{% Date fix - \ifthenelse{\iffieldundef{eventyear}\AND\iffieldundef{eventmonth}}% - {}% - {\printeventdate}} - -\newbibmacro*{ser+num}{% - \printfield{series}% - \printfield[sernum]{number}% - \newunit} - \newbibmacro*{video+title}{% Simplifies trad style. - \printtext[title]{% - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}} + \iffieldundef{title}% + {}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}} \newbibmacro*{italtitle+stitle}{% \printtext[title]{% - \printfield[noformat]{title}% + \printfield[tnoformat]{title}% \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \newunit\newblock% + \printfield[stnoformat]{subtitle}}% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -2207,404 +142,123 @@ citation style] \printfield[noformat]{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \newunit%\setunit{\addcomma\addspace} + \setunit{\ptitleaddonpunct}%\setunit{\addcomma\addspace} \printfield{titleaddon}% }%\newcunit\newblock -\newbibmacro*{language+transtitle}{% - \iffieldundef{usere}% - {\printlist[][-\value{listtotal}]{language}}% - {\printfield{usere}}} - \newbibmacro*{issuetitle}{% \iffieldundef{issuetitle}% - {} + {}% {\ifthenelse{\ifentrytype{article}\OR% \ifentrytype{review}\OR% \ifentrytype{suppperiodical}}% This test is for {\usebibmacro{cms-in:}}% periodical entries {}% \printtext[issuetitle]{% - \printfield[noformat]{issuetitle}% + \printfield[itnoformat]{issuetitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{issuesubtitle}}}} - -\newbibmacro*{publ+loc+year}{% - \printlist{location}% - \iflistundef{publisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}% - \printlist{publisher}% - \setunit*{\addcomma\addspace} - \usebibmacro{date}% For the author-date style. Tricky. -}% - -\newbibmacro*{origpubl+loc+year}{% 16th ed. - \printlist{origlocation}% - \iflistundef{origpublisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}% - \printlist{origpublisher}% -% \setunit*{\addcomma\addspace}% -% \usebibmacro{cmsorigdate}% -} - -\newbibmacro*{howpubl+loc+year}{% - \printlist{location}% - \iffieldundef{howpublished}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% - \printfield{howpublished}% - \setunit*{\addcomma\space}% - \usebibmacro{date}% -}% - -\newbibmacro*{inst+loc+year}{% - \printlist{location}% - \iflistundef{institution}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% - \printlist{institution}% - \setunit*{\addcomma\space}% - \usebibmacro{date}% -}% - -\newbibmacro*{originally+published+as}{% Punctuation fix now in - \iffieldundef{userf}% \origfullcite for 0.8e. - {\iffieldundef{reprinttitle}% - {} - {\bibstring{origpublin}% - \origpublcite{\thefield{reprinttitle}}% - \newunit}} - {\iffieldundef{origlanguage}% - {\bibstring{origpub}% - \origfullcite{\thefield{userf}} - \newunit}% - {\iftoggle{cms@postposit}% - {\bibstring{origedition}% - \setunit{\addspace}% - \printfield[edlang]{origlanguage}% - \addcolon% - \origfullcite{\thefield{userf}}% - \newunit}% - {\printfield[edlang]{origlanguage}% - \setunit{\addspace}% - \bibstring{origedition}% - \origfullcite{\thefield{userf}} - \newunit}}}} - -\newbibmacro*{org+publ+loc+year}{% What was wrong with \ifthenelse here? - \printlist{location}% - \iflistundef{organization}% - {\iflistundef{publisher}% - {\setunit*{\addcomma\addspace}}% - {\setunit*{\addcolon\addspace}}}% - {\setunit*{\addcolon\addspace}}% - \printlist{organization}% - \setunit*{\addcomma\space}% - \printlist{publisher}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}} - -\newbibmacro*{year+in+parens}{% - \iffieldundef{volume}% - {noformat}% - {parens}} - -\newbibmacro*{letter+date}{% New for 0.9 - \iflistundef{origlocation}% - {}% - {\printlist{origlocation}% - \newcunit\newblock}% - \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {}% - {\cms@datelong}}} - -\newbibmacro*{unpubl+letter+date}{% For the Misc type. - \iflistundef{origlocation}% - {}% - {\printlist{origlocation}% - \newcunit\newblock}% - \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% - {\printdate}% For interviews and other dated non-letters - {\cms@datelong}}} - -\newbibmacro*{cmsbookdate}{% - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{origyear}}% - {\newunit}% - {\iftoggle{cms@switchdates}% - {\iffieldundef{origyear}% - {\newunit}% - {\newcunit\printorigdate}}% - {\iffieldundef{year}% - {\newunit}% - {\newcunit\printdate}}}} + \printfield[sitnoformat]{issuesubtitle}}}} -\renewbibmacro*{date}{% Adding the test solved some issues in 0.9 with - \iftoggle{cms@switchdates} - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth} - \AND\iffieldundef{origday}}% - {}% - {\printorigdate}}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month} - \AND\iffieldundef{day}}% punctuation in some entry types (Misc). The - {}% whole \printdate thing may need further work. - {\printdate}}} - -\newcommand*{\cms@datelong}{% Modified for 0.9 - \iffieldundef{origmonth}% - {\printfield{origyear}}% - {\printfield[letterday]{origday}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% - \printfield{origyear}}}% - -\newcommand*{\cms@datelongalt}{% Modified for 0.9 - \iffieldundef{month}% - {\printfield{year}}% - {\printfield[letterday]{day}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% - \printfield{year}}}% - -\newcommand*{\letterdatelong}{% Modified for 0.9 - \iftoggle{cms@switchdates}% This one for users - {\iffieldundef{year}% Previous two for internal use - {}% - {\iffieldundef{month}% - {\printfield{year}}% - {\printfield[letterday]{day}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% - \printfield{year}}}}% - {\iffieldundef{origyear}% - {}% - {\iffieldundef{origmonth}% - {\printfield{origyear}}% - {\printfield[letterday]{origday}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% - \printfield{origyear}}}}}% - -\newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, - \printtext[title]{% article subtype - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \setunit*{\addspace}% - \iffieldundef{series} - {} - {\newcunit - \printfield[jourser]{series}% - \newcunit}%\setunit*{\addspace}? - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}}% - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}% need * here? - \printfield[journum]{number}% - \clearfield{number}% - \setunit{\addcomma\addspace}}% - \printfield{eid}% - \newunit} - -\newbibmacro*{journal+sub}{% - \iffieldundef{journaltitle} - {} - {\printtext[journaltitle]{% - \printfield[noformat]{journaltitle}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{journalsubtitle}}}} - -\newbibmacro*{chap+pag}{% - \printfield{chapter}% - \setunit*{\addcomma\space}% - \printfield{pages}} - -\newbibmacro*{mag+news+date}{% - \ifnameundef{author}% - {\usebibmacro{date+issue}}% - {\usebibmacro{mag+date+issue}}} - -\newbibmacro*{date+issue}{% - \iffieldundef{issue} - {\iffieldundef{number}% - {\usebibmacro{date}}% - {\iftoggle{cms@numbermonth}% - {\usebibmacro{date}}% - {\usebibmacro{cmsyear}}% - \setunit*{\addcomma\addspace}% Starred version for when the - \printfield[journum]{number}}}% month isn't printed because of - {\printfield{issue}% the toggle. - \setunit{\addspace}% - \usebibmacro{cmsyear}}} - -\newbibmacro*{mag+date+issue}{% - \usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \newcunit\newblock - \printfield{usera}% For network ID and possible section of newspaper. - \newcunit\newblock - \usebibmacro{date+issue}} - -\newbibmacro*{cmsyear}{% - \iftoggle{cms@switchdates}% - {\printfield{origyear}}% - {\printfield{year}}} - -\newbibmacro*{cmsorigdate}{% New for 0.9 - \iftoggle{cms@switchdates}% - {\printdate}% - {\printorigdate}} - -\newbibmacro*{periodical+date+issue}{% For periodical type & - \printtext[title]{% magazine subtype - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \newcunit\newblock - \printfield{usera}% For network ID and possible section of newspaper. - \newcunit\newblock - \usebibmacro{date+issue}} - -\renewbibmacro*{postnote}{% - \iffieldundef{postnote}% - {}% - {\setunit{\postnotewrapper}%delim}% - \printfield{postnote}}} +%%%% Related macros that can't reside in common.cbx %%%% -\newbibmacro*{part+editor+translator}{% - \ifnameundef{namea}% - {\ifnameundef{nameb}% - {} - {\bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}% -{\ifnamesequal{namea}{nameb}% - {\bibstring{byeditortr}\space% - \printnames[byeditor]{namea}}% - {\bibstring{byeditor}\space% - \printnames[byeditor]{namea}% - \ifnameundef{nameb}% - {} - {\newunit - \bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}}} - -\newbibmacro*{compilestrg}{% - \ifthenelse{\value{namec}>1\OR\ifandothers{namec}} - {\bibstring{compilers}} - {\bibstring{compiler}} - \clearname{namec}} - -\newbibmacro*{transstrg}{% - \ifthenelse{\value{translator}>1\OR\ifandothers{translator}} - {\ifnamesequal{translator}{namec}% - {\bibstring{transcompilers}% - \clearname{namec}}% - {\bibstring{translators}}}% - {\ifnamesequal{translator}{namec}% - {\bibstring{transcompiler}% - \clearname{namec}}% - {\bibstring{translator}}} - \clearname{translator}} - -\newbibmacro*{parttransstrg}{% - \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}} - {\ifnamesequal{nameb}{namec}% - {\bibstring{transcompilers}% - \clearname{namec}}% - {\bibstring{translators}}}% - {\ifnamesequal{nameb}{namec}% - {\bibstring{transcompiler}% - \clearname{namec}}% - {\bibstring{translator}}} - \clearname{nameb}} - -\newbibmacro*{editstrg}{% Test added for 0.9 - \ifthenelse{\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}} - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} - {\bibstring{editortranscompilers}% - \clearname{translator}% - \clearname{namec}}% - {\ifnamesequal{editor}{namec}% - {\bibstring{editorcompilers}% - \clearname{namec}}% - {\ifnamesequal{editor}{translator}% - {\bibstring{editortranslators}% - \clearname{translator}}% - {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} - {\bibstring{editortranscompiler}% - \clearname{translator}% - \clearname{namec}}% - {\ifnamesequal{editor}{namec}% - {\bibstring{editorcompiler}% - \clearname{namec}}% - {\ifnamesequal{editor}{translator}% - {\bibstring{editortranslator}% - \clearname{translator}}% - {\bibstring{editor}}}}}}% - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\bibstring{\thefield{editortype}s}} - {\bibstring{\thefield{editortype}}}} - \clearname{editor}} - -\newbibmacro*{parteditstrg}{% - \ifthenelse{\value{namea}>1\OR\ifandothers{namea}} - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} - {\bibstring{editortranscompilers}% - \clearname{nameb}% - \clearname{namec}}% - {\ifnamesequal{namea}{namec}% - {\bibstring{editorcompilers}% - \clearname{namec}}% - {\ifnamesequal{namea}{nameb}% - {\bibstring{editortranslators}% - \clearname{nameb}}% - {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} - {\bibstring{editortranscompiler}% - \clearname{nameb}% - \clearname{namec}}% - {\ifnamesequal{namea}{namec}% - {\bibstring{editorcompiler}% - \clearname{namec}}% - {\ifnamesequal{namea}{nameb}% - {\bibstring{editortranslator}% - \clearname{nameb}}% - {\bibstring{editor}}}}}% - \clearname{namea}} - -\newbibmacro*{clearpublin}{% - \clearname{author}% - \clearname{namea}% - \clearname{nameb}% - \clearfield{nameaddon}% - \ifthenelse{\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR% - \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR% - \ifentrytype{mvreference}}% - {}% - {\clearfield{title}% - \clearfield{subtitle}% - \clearfield{titleaddon}}% - \clearfield{reprinttitle}% - \clearfield{usere}% - \clearlist{language}% -} +\DeclareFieldFormat{title:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibemph{#1}} + +\DeclareFieldFormat{ititle:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibquote{#1}} + +\DeclareFieldFormat{chapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1\addspace\bibstring{in}} + +\DeclareFieldFormat{avchapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1} + +\DeclareFieldFormat{sitnoformat}{#1} +\DeclareFieldFormat{sjtnoformat}{#1} +\DeclareFieldFormat{stnoformat}{#1} +\DeclareFieldFormat{itnoformat}{#1} +\DeclareFieldFormat{jtnoformat}{#1} +\DeclareFieldFormat{jtsnoformat}{#1} +\DeclareFieldFormat{tnoformat}{#1} + +\newbibmacro*{cms:titlehook}{% Needed for the full drivers in reprintfrom + \ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR% + \ifentrytype{inbook}\OR\ifentrytype{incollection}\OR% + \ifentrytype{inproceedings}\OR\ifentrytype{letter}\OR% + \ifentrytype{music}\OR\ifentrytype{video}\)}% + {\iffieldundef{issuetitle}% + {\iffieldundef{title}% + {\iffieldundef{booktitle}% + {\iffieldundef{maintitle}% + {\iffieldundef{journaltitle}% + {}% + {\DeclareFieldAlias{jtnoformat}{title:hook}% + \DeclareFieldAlias{sjtnoformat}{title}% + \DeclareFieldAlias{journaltitle}{default}% + \DeclareFieldAlias{shortjournal}{series}% + \DeclareFieldAlias{jtsnoformat}{title:hook}}}% + {\DeclareFieldAlias{maintitle}{title:hook}}}% + {\DeclareFieldAlias{booktitle}{title:hook}}}% + {\DeclareFieldAlias{tnoformat}{title:hook}% + \DeclareFieldAlias{stnoformat}{citetitle}% + \DeclareFieldAlias[video]{title}{default}% + \DeclareFieldAlias[audio]{title}{default}% + \DeclareFieldAlias[music]{title}{default}% + \DeclareFieldAlias{title}{default}% + \DeclareFieldAlias[periodical]{shorttitle}{series}}}% + {\iffieldundef{issuesubtitle}% + {\DeclareFieldAlias{itnoformat}{ititle:hook}% + \DeclareFieldAlias{issuetitle}{default}}% + {\DeclareFieldAlias{issuetitle}{ititle:hook}}}}% + {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% + \ifentrytype{video}}% + {\iffieldundef{title}% + {\DeclareFieldAlias{chapter}{avchapter:hook}}% + {\DeclareFieldAlias{tnoformat}{title:hook}% + \DeclareFieldAlias{stnoformat}{citetitle}% + \DeclareFieldAlias[video]{title}{default}% + \DeclareFieldAlias[audio]{title}{default}% + \DeclareFieldAlias[music]{title}{default}}}% + {\DeclareFieldAlias{chapter}{chapter:hook}}}}% \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx new file mode 100644 index 00000000000..c0b4b338168 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx @@ -0,0 +1,3075 @@ +% $Id: chicago-dates-common.cbx,v 0.9.1.21 2016/06/07 09:00:02 dfussner Exp $ +% This is a biblatex citation style file, adapted from Lehman's +% authoryear-comp.cbx. It is heavily modified, and contains the +% common code for providing inline citations (and a reference list) +% for the two author-date styles of the Chicago Manual of Style, 16th +% edition. + +\ProvidesFile{chicago-dates-common.cbx}[2016/06/07 v 3.4 biblatex +citation style] + +%%%% Biblatex initialization + Chicago options + Toggles %%%% + +\newbool{cbx:parens} + +\providecommand*{\mkibid}[1]{#1} + +\providetoggle{cms@inlineibid} +\providetoggle{cms@origlabel} +\providetoggle{cms@bothlabelold} +\providetoggle{cms@bothlabelnew} +\providetoggle{cms@fulldate} +\providetoggle{cms@reprint} +\providetoggle{cms@switchdates} +\providetoggle{cms@los} +%\providetoggle{cms@oneyear} +\providetoggle{cms@avdate} +\providetoggle{cms@ordate} +\providetoggle{cms@nodates} +\providetoggle{cms@authorparens} +\providetoggle{cms@datedash} +\providetoggle{cms@modpostnote} + +\providetoggle{cms@url}% These are for the field-exclusion options +\providetoggle{cms@doi} +\providetoggle{cms@doionly} +\providetoggle{cms@eprint} +\providetoggle{cms@isbn} +\providetoggle{cms@numbermonth} +\providetoggle{cms@bookpages} +\providetoggle{cms@hidevolumes}% Modify Volume fix +\providetoggle{cms@comprange} + +\providetoggle{cms@jrcomma}% Comma after Jr./Sr. + +\providetoggle{cms@headlessnote}% Keep +\providetoggle{cms@noibid}% Keep +\providetoggle{cms@usecompiler}% Keep +\providetoggle{cms@origpublished}% Keep +\providetoggle{cms@annotation}% Keep +\providetoggle{cms@postposit}% Keep +\providetoggle{cms@fullshhand}% +\providetoggle{cms@vol}% +\providetoggle{cms@crossref}% +\providetoggle{cms@bookcrossref} +\providetoggle{cms@gencite} +\providetoggle{cms@genallnames} +\providetoggle{cms@xrefurl} +\providetoggle{cms@related} + +\AtEveryCitekey{% + \iffieldundef{userc}% + {}% + {\nocite{\thefield{userc}}}% + \iffieldequalstr{pubstate}{reprint}% + {\toggletrue{cms@reprint}}% + {\togglefalse{cms@reprint}}}% + +\protected\def\cms@warning@noline#1{% + \begingroup + \blx@safe@actives + \PackageWarningNoLine{biblatex-chicago}{#1}% + \endgroup}% + +\DeclareBibliographyOption{avdate}[true]{% + \ifcsdef{cms@opt@avdate@#1}% + {\csuse{cms@opt@avdate@#1}}% + {\blx@err@invopt{avdate=#1}{}}}% +\def\cms@opt@avdate@true{% + \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 + {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. + {\DeclareLabeldate[music,review,suppperiodical,video]{\field{eventyear}% + \field{origyear} \field{year} \field{urlyear}}}% + {\DeclareLabelyear[music,review,suppperiodical,video]{\field{eventyear}% + \field{origyear} \field{year} \field{urlyear}}}}% + {\DeclareLabelyear[music,review,suppperiodical,video]% + {eventyear,origyear,year,urlyear}}% + \toggletrue{cms@avdate}}% +\def\cms@opt@avdate@false{% + \togglefalse{cms@avdate}}% + +\DeclareBibliographyOption{cmsdate}[off]{% Trying to implement origyear as + \ifcsdef{cms@global@cmsdate@#1}% labelyear. Sorting will be an issue. + {\csuse{cms@global@cmsdate@#1}}% + {\blx@err@invopt{cmsdate=#1}{}}}% +\def\cms@global@cmsdate@on{% + \toggletrue{cms@origlabel}% + \ExecuteBibliographyOptions{cmsorigdate=true}}% +\def\cms@global@cmsdate@new{% + \toggletrue{cms@bothlabelnew}% + \ExecuteBibliographyOptions{cmsorigdate=true}}% +\def\cms@global@cmsdate@old{% + \toggletrue{cms@bothlabelold}% + \ExecuteBibliographyOptions{cmsorigdate=true}}% +\def\cms@global@cmsdate@both{% + \toggletrue{cms@bothlabelold}% + \ExecuteBibliographyOptions{cmsorigdate=true}}% +\def\cms@global@cmsdate@full{}% +\def\cms@global@cmsdate@off{}% + +\DeclareBibliographyOption{cmsorigdate}[true]{% ??? Also need new macros + \ifcsdef{cms@opt@origdate@#1}% for printing dates. Worth it ??? + {\csuse{cms@opt@origdate@#1}}% + {\blx@err@invopt{cmsorigdate=#1}{}}}% +\def\cms@opt@origdate@true{% + \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 + {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. + {\DeclareLabeldate{\field{origyear} \field{year}% + \field{eventyear} \field{urlyear}}% + \DeclareLabeldate[patent]{\field{year} \field{eventyear}% + \field{origyear} \field{urlyear}}}% + {\DeclareLabelyear{\field{origyear} \field{year}% + \field{eventyear} \field{urlyear}}% + \DeclareLabelyear[patent]{\field{year} \field{eventyear}% + \field{origyear} \field{urlyear}}}}% + {\DeclareLabelyear{origyear,year,eventyear,urlyear}% + \DeclareLabelyear[patent]{year,eventyear,origyear,urlyear}}% + \global\toggletrue{cms@ordate}}% +\def\cms@opt@origdate@false{\togglefalse{cms@ordate}}% + +\DeclareEntryOption{cmsdate}[off]{% Trying to implement origyear as + \ifcsdef{cms@opt@cmsdate@#1}% labelyear. Sorting will be an issue. + {\iftoggle{cms@origlabel}% + {\togglefalse{cms@origlabel}% + \def\@cms@tempdate{cms@origlabel}}% + {\iftoggle{cms@bothlabelnew}% + {\togglefalse{cms@bothlabelnew}% + \def\@cms@tempdate{cms@bothlabelnew}}% + {\iftoggle{cms@bothlabelold}% + {\togglefalse{cms@bothlabelold}% + \def\@cms@tempdate{cms@bothlabelold}}% + {}}}% + \csuse{cms@opt@cmsdate@#1}}% + {\blx@err@invopt{cmsdate=#1}{}}}% +\def\cms@opt@cmsdate@on{% + \toggletrue{cms@origlabel}}% +\def\cms@opt@cmsdate@new{% + \toggletrue{cms@bothlabelnew}}% +\def\cms@opt@cmsdate@old{% + \toggletrue{cms@bothlabelold}}% +\def\cms@opt@cmsdate@both{% + \toggletrue{cms@bothlabelold}}% +\def\cms@opt@cmsdate@full{% + \toggletrue{cms@fulldate}}% +\def\cms@opt@cmsdate@off{}% + +\DeclareBibliographyOption[boolean]{genallnames}[true]{% + \settoggle{cms@genallnames}{#1}}% + +\DeclareEntryOption[boolean]{genallnames}[true]{% + \settoggle{cms@genallnames}{#1}}% + +\DeclareBibliographyOption[boolean]{annotation}[true]{% + \global\settoggle{cms@annotation}{#1}}% + +\DeclareBibliographyOption[boolean]{cmslos}[true]{% + \global\settoggle{cms@los}{#1}}% + +\DeclareBibliographyOption[boolean]{noibid}[true]{% + \global\settoggle{cms@noibid}{#1}}% + +\DeclareBibliographyOption{compresspages}[true]{% + \ifcsdef{cms@opt@crange@#1}% + {\csuse{cms@opt@crange@#1}}% + {\blx@err@invopt{compresspages=#1}{}}}% +\def\cms@opt@crange@true{% + \global\toggletrue{cms@comprange}% + \setcounter{mincomprange}{100}% + \setcounter{mincompwidth}{10}% +}% +\def\cms@opt@crange@false{}% + +\DeclareBibliographyOption{postnotepunct}[true]{% + \ifcsdef{cms@opt@ppunct@#1}% + {\csuse{cms@opt@ppunct@#1}}% + {\blx@err@invopt{postnotepunct=#1}{}}}% +\def\cms@opt@ppunct@true{% + \global\toggletrue{cms@modpostnote}}% +\def\cms@opt@ppunct@false{}% + +\DeclareBibliographyOption{usecompiler}[true]{% + \settoggle{cms@usecompiler}{#1}}% + +\DeclareBibliographyOption{nodates}[true]{% + \settoggle{cms@nodates}{#1}}% + +\DeclareEntryOption{usecompiler}[true]{% + \settoggle{cms@usecompiler}{#1}}% + +\DeclareBibliographyOption{juniorcomma}[true]{% + \settoggle{cms@jrcomma}{#1}}% + +\DeclareEntryOption{juniorcomma}[true]{% + \settoggle{cms@jrcomma}{#1}}% + +\DeclareBibliographyOption{shorthandfull}[true]{% + \settoggle{cms@fullshhand}{#1}}% + +\DeclareBibliographyOption{longcrossref}[false]{% + \ifcsdef{cms@opt@lxref@#1}% + {\csuse{cms@opt@lxref@#1}}% + {\blx@err@invopt{longcrossref=#1}{}}}% +\def\cms@opt@lxref@none{% + \togglefalse{cms@crossref}% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@lxref@true{% + \toggletrue{cms@crossref}}% +\def\cms@opt@lxref@false{% + \togglefalse{cms@crossref}}% +\def\cms@opt@lxref@notes{% + \togglefalse{cms@crossref}}% +\def\cms@opt@lxref@bib{% + \toggletrue{cms@crossref}}% + +\DeclareEntryOption{longcrossref}[false]{% + \ifcsdef{cms@opt@lxref@#1}% + {\csuse{cms@opt@lxref@#1}}% + {\blx@err@invopt{longcrossref=#1}{}}}% + +\DeclareBibliographyOption{booklongxref}[true]{% + \ifcsdef{cms@opt@bklxref@#1}% + {\csuse{cms@opt@bklxref@#1}}% + {\blx@err@invopt{booklongxref=#1}{}}}% +\def\cms@opt@bklxref@true{% + \toggletrue{cms@bookcrossref}}% +\def\cms@opt@bklxref@false{% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@bklxref@notes{% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@bklxref@bib{% + \toggletrue{cms@bookcrossref}}% + +\DeclareEntryOption{booklongxref}[true]{% + \ifcsdef{cms@opt@bklxref@#1}% + {\csuse{cms@opt@bklxref@#1}}% + {\blx@err@invopt{booklongxref=#1}{}}}% + +\DeclareBibliographyOption[boolean]{xrefurl}[true]{% + \settoggle{cms@xrefurl}{#1}}% + +\DeclareEntryOption[boolean]{xrefurl}[true]{% + \settoggle{cms@xrefurl}{#1}}% + +\DeclareBibliographyOption[string]{journalabbrev}[false]{% + \ifcsdef{cms@opt@jtabb@#1}% + {\csuse{cms@opt@jtabb@#1}}% + {\csuse{cms@opt@jtabb@false}\cms@warning@noline% + {'journalabbrev=#1' isn't a valid option.\MessageBreak + The default - 'false' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@jtabb@true{% + \toggletrue{cms@citejtabb}% + \toggletrue{cms@bibjtabb}}% +\def\cms@opt@jtabb@false{% + \togglefalse{cms@citejtabb}% + \togglefalse{cms@bibjtabb}}% +\def\cms@opt@jtabb@notes{% + \toggletrue{cms@citejtabb}% + \togglefalse{cms@bibjtabb}}% +\def\cms@opt@jtabb@bib{% + \togglefalse{cms@citejtabb}% + \toggletrue{cms@bibjtabb}}% + +\DeclareEntryOption[string]{journalabbrev}[false]{% + \ifcsdef{cms@opt@jtabb@#1}% + {\csuse{cms@opt@jtabb@#1}}% + {\csuse{cms@opt@jtabb@false}\cms@warning@noline% + {'journalabbrev=#1' isn't a valid option.\MessageBreak + The default - 'false' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +\DeclareBibliographyOption[boolean]{related}[true]{% + \settoggle{cms@related}{#1}}% + +\DeclareEntryOption[boolean]{related}[true]{% + \settoggle{cms@related}{#1}}% + +% Controlling punctuation before titleaddon fields % + +\DeclareBibliographyOption[string]{ptitleaddon}[period]{% + \ifcsdef{cms@opt@ptao@#1}% + {\csuse{cms@opt@ptao@#1}}% + {\csuse{cms@opt@ptao@period}\cms@warning@noline% + {'ptitleaddon=#1' is not a valid option.\MessageBreak + The default - 'period' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@ptao@none{% + \let\ptitleaddonpunct\@empty}% +\def\cms@opt@ptao@comma{% + \def\ptitleaddonpunct{\addcomma\addspace}}% +\def\cms@opt@ptao@colon{% + \def\ptitleaddonpunct{\addcolon\addspace}}% +\def\cms@opt@ptao@space{% + \def\ptitleaddonpunct{\addspace}}% +\def\cms@opt@ptao@semicolon{% + \def\ptitleaddonpunct{\addsemicolon\addspace}}% +\def\cms@opt@ptao@period{% + \def\ptitleaddonpunct{\addperiod\addspace}}% + +\DeclareEntryOption[string]{ptitleaddon}[period]{% + \ifcsdef{cms@opt@ptao@#1}% + {\csuse{cms@opt@ptao@#1}}% + {\csuse{cms@opt@ptao@period}\cms@warning@noline% + {'ptitleaddon=#1' is not a valid option.\MessageBreak + The default - 'period' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +\DeclareBibliographyOption[string]{ctitleaddon}[comma]{% + \ifcsdef{cms@opt@ctao@#1}% + {\csuse{cms@opt@ctao@#1}}% + {\csuse{cms@opt@ctao@comma}\cms@warning@noline% + {'ctitleaddon=#1' is not a valid option.\MessageBreak + The default - 'comma' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@ctao@none{% + \let\ctitleaddonpunct\@empty}% +\def\cms@opt@ctao@comma{% + \def\ctitleaddonpunct{\addcomma\addspace}}% +\def\cms@opt@ctao@colon{% + \def\ctitleaddonpunct{\addcolon\addspace}}% +\def\cms@opt@ctao@space{% + \def\ctitleaddonpunct{\addspace}}% +\def\cms@opt@ctao@semicolon{% + \def\ctitleaddonpunct{\addsemicolon\addspace}}% +\def\cms@opt@ctao@period{% + \def\ctitleaddonpunct{\addperiod\addspace}}% + +\DeclareEntryOption[string]{ctitleaddon}[comma]{% + \ifcsdef{cms@opt@ctao@#1}% + {\csuse{cms@opt@ctao@#1}}% + {\csuse{cms@opt@ctao@comma}\cms@warning@noline% + {'ctitleaddon=#1' is not a valid option.\MessageBreak + The default - 'comma' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +% The field-exclusion options % + +\DeclareBibliographyOption{isbn}[true]{% + \settoggle{cms@isbn}{#1}}% +\DeclareBibliographyOption{url}[true]{% + \settoggle{cms@url}{#1}}% +\DeclareBibliographyOption{doi}[true]{% + \ifcsdef{cms@opt@doi@#1}% + {\csuse{cms@opt@doi@#1}}% + {\blx@err@invopt{doi=#1}{}}}% +\def\cms@opt@doi@true{% + \toggletrue{cms@doi}}% +\def\cms@opt@doi@false{% + \togglefalse{cms@doi}}% +\def\cms@opt@doi@only{% + \toggletrue{cms@doionly}}% +\DeclareBibliographyOption{eprint}[true]{% + \settoggle{cms@eprint}{#1}}% +\DeclareBibliographyOption{numbermonth}[true]{% + \settoggle{cms@numbermonth}{#1}}% +\DeclareBibliographyOption{bookpages}[true]{% + \settoggle{cms@bookpages}{#1}}% +\DeclareBibliographyOption{includeall}[true]{% + \settoggle{cms@isbn}{#1}% + \settoggle{cms@url}{#1}% + \settoggle{cms@doi}{#1}% + \settoggle{cms@eprint}{#1}% + \settoggle{cms@numbermonth}{#1}% + \settoggle{cms@bookpages}{#1}}% +\DeclareBibliographyOption{hidevolumes}[true]{% + \settoggle{cms@hidevolumes}{#1}}% + +\DeclareEntryOption{isbn}[true]{% + \settoggle{cms@isbn}{#1}}% +\DeclareEntryOption{doi}[true]{% + \ifcsdef{cms@opt@doi@#1}% + {\iftoggle{cms@doi}% + {\togglefalse{cms@doi}% + \iftoggle{cms@doionly}% + {\togglefalse{cms@doionly}}% !! + {}}% + {\toggletrue{cms@doi}}% !! + \csuse{cms@opt@doi@#1}}% + {\blx@err@invopt{doi=#1}{}}}% +\DeclareEntryOption{url}[true]{% + \settoggle{cms@url}{#1}}% +\DeclareEntryOption{eprint}[true]{% + \settoggle{cms@eprint}{#1}}% +\DeclareEntryOption{numbermonth}[true]{% + \settoggle{cms@numbermonth}{#1}}% +\DeclareEntryOption{bookpages}[true]{% + \settoggle{cms@bookpages}{#1}}% +\DeclareEntryOption{hidevolumes}[true]{% + \settoggle{cms@hidevolumes}{#1}}% + +\ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref,related,% + ctitleaddon,ptitleaddon,journalabbrev=notes}% + +\@ifpackagelater{biblatex}{2013/03/30}% For biblatex 2.6 ff. +{\ExecuteBibliographyOptions{labeldate=true}}% +{\ExecuteBibliographyOptions{labelyear=true}}% + +\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff. +{\global\toggletrue{cms@datedash}}% +{\global\togglefalse{cms@datedash}}% + +\DeclareDataInheritance{collection}{suppcollection}{% + \inherit{title}{title} + \inherit{subtitle}{subtitle} + \inherit{titleaddon}{titleaddon}} + +\DeclareDataInheritance{mvbook}{incollection}{% + \inherit{title}{maintitle} + \inherit{subtitle}{mainsubtitle} + \inherit{titleaddon}{maintitleaddon} + \noinherit{shorttitle} + \noinherit{sorttitle} + \noinherit{indextitle} + \noinherit{indexsorttitle} +} + +\DeclareDataInheritance{book}{incollection}{% + \inherit{title}{booktitle} + \inherit{subtitle}{booksubtitle} + \inherit{titleaddon}{booktitleaddon} + \noinherit{shorttitle} + \noinherit{sorttitle} + \noinherit{indextitle} + \noinherit{indexsorttitle} +} + +\DeclareDataInheritance{book,collection}{letter}{% + \inherit{title}{booktitle} + \inherit{subtitle}{booksubtitle} + \inherit{titleaddon}{booktitleaddon} + \noinherit{shorttitle} + \noinherit{sorttitle} + \noinherit{indextitle} + \noinherit{indexsorttitle} +} + +\DeclareDataInheritance{mvbook,mvcollection}{letter}{% + \inherit{title}{maintitle} + \inherit{subtitle}{mainsubtitle} + \inherit{titleaddon}{maintitleaddon} + \noinherit{shorttitle} + \noinherit{sorttitle} + \noinherit{indextitle} + \noinherit{indexsorttitle} +} + +\DeclareDataInheritance{*}{*}{% + \noinherit{namea} + \noinherit{nameb} + \noinherit{sortyear} + \noinherit{sortname} + \noinherit{sorttitle} + \noinherit{sorttitle} + \noinherit{urlyear} + \noinherit{urlmonth} + \noinherit{urlday} + \noinherit{doi} + \noinherit{eprint} + \noinherit{eprinttype} + \noinherit{url}} + +\DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}% +{*}{% ??? + \noinherit{year} + \noinherit{month} + \noinherit{day} + \noinherit{endyear} + \noinherit{endmonth} + \noinherit{endday} + \noinherit{origyear} + \noinherit{origmonth} + \noinherit{origday} + \noinherit{origendyear} + \noinherit{origendmonth} + \noinherit{origendday}} + +% More authordate options % + +\DeclareSortingScheme{cms}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \name{sortname} + \name{author} + \name{namea} + \name{editor} + \name{nameb} + \name{translator} + \name{namec} + \field{sorttitle} + \field{journaltitle} + \list{organization} + \field{title} + } + \sort{ + \field{sortyear} + \field{labelyear} + \field{year} + \field{origyear} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field[padside=left,padwidth=4,padchar=0]{volume} + \literal{0000} + } +} + +\DeclareSortingScheme{shortjournal}{% + \sort{ + \field{shortjournal} + } +} + +\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4 +{\DeclareLabelname{\field{shortauthor} \field{author}% + \field{shorteditor} \field{namea} \field{editor}% + \field{nameb} \field{translator} \field{namec}}}% +{\DeclareLabelname{shortauthor,author,shorteditor,namea,% + editor,nameb,translator,namec}}% + +\DeclareEntryOption{switchdates}[true]{% + \settoggle{cms@switchdates}{#1}}% + +\DeclareBibliographyOption{strict}[true]{% + \let\splitfootnoterule\footnoterule + \renewcommand\footnoterule{}% + \advance\skip\footins 4\p@\@plus2\p@\relax + \gdef\split@prev{0}% + \let\pagefootnoterule\footnoterule + % \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@} + \def\footnoterule{\relax + \ifnum\split@prev=\z@ + \pagefootnoterule + \else + \splitfootnoterule + \fi + \xdef\split@prev{\the\insertpenalties}% + }}% + +\protected\def\blx@newcunit{% + \global\let\blx@unitpunct\newcunitpunct + \global\toggletrue{blx@unit}}% + +\appto\blx@blxinit{% + \let\newcunit\blx@newcunit}% + +\newcommand*{\newcunitpunct}{\addcomma\space} + +\def\mkbibcurdinal#1{% + \@tempcnta0#1 \the\@tempcnta}% + +\@ifpackagelater{biblatex}{2011/01/04}% +{}% +{\PackageError{biblatex}% + {Outdated 'biblatex' package}% + {The Chicago style requires biblatex v1.1 or later.\MessageBreak + You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak + This is a fatal error. I'm aborting now.}% + \endinput}% + +% American-specific punctuation change for 16th edition % + +\DefineBibliographyExtras{american}{% + \DeclarePunctuationPairs{comma}{*!?}} + +%%%% Macros from authoryear-comp.cbx, revised for CMS %%%% + +\newbibmacro*{cite:init}{% + \ifnumless{\value{multicitecount}}{2}% + {\global\boolfalse{cbx:parens}% + \global\undef\cbx@lasthash% + \global\undef\cbx@lastyear}% + {\iffieldundef{prenote}% + {}% + {\global\undef\cbx@lasthash% + \global\undef\cbx@lastyear}}}% + +\newbibmacro*{cite:reinit}{% + \global\undef\cbx@lasthash% + \global\undef\cbx@lastyear}% + +\newbibmacro*{backref+check}{% + \ifbibliography% + {\backtrackerfalse}% + {}} + +\newbibmacro*{cite}{% + \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% + {\usebibmacro{cite:ibid}}% + {\iffieldequalstr{entrysubtype}{classical}% Similar to notes+bib + {\iffieldundef{shorthand}% + {\ifthenelse{\ifnameundef{labelname}\OR + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% Simplified for CMS + {\usebibmacro{cite:label}% + \setunit{\cms@testspace}% + \usebibmacro{cite:reinit}}% + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{postnote}% + {\setunit{\multicitedelim}}% + {}% + \usebibmacro{cite:label}}% + {\iffieldequals{fullhash}{\cbx@lastyear}% + {}% + {\usebibmacro{cmsbracketname}% For names in [] + \ifentrytype{customc}% + {\newcunit}% + {\setunit{\cms@testspace}}}% + \usebibmacro{cite:label}% + \iffieldundef{postnote}% + {\savefield{fullhash}{\cbx@lasthash}}% + {\savefield{fullhash}{\cbx@lastyear}}}}}% + {\usebibmacro{cite:shorthand+title}}}% + {\iffieldundef{shorthand}% + {\ifthenelse{\ifnameundef{labelname}\OR + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% Simplified for CMS + {\usebibmacro{cite:label}% + \setunit{\cms@testspace}% + \usebibmacro{cmscitesortdate}% + \usebibmacro{cite:reinit}}% + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{postnote}% + {\setunit{\compcitedelim}}% + {}% + \usebibmacro{cmscitesortdate}}% + {\iffieldequals{fullhash}{\cbx@lastyear}% Is this right? + {}% + {\usebibmacro{cmsbracketname}% + \setunit{\nameyeardelim}}% + \usebibmacro{cmscitesortdate}% + \iffieldundef{postnote}% + {\savefield{fullhash}{\cbx@lasthash}}% + {\savefield{fullhash}{\cbx@lastyear}}}}}% + {\usebibmacro{cite:shorthand}}}}% + \setunit{\multicitedelim}}% ??? + +\newbibmacro*{cmsbracketname}{% + \iffieldequalstr{authortype}{anon}% + {\bibleftbracket\printnames{labelname}% + \bibrightbracket}% + {\iffieldequalstr{authortype}{anon?}% + {\bibleftbracket\printnames{labelname}?% + \bibrightbracket}% + {\printnames{labelname}}}}% + +\newbibmacro*{citeyear}{% + \iffieldequalstr{entrysubtype}{classical}% + {\iffieldundef{shorthand}% + {\usebibmacro{citeyear:noshort}}% + {\iftoggle{cms@los}% + {\usebibmacro{citeyear:noshort}}% + {\usebibmacro{cite:shorthand+title}}}}% + {\iffieldundef{shorthand}% + {\usebibmacro{citeyear:noshort}}% + {\iftoggle{cms@los}% + {\usebibmacro{citeyear:noshort}}% + {\usebibmacro{cite:shorthand}}}}% + \setunit{\multicitedelim}}% + +\newbibmacro*{citeyear:noshort}{% + \iffieldequalstr{entrysubtype}{classical}% Altered for CMS + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{postnote}% + {\setunit{\compcitedelim}}% + {}% + \usebibmacro{cite:label}}% + {\usebibmacro{cite:label}% + \iffieldundef{postnote}% + {\savefield{fullhash}{\cbx@lasthash}}% + {}}}% + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{postnote}% + {\setunit{\compcitedelim}}% + {}% + \usebibmacro{cmscitesortdate}}% + {\usebibmacro{cmscitesortdate}% + \iffieldundef{postnote}% + {\savefield{fullhash}{\cbx@lasthash}}% + {}}}}% + +\newbibmacro*{textcite}{% + \iftoggle{cms@los}% + {\usebibmacro{textcite:authshort}}% + {\usebibmacro{textcite:citeshort}}}% + +\newbibmacro*{textcite:authshort}{% + \iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{postnote}% + {\iffieldequals{fullhash}{\cbx@lastyear}% + {\setunit{\multicitedelim}% + \global\undef\cbx@lastyear}% + {\iffieldequalstr{entrysubtype}{classical}% + {\setunit{\multicitedelim}}% + {\setunit{\compcitedelim}}}}% + {\setunit{\multicitedelim}}% + \iffieldequalstr{entrysubtype}{classical}% + {\usebibmacro{cite:label}}% + {\usebibmacro{cmscitesortdate}}}% + {\iffieldundef{shorthand}% + {\ifthenelse{\ifnameundef{labelname}\OR + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% + {\iffieldequalstr{entrysubtype}{classical}% + {\setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cite:label}}% + {\usebibmacro{cite:label}% + \ifboolexpr{% + togl {cms@gencite}% + and + ( + test {\iflastcitekey}% + or + togl {cms@genallnames}% + ) + }% + {\thegen}% + {}% + \setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cmscitesortdate}}}% + {\printnames{labelname}% + \ifboolexpr{% + togl {cms@gencite}% + and + ( + test {\iflastcitekey}% + or + togl {cms@genallnames}% + ) + }% + {\thegen}% + {}% + \setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \iffieldequalstr{entrysubtype}{classical}% + {\usebibmacro{cite:label}}% + {\usebibmacro{cmscitesortdate}}% + \savefield{fullhash}{\cbx@lasthash}}}% + {\printfield{shorthand}% + \ifboolexpr{% + togl {cms@gencite}% + and + ( + test {\iflastcitekey}% + or + togl {cms@genallnames}% + ) + }% + {\thegen}% + {}% + \setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \iffieldequalstr{entrysubtype}{classical}% + {\usebibmacro{cite:label}}% + {\usebibmacro{cmscitesortdate}}% + \savefield{fullhash}{\cbx@lasthash}}% + \stepcounter{textcitecount}}% Added ??? + \setunit{% + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}% + \textcitedelim}}% Not \multicitedelim ??? + +\newbibmacro*{textcite:citeshort}{% + \iffieldequals{fullhash}{\cbx@lasthash}% + {\iffieldundef{shorthand}% + {\iffieldundef{postnote}% + {\iffieldequals{fullhash}{\cbx@lastyear}% + {\setunit{\multicitedelim}% + \global\undef\cbx@lastyear}% + {\iffieldequalstr{entrysubtype}{classical}% + {\setunit{\multicitedelim}}% + {\setunit{\compcitedelim}}}}% + {\setunit{\multicitedelim}}% + \iffieldequalstr{entrysubtype}{classical}% + {\usebibmacro{cite:label}}% + {\usebibmacro{cmscitesortdate}}}% + {\iffieldundef{postnote}% + {\iffieldequals{fullhash}{\cbx@lastyear}% + {\setunit{\multicitedelim}% + \global\undef\cbx@lastyear}% + {\setunit{\compcitedelim}}}% + {\setunit{\multicitedelim}}% + \printtext[bibhyperref]{% + \printfield{shorthand}}}}% + {\ifthenelse{\ifnameundef{labelname}\OR + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% + {\iffieldundef{shorthand}% + {\iffieldequalstr{entrysubtype}{classical}% + {\setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cite:label}}% + {\usebibmacro{cite:label}% + \ifboolexpr{% + togl {cms@gencite}% + and + test {\iflastcitekey}% + }% + {\thegen}% + {}% + \setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cmscitesortdate}}}% + {\printtext[bibhyperref]{% + \printfield{shorthand}}}}% + {\printnames{labelname}% + \ifboolexpr{% + togl {cms@gencite}% + and + test {\iflastcitekey}% + }% + {\thegen}% + {}% + \setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \iffieldundef{shorthand}% + {\iffieldequalstr{entrysubtype}{classical}% + {\usebibmacro{cite:label}}% + {\usebibmacro{cmscitesortdate}}}% + {\printtext[bibhyperref]{% + \printfield{shorthand}}}% + \savefield{fullhash}{\cbx@lasthash}}% + \stepcounter{textcitecount}}% Added ??? + \setunit{% + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}% + \textcitedelim}}% Not \multicitedelim ??? + +\newbibmacro*{textcite:postnote}{% + \iffieldundef{postnote}% + {}% + {\savefield{fullhash}{\cbx@lastyear}% + \setunit{\postnotewrapper}%delim}% + \printfield{postnote}}% + \ifthenelse{\value{multicitecount}=\value{multicitetotal}}% + {\setunit{}% + \printtext{% + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}}}% + {\setunit{% + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}% + \textcitedelim}}}% Not \multicitedelim ??? + +\newbibmacro*{cite:shorthand}{% + \iftoggle{cms@los}% + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\printtext[bibhyperref]{% + \setunit{\compcitedelim}% + \usebibmacro{cmscitesortdate}}}% + {\printtext[bibhyperref]{% + \printfield{shorthand}% + \setunit{\nameyeardelim}% + \usebibmacro{cmscitesortdate}}% + \savefield{fullhash}{\cbx@lasthash}}}% + {\printtext[bibhyperref]{\printfield{shorthand}}% + \usebibmacro{cite:reinit}}}% + +\newbibmacro*{cite:shorthand+title}{% + \iftoggle{cms@los}% + {\iffieldequals{fullhash}{\cbx@lasthash}% + {\printtext[bibhyperref]{% + \setunit{\multicitedelim}% + \usebibmacro{cite:label}}}% + {\printtext[bibhyperref]{% + \printfield{shorthand}% + \setunit{\cms@testspace}% FIXME + \usebibmacro{cite:label}}% + \savefield{fullhash}{\cbx@lasthash}}}% + {\printtext[bibhyperref]{\printfield{shorthand}}% + \usebibmacro{cite:reinit}}}% + +\newbibmacro*{cite:label}{% Test this + \iffieldundef{label}% + {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% + \ifentrytype{periodical}}% Simplifies .bib creation + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\printtext[bibhyperref]{\printfield[shortjournal]{shortjournal}}}% + {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}}}}% + {\ifentrytype{manual}% + {\printtext[bibhyperref]{\printlist{organization}}}% + {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}}}% + {\printtext[bibhyperref]{\printfield{label}}}}% + +\newbibmacro*{cite:labelyear+extrayear}{% + \ifboolexpr{ ( + test {\ifentrytype{music}}% + or + test {\ifentrytype{review}}% + or + test {\ifentrytype{suppperiodical}}% + or + test {\ifentrytype{video}}% + ) + and + togl {cms@avdate}% + }% + {\usebibmacro{cite:av+labelyear+extrayear}}% + {\iftoggle{cms@ordate}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\usebibmacro{cite:standard+labelyear+extrayear}}}}% + +\newbibmacro*{cite:standard+labelyear+extrayear}{% + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% + {\ifboolexpr{% + test {\ifentrytype{misc}}% + or + test {\ifentrytype{inreference}}% + or + test {\ifentrytype{reference}}% + or + test {\ifentrytype{mvreference}}% + or + not togl {cms@nodates}% + }% + {}% + {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? + {\printtext[bibhyperref]{% + \iffieldundef{year}% + {\iffieldundef{eventyear}% + {\iffieldundef{origyear}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{urlendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{urlendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{origendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{origendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{eventendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{eventendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{endyear}% DATE FIX + {}% + {\ifboolexpr{% + test {\iffieldequalstr{endyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}}}% + +\newbibmacro*{cite:origfirst+labelyear+extrayear}{% + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% + {\ifboolexpr{% + test {\ifentrytype{misc}}% + or + test {\ifentrytype{inreference}}% + or + test {\ifentrytype{reference}}% + or + test {\ifentrytype{mvreference}}% + or + not togl {cms@nodates}% + }% + {}% + {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? + {\printtext[bibhyperref]{% + \iffieldundef{origyear}% + {\iffieldundef{year}% + {\iffieldundef{eventyear}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{urlendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{urlendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{eventendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{eventendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{endyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{endyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{origendyear}% DATE FIX + {}% + {\ifboolexpr{% + test {\iffieldequalstr{origendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}}}% + +\newbibmacro*{cite:av+labelyear+extrayear}{% + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% + {\ifboolexpr{% + test {\ifentrytype{misc}}% + or + test {\ifentrytype{inreference}}% + or + test {\ifentrytype{reference}}% + or + test {\ifentrytype{mvreference}}% + or + not togl {cms@nodates}% + }% + {}% + {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? + {\printtext[bibhyperref]{% + \iffieldundef{eventyear}% + {\iffieldundef{origyear}% + {\iffieldundef{year}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{urlendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{urlendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{endyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{endyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{origendyear}% + {}% + {\ifboolexpr{% + test {\iffieldequalstr{origendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{eventendyear}% DATE FIX + {}% + {\ifboolexpr{% + test {\iffieldequalstr{eventendyear}{}}% + and + not togl {cms@datedash}% + }% + {\mbox{\bibdatedash}}% + {}}}}}}% + +\newbibmacro*{cmscitesortdate}{% Attempt to solve date-related problems + \ifboolexpr{% + test {\iffieldundef{origyear}}% + or + not test {\iffieldint{origyear}}% + }% + {\usebibmacro{cmsciteyear}}% + {\iffieldint{year}% + {\ifboolexpr{% Needed for date ranges + test {\iffieldundef{endyear}}% + or + not test {\iffieldnum{endyear}}% + }% + {\ifthenelse{\thefield{origyear}>\thefield{year}}% + {\toggletrue{cms@switchdates}% + \usebibmacro{cmsciteyear}}% + {\usebibmacro{cmsciteyear}}}% + {\ifthenelse{\thefield{origyear}>\thefield{endyear}}% + {\toggletrue{cms@switchdates}% + \usebibmacro{cmsciteyear}}% + {\usebibmacro{cmsciteyear}}}}% + {\usebibmacro{cmsciteyear}}}}% + +\newbibmacro*{cmsciteyear}{% + \iftoggle{cms@origlabel}% + {\usebibmacro{cite:origyear+labelyear}}% + {\iftoggle{cms@bothlabelnew}% + {\usebibmacro{cite:bothyear+oldstyle}}% + {\iftoggle{cms@bothlabelold}% + {\usebibmacro{cite:bothyear+oldstyle}}% + {\iftoggle{cms@fulldate}% + {\newcunit\printdate}% + {\usebibmacro{cite:labelyear+extrayear}}}}}% + \ifcsdef{@cms@tempdate}% + {\toggletrue{\@cms@tempdate}}% + {}}% + +\newbibmacro*{cite:origyear+labelyear}{% + \ifboolexpr{ ( + test {\ifentrytype{music}}% + or + test {\ifentrytype{review}}% + or + test {\ifentrytype{suppperiodical}}% + or + test {\ifentrytype{video}}% + ) + and + togl {cms@avdate}% + }% + {\usebibmacro{cite:av+labelyear+extrayear}}% + {\iftoggle{cms@switchdates}% + {\usebibmacro{cite:labelyear+extrayear}}% + {\iffieldundef{origyear}% + {\iftoggle{cms@ordate}% ??? + {}% + {\clearfield{extrayear}}% + \usebibmacro{cite:standard+labelyear+extrayear}}% + {\iftoggle{cms@ordate}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\printtext[bibhyperref]{% + \usebibmacro{origyear+endyear}}}}}}}% + +\newbibmacro*{cite:bothyear+oldstyle}{% + \ifboolexpr{ ( + test {\ifentrytype{music}}% + or + test {\ifentrytype{review}}% + or + test {\ifentrytype{suppperiodical}}% + or + test {\ifentrytype{video}}% + ) + and + togl {cms@avdate}% + }% + {\usebibmacro{cite:av+labelyear+extrayear}}% + {\iftoggle{cms@switchdates}% + {\printtext[bibhyperref]{% + \bibopenparen% + \usebibmacro{cite:labelyear+extrayear}% + \bibcloseparen% + \addspace\usebibmacro{origyear+endyear}}}% + {\iffieldundef{origyear}% ??? + {\iftoggle{cms@ordate}% + {}% + {\clearfield{extrayear}}% + \usebibmacro{cite:standard+labelyear+extrayear}}% + {\iftoggle{cms@ordate}% Added test for year field ??? + {\iffieldundef{year}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\printtext[bibhyperref]{% + \bibopenparen% + \usebibmacro{cite:origfirst+labelyear+extrayear}% + \bibcloseparen% + \setunit{\addspace}%\addspace% ??? + \usebibmacro{year+endyear}}}}% + {\printtext[bibhyperref]{% + \bibopenparen% + \usebibmacro{origyear+endyear}% + \bibcloseparen% + \clearfield{extrayear}\addspace% + \usebibmacro{cite:standard+labelyear+extrayear}}}}}}}% + +\newbibmacro*{cite:save}{% + \savefield{entrykey}{\cbx@lastkey}}% + +\newbibmacro*{cite:ibid}{% + \iftoggle{cms@noibid}% + {\blx@ibidreset% + \usebibmacro{cite}}% + {\ifthenelse{\iffieldundef{prenote}\AND% + \iffieldundef{postnote}}% + {\blx@ibidreset% + \usebibmacro{cite}% + \PackageWarning{biblatex-chicago}% + {Empty Ibidem citation}}% + {\toggletrue{cms@inlineibid}}}}% + +%%%% Citation Commands, internal and external %%%% + +\DeclareCiteCommand{\cite} + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {}%\multicitedelim + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\cite} + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{citeyear}} + {}%\multicitedelim + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\parencite}[\mkbibparens] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {}%\setunit{\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\parencite}[\mkbibparens] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{citeyear}} + {}%\setunit{\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\footcite}[\mkbibfootnote] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {}%\multicitedelim + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {}% + {\usebibmacro{postnote}} + +%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% + +\DeclareCiteCommand{\cbx@textcite} + {\usebibmacro{cite:init}} + {\usebibmacro{citeindex}% + \usebibmacro{textcite}} + {}% + {\usebibmacro{textcite:postnote}} + +\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite] + {\gdef\cbx@savedkeys{}% + \citetrackerfalse% + \pagetrackerfalse% + \DeferNextCitekeyHook% + \usebibmacro{cite:init}} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}% + {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% + \global\clearfield{multipostnote}}% + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{fullhash}{\cbx@lasthash}% + {}% + {\stepcounter{textcitetotal}% + \savefield{fullhash}{\cbx@lasthash}}} + {}% + {\protected@xappto\cbx@savedcites{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} + +\newrobustcmd{\cbx@textcite@init}[2]{% + \setcounter{textcitetotal}{0}% + \setcounter{textcitecount}{0}% + \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} + +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{} + +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{} + +%%% The \gentextcite commands - \textcite in the genitive case %%% + +\DeclareCiteCommand{\cms@gentextcite@i} + {\usebibmacro{cite:init}% + \toggletrue{cms@gencite}} + {\usebibmacro{citeindex}% + \usebibmacro{textcite}} + {}% + {\usebibmacro{textcite:postnote}% + \togglefalse{cms@gencite}}% + +\DeclareCiteCommand{\cms@gentextcite}[\cbx@textcite@init\cms@gentextcite@i] + {\gdef\cbx@savedkeys{}% + \citetrackerfalse% + \pagetrackerfalse% + \DeferNextCitekeyHook% + \usebibmacro{cite:init}} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}% + {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% + \global\clearfield{multipostnote}}% + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{fullhash}{\cbx@lasthash}% + {}% + {\stepcounter{textcitetotal}% + \savefield{fullhash}{\cbx@lasthash}}} + {}% + {\protected@xappto\cbx@savedcites{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} + +\DeclareMultiCiteCommand{\cms@gentextcite@is}{\cms@gentextcite@i}{} +\DeclareMultiCiteCommand{\cms@gentextcites}[\cbx@textcites@init\cms@gentextcite@is]{\cms@gentextcite}{} + +\newrobustcmd*{\gentextcite}[1][]{% + \@ifnextchar[%] + {\gencite@i[#1]}% + {\gencite@i[][#1]}}% + +\def\gencite@i[#1][#2]{% + \@ifnextchar[%] + {\gencite@ii[#1][#2]}% + {\gencite@ii[][#1][#2]}}% + +\def\gencite@ii[#1][#2][#3]#4{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \gencite@iii[#2][#3]{#4}}% + +\def\gencite@iii#1{\cms@gentextcite#1} + +\newrobustcmd*{\gentextcites}[1][]{% + \@ifnextchar(%) + {\gencites@iv[#1]}% + {\@ifnextchar[%] + {\gencites@i[#1]}% + {\gencites@i[][#1]}}}% + +\def\gencites@i[#1][#2]{% + \@ifnextchar[%] + {\gencites@ii[#1][#2]}% + {\gencites@ii[][#1][#2]}}% + +\def\gencites@ii[#1][#2][#3]#4{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \gencites@iii[#2][#3]{#4}}% + +\def\gencites@iii#1{\cms@gentextcites#1}% + +\def\gencites@iv[#1]#2{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \cms@gentextcites#2}% + +\newrobustcmd*{\Gentextcite}{\bibsentence\gentextcite} +\newrobustcmd*{\Gentextcites}{\bibsentence\gentextcites} + +%%% End code for \gentextcite %%% + +\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} + +\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}% + {\setunit{\multicitedelim}} + +\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}% + {\setunit{\multicitedelim}} + +\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]% + {\footcitetext}{\setunit{\multicitedelim}} + +\DeclareCiteCommand{\bibxrefcite} + {\usebibmacro{cite:init}% + \usebibmacro{backref+check}}%\usebibmacro{clearalmostall}} (?) + {\usebibmacro{xref-in:}% + \blx@ibidreset% For authordate style + \usebibmacro{cite}} + {}% + {}% + +\DeclareCiteCommand{\origfullcite} + {\usebibmacro{backref+check}% + \nopunct\unspace% + \savebibmacro{cmsbibsortdate}% + \renewbibmacro*{cmsbibsortdate}{}}% + {\usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \clearname{author}\clearfield{userf}%\toggletrue{cms@fullnote}% + \toggletrue{cms@headlessnote}\frenchspacing}% + {\thefield{entrytype}}% + \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% + {\multicitedelim}% + {\restorebibmacro{cmsbibsortdate}} + +\DeclareCiteCommand{\origpublcite}% Similar to above, w/o title. + {\usebibmacro{backref+check}% + \nopunct%\unspace% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\addspace}{\unspace}% + \savebibmacro{cmsbibsortdate}% + \renewbibmacro*{cmsbibsortdate}{}}% + {\usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \usebibmacro{clearpublin}\usebibmacro{cms:titlehook}% + \toggletrue{cms@headlessnote}%\toggletrue{cms@fullnote}% + \toggletrue{cms@origpublished}\frenchspacing}% + {\thefield{entrytype}}% + \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% + {\multicitedelim}% + {\restorebibmacro{cmsbibsortdate}} + +%%%% List Formats %%%% + +\DeclareListFormat{language}{% + \ifthenelse{\value{listcount}=1}% + {\bibleftbracket\bibstring{inlang}%\addspace - for inflected langs. + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% + {#1}}% + \ifthenelse{\value{listtotal}=1}% + {\bibrightbracket}% + {}}% + {\ifthenelse{\value{listcount}=\value{listtotal}}% + {\multilangdelim% + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% + {#1}}% + \bibrightbracket}% + {\multilangdelim% + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% + {#1}}}}% + \usebibmacro{langlist:andothers}}% + +\DeclareListFormat{publisher}{% + \ifthenelse{\value{listtotal}<2}% + {#1\isdot}% + {\ifthenelse{\value{listcount}=1}% + {#1}% + {\multipubsdelim #1\isdot}}}% + +\DeclareListFormat{periodplace}{\mkbibparens{#1}} + +\DeclareListFormat{lista}{% + \ifthenelse{\value{listtotal}<2}% + {s\adddot v\adddot\addspace\mkbibquote{#1\isdot}}% + {\ifthenelse{\value{listcount}=1}% + {s\adddot vv\adddot\addspace \mkbibquote{#1\isdot}\addcomma}% + {\ifthenelse{\value{listcount}<\value{listtotal}}% + {\addspace\mkbibquote{#1\isdot}\addcomma}% + {\addspace\mkbibquote{#1\isdot}}}}} + +%%%% Field Formats -- Mostly non-title %%%% + +\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}\isdot} + +\iftoggle{cms@comprange}% Audrey Boruvka's code from StackExchange +{\patchcmd{\blx@comprange@check}% + {\blx@comprange@comp{#1}{#2}}% + {\blx@tempcnta=#1% + \divide\blx@tempcnta100% + \multiply\blx@tempcnta100% + \ifnumequal{\blx@tempcnta}{#1}% + {\blx@range@out@value{#1\bibrangedash#2}}% + {\blx@comprange@comp{#1}{#2}}}% + {}{}}{}% + +\DeclareFieldFormat{postnote}{% Changed for page compression option + \iftoggle{cms@comprange}% + {\iffieldundef{pagination}% + {\mkcomprange{#1}}% + {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% + {\iffieldundef{pagination}% + {#1}% + {\mkpageprefix[pagination]{#1}}}}% + +\DeclareFieldFormat[inreference]{postnote}{% + \iftoggle{cms@comprange}% + {\iffieldundef{pagination}% + {s\adddot v\adddot\addnbspace\mkbibquote{#1}}% + {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% + {\iffieldundef{pagination}% + {s\adddot v\adddot\addnbspace\mkbibquote{#1}}% + {\mkpageprefix[pagination]{#1}}}}% + +\DeclareFieldFormat{pages}{% + \iftoggle{cms@comprange}% + {\iffieldundef{bookpagination}% + {\mkcomprange{#1}\isdot}% + {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}}% + {\iffieldundef{bookpagination}% + {#1\isdot}% + {\mkpageprefix[bookpagination]{#1}}}}% + +\DeclareFieldFormat{bibnote}{\MakeCapital{#1}} + +\DeclareFieldFormat{edlang}{% + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{ed#1}% + {\bibstring{ed#1}}% + {\ifcapital{\MakeCapital{#1}}{#1}}}} + +\DeclareFieldFormat[customc]{title}{% + \iffieldundef{nameaddon}% + {\mkbibemph{\bibstring{see}}% + \addspace% + #1}% + {#1}} + +\DeclareFieldFormat[customc]{citetitle}{% + \ifnameundef{author}% + {#1}% + {\iffieldundef{nameaddon}% + {\mkbibemph{\bibstring{see}}% + \addspace% + #1}% + {\printfield{nameaddon}\addspace #1}}} + +\DeclareFieldFormat{shortjournal}{\mkbibemph{#1}\isdot} + +\DeclareFieldFormat[periodical]{shorttitle}{\mkbibemph{#1}\isdot} + +%%%% Other Field Formats %%%% + +\DeclareNumChars*{:}% + +\DeclareFieldFormat{letterday}{\mkbibcurdinal{#1}} + +\DeclareFieldFormat{note}{% + \ifcapital{\MakeCapital{#1}}{#1}}% + +\DeclareFieldFormat +[audio,manual,music,patent,report,suppbook,suppcollection,thesis,video] +{type}{% + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifcapital% + {\MakeCapital{#1\isdot}}% + {#1\isdot}}} + +\DeclareFieldFormat[artwork,image]{type}{% + \ifcapital% + {\MakeCapital{#1}}% + {#1}} + +\DeclareFieldFormat{url}{\url{#1}} + +\DeclareFieldFormat{doi}{% + \textrm{doi}\addcolon + \ifhyperref + {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}% + {\nolinkurl{#1}}} + +\DeclareFieldFormat[music]{date}{% Generalize userd ??? + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% + \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{origyear}% + \OR\NOT\iffieldundef{urlmonth}\OR\NOT\iffieldundef{eventmonth}% + \OR\NOT\iffieldundef{origmonth}}% + {#1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[video]{date}{% Generalize userd ??? + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% + \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{urlmonth}% + \OR\NOT\iffieldundef{eventmonth}}% + {#1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat{date}{% Generalize userd ??? + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}}% + {#1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat{urldate}{% 16th ed. + \iffieldundef{userd}% + {\bibstring{urlseen}\space #1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[video]{urldate}{% 16th ed. + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% + {\bibstring{urlseen}\space #1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[music]{urldate}{% 16th ed. + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}% + \OR\NOT\iffieldundef{origyear}}% + {\bibstring{urlseen}\space #1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[music]{origdate}{% 16th ed. + \iftoggle{cms@reprint}% Date fix + {#1}% + {\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% + {\bibstring{recorded}\space #1}% + {\printfield{userd}\addspace #1}}} + +\DeclareFieldFormat[music]{eventdate}{% 16th ed. + \iffieldundef{userd}% + {\bibstring{recorded}\space #1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[video]{eventdate}{% 16th ed. + \iffieldundef{userd}% + {\bibstring{broadcast}\space #1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldAlias{userd}{titleaddon}% 16th ed. + +\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?! + +\DeclareFieldFormat[review,suppperiodical]{nameaddon}{#1\bibsentence}% 16th ed. + +\DeclareFieldFormat[customc]{nameaddon}{% For cross-refs + \ifbibstring{#1}% + {\mkbibemph{\bibstring{#1}}}% + {#1}}% + +\DeclareFieldFormat{edition}{% New in 0.8 + \ifinteger{#1}% + {\mkbibordedition{#1}~\bibstring{edition}}% + {\ifcapital + {\MakeCapital{#1\isdot}}% + {#1\isdot}}} + +\DeclareFieldFormat{usere}{[#1]} % Better than mkbibbrackets? + +\DeclareFieldFormat{titleaddon}{% + \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}%\custpunctc? + +\DeclareFieldAlias{booktitleaddon}{titleaddon} + +\DeclareFieldAlias{maintitleaddon}{titleaddon} + +\DeclareFieldFormat{jourser}{% + \ifinteger{#1}% + {\mkbibordseries{#1}% + \addnbspace% + \bibstring{jourser}}% + {\ifbibstring{#1}{\bibstring{#1}}{#1}}} + +\DeclareFieldFormat{journum}{% Revised for 0.9.5 + \ifboolexpr{% + test {\ifnumerals{#1}}% + and + not test {\ifnumeral{#1}}% + }% + {\bibstring{numbers}\addspace #1}% + {\bibstring{number}\addspace #1}} + +\DeclareFieldFormat{sernum}{% + \ifnumeral{#1}% + {\addnbspace #1}% + {\addcomma\addspace #1}} + +\DeclareFieldFormat{addendum}{% + \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} + +% This works better here than in the entrytail macro -- userf use is +% no longer a problem, though the page breaking still isn't ideal. + +\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1} + +\DeclareFieldFormat{part}{% + \ifnumerals{#1}% + {\addcomma\addspace\bibstring{partvolume}~#1}% + {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}} + +\DeclareFieldAlias[review]{volume}[article]{volume} + +\DeclareFieldAlias[suppperiodical]{volume}[article]{volume} + +%%%% Related field formats from biblatex.def %%%% + +\DeclareFieldFormat{related:origpubas}{#1}% This and next remove parens + +\DeclareFieldFormat{related:origpubin}{#1} + +\DeclareFieldFormat{relatedstring:default}{% For notes + bib + \ifboolexpr{% + test {\iffieldundef{relatedstring}}% + or + test {\iffieldbibstring{relatedstring}}% + }% + {#1}% + {\ifcapital% + {\MakeCapital{#1}}% + {#1}}% + \printunit{\relatedpunct}}% + +\DeclareFieldFormat{relatedstring:reprintfrom}{% For notes + bib + \ifboolexpr{% + test {\iffieldundef{relatedstring}}% + or + test {\iffieldbibstring{relatedstring}}% + }% + {#1}% + {\ifcapital% + {\MakeCapital{#1}}% + {#1}}% + \addspace}% + +%%%% Commands, for users and internal %%%% + +\newcommand*{\cbytypeeditor}{% Needed? + \iffieldundef{editortype}% + {\bibstring{cbytypeeditor}}% + {\bibstring{cbytype\thefield{editortype}}}} + +\renewcommand*{\multicitedelim}{\addsemicolon\space} + +\newcommand*{\cms@testspace}{% FIXME + \ifboolexpr{% + test {\ifnumequal{\spacefactor}{\blx@sf@dot}}% + and + not test {\ifbibliography}% + }% + {\addnbspace}% + {\addspace}}% + +\renewcommand*{\iffinalcitedelim}{% + \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} + +\renewcommand*{\nameyeardelim}{% + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% + {\addcomma\addspace}% + {\iffieldundef{origyear}% Is this test correct? + {\iffieldundef{year}% + {\cms@testspace}% FIXME -- automatic n.d. ??? labeldate test? + {\NumCheckSetup{\renewcommand{\mkbibbrackets}{\expandonce}% + \DeclareNumChars*{[?]s}}% For bracketed dates, and decades. + \iffieldnums{year}% This one works. + {\cms@testspace}% + {\addcomma\addspace}}}% 16th ed. wants comma before n.d. (!) + {\cms@testspace}}} + +\newcommand{\classicpunct}{% + \ifthenelse{\iffieldequalstr{entrysubtype}{classical}\OR% + \ifentrytype{letter}}% + {\setunit*{\addspace}}% + {\setunit*{\addcomma\addspace}}} + +\newcommand{\postvolpunct}{\addcolon}% + +\newcommand{\parttrans}{% + {\bibstring{bytranslator}\space}}% + +\newcommand{\partedit}{% + \iftoggle{cms@postposit}% Kludge to make it work in French. + {\bibstring{byeditoralt}\addspace}% + {\bibstring{byeditor}\addspace}}% + +\newcommand{\partcomp}{% + {\bibstring{bycompiler}\space}}% + +\newcommand{\parteditandcomp}{% + {\bibstring{byeditorcp}\space}}% + +\newcommand{\parttransandcomp}{% + {\bibstring{bytranslatorcp}\space}}% + +\newcommand{\partedittransandcomp}{% + {\bibstring{byeditortrcp}\space}}% + +\newcommand{\parteditandtrans}{% + {\bibstring{byeditortr}\space}}% + +\newcommand{\reprint}{\bibstring{reprint}}% + +\newcommand*{\multipubsdelim}{\addnbspace/\addspace} + +\newcommand*{\multilocsdelim}{% + \ifthenelse{\value{listcount}<\value{liststop}}% + {\ifthenelse{\numexpr\value{listcount}+1<\value{liststop}}% + {\addcomma\addspace}% + {\ifthenelse{\value{liststop}>2}% + {\addcomma\addspace\bibstring{and}\addspace}% + {\addspace\bibstring{and}\addspace}}}% + {}}% + +\newcommand*{\multilangdelim}{% + \ifthenelse{\value{listtotal}<3}% + {\addspace\bibstring{and}\addspace}% + {\ifthenelse{\value{listcount}<\value{listtotal}}% + {\addcomma\addspace}% + {\addcomma\addspace\bibstring{and}\addspace}}} + +\renewcommand*{\postnotedelim}{% + \iftoggle{cms@inlineibid}% + {\togglefalse{cms@inlineibid}% + \iffieldundef{prenote}% Bug fix + {}% + {\cms@testspace}}% + {\iffieldequalstr{entrysubtype}{classical}% For Notes+Bib, too? + {\NumCheckSetup{\DeclareNumChars*{abcdeABCDE}}% + \iffieldpages{postnote}% + {\cms@testspace}% + {\addcomma\addspace}}% + {\addcomma\addspace}}} + +\newcommand*{\postnotewrapper}{% + \iftoggle{cms@modpostnote}% + {\ifboolexpr{% + test {\iffieldstart{postnote}{,}}% + or + test {\iffieldstart{postnote}{\bibrangessep}}% + }% + {\addcomma}% w/ or w/o \addspace? + {\ifboolexpr{% + test {\iffieldstart{postnote}{;}}% + or + test {\iffieldstart{postnote}{:}}% + or + test {\iffieldstart{postnote}{.}}% + }% + {}{\postnotedelim}}}% + {\postnotedelim}}% + +\newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from + \begingroup% comp.text.tex + \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} + +\newcommand*{\editordelim}{% Otherwise you get an inaccurate comma. + \iffieldequalstr{editortype}{none}% + {\addperiod\addspace}% + {\addcomma\addspace}} + +\newcommand*{\nameadelim}{% Otherwise you get an inaccurate comma. + \iffieldequalstr{nameatype}{none}% + {\addperiod\addspace}% + {\addcomma\addspace}} + +\newcommand*{\lbx@cfromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\bibstring{cfrom\thefield{origlanguage}}}}% + {\unspace}} + +\@ifpackagelater{biblatex}{2011/11/12}% +{\renewcommand*{\lbx@fromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\bibstring{from\thefield{origlanguage}}}}% + {\unspace}}}% +{\@ifpackagelater{biblatex}{2011/07/28}% + {\newcommand*{\lbx@fromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\bibstring{from\thefield{origlanguage}}}}% + {\unspace}}}% + {\renewcommand*{\lbx@fromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\bibstring{from\thefield{origlanguage}}}}% + {\unspace}}}}% + +\renewcommand*{\lbx@lfromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\biblstring{from\thefield{origlanguage}}}}% + {\unspace}}% + +\renewcommand*{\lbx@sfromlang}{% + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% + {\bibsstring{from\thefield{origlanguage}}}}% + {\unspace}}% + +%%%% Formatting macros, called both by cbx and bbx %%%% + +\newbibmacro*{finentry}{%{\finentry} To make annotated bibliography + \ifbibliography + {\usebibmacro{entrytail}}% + {}% + \finentry} + +\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography + \newunit\newblock + \iftoggle{cms@annotation}% + {\usebibmacro{annotation}% + \newunit\newblock}% + {}}% + +\newbibmacro*{author+holder}{% + \ifnameundef{author}% + {\let\bbx@lasthash\undefined}% + {\usebibmacro{author/editor}% + \ifthenelse{\ifnameundef{holder}\OR + \ifnamesequal{author}{holder}}% + {}% + {\setunit{\addspace}% + \printtext[parens]{\printnames{holder}}}}} + +\renewbibmacro*{byauthor}{% + \ifthenelse{\ifuseauthor\OR + \ifnameundef{author}}% + {}% + {\bibstring{by}\addspace% + \printnames[byauthor]{author}}} + +\newbibmacro*{byauthorpunct}{% + \ifthenelse{\ifuseauthor\OR\ifnameundef{author}}% + {\addperiod\addspace}% + {\newcunit}} + +\renewbibmacro*{bybookauthor}{% + \ifnameundef{bookauthor}% + {}% + {\ifnamesequal{author}{bookauthor}% + {}% + {\bibstring{by}\addspace\printnames[default]{bookauthor}% + \newcunit\newblock}}} + +\newbibmacro*{editorpunct}{% + \ifthenelse{\(\iffieldundef{booktitle}\AND% + \iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)% + \OR\iffieldsequal{booktitle}{title}% Changed these for crossrefed + \OR\iffieldsequal{maintitle}{title}}% entries. Create problems? + {\ifentrytype{video}% + {\newcunit\newblock}% + {\newunit\newblock}}% + {\newcunit\newblock}} + +\newbibmacro*{edition}{% + \printfield{edition}% + \clearfield{edition}}% + +\newbibmacro*{inforaft}{% + \ifnameundef{introduction}% + {\ifnameundef{afterword}% + {\ifnameundef{foreword}% + {\printfield{type}}% + {\bibstring{forewordto}% + \clearname{foreword}}}% + {\bibstring{afterwordto}% + \clearname{afterword}}}% + {\bibstring{introductionto}% + \clearname{introduction}}} + +\newbibmacro*{langlist:andothers}{% + \ifthenelse{\value{listcount}=\value{liststop}\AND + \ifmoreitems}% + {\ifnum\value{liststop}>1 \finalandcomma\fi + \andmoredelim\bibstring{andmore}\bibrightbracket}% + {}} + +\newbibmacro*{reference+title}{% + \ifthenelse{\iffieldequals{title}{\bbx@lasthash}\AND\NOT + \iffirstonpage}% + {\bibnamedash\addperiod\addspace}% + {\usebibmacro{italtitle+stitle}% + \savefield{title}{\bbx@lasthash}}} + +\newbibmacro*{mag+news+author}{% + \ifboolexpr{% + ( + test {\ifnameundef{author}}% + or + not test {\ifuseauthor}% + ) + and + not togl {cms@origpublished}% + }% + {\ifthenelse{\iffieldequals{journaltitle}{\bbx@lasthash}\AND\NOT + \iffirstonpage}% + {\bibnamedash\addperiod\addspace}% + {\usebibmacro{journal+sub}% + \setunit*{\addspace}% + \printlist[periodplace]{location}% + \savefield{journaltitle}{\bbx@lasthash}}}% + {\usebibmacro{author}}} + +\newbibmacro*{cmag+news+author}{% + \ifnameundef{author}% + {\usebibmacro{journal+sub}% + \setunit*{\addspace}% + \printlist[periodplace]{location}}% + {\usebibmacro{author}}} + +\newbibmacro*{type+inst+year}{% + \printfield{type}% + \newcunit + \printlist{institution}% + \setunit*{\addcomma\space}% + \printfield{year}} + +\newbibmacro*{institution+organization}{% + \iflistundef{organization}% + {\iflistundef{institution}% + {}% + {\printlist{institution}}}% + {\printlist{organization}% + \newcunit% + \printlist{institution}}} + +\newbibmacro*{author+org}{% + \ifnameundef{author}% + {\ifnameundef{editor}% + {\iflistundef{organization}% + {\let\bbx@lasthash\undefined}% + {\ifboolexpr{% + test {\iflistequals{organization}{\bbx@lasthash}}% + and + not test {\iffirstonpage}% + }% + {\bibnamedash\addperiod\addspace}% + {\iftoggle{cms@authorparens}% + {\bibopenparen\printlist{organization}\bibcloseparen}% + {\printlist{organization}}% + \savelist{organization}{\bbx@lasthash}}}}% + {\usebibmacro{editor}}}% + {\usebibmacro{author/editor}}} + +\newbibmacro*{cbytypestrg}[2]{% + \iffieldundef{#1type}% + {\bibstring{by#2}}% + {\bibstring{by\thefield{#1type}}}} + +\newbibmacro*{cbyeditor}{% + \ifnameundef{editor}% + {}% + {\usebibmacro{cbytypestrg}{editor}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{editor}% + \newcunit}% + \usebibmacro{cbyeditorx}} + +\newbibmacro*{cbyeditorx}{% + \ifnameundef{editora}% + {}% + {\usebibmacro{cbytypestrg}{editora}{editor}% + \setunit{\addspace}% + \printnames[byeditora]{editora}% + \newcunit}% + \ifnameundef{editorb}% + {}% + {\usebibmacro{cbytypestrg}{editorb}{editor}% + \setunit{\addspace}% + \printnames[byeditorb]{editorb}% + \newcunit}% + \ifnameundef{editorc}% + {}% + {\usebibmacro{cbytypestrg}{editorc}{editor}% + \setunit{\addspace}% + \printnames[byeditorc]{editorc}% + \newcunit}} + +\newbibmacro*{cbytranslator}{% + \ifnameundef{translator}% + {}% + {\bibstring{bytranslator}% + \addspace + \printnames[bytranslator]{translator}}} + +\newbibmacro*{cbycompiler}{% + \ifnameundef{namec}% + {}% + {\bibstring{cbycompiler}\addspace% + \printnames[bycompiler]{namec}}} + +\newbibmacro*{cbyredactor}{% + \ifnameundef{redactor}% + {}% + {\bibstring{cbyredactor}\addspace% + \printnames[byredactor]{redactor}}} + +\newbibmacro*{cwithcommentator}{% + \ifnameundef{commentator}% + {}% + {\bibstring{withcommentator}\addspace% + \printnames[withcommentator]{commentator}}} + +\newbibmacro*{cwithannotator}{% + \ifnameundef{annotator}% + {}% + {\bibstring{withannotator}\addspace% + \printnames[withannotator]{annotator}}} + +\newbibmacro*{cwithintroduction}{% + \ifnameundef{introduction}% + {}% + {\bibstring{withintroduction}\addspace% + \printnames[withintroduction]{introduction}}} + +\newbibmacro*{cwithforeword}{% + \ifnameundef{foreword}% + {}% + {\bibstring{withforeword}\addspace% + \printnames[withforeword]{foreword}}} + +\newbibmacro*{cwithafterword}{% + \ifnameundef{afterword}% + {}% + {\bibstring{withafterword}\addspace% + \printnames[withafterword]{afterword}}} + +\newbibmacro*{cbyeditor+others}{% + \ifthenelse{\NOT\ifnameundef{editor}\AND + \(\iffieldundef{editortype}\OR + \iffieldequalstr{editortype}{editor}\)}% + {\def\@tempa{cbyeditor}% + \ifnamesequal{editor}{translator}% + {\edef\@tempa{\@tempa tr}% + \clearname{translator}}% + {}% + \ifnamesequal{editor}{namec}% + {\edef\@tempa{\@tempa cp}% + \clearname{namec}}% + {}% + \ifnamesequal{editor}{commentator}% + {\edef\@tempa{\@tempa co}% + \clearname{commentator}}% + {\ifnamesequal{editor}{annotator}% + {\edef\@tempa{\@tempa an}% + \clearname{annotator}}% + {}}% + \ifnamesequal{editor}{introduction}% + {\edef\@tempa{\@tempa in}% + \clearname{introduction}}% + {\ifnamesequal{editor}{foreword}% + {\edef\@tempa{\@tempa fo}% + \clearname{foreword}}% + {\ifnamesequal{editor}{afterword}% + {\edef\@tempa{\@tempa af}% + \clearname{afterword}}% + {}}}% + \bibstring{\@tempa}\space% + \printnames[byeditor]{editor}% + \clearname{editor}% + \newcunit% + \usebibmacro{cbyeditorx}}% + {\usebibmacro{cbyeditor}}% + \usebibmacro{cbytranslator+others}} + +\newbibmacro*{cbytranslator+others}{% + \ifnameundef{translator}% + {}% + {\def\@tempa{cbytranslator}% + \ifnamesequal{translator}{namec}% + {\edef\@tempa{\@tempa cp}% + \clearname{namec}}% + {}% + \ifnamesequal{translator}{commentator}% + {\edef\@tempa{\@tempa co}% + \clearname{commentator}}% + {\ifnamesequal{translator}{annotator}% + {\edef\@tempa{\@tempa an}% + \clearname{annotator}}% + {}}% + \ifnamesequal{translator}{introduction}% + {\edef\@tempa{\@tempa in}% + \clearname{introduction}}% + {\ifnamesequal{translator}{foreword}% + {\edef\@tempa{\@tempa fo}% + \clearname{foreword}}% + {\ifnamesequal{translator}{afterword}% + {\edef\@tempa{\@tempa af}% + \clearname{afterword}}% + {}}}% + \bibstring{\@tempa}\space% + \printnames[bytranslator]{translator}% + \clearname{translator}% + \newcunit}% + \usebibmacro{cbycompiler+others}} + +\newbibmacro*{cbycompiler+others}{% + \ifnameundef{namec}% + {}% + {\def\@tempa{cbycompiler}% + \ifnamesequal{namec}{commentator}% + {\edef\@tempa{\@tempa co}% + \clearname{commentator}}% + {\ifnamesequal{namec}{annotator}% + {\edef\@tempa{\@tempa an}% + \clearname{annotator}}% + {}}% + \ifnamesequal{namec}{introduction}% + {\edef\@tempa{\@tempa in}% + \clearname{introduction}}% + {\ifnamesequal{namec}{foreword}% + {\edef\@tempa{\@tempa fo}% + \clearname{foreword}}% + {\ifnamesequal{namec}{afterword}% + {\edef\@tempa{\@tempa af}% + \clearname{afterword}}% + {}}}% + \bibstring{\@tempa}\space% + \printnames[bycompiler]{namec}% + \clearname{namec}% + \newcunit}% + \usebibmacro{cbyothers}} + +\newbibmacro*{cbyothers}{% + \usebibmacro{cbytranslator}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cbycompiler}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cbyredactor}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cwithcommentator}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cwithannotator}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cwithintroduction}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cwithforeword}% + \setunit*{\addcomma\addspace}% + \usebibmacro{cwithafterword}} + +\newbibmacro*{cms-in:}{% Fix for 0.9a compat. + \iftoggle{cms@origpublished}% + {}% + {\bibstring{in}% + \setunit{\addspace}}} + +\newbibmacro*{xref-in:}{% + \iffieldundef{volume}{}{\savefield{volume}{\cbx@incollvol}}% + \iffieldundef{part}{}{\savefield{part}{\cbx@incollpart}}% + \bibstring{in}\setunit{\addspace}}% Changed for related:reprintfrom + +\newbibmacro*{chapincoll}{% + \iffieldundef{chapter}% + {}% + {\printfield{chapter}\addspace% + \clearfield{chapter}}}% + +\newbibmacro*{chapinscore}{% + \iffieldundef{chapter}% + {\ifboolexpr{% + test {\ifentrytype{music}}% + and + not test {\iffieldundef{booktitle}}% + and + not togl {cms@origpublished}% + }% + {\bibstring{on}\setunit{\addspace}}% + {}}% + {\printfield{chapter}\clearfield{chapter}% + \iffieldundef{booktitle}% + {}% + {\addspace\bibstring{of}\setunit{\addspace}}}}% + +\newbibmacro*{music+ser+num}{% + \iffieldundef{series}% + {\iffieldundef{number}% + {}% + {\printfield{number}}}% + {\printfield{series}% + \setunit{\addspace}% + \printfield{number}}}% + +\newbibmacro*{music+publisher}{% + \iffieldundef{howpublished}% + {\iffieldundef{pubstate}% + {}% + {\printfield{pubstate}}}% + {\printfield{howpublished}}}% + +\newbibmacro*{music+origdate}{% + \iftoggle{cms@reprint}% 16th ed. + {}% + {\iftoggle{cms@switchdates}% Date fix + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {}% + {\usebibmacro{cmsorigdate}}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {}% + {\usebibmacro{cmsorigdate}}}}}% + +\newbibmacro*{music+eventdate}{% Date fix + \ifthenelse{\iffieldundef{eventyear}\AND\iffieldundef{eventmonth}}% + {}% + {\printeventdate}} + +\newbibmacro*{ser+num}{% + \printfield{series}% + \printfield[sernum]{number}% + \newunit} + +\newbibmacro*{language+transtitle}{% + \iffieldundef{usere}% + {\printlist[][-\value{listtotal}]{language}}% + {\printfield{usere}}} + +\newbibmacro*{publ+loc+year}{% + \printlist{location}% + \iflistundef{publisher}% + {\setunit*{\addcomma\addspace}}% + {\setunit*{\addcolon\addspace}}% + \printlist{publisher}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% For the author-date style. Tricky. +}% + +\newbibmacro*{origpubl+loc+year}{% 16th ed. + \printlist{origlocation}% + \iflistundef{origpublisher}% + {\setunit*{\addcomma\addspace}}% + {\setunit*{\addcolon\addspace}}% + \printlist{origpublisher}% +% \setunit*{\addcomma\addspace}% +% \usebibmacro{cmsorigdate}% +}% + +\newbibmacro*{howpubl+loc+year}{% + \printlist{location}% + \iffieldundef{howpublished}% + {\setunit*{\addcomma\space}}% + {\setunit*{\addcolon\space}}% + \printfield{howpublished}% + \setunit*{\addcomma\space}% + \usebibmacro{date}% +}% + +\newbibmacro*{inst+loc+year}{% + \printlist{location}% + \iflistundef{institution}% + {\setunit*{\addcomma\space}}% + {\setunit*{\addcolon\space}}% + \printlist{institution}% + \setunit*{\addcomma\space}% + \usebibmacro{date}% +}% + +\newbibmacro*{originally+published+as}{% Punctuation fix now in + \iffieldundef{userf}% \origfullcite for 0.8e. + {\iffieldundef{reprinttitle}% + {}% + {\usebibmacro{begrelated}% + \bibstring{reprintfrom}% ? + \origpublcite{\thefield{reprinttitle}}% + \usebibmacro{endrelated}% + \newunit}}% + {\usebibmacro{begrelated}% + \iffieldundef{origlanguage}% + {\bibstring{origpub}% + \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% + \newunit}% + {\iftoggle{cms@postposit}% + {\bibstring{origedition}% + \setunit{\addspace}% + \printfield[edlang]{origlanguage}% + \addcolon% + \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% + \newunit}% + {\printfield[edlang]{origlanguage}% + \setunit{\addspace}% + \bibstring{origedition}% + \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% + \newunit}}}} + +\newbibmacro*{org+publ+loc+year}{% What was wrong with \ifthenelse here? + \printlist{location}% + \iflistundef{organization}% + {\iflistundef{publisher}% + {\setunit*{\addcomma\addspace}}% + {\setunit*{\addcolon\addspace}}}% + {\setunit*{\addcolon\addspace}}% + \printlist{organization}% + \setunit*{\addcomma\space}% + \printlist{publisher}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}} + +\newbibmacro*{year+in+parens}{% + \iffieldundef{volume}% + {noformat}% + {parens}} + +\newbibmacro*{letter+date}{% New for 0.9 + \iflistundef{origlocation}% + {}% + {\printlist{origlocation}% + \newcunit\newblock}% + \iftoggle{cms@switchdates}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {}% + {\cms@datelongalt}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {}% + {\cms@datelong}}} + +\newbibmacro*{unpubl+letter+date}{% For the Misc type. + \iflistundef{origlocation}% + {}% + {\printlist{origlocation}% + \newcunit\newblock}% + \iftoggle{cms@switchdates}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {}% + {\cms@datelongalt}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {\printdate}% For interviews and other dated non-letters + {\cms@datelong}}} + +\newbibmacro*{cmsbookdate}{% + \ifthenelse{\iffieldundef{year}\AND\iffieldundef{origyear}}% + {\newunit}% + {\iftoggle{cms@switchdates}% + {\iffieldundef{origyear}% + {\newunit}% + {\newcunit\printorigdate}}% + {\iffieldundef{year}% + {\newunit}% + {\newcunit\printdate}}}} + +\renewbibmacro*{date}{% Adding the test solved some issues in 0.9 with + \iftoggle{cms@switchdates}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}% + \AND\iffieldundef{origday}}% + {}% + {\printorigdate}}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}% + \AND\iffieldundef{day}}% punctuation in some entry types (Misc). The + {}% whole \printdate thing may need further work. + {\printdate}}} + +\newcommand*{\cms@datelong}{% Modified for 0.9 + \iffieldundef{origmonth}% + {\printfield{origyear}}% + {\printfield[letterday]{origday}\setunit*{\nobreakspace}% + \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% + \printfield{origyear}}}% + +\newcommand*{\cms@datelongalt}{% Modified for 0.9 + \iffieldundef{month}% + {\printfield{year}}% + {\printfield[letterday]{day}\setunit*{\nobreakspace}% + \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% + \printfield{year}}}% + +\newcommand*{\letterdatelong}{% Modified for 0.9 + \iftoggle{cms@switchdates}% This one for users + {\iffieldundef{year}% Previous two for internal use + {}% + {\iffieldundef{month}% + {\printfield{year}}% + {\printfield[letterday]{day}\setunit*{\nobreakspace}% + \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% + \printfield{year}}}}% + {\iffieldundef{origyear}% + {}% + {\iffieldundef{origmonth}% + {\printfield{origyear}}% + {\printfield[letterday]{origday}\setunit*{\nobreakspace}% + \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% + \printfield{origyear}}}}}% + +\newbibmacro*{journal+sub}{% + \iffieldundef{journaltitle}% + {}% + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\clearlist{location}\printtext[shortjournal]{% + \printfield[jtsnoformat]{shortjournal}}}% + {\printtext[journaltitle]{% + \printfield[jtnoformat]{journaltitle}% + \setunit{\addcolon\addspace}% + \printfield[sjtnoformat]{journalsubtitle}}}}}% + +\newbibmacro*{chap+pag}{% + \printfield{chapter}% + \setunit*{\addcomma\space}% + \printfield{pages}} + +\newbibmacro*{mag+news+date}{% + \ifboolexpr{% + ( + test {\ifnameundef{author}}% + or + not test {\ifuseauthor}% + ) + and + not togl {cms@origpublished}% + }% + {\usebibmacro{date+issue}}% + {\usebibmacro{mag+date+issue}}} + +\newbibmacro*{date+issue}{% + \iffieldundef{issue}% + {\iffieldundef{number}% + {\usebibmacro{date}}% + {\iftoggle{cms@numbermonth}% + {\usebibmacro{date}}% + {\usebibmacro{cmsyear}}% + \setunit*{\addcomma\addspace}% Starred version for when the + \printfield[journum]{number}}}% month isn't printed because of + {\printfield{issue}% the toggle. + \setunit{\addspace}% + \usebibmacro{cmsyear}}} + +\newbibmacro*{mag+date+issue}{% + \usebibmacro{journal+sub}% + \setunit*{\addspace}% + \printlist[periodplace]{location}% + \newcunit\newblock + \printfield{usera}% For network ID and possible section of newspaper. + \newcunit\newblock + \usebibmacro{date+issue}} + +\newbibmacro*{cmsyear}{% + \iftoggle{cms@switchdates}% + {\printfield{origyear}}% + {\printfield{year}}} + +\newbibmacro*{cmsorigdate}{% New for 0.9 + \iftoggle{cms@switchdates}% + {\printdate}% + {\printorigdate}} + +\newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, + \ifboolexpr{% article subtype + togl {cms@citejtabb}% + and + test {\ifcitation}% + and + not test {\iffieldundef{shorttitle}}% + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\ifboolexpr{% + togl {cms@bibjtabb}% + and + test {\ifbibliography}% + and + not test {\iffieldundef{shorttitle}}% + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}% + \setunit*{\addspace}% + \iffieldundef{series}% + {}% + {\newcunit + \printfield[jourser]{series}% + \newcunit}%\setunit*{\addspace}? + \ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {\printfield[jourvol]{volume}% + \setunit{\addcomma\addspace}}% + {\printfield[jourvol]{volume}% + \setunit{\addcomma\addspace}% need * here? + \printfield[journum]{number}% + \clearfield{number}% + \setunit{\addcomma\addspace}}% + \printfield{eid}% + \newunit} + +\newbibmacro*{periodical+date+issue}{% For periodical type & + \ifboolexpr{% magazine subtype + togl {cms@citejtabb}% + and + test {\ifcitation}% + and + not test {\iffieldundef{shorttitle}}% + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\ifboolexpr{% + togl {cms@bibjtabb}% + and + test {\ifbibliography}% + and + not test {\iffieldundef{shorttitle}}% + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}% + \newcunit\newblock + \printfield{usera}% For network ID and possible section of newspaper. + \newcunit\newblock + \usebibmacro{date+issue}} + +\renewbibmacro*{postnote}{% + \iffieldundef{postnote}% + {}% + {\setunit{\postnotewrapper}%delim}% + \printfield{postnote}}} + +\newbibmacro*{part+editor+translator}{% + \ifnameundef{namea}% + {\ifnameundef{nameb}% + {}% + {\bibstring{bytranslator}\space% + \printnames[bytranslator]{nameb}}}% + {\ifthenelse{\iffieldundef{nameatype}\OR% + \iffieldequalstr{nameatype}{editor}}% + {\ifnamesequal{namea}{nameb}% + {\bibstring{byeditortr}\space% + \printnames[byeditor]{namea}}% + {\bibstring{byeditor}\space% + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newunit + \bibstring{bytranslator}\space% + \printnames[bytranslator]{nameb}}}}% + {\usebibmacro{bytypestrg}{namea}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newunit% + \bibstring{bytranslator}\addspace% + \printnames[bytranslator]{nameb}}}}} + +\newbibmacro*{compilestrg}{% + \ifthenelse{\value{namec}>1\OR\ifandothers{namec}}% + {\bibstring{compilers}}% + {\bibstring{compiler}}% + \clearname{namec}} + +\newbibmacro*{transstrg}{% + \ifthenelse{\value{translator}>1\OR\ifandothers{translator}}% + {\ifnamesequal{translator}{namec}% + {\bibstring{transcompilers}% + \clearname{namec}}% + {\bibstring{translators}}}% + {\ifnamesequal{translator}{namec}% + {\bibstring{transcompiler}% + \clearname{namec}}% + {\bibstring{translator}}}% + \clearname{translator}} + +\newbibmacro*{parttransstrg}{% + \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}}% + {\ifnamesequal{nameb}{namec}% + {\bibstring{transcompilers}% + \clearname{namec}}% + {\bibstring{translators}}}% + {\ifnamesequal{nameb}{namec}% + {\bibstring{transcompiler}% + \clearname{namec}}% + {\bibstring{translator}}}% + \clearname{nameb}} + +\newbibmacro*{editstrg}{% Test added for 0.9 + \ifthenelse{\iffieldundef{editortype}\OR + \iffieldequalstr{editortype}{editor}}% + {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% + {\ifthenelse{\ifnamesequal{editor}{translator}\AND + \ifnamesequal{editor}{namec}}% + {\bibstring{editortranscompilers}% + \clearname{translator}% + \clearname{namec}}% + {\ifnamesequal{editor}{namec}% + {\bibstring{editorcompilers}% + \clearname{namec}}% + {\ifnamesequal{editor}{translator}% + {\bibstring{editortranslators}% + \clearname{translator}}% + {\bibstring{editors}}}}}% + {\ifthenelse{\ifnamesequal{editor}{translator}\AND + \ifnamesequal{editor}{namec}}% + {\bibstring{editortranscompiler}% + \clearname{translator}% + \clearname{namec}}% + {\ifnamesequal{editor}{namec}% + {\bibstring{editorcompiler}% + \clearname{namec}}% + {\ifnamesequal{editor}{translator}% + {\bibstring{editortranslator}% + \clearname{translator}}% + {\bibstring{editor}}}}}}% + {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% + {\bibstring{\thefield{editortype}s}}% + {\bibstring{\thefield{editortype}}}}% + \clearname{editor}} + +\newbibmacro*{parteditstrg}{% + \ifthenelse{\iffieldundef{nameatype}\OR% + \iffieldequalstr{nameatype}{editor}}% + {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% + {\ifthenelse{\ifnamesequal{namea}{nameb}\AND + \ifnamesequal{namea}{namec}}% + {\bibstring{editortranscompilers}% + \clearname{nameb}% + \clearname{namec}}% + {\ifnamesequal{namea}{namec}% + {\bibstring{editorcompilers}% + \clearname{namec}}% + {\ifnamesequal{namea}{nameb}% + {\bibstring{editortranslators}% + \clearname{nameb}}% + {\bibstring{editors}}}}}% + {\ifthenelse{\ifnamesequal{namea}{nameb}\AND + \ifnamesequal{namea}{namec}}% + {\bibstring{editortranscompiler}% + \clearname{nameb}% + \clearname{namec}}% + {\ifnamesequal{namea}{namec}% + {\bibstring{editorcompiler}% + \clearname{namec}}% + {\ifnamesequal{namea}{nameb}% + {\bibstring{editortranslator}% + \clearname{nameb}}% + {\bibstring{editor}}}}}}% + {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% + {\bibstring{\thefield{nameatype}s}}% + {\bibstring{\thefield{nameatype}}}}% + \clearname{namea}} + +\newbibmacro*{clearpublin}{% + \clearname{author}% + \ifthenelse{\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR% + \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}}% + {}% + {\clearname{namea}% + \clearname{nameb}}% + \clearfield{nameaddon}% + \ifthenelse{\(\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR% + \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR% + \ifentrytype{mvreference}\OR\ifentrytype{proceedings}\OR% + \ifentrytype{collection}\OR\ifentrytype{reference}\OR% + \ifentrytype{suppbook}\OR\ifentrytype{suppcollection}\)\OR% + \(\(\ifentrytype{audio}\OR\ifentrytype{music}\OR% + \ifentrytype{video}\)\AND\iffieldundef{booktitle}\)}% + {}% + {\clearfield{title}% + \clearfield{subtitle}% + \clearfield{titleaddon}% + \clearfield{usere}% + \clearlist{language}}% + \ifentrytype{letter}% + {\iftoggle{cms@switchdates}% + {\clearfield{year}\clearfield{month}}% + {\clearfield{origyear}\clearfield{origmonth}}% + \clearfield{origlocation}}% + {}% + \clearfield{reprinttitle}% +} + +%%%% Related macros from biblatex.def %%%% + +\renewbibmacro*{related:origpubas}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \usebibmacro{cite:origfull}}}% + +\renewbibmacro*{related:reprintfrom}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \nopunct% ??? + \usebibmacro{cite:origpubl}}}% + +\renewbibmacro*{related:origpubin}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \usebibmacro{cmsyear}% + \ifboolexpr{% + test {\iflistsequal{publisher}{savedpublisher}}% + or + test {\iflistundef{publisher}}% + }% + {}% + {\setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}% + \printlist{publisher}% + \setunit{\addcomma\space}% + \iflistsequal{location}{savedlocation}% + {}% + {\printlist{location}}}}} + +\renewbibmacro*{related:bytranslator}[1]{% + \entrydata{#1}{% + \usebibmacro{at+every+item}% + \renewbibmacro*{name:hook}[1]{% + \ifnumequal{\value{listcount}}{1}% + {\begingroup + \mkrelatedstring% + \lbx@initnamehook{#1}% + \endgroup}% + {}}% + \printnames[bytranslator]{translator}% + \setunit*{\addspace\bibstring[\mkrelatedstring]{astitle}\space}% + \clearname{translator}% + \usebibmacro{cite:origfull}}}% + +\renewbibmacro*{related:default}[1]{% + \entrydata*{#1}{% + \usedriver + {\ifnameundef{savedauthor}% + {\ifnameundef{savededitor}% + {}% + {\ifnamesequal{editor}{savededitor}% + {\clearname{editor}}% + {}}}% + {\ifnamesequal{author}{savedauthor}% + {\clearname{author}}% + {}}% + \usebibmacro{at+every+item}% + \renewbibmacro*{cmsbibsortdate}{}% + \renewbibmacro*{related:init}{}% + \DeclareNameAlias{sortname}{default}% + \renewbibmacro*{pageref}{}}% + {\thefield{entrytype}}}} + +\renewbibmacro*{related:multivolume}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% + {}% + {\printtext{% + \printfield{volume}% + \printfield{part}}% + \setunit{\addcolon\space}}% + \usebibmacro{italtitle+stitle}% + \ifboolexpr{% + test {\ifnamesequal{author}{savedauthor}}% + or + test {\ifnameundef{author}}% + }% + {}% + {\usebibmacro{bytypestrg}{author}{author}% + \setunit{\addspace}% + \printnames[byauthor]{author}% + \newcunit\newblock}% + \ifboolexpr{% + test {\ifnamesequal{namea}{savednamea}}% + or + test {\ifnameundef{namea}}% + }% + {\ifboolexpr{% + test {\ifnamesequal{editor}{savededitor}}% + or + test {\ifnameundef{editor}}% + }% + {\ifboolexpr{% + test {\ifnamesequal{nameb}{savednameb}}% + or + test {\ifnameundef{nameb}}% + }% + {}% + {\bibstring{bytranslator}\addspace% + \printnames[bytranslator]{nameb}\newcunit}}% + {\usebibmacro{byeditor+others}% + \newcunit\newblock}}% + {\usebibmacro{part+editor+translator}% + \newcunit}% + \usebibmacro{date}}}% + +\providetoggle{cms@otherlang} + +\apptocmd\blx@opt@autolang@other% +{\toggletrue{cms@otherlang}}% +{\blx@info@noline{Patching 'autolang=other' option}}% +{\PackageWarningNoLine{biblatex-chicago}% + {Upgrading biblatex to >v2.7a recommended,\MessageBreak + especially if you are using the "related"\MessageBreak + functionality}} + +\newbibmacro*{cite:origfull}{% + \printtext[cmshypertarget]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \clearname{author}\clearfield{userf}\clearfield{shorthand}% + \toggletrue{cms@headlessnote}\frenchspacing% + \renewbibmacro*{cmsbibsortdate}{}}% + {\thefield{entrytype}}}} + +\newbibmacro*{cite:origpubl}{% + \printtext[cmshypertarget]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \usebibmacro{clearpublin}\clearfield{shorthand}% + \toggletrue{cms@headlessnote}\toggletrue{cms@origpublished}% + \frenchspacing\renewbibmacro*{cmsbibsortdate}{}% + \usebibmacro{cms:titlehook}}% + {\thefield{entrytype}}}} + +\newbibmacro*{at+every+item}{% + \iffieldequalstr{pubstate}{reprint}% + {\toggletrue{cms@reprint}}% + {\togglefalse{cms@reprint}}% + \ifboolexpr{% AD requires this here because cmsbibsortdate=null + test {\iffieldundef{origyear}}% + or + test {\iffieldundef{year}}% + or + not test {\iffieldint{year}}% + or + togl {cms@switchdates}% + }% + {}% + {\ifboolexpr{% Needed for open-ended ranges + test {\iffieldundef{endyear}}% + or + not test {\iffieldnum{endyear}}% + }% + {\ifthenelse{\thefield{origyear}>\thefield{year}}% + {\toggletrue{cms@switchdates}}% + {}}% + {\ifthenelse{\thefield{origyear}>\thefield{endyear}}% + {\toggletrue{cms@switchdates}}% + {}}}}% + +\endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx index 66907a36043..e0d5e5a59af 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx @@ -1,15 +1,20 @@ -% $Id: chicago-notes.bbx,v 0.9.7.64 2016/03/21 18:06:34 dfussner Exp $ +% $Id: chicago-notes.bbx,v 0.9.8.28 2016/06/07 07:43:24 dfussner Exp $ % This is a biblatex style file, adapted mainly from Lehman's standard.bbx % It provides the bibliography formatting for the Chicago notes + % bibliography style. -\ProvidesFile{chicago-notes.bbx}[2016/03/21 v 2.9a biblatex bibliography style] +\ProvidesFile{chicago-notes.bbx}[2016/06/07 v 3.4 biblatex bibliography style] %%%% Initialize and format bibliography and los %%%% +\providetoggle{cms@citejtabb}% Here for Sourcemap declaration +\providetoggle{cms@bibjtabb}% + \DeclareFieldFormat{shorthandwidth}{#1} +\DeclareFieldFormat{shortjournalwidth}{\mkbibemph{\textbf{#1}}\isdot} + \newlength{\lositemsep} \defbibenvironment{bibliography}% New for 0.9a @@ -37,8 +42,8 @@ \defbibenvironment{shorthands}% For biblatex < 2.9 {\list - {\printfield[shorthandwidth]{shorthand}}% - {\setlength{\labelwidth}{\shorthandwidth}% + {\printfield[shorthandwidth]{shorthand}}% + {\setlength{\labelwidth}{\shorthandwidth}% \setlength{\leftmargin}{\labelwidth}% \setlength{\labelsep}{\biblabelsep}% \addtolength{\leftmargin}{\labelsep}% @@ -76,6 +81,62 @@ {\endlist\nopunct\vspace{-\baselineskip}}% Kludges for endnotes {\item} +\defbibenvironment{shortjournal}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.7\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist} + {\item} + +\defbibenvironment{sjnotes}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\footnotesize% + \setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.3\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist} + {\item} + +\defbibenvironment{sjendnotes}% + {\list + {\printfield[shortjournalwidth]{shortjournal}}% + {\enotesize% + \setlength{\labelwidth}{\shortjournalwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.3\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\lositemsep}% + \setlength{\parsep}{\bibparsep}% + \renewcommand*{\makelabel}[1]{##1\hss}}} + {\endlist\nopunct\vspace{-\baselineskip}} + {\item} + +\defbibcheck{shortjournal}{% Only one list + \iffieldundef{shortjournal}% + {\skipentry}% + {\ifcsdef{\strfield{shortjournal}}% + {\skipentry}% + {\savefieldcs{shortjournal}% + {\strfield{shortjournal}}}}}% + +% \defbibcheck{shortjournal}{% Multiple lists +% \ifcsdef{cms@shjour}% +% {\iffieldequals{shortjournal}{\cms@shjour}% +% {\skipentry}% +% {\savefield{shortjournal}{\cms@shjour}}}% +% {\savefield{shortjournal}{\cms@shjour}}} + \AtBeginBibliography{% \togglefalse{cms@headlessnote}% \togglefalse{cms@shortnote}% @@ -154,12 +215,12 @@ \usebibmacro{name:hook}{#3#1}% \ifblank{#3}{}{% \ifcapital - {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{\MakeCapital{#3}}\isdot}% {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\addhighpenspace}}% \mkbibnamelast{#1}\isdot \ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#2}\isdot}% - \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}} + \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}% {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% \mkbibnamelast{#1}\isdot% @@ -174,8 +235,8 @@ \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\addlowpenspace}% \ifblank{#3}{}{% \mkbibnameprefix{#3}\isdot - \ifpunctmark{'} - {} + \ifpunctmark{'}% + {}% {\ifuseprefix{\addhighpenspace}{\addlowpenspace}}}% \mkbibnamelast{#1}\isdot \ifblank{#4}{}{% @@ -183,51 +244,51 @@ {\ifnumeral{#4}% {\addlowpenspace\mkbibnameaffix{#4}\isdot}% {\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot% - \ifboolexpr{ + \ifboolexpr{% test{\ifnumless{\value{listcount}}{\value{listtotal}}}% and test{\ifnumless{\value{listcount}}{\value{maxnames}}}% - } + }% {\addcomma}% {}}}% {\addlowpenspace\mkbibnameaffix{#4}\isdot}}} -\@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3/3.4 +\@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3 {\renewbibmacro*{name:family-given}[4]{% - \ifuseprefix% + \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% \ifdefvoid{#3}{}{% - \ifcapital% + \ifcapital {\mkbibnameprefix{\MakeCapital{#3}}\isdot}% {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% - \mkbibnamefamily{#1}\isdot% + \mkbibnamefamily{#1}\isdot \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% {\usebibmacro{name:delim}{#1}% - \usebibmacro{name:hook}{#1}% - \mkbibnamefamily{#1}\isdot% - \ifboolexpr{% - 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}}}% + \usebibmacro{name:hook}{#1}% + \mkbibnamefamily{#1}\isdot + \ifboolexpr{% + 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}}}% \renewbibmacro*{name:given-family}[4]{% \usebibmacro{name:delim}{#2#3#1}% \usebibmacro{name:hook}{#2#3#1}% \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}% \ifdefvoid{#3}{}{% - \mkbibnameprefix{#3}\isdot% - \ifprefchar% + \mkbibnameprefix{#3}\isdot + \ifprefchar {}% {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% - \mkbibnamefamily{#1}\isdot% + \mkbibnamefamily{#1}\isdot \ifdefvoid{#4}{}{% \iftoggle{cms@jrcomma}% {\ifnumeral{#4}% @@ -242,88 +303,38 @@ {}}}% {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}}{}% -\newbibmacro*{author/editors/translators}{% - \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}% - {\usebibmacro{author}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}% - {\usebibmacro{parteditor}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}% - {\usebibmacro{editor}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}% - {\usebibmacro{parttranslator}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}% - {\usebibmacro{translator}}% - {\ifnameundef{namec}% - {\let\bbx@lasthash\undefined}% - {\usebibmacro{compiler}}}}}}}} - \renewbibmacro*{author/editor}{% - \ifuseauthor% - {\usebibmacro{author}}% + \ifboolexpr{% + test {\ifuseauthor}% + or + togl {cms@headlessnote} + }% + {\usebibmacro{author}}% + {\ifusenamea% + {\usebibmacro{pickeditor}}% {\ifuseeditor% - {\ifnameundef{namea}% - {\usebibmacro{moreeditor}}% - {\usebibmacro{parteditor}}}% - {\ifusetranslator% - {\ifnameundef{nameb}% + {\usebibmacro{moreeditor}}% + {\ifusenameb% + {\usebibmacro{picktranslator}}% + {\ifusetranslator% {\usebibmacro{moretranslator}}% - {\usebibmacro{parttranslator}}}% - {\iftoggle{cms@usecompiler}% - {\usebibmacro{compiler}}% - {\let\bbx@lasthash\undefined% - \settoggle{cms@usecompiler}{true}}}}}} + {\ifusenamec% + {\usebibmacro{compiler}}% + {\let\bbx@lasthash\undefined}}}}}}}% \renewbibmacro*{author}{% \iftoggle{cms@headlessnote}% {\usebibmacro{justauthor}}% {\usebibmacro{moreauthor}}} -\newbibmacro*{allauthor}{% - \ifnameundef{author}% - {\ifnameundef{editor}% - {\ifnameundef{translator}% - {\ifnameundef{namec}% - {\let\bbx@lasthash\undefined}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames[sortname]{namec}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{compilestrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames[sortname]{translator}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{transstrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\space} - {\printnames{editor}\addcomma\space - \savefield{namehash}{\bbx@lasthash}}% - \usebibmacro{editstrg}}}% - {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\iffieldundef{nameaddon}% - {\bibnamedash\addperiod\addspace} - {\bibnamedash\addspace}}% - {\iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{author}\bibrightbracket% - \savefield{namehash}{\bbx@lasthash}}% - {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{author}\addquestion\bibrightbracket% - \savefield{namehash}{\bbx@lasthash}}% - {\printnames{author}% - \savefield{namehash}{\bbx@lasthash}}}}}} - \newbibmacro*{justauthor}{% - \ifnameundef{author} + \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}% {\iftoggle{cms@origcite}{}{\let\bbx@lasthash\undefined}}% - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% {\iffieldundef{nameaddon}% - {\bibnamedash\addperiod\addspace} - {\bibnamedash\addspace}} + {\bibnamedash\addperiod\addspace}% + {\bibnamedash\addspace}}% {\iffieldequalstr{authortype}{anon}% {\bibleftbracket\printnames{author}\bibrightbracket% \savefield{fullhash}{\bbx@lasthash}}% @@ -334,13 +345,13 @@ \savefield{fullhash}{\bbx@lasthash}}}}}} \newbibmacro*{moreauthor}{% - \ifnameundef{author} - {\usebibmacro{pickeditor}} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} + \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}% + {\usebibmacro{pickeditor}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% {\iffieldundef{nameaddon}% - {\bibnamedash\addperiod\addspace} - {\bibnamedash\addspace}} + {\bibnamedash\addperiod\addspace}% + {\bibnamedash\addspace}}% {\iffieldequalstr{authortype}{anon}% {\bibleftbracket\printnames{author}\bibrightbracket% \savefield{fullhash}{\bbx@lasthash}}% @@ -351,76 +362,81 @@ \savefield{fullhash}{\bbx@lasthash}}}}}} \newbibmacro*{pickeditor}{% - \ifnameundef{namea} + \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% {\usebibmacro{moreeditor}}% {\usebibmacro{parteditor}}} \newbibmacro*{moreeditor}{% \ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}% - {\usebibmacro{picktranslator}} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% {\bibnamedash\editordelim}% {\printnames{editor}\editordelim% \savefield{fullhash}{\bbx@lasthash}}% \usebibmacro{editstrg}}} \renewbibmacro*{editor}{% - \ifnameundef{editor} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\editordelim}% - {\printnames{editor}\editordelim% + \iftoggle{cms@headlessnote}% + {}% + {\ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% + {\ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}% + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\editordelim}% + {\printnames{editor}\editordelim% + \savefield{fullhash}{\bbx@lasthash}}% + \usebibmacro{editstrg}}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\nameadelim}% + {\printnames[sortname]{namea}\nameadelim% \savefield{fullhash}{\bbx@lasthash}}% - \usebibmacro{editstrg}}} + \usebibmacro{parteditstrg}}}}% \newbibmacro*{parteditor}{% - \ifnameundef{namea} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\printnames[sortname]{namea}\addcomma\space + \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}% + {\usebibmacro{picktranslator}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\nameadelim}% + {\printnames[sortname]{namea}\nameadelim% \savefield{fullhash}{\bbx@lasthash}}% \usebibmacro{parteditstrg}}} \newbibmacro*{picktranslator}{% - \ifnameundef{nameb} + \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}% {\usebibmacro{moretranslator}}% {\usebibmacro{parttranslator}}} \newbibmacro*{moretranslator}{% \ifthenelse{\ifnameundef{translator}\OR\NOT\ifusetranslator}% - {\usebibmacro{compiler}} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\printnames[sortname]{translator}\addcomma\space + {\usebibmacro{compiler}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\printnames[sortname]{translator}\addcomma\addspace% \savefield{fullhash}{\bbx@lasthash}}% \usebibmacro{transstrg}}} \newbibmacro*{parttranslator}{% - \ifnameundef{nameb} - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\printnames[sortname]{nameb}\addcomma\space + \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}% + {\usebibmacro{compiler}}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\printnames[sortname]{nameb}\addcomma\addspace% \savefield{fullhash}{\bbx@lasthash}}% \usebibmacro{parttransstrg}}} \newbibmacro*{compiler}{% - \ifboolexpr{ - test {\ifnameundef{namec}}% - or - not togl {cms@usecompiler}% - }% - {\let\bbx@lasthash\undefined} - {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT - \iffirstonpage} - {\bibnamedash\addcomma\addspace} - {\printnames[sortname]{namec}\addcomma\space + \ifthenelse{\ifnameundef{namec}\OR\NOT\ifusenamec}% + {\let\bbx@lasthash\undefined}% + {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT% + \iffirstonpage}% + {\bibnamedash\addcomma\addspace}% + {\printnames[sortname]{namec}\addcomma\addspace% \savefield{fullhash}{\bbx@lasthash}}% \usebibmacro{compilestrg}}} @@ -446,10 +462,36 @@ {\printtext[bibhyperref]{\printlist{organization}\newcunit}}% {}}}% {\usebibmacro{author/editor}% - \setunit{\addcomma\space}}% + \setunit{\addcomma\addspace}}% \printfield[lostitle]{title}% \finentry}} +\DeclareBibliographyDriver{shortjournal}{% + \iffieldundef{journaltitle}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}}% + {\printtext[journaltitle]{% + \printfield[jtnoformat]{journaltitle}% + \setunit{\addcolon\addspace}% + \printfield[sjtnoformat]{journalsubtitle}}% + \setunit*{\addspace}% + \printlist[periodplace]{location}}% + \finentry}% + +\DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \pertype{periodical} + \step[fieldsource=shorttitle, final] + \step[fieldset=shortjournal, origfieldval] + } + } +}% + \DeclareBibliographyDriver{shorthands}{% For biblatex < 2.9 \iftoggle{cms@fullshhand}% {\usedriver{\frenchspacing}% @@ -464,7 +506,7 @@ {\printtext[bibhyperref]{\printlist{organization}\newcunit}}% {}}}% {\usebibmacro{author/editor}% - \setunit{\addcomma\space}}% + \setunit{\addcomma\addspace}}% \printfield[lostitle]{title}% \finentry}} @@ -501,6 +543,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} {\usebibmacro{bibindex}% @@ -534,6 +581,12 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% + \newunit\newblock \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -569,6 +622,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -586,7 +644,7 @@ \newcunit%\setunit{\addperiod\addspace}% \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\setunit{\addperiod\addspace}}% Fix customc? {\setunit{\addcomma\addspace}}% \iffieldundef{edition}% @@ -596,15 +654,15 @@ \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% {\usebibmacro{cms-in:}% \printtext[maintitle]{% \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\printfield{volume}% \printfield{part}% @@ -615,7 +673,7 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}} \newcunit\newblock \usebibmacro{volume+pages}% @@ -642,6 +700,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% @@ -710,32 +773,47 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -759,16 +837,16 @@ \newunit\newblock \usebibmacro{part+editor+translator}% \setunit*{\addperiod\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@bookbibxref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@bookbibxref}% - } + }% {\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% \newcunit \iffieldundef{edition}% @@ -776,7 +854,7 @@ {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -801,32 +879,47 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -852,6 +945,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -865,6 +963,8 @@ \setunit{\addspace}% \usebibmacro{bib:xref+date}% \newunit\newblock + \usebibmacro{part+editor+translator}% + \newunit\newblock \ifboolexpr{% test {\iffieldundef{crossref}}% or @@ -881,7 +981,7 @@ {}% {\usebibmacro{edition}}% \usebibmacro{editorpunct}% - \usebibmacro{bytranslator+others}% + \usebibmacro{byeditor+others}% \newunit \usebibmacro{volume+or+volumes}% \newunit\newblock @@ -903,32 +1003,47 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -973,6 +1088,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -989,16 +1109,16 @@ \usebibmacro{byauthor}% \setunit{\addperiod\addspace}% \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@bibcrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@bibcrossref}% - } + }% {\setunit{\addperiod\addspace}% \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% @@ -1030,13 +1150,18 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix @@ -1044,13 +1169,18 @@ \bibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\newunit}% \usebibmacro{xrefprenote}% Volume fix @@ -1058,6 +1188,11 @@ \bibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1074,16 +1209,16 @@ \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@bibcrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@bibcrossref}% - } + }% {\newunit\newblock \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% @@ -1115,13 +1250,18 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix @@ -1129,13 +1269,18 @@ \bibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix @@ -1143,6 +1288,11 @@ \bibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1159,20 +1309,22 @@ \usebibmacro{byauthor}% \setunit{\addperiod\addspace}% \usebibmacro{part+editor+translator}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@bibcrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@bibcrossref}% - } + }% {\setunit{\addperiod\addspace}% \usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% \newcunit\newblock + \usebibmacro{byeditor+others}% + \newcunit\newblock \usebibmacro{volume+pages}% \newunit\newblock \usebibmacro{ser+num}% @@ -1191,13 +1343,18 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix @@ -1205,13 +1362,18 @@ \bibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix @@ -1219,6 +1381,11 @@ \bibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1241,7 +1408,7 @@ {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -1275,6 +1442,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1286,7 +1458,7 @@ \newunit\newblock \printtext[title]{% \printfield[noformat]{title}}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit*{\addcomma\addspace}% \usebibmacro{letter+date}% @@ -1295,16 +1467,16 @@ \newunit\newblock%\bibsentence \usebibmacro{part+editor+translator}% \setunit*{\addperiod\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or togl {cms@bibcrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or togl {cms@bibcrossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}% \newcunit @@ -1333,13 +1505,18 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\newunit}% \usebibmacro{xrefprenote}% Volume fix @@ -1347,13 +1524,18 @@ \bibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\newunit}% \usebibmacro{xrefprenote}% Volume fix @@ -1361,6 +1543,11 @@ \bibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1394,6 +1581,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1408,7 +1600,7 @@ {\printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -1441,6 +1633,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1460,7 +1657,7 @@ \newunit\newblock \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\newunit}% Fix customc? {\newcunit}% \iffieldundef{edition}% @@ -1470,15 +1667,15 @@ \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% {\usebibmacro{cms-in:}% \printtext[maintitle]{% \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\printfield{volume}% \printfield{part}% @@ -1489,7 +1686,7 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}} \newcunit\newblock \usebibmacro{volume+pages}% @@ -1526,6 +1723,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1555,8 +1757,8 @@ \newunit\newblock \usebibmacro{date}% \newunit\newblock - \iffieldundef{urlyear} - {} + \iffieldundef{urlyear}% + {}% {\printurldate}% Date fix \newunit\newblock \iftoggle{cms@doionly}% @@ -1574,6 +1776,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1590,8 +1797,8 @@ \printfield{type}% \setunit{\addspace}% \printfield{number}% - \iflistundef{location} - {} + \iflistundef{location}% + {}% {\setunit*{\addspace}% \printtext[parens]{% \printlist[][-\value{listtotal}]{location}}}% @@ -1613,6 +1820,12 @@ \usebibmacro{bib+doi+url}% \newunit\newblock \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{periodical}{% @@ -1673,6 +1886,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1686,6 +1904,8 @@ \setunit{\addspace}% \usebibmacro{bib:xref+date}% \newunit\newblock + \usebibmacro{part+editor+translator}% + \newunit\newblock \ifboolexpr{% test {\iffieldundef{crossref}}% or @@ -1697,6 +1917,8 @@ togl {cms@bookbibxref}% }% {\usebibmacro{mtitle+mstitle+vol+part+title+stitle}% + \usebibmacro{editorpunct}% + \usebibmacro{byeditor+others}% \newunit\newblock \usebibmacro{volume+or+volumes}% \newunit\newblock @@ -1716,32 +1938,47 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{xref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}}% {\ifboolexpr{% Changed for 16th ed. test {\ifterm}% or test {\ifpunctmark{*}}% - } + }% {\setunit{\addspace\bibsentence}}% {\setunit{\addperiod\addspace}}% \usebibmacro{xrefprenote}% Volume fix \bookbibxrefcite{\thefield{crossref}}% \usebibmacro{xrefpostnote}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}} @@ -1764,7 +2001,7 @@ {\usebibmacro{edition}}% \newcunit \usebibmacro{bybookauthor}% - \usebibmacro{editorpunct} + \usebibmacro{editorpunct}% \usebibmacro{byeditor+others}% \newcunit\newblock \printfield{chapter}% @@ -1789,6 +2026,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1822,6 +2064,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1838,7 +2085,7 @@ \printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}% - \setunit{\addspace}% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -1851,7 +2098,7 @@ \usebibmacro{editorpunct}%\newunit\newblock \printfield{note}% \setunit*{\addcomma\addspace}\newblock% - \iffieldequalstr{entrysubtype}{magazine} + \iffieldequalstr{entrysubtype}{magazine}% {\usebibmacro{mag+news+date}% \newcunit\newblock \usebibmacro{chap+pag}}% @@ -1867,6 +2114,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1918,6 +2170,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1947,6 +2204,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1978,6 +2240,11 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}} @@ -1992,8 +2259,8 @@ \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% \iffieldundef{booktitle}% Comma after italics, period after quotes - {\newcunit} - {\newunit}%\setunit{\addspace}\newblock% + {\setunit{\ctitleaddonpunct}}% + {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock% \printfield{titleaddon}%\usebibmacro{title+stitle}% \setunit{\addspace}\newblock%\bibsentence \usebibmacro{language+transtitle}% @@ -2004,7 +2271,7 @@ \setunit{\addperiod\addspace}% \usebibmacro{chapinscore}% \usebibmacro{btitle+bstitle}% - \iffieldundef{booktitle} + \iffieldundef{booktitle}% {\setunit{\addperiod\addspace}}% Fix customc? {\setunit{\addcomma\addspace}}% \iffieldundef{edition}% @@ -2014,16 +2281,16 @@ \usebibmacro{bybookauthor}% \usebibmacro{byeditor+others}% \newunit% ??? Editorpunct maybe not right here? - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% {\usebibmacro{cms-in:}% \printtext[maintitle]{% \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\printfield{volume}% \printfield{part}% \setunit{\addspace} @@ -2033,8 +2300,8 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}} + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}}% \newcunit\newblock \usebibmacro{volume+pages}% \newunit\newblock @@ -2060,14 +2327,19 @@ \newunit\newblock \usebibmacro{pageref}% \newunit\newblock + \iftoggle{cms@related}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newunit}% + {}% \usebibmacro{originally+published+as}% \usebibmacro{finentry}}% %%%% Other Formatting Macros %%%% \newbibmacro*{bib+doi+url}{% 16th ed. - \iffieldundef{urlyear} - {} + \iffieldundef{urlyear}% + {}% {\printurldate}% Date fix \iffieldundef{addendum}% Punctuation fixes in 0.9.9c {\newunit\newblock}% @@ -2078,20 +2350,32 @@ {\printfield{doi}% \setunit*{\addperiod\addspace}\newblock% \clearfield{url}}}% - {\iftoggle{cms@doi}% + {\ifboolexpr{% + togl {cms@doi}% + and + not test {\iffieldundef{doi}}% + }% {\printfield{doi}% \setunit*{\addperiod\addspace}\newblock}% {}}% - \iftoggle{cms@eprint}% + \ifboolexpr{% + togl {cms@eprint}% + and + not test {\iffieldundef{eprint}}% + }% {\usebibmacro{eprint}% \setunit*{\addperiod\addspace}\newblock}% {}% - \iftoggle{cms@url}% + \ifboolexpr{% + togl {cms@url}% + and + not test {\iffieldundef{url}}% + }% {\printfield{url}}% {}}% \newbibmacro{bib:xref+date}{% Experiment for xrefs - \ifboolexpr{ + \ifboolexpr{% togl {cms@omitxrefdate}% or togl {cms@bookbibxref}% @@ -2110,8 +2394,8 @@ or not togl {cms@switchdates}% )) - } - {\ifboolexpr{ + }% + {\ifboolexpr{% togl {cms@omitxrefdate}% or togl {cms@bookbibxref}% @@ -2130,13 +2414,13 @@ or not togl {cms@switchdates}% )) - } + }% {}% {\printtext[parens]{\usebibmacro{date}}}}% {\printtext[parens]{\usebibmacro{date}}}} \newbibmacro*{volume+pages}{% Volume fix (modified) - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{maintitle}}% or togl {cms@vol}% @@ -2161,7 +2445,7 @@ \printfield{part}% \newcunit% \printfield{pages}}}}% - {\ifboolexpr{ + {\ifboolexpr{% togl {cms@hidevolumes}% and ( @@ -2176,15 +2460,15 @@ \printfield{volumes}}}}% \newbibmacro*{mtitle+mstitle+vol+part+title+stitle}{% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% {\usebibmacro{cms-in:}% 16th ed (Also 15th?) \printtext[maintitle]{% \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\printfield{volume}% \printfield{part}% @@ -2195,12 +2479,12 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}}} \newbibmacro*{mtitle+mstitle+vol+part+btitle+bstitle}{% \usebibmacro{btitle+bstitle}% - \iffieldundef{maintitle} + \iffieldundef{maintitle}% {}% {\ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)\OR% \(\iffieldundef{booktitle}\AND\NOT\ifentrytype{bookinbook}\)}% ??? @@ -2209,7 +2493,7 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct} \printfield{maintitleaddon}% \toggletrue{cms@vol}}% InIn fix {\printfield{volume}% @@ -2221,7 +2505,7 @@ \printfield[noformat]{maintitle}% \setunit{\addcolon\addspace}% \printfield[noformat]{mainsubtitle}}% - \newcunit + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}}} \newbibmacro*{journal+issue+year+pages}{% @@ -2241,7 +2525,7 @@ {\newcunit\printfield{pages}}}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed. {\newcunit% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -2249,7 +2533,7 @@ \newcunit\printfield{pages}}% {\setunit{\addspace}% \printtext[parens]{% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -2274,7 +2558,7 @@ {\newcunit\printfield{pages}}}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed. {\newcunit% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -2282,7 +2566,7 @@ \newcunit\printfield{pages}}% {\setunit{\addspace}% \printtext[parens]{% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -2291,14 +2575,14 @@ \printfield{pages}}}} \newbibmacro*{bycompiler}{% - \ifnameundef{namec} - {} - {\bibstring{bycompiler}\addspace + \ifnameundef{namec}% + {}% + {\bibstring{bycompiler}\addspace% \printnames[bycompiler]{namec}}} \renewbibmacro*{byeditor}{% - \ifnameundef{editor} - {} + \ifnameundef{editor}% + {}% {\usebibmacro{bytypestrg}{editor}{editor}% \setunit{\addspace}% \printnames[byeditor]{editor}% @@ -2306,20 +2590,20 @@ \usebibmacro{byeditorx}} \renewbibmacro*{byeditorx}{% - \ifnameundef{editora} - {} + \ifnameundef{editora}% + {}% {\usebibmacro{bytypestrg}{editora}{editor}% \setunit{\addspace}% \printnames[byeditora]{editora}% \usebibmacro{editorpunct}}% - \ifnameundef{editorb} - {} + \ifnameundef{editorb}% + {}% {\usebibmacro{bytypestrg}{editorb}{editor}% \setunit{\addspace}% \printnames[byeditorb]{editorb}% \usebibmacro{editorpunct}}% - \ifnameundef{editorc} - {} + \ifnameundef{editorc}% + {}% {\usebibmacro{bytypestrg}{editorc}{editor}% \setunit{\addspace}% \printnames[byeditorc]{editorc}% @@ -2328,32 +2612,32 @@ \renewbibmacro*{byeditor+others}{% \ifthenelse{\NOT\ifnameundef{editor}\AND \(\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}\)} + \iffieldequalstr{editortype}{editor}\)}% {\def\@tempa{byeditor}% - \ifnamesequal{editor}{translator} + \ifnamesequal{editor}{translator}% {\edef\@tempa{\@tempa tr}% - \clearname{translator}} + \clearname{translator}}% {}% - \ifnamesequal{editor}{namec} + \ifnamesequal{editor}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{editor}{commentator} + \ifnamesequal{editor}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{editor}{annotator} + \clearname{commentator}}% + {\ifnamesequal{editor}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{editor}{introduction} + \ifnamesequal{editor}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{editor}{foreword} + \clearname{introduction}}% + {\ifnamesequal{editor}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{editor}{afterword} + \clearname{foreword}}% + {\ifnamesequal{editor}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% \bibstring{\@tempa}% \setunit{\addspace}% @@ -2365,62 +2649,62 @@ \usebibmacro{bytranslator+others}} \renewbibmacro*{bytranslator+others}{% - \ifnameundef{translator} - {} + \ifnameundef{translator}% + {}% {\def\@tempa{bytranslator}% - \ifnamesequal{translator}{namec} + \ifnamesequal{translator}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{translator}{commentator} + \ifnamesequal{translator}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{translator}{annotator} + \clearname{commentator}}% + {\ifnamesequal{translator}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{translator}{introduction} + \ifnamesequal{translator}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{translator}{foreword} + \clearname{introduction}}% + {\ifnamesequal{translator}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{translator}{afterword} + \clearname{foreword}}% + {\ifnamesequal{translator}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% - \bibstring{\@tempa}\space + \bibstring{\@tempa}\addspace% \printnames[bytranslator]{translator}% \clearname{translator}% \usebibmacro{editorpunct}}% \usebibmacro{bycompiler+others}} \newbibmacro*{bycompiler+others}{% - \ifnameundef{namec} - {} + \ifnameundef{namec}% + {}% {\def\@tempa{bycompiler}% - \ifnamesequal{namec}{commentator} + \ifnamesequal{namec}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{namec}{annotator} + \clearname{commentator}}% + {\ifnamesequal{namec}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{namec}{introduction} + \ifnamesequal{namec}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{namec}{foreword} + \clearname{introduction}}% + {\ifnamesequal{namec}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{namec}{afterword} + \clearname{foreword}}% + {\ifnamesequal{namec}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% - \bibstring{\@tempa}\space + \bibstring{\@tempa}\addspace% \printnames[bycompiler]{namec}% \clearname{namec}% \usebibmacro{editorpunct}}% - \usebibmacro{byothers}} + \usebibmacro{byothers}}% \newbibmacro*{byothers}{% Changed for 0.9 \usebibmacro{bytranslator}% @@ -2439,4 +2723,81 @@ \usebibmacro{editorpunct}% \usebibmacro{withafterword}} +%%%% Related functionality from standard.bbx %%%% + +\newcounter{bbx:relatedcount} +\newcounter{bbx:relatedtotal} + +\newbibmacro*{related:init}{% + \csundef{bbx:relatedloop}} + +\newbibmacro*{begrelated}{\ifcsdef{bbx@lasthash}% + {\let\cms@related@hash\bbx@lasthash}{}}% +\newbibmacro*{endrelated}{\ifcsdef{cms@related@hash}% + {\global\let\bbx@lasthash\cms@related@hash% + \let\cms@related@hash\undefined}{}}% +\newbibmacro*{begrelatedloop}{} +\newbibmacro*{endrelatedloop}{} + +\def\ifrelatedloop{% + \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}% + or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }} + +\newbibmacro*{related}{% + \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }% + {}% + {\usebibmacro{begrelated}% + \def\bbx@tempa{}% + \setcounter{bbx:relatedtotal}{0}% + \def\do##1{% + \entrydata{##1}{% + \ifrelatedloop + {}% + {\stepcounter{bbx:relatedtotal}% + \gappto{\bbx@tempa}{##1,}}}}% + \docsvfield{related}% + \restorefield{related}{\bbx@tempa}% + \ifnumgreater{\value{bbx:relatedtotal}}{0}% + {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}% + \iffieldundef{clonesourcekey}% + {}% + {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}% + \setcounter{bbx:relatedcount}{0}% + \def\do{% + \stepcounter{bbx:relatedcount}% + \ifnumgreater{\value{bbx:relatedcount}}{1}% + {\printtext{\relateddelim}}% + {}}% + \ifbibmacroundef{related:\strfield{relatedtype}}% + {\appto{\do}{\usebibmacro{related:default}}} + {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}% + \iffieldformatundef{related:\strfield{relatedtype}}% + {\def\bbx@tempa{related}} + {\def\bbx@tempa{related:\strfield{relatedtype}}}% + \iffieldformatundef{relatedstring:\strfield{relatedtype}} + {\def\bbx@tempb{relatedstring:default}} + {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}% + \printtext[\bbx@tempa]{% + \usebibmacro{begrelatedloop}% + \iffieldundef{relatedstring}% + {\ifboolexpr{% + test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}% + and + test {\ifbibxstring{\thefield{relatedtype}s}}% + }% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedtype}s}}}% + {\iffieldbibstring{relatedtype}% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedtype}}}}% + {}}}% + {\iffieldbibstring{relatedstring}% + {\printtext[\bbx@tempb]{% + \bibstring[\mkrelatedstring]{\thefield{relatedstring}}}}% + {\printfield[\bbx@tempb]{relatedstring}}}% + \docsvfield{related}% + \usebibmacro{endrelatedloop}}}% + {}% + \usebibmacro{endrelated}}} + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx index 32e03299a05..140f6cb6310 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx @@ -1,10 +1,10 @@ -% $Id: chicago-notes.cbx,v 0.9.7.115 2016/03/18 17:16:53 dfussner Exp $ +% $Id: chicago-notes.cbx,v 0.9.8.36 2016/06/07 08:17:10 dfussner Exp $ % This is a biblatex citation style file, adapted from Lehman's % authortitle-cverb.cbx. It is heavily modified, with the intention % of providing footnote citations and a bibliography formatted % according to the specifications of the Chicago Manual of Style. -\ProvidesFile{chicago-notes.cbx}[2016/03/18 v 2.9a biblatex citation style] +\ProvidesFile{chicago-notes.cbx}[2016/06/07 v 3.4 biblatex citation style] %%%% Biblatex initialization + Chicago options + Toggles %%%% @@ -36,6 +36,7 @@ \providetoggle{cms@shortnote} \providetoggle{cms@allshort} \providetoggle{cms@noibid} +\providetoggle{cms@noidem} \providetoggle{cms@usecompiler} \providetoggle{cms@shorthandibid} \providetoggle{cms@printshhand} @@ -55,6 +56,11 @@ \providetoggle{cms@xrefvol} \providetoggle{cms@xrefpart} \providetoggle{cms@omitxrefdate} +\providetoggle{cms@xrefurl} +\providetoggle{cms@related} +\providetoggle{cms@citerel} +\providetoggle{cms@gencite} +\providetoggle{cms@genallnames} \AtEveryCitekey{% \iffieldundef{userc}% @@ -88,6 +94,18 @@ {\toggletrue{cms@switchdates}}% {}}}}% +\protected\def\cms@warning@noline#1{% + \begingroup + \blx@safe@actives + \PackageWarningNoLine{biblatex-chicago}{#1}% + \endgroup} + +\DeclareBibliographyOption[boolean]{genallnames}[true]{% + \settoggle{cms@genallnames}{#1}} + +\DeclareEntryOption[boolean]{genallnames}[true]{% + \settoggle{cms@genallnames}{#1}} + \DeclareBibliographyOption{annotation}[true]{% \global\toggletrue{cms@annotation}} @@ -110,7 +128,7 @@ \inherit{shorthand}{shorthand} \inherit{shorthandintro}{shorthandintro} }}% - {}} + {}}% \DeclareBibliographyOption{compresspages}[true]{% \ifcsdef{cms@opt@crange@#1}% @@ -131,11 +149,11 @@ \global\toggletrue{cms@modpostnote}}% \def\cms@opt@ppunct@false{}% -\DeclareBibliographyOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} +\DeclareBibliographyOption[boolean]{usecompiler}[true]{% + \settoggle{blx@usenamec}{#1}} -\DeclareEntryOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}} +\DeclareEntryOption[boolean]{usecompiler}[true]{% + \settoggle{blx@usenamec}{#1}} \DeclareBibliographyOption{juniorcomma}[true]{% \settoggle{cms@jrcomma}{#1}} @@ -151,13 +169,13 @@ \DeclareBibliographyOption{longcrossref}[false]{% \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} + {\csuse{cms@opt@lxref@#1}}% + {\blx@err@invopt{longcrossref=#1}{}}}% \def\cms@opt@lxref@none{% \togglefalse{cms@citecrossref}% \togglefalse{cms@bibcrossref}% \togglefalse{cms@bookcitexref}% - \togglefalse{cms@bookbibxref}} + \togglefalse{cms@bookbibxref}}% \def\cms@opt@lxref@true{% \toggletrue{cms@citecrossref}% \toggletrue{cms@bibcrossref}}% @@ -173,12 +191,12 @@ \DeclareEntryOption{longcrossref}[false]{% \ifcsdef{cms@opt@lxref@#1}% - {\csuse{cms@opt@lxref@#1}} - {\blx@err@invopt{longcrossref=#1}{}}} + {\csuse{cms@opt@lxref@#1}}% + {\blx@err@invopt{longcrossref=#1}{}}}% \DeclareBibliographyOption{booklongxref}[true]{% \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} + {\csuse{cms@opt@bklxref@#1}}% {\blx@err@invopt{booklongxref=#1}{}}}% \def\cms@opt@bklxref@true{% \toggletrue{cms@bookcitexref}% @@ -195,62 +213,98 @@ \DeclareEntryOption{booklongxref}[true]{% \ifcsdef{cms@opt@bklxref@#1}% - {\csuse{cms@opt@bklxref@#1}} + {\csuse{cms@opt@bklxref@#1}}% {\blx@err@invopt{booklongxref=#1}{}}}% \DeclareBibliographyOption{omitxrefdate}[true]{% - \settoggle{cms@omitxrefdate}{#1}} + \settoggle{cms@omitxrefdate}{#1}}% \DeclareEntryOption{omitxrefdate}[true]{% - \settoggle{cms@omitxrefdate}{#1}} + \settoggle{cms@omitxrefdate}{#1}}% + +\DeclareBibliographyOption[boolean]{xrefurl}[true]{% + \settoggle{cms@xrefurl}{#1}}% + +\DeclareEntryOption[boolean]{xrefurl}[true]{% + \settoggle{cms@xrefurl}{#1}}% + +\DeclareBibliographyOption[string]{journalabbrev}[false]{% + \ifcsdef{cms@opt@jtabb@#1}% + {\csuse{cms@opt@jtabb@#1}}% + {\csuse{cms@opt@jtabb@false}\cms@warning@noline% + {'journalabbrev=#1' isn't a valid option.\MessageBreak + The default - 'false' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@jtabb@true{% + \toggletrue{cms@citejtabb}% + \toggletrue{cms@bibjtabb}}% +\def\cms@opt@jtabb@false{% + \togglefalse{cms@citejtabb}% + \togglefalse{cms@bibjtabb}}% +\def\cms@opt@jtabb@notes{% + \toggletrue{cms@citejtabb}% + \togglefalse{cms@bibjtabb}}% +\def\cms@opt@jtabb@bib{% + \togglefalse{cms@citejtabb}% + \toggletrue{cms@bibjtabb}}% + +\DeclareEntryOption[string]{journalabbrev}[false]{% + \ifcsdef{cms@opt@jtabb@#1}% + {\csuse{cms@opt@jtabb@#1}}% + {\csuse{cms@opt@jtabb@false}\cms@warning@noline% + {'journalabbrev=#1' isn't a valid option.\MessageBreak + The default - 'false' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% % The field-exclusion options % \DeclareBibliographyOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} + \settoggle{cms@isbn}{#1}}% \DeclareBibliographyOption{url}[true]{% - \settoggle{cms@url}{#1}} + \settoggle{cms@url}{#1}}% \DeclareBibliographyOption{doi}[true]{% \ifcsdef{cms@opt@doi@#1}% - {\csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} + {\csuse{cms@opt@doi@#1}}% + {\blx@err@invopt{doi=#1}{}}}% \def\cms@opt@doi@true{% - \toggletrue{cms@doi}} + \toggletrue{cms@doi}}% \def\cms@opt@doi@false{% - \togglefalse{cms@doi}} + \togglefalse{cms@doi}}% \def\cms@opt@doi@only{% - \toggletrue{cms@doionly}} + \toggletrue{cms@doionly}}% \DeclareBibliographyOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} + \settoggle{cms@eprint}{#1}}% \DeclareBibliographyOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} + \settoggle{cms@numbermonth}{#1}}% \DeclareBibliographyOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} + \settoggle{cms@bookpages}{#1}}% \DeclareBibliographyOption{includeall}[true]{% \settoggle{cms@isbn}{#1}% \settoggle{cms@url}{#1}% \settoggle{cms@doi}{#1}% \settoggle{cms@eprint}{#1}% \settoggle{cms@numbermonth}{#1}% - \settoggle{cms@bookpages}{#1}} + \settoggle{cms@bookpages}{#1}}% \DeclareBibliographyOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} + \settoggle{cms@hidevolumes}{#1}}% \DeclareBibliographyOption{addendum}[true]{% - \settoggle{cms@addendum}{#1}} + \settoggle{cms@addendum}{#1}}% \DeclareBibliographyOption{bookseries}[true]{% - \settoggle{cms@bookseries}{#1}} + \settoggle{cms@bookseries}{#1}}% \DeclareBibliographyOption{notefield}[true]{% - \settoggle{cms@notefield}{#1}} + \settoggle{cms@notefield}{#1}}% \DeclareBibliographyOption{completenotes}[true]{% \settoggle{cms@addendum}{#1}% \settoggle{cms@bookseries}{#1}% \settoggle{cms@notefield}{#1}}% \DeclareEntryOption{isbn}[true]{% - \settoggle{cms@isbn}{#1}} + \settoggle{cms@isbn}{#1}}% \DeclareEntryOption{url}[true]{% - \settoggle{cms@url}{#1}} + \settoggle{cms@url}{#1}}% \DeclareEntryOption{doi}[true]{% \ifcsdef{cms@opt@doi@#1}% {\iftoggle{cms@doi}% @@ -259,30 +313,159 @@ {\togglefalse{cms@doionly}}% !! {}}% {\toggletrue{cms@doi}}% !! - \csuse{cms@opt@doi@#1}} - {\blx@err@invopt{doi=#1}{}}} + \csuse{cms@opt@doi@#1}}% + {\blx@err@invopt{doi=#1}{}}}% \DeclareEntryOption{eprint}[true]{% - \settoggle{cms@eprint}{#1}} + \settoggle{cms@eprint}{#1}}% \DeclareEntryOption{numbermonth}[true]{% - \settoggle{cms@numbermonth}{#1}} + \settoggle{cms@numbermonth}{#1}}% \DeclareEntryOption{bookpages}[true]{% - \settoggle{cms@bookpages}{#1}} + \settoggle{cms@bookpages}{#1}}% \DeclareEntryOption{hidevolumes}[true]{% - \settoggle{cms@hidevolumes}{#1}} + \settoggle{cms@hidevolumes}{#1}}% \DeclareEntryOption{addendum}[true]{% - \settoggle{cms@addendum}{#1}} + \settoggle{cms@addendum}{#1}}% \DeclareEntryOption{bookseries}[true]{% - \settoggle{cms@bookseries}{#1}} + \settoggle{cms@bookseries}{#1}}% \DeclareEntryOption{notefield}[true]{% - \settoggle{cms@notefield}{#1}} + \settoggle{cms@notefield}{#1}}% -\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,booklongxref} +\DeclareBibliographyOption[string]{related}[bib]{% + \ifcsdef{cms@opt@rel@#1}% + {\csuse{cms@opt@rel@#1}}% + {\csuse{cms@opt@rel@bib}\cms@warning@noline% + {'related=#1' is not a valid option.\MessageBreak + The default - 'bib' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@rel@true{% + \settoggle{cms@citerel}{true}% + \settoggle{cms@related}{true}}% +\def\cms@opt@rel@false{% + \settoggle{cms@citerel}{false}% + \settoggle{cms@related}{false}}% +\def\cms@opt@rel@bib{% + \settoggle{cms@citerel}{false}% + \settoggle{cms@related}{true}}% +\def\cms@opt@rel@notes{% + \settoggle{cms@citerel}{true}% + \settoggle{cms@related}{false}}% + +\DeclareEntryOption[string]{related}[bib]{% + \ifcsdef{cms@opt@rel@#1}% + {\csuse{cms@opt@rel@#1}}% + {\csuse{cms@opt@rel@bib}\cms@warning@noline% + {'related=#1' is not a valid option.\MessageBreak + The default - 'bib' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +% Controlling punctuation before titleaddon fields % + +\DeclareBibliographyOption[string]{ptitleaddon}[period]{% + \ifcsdef{cms@opt@ptao@#1}% + {\csuse{cms@opt@ptao@#1}}% + {\csuse{cms@opt@ptao@period}\cms@warning@noline% + {'ptitleaddon=#1' is not a valid option.\MessageBreak + The default - 'period' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@ptao@none{% + \let\ptitleaddonpunct\@empty}% +\def\cms@opt@ptao@comma{% + \def\ptitleaddonpunct{\addcomma\addspace}}% +\def\cms@opt@ptao@colon{% + \def\ptitleaddonpunct{\addcolon\addspace}}% +\def\cms@opt@ptao@space{% + \def\ptitleaddonpunct{\addspace}}% +\def\cms@opt@ptao@semicolon{% + \def\ptitleaddonpunct{\addsemicolon\addspace}}% +\def\cms@opt@ptao@period{% + \def\ptitleaddonpunct{\addperiod\addspace}}% + +\DeclareEntryOption[string]{ptitleaddon}[period]{% + \ifcsdef{cms@opt@ptao@#1}% + {\csuse{cms@opt@ptao@#1}}% + {\csuse{cms@opt@ptao@period}\cms@warning@noline% + {'ptitleaddon=#1' is not a valid option.\MessageBreak + The default - 'period' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +\DeclareBibliographyOption[string]{ctitleaddon}[comma]{% + \ifcsdef{cms@opt@ctao@#1}% + {\csuse{cms@opt@ctao@#1}}% + {\csuse{cms@opt@ctao@comma}\cms@warning@noline% + {'ctitleaddon=#1' is not a valid option.\MessageBreak + The default - 'comma' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@ctao@none{% + \let\ctitleaddonpunct\@empty}% +\def\cms@opt@ctao@comma{% + \def\ctitleaddonpunct{\addcomma\addspace}}% +\def\cms@opt@ctao@colon{% + \def\ctitleaddonpunct{\addcolon\addspace}}% +\def\cms@opt@ctao@space{% + \def\ctitleaddonpunct{\addspace}}% +\def\cms@opt@ctao@semicolon{% + \def\ctitleaddonpunct{\addsemicolon\addspace}}% +\def\cms@opt@ctao@period{% + \def\ctitleaddonpunct{\addperiod\addspace}}% + +\DeclareEntryOption[string]{ctitleaddon}[comma]{% + \ifcsdef{cms@opt@ctao@#1}% + {\csuse{cms@opt@ctao@#1}}% + {\csuse{cms@opt@ctao@comma}\cms@warning@noline% + {'ctitleaddon=#1' is not a valid option.\MessageBreak + The default - 'comma' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +% Controlling punctuation before shorthand in notes % + +\DeclareBibliographyOption[string]{shorthandpunct}[space]{% + \ifcsdef{cms@opt@shp@#1}% + {\csuse{cms@opt@shp@#1}}% + {\csuse{cms@opt@shp@space}\cms@warning@noline% + {'shorthandpunct=#1' isn't a valid option.\MessageBreak + The default - 'space' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% +\def\cms@opt@shp@none{% + \let\shorthandpunct\@empty}% +\def\cms@opt@shp@comma{% + \def\shorthandpunct{\addcomma\addspace}}% +\def\cms@opt@shp@colon{% + \def\shorthandpunct{\addcolon\addspace}}% +\def\cms@opt@shp@space{% + \def\shorthandpunct{\addspace}}% +\def\cms@opt@shp@semicolon{% + \def\shorthandpunct{\addsemicolon\addspace}}% +\def\cms@opt@shp@period{% + \def\shorthandpunct{\addperiod\addspace}}% +\def\cms@opt@shp@emdash{% + \def\shorthandpunct{\addthinspace\textemdash\addthinspace}}% +\def\cms@opt@shp@endash{% + \def\shorthandpunct{\addspace\textendash\addspace}}% + +\DeclareEntryOption[string]{shorthandpunct}[space]{% + \ifcsdef{cms@opt@shp@#1}% + {\csuse{cms@opt@shp@#1}}% + {\csuse{cms@opt@shp@space}\cms@warning@noline% + {'shorthandpunct=#1' isn't a valid option.\MessageBreak + The default - 'space' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% + +\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,% + related,booklongxref,ptitleaddon,ctitleaddon,shorthandpunct} % For author-date compatibility % \DeclareEntryOption{switchdates}[true]{% - \settoggle{cms@switchdates}{#1}} + \settoggle{cms@switchdates}{#1}}% \DeclareEntryOption{cmsdate}{}% @@ -312,13 +495,13 @@ \appto\blx@blxinit{% \let\newcunit\blx@newcunit} -\newcommand*{\newcunitpunct}{\addcomma\space} +\newcommand*{\newcunitpunct}{\addcomma\addspace} \def\mkbibcurdinal#1{% \@tempcnta0#1 \the\@tempcnta}% \@ifpackagelater{biblatex}{2010/08/28} -{} +{}% {\PackageError{biblatex} {Outdated 'biblatex' package} {The Chicago style requires biblatex v0.9 or later.\MessageBreak @@ -344,11 +527,15 @@ \global\let\cbx@lastkey\undefined} \newbibmacro*{cite:save}{% - \savefield{entrykey}{\cbx@lastkey}} + \savefield{entrykey}{\cbx@lastkey}% + \ifthenelse{\ifentrytype{inreference}\OR\ifentrytype{reference}\OR% + \ifentrytype{mvreference}}% + {\global\toggletrue{cms@noidem}}% + {\global\togglefalse{cms@noidem}}}% \newbibmacro*{cite}{% \ifciteseen% - {\ifboolexpr{ + {\ifboolexpr{% test {\iffieldundef{shorthand}}% or ( @@ -358,20 +545,24 @@ and not test {\iffieldundef{crossref}}% ) - } + }% {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% - {\usebibmacro{cite:ibid}}% + {\usebibmacro{cite:ibid}% + \usebibmacro{cite:save}}% {\global\toggletrue{cms@shortnote}% \global\togglefalse{cms@fullnote}% \usebibmacro{cite:short}% \usebibmacro{cite:save}}}% {\iftoggle{cms@shorthandibid}% {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% - {\usebibmacro{cite:ibid}}% + {\usebibmacro{cite:ibid}% + \usebibmacro{cite:save}}% {\usebibmacro{cite:shorthand}% - \usebibmacro{cite:save}}}% + \usebibmacro{cite:save}% + \global\toggletrue{cms@noidem}}}% {\usebibmacro{cite:shorthand}% - \usebibmacro{cite:save}}}}% + \usebibmacro{cite:save}% + \global\toggletrue{cms@noidem}}}}% {\iftoggle{cms@allshort}% {\global\toggletrue{cms@shortnote}% \global\togglefalse{cms@fullnote}% @@ -386,29 +577,60 @@ \newbibmacro*{cite:full}{% \printtext[bibhypertarget]{% \usedriver - {\DeclareNameAlias{sortname}{default}\frenchspacing} + {\DeclareNameAlias{sortname}{default}\frenchspacing}% {cite:\thefield{entrytype}}}}% \newbibmacro*{cite:short}{% + \usebibmacro{allshort+firstcite+xref}% \ifthenelse{\ifnameundef{labelname}\OR% \ifentrytype{inreference}\OR% \ifentrytype{reference}\OR% \ifentrytype{mvreference}}% - {\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation + {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% + \ifentrytype{periodical}}% Simplify .bib creation {\ifuseauthor% - {\printfield[journaltitle]{journaltitle}\isdot\newcunit}% + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\printfield[shortjournal]{shortjournal}\newcunit}% + {\printfield[journaltitle]{journaltitle}\newcunit}}% {}}% {\ifentrytype{manual}% {\printlist{organization}\isdot\newcunit}% {}}}% - {\iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{labelname}% - \bibrightbracket\classicpunct}% - {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{labelname}?% + {\ifboolexpr{% + test {\ifciteidem}% + and + not test {\ifbibliography}% + and + not test {\iffirstonpage}% + and + not togl {cms@noidem}% + and + not togl {cms@headlessnote}% + }% + {\bibstring[\mkibid]{idem\thefield{gender}}% + \classicpunct}% + {\iffieldequalstr{authortype}{anon}% + {\bibleftbracket\printnames{labelname}% \bibrightbracket\classicpunct}% - {\usebibmacro{choose+labelname}%\printnames{labelname}% - \isdot\classicpunct}}}% + {\iffieldequalstr{authortype}{anon?}% + {\bibleftbracket\printnames{labelname}?% + \bibrightbracket\classicpunct}% + {\printnames{labelname}%\usebibmacro{choose+labelname}% + \isdot\classicpunct}}}}% \ifboolexpr{% togl {cms@allshort}% or @@ -420,9 +642,10 @@ \printfield[citetitle]{labeltitle}}}}%:\thefield{entrytype}? \newbibmacro*{cite:shorthand}{% + \usebibmacro{allshort+firstcite+xref}% \iftoggle{cms@allshort}% {\printtext[bibhyperref]{% - \printfield{shorthand}}} + \printfield{shorthand}}}% {\printtext[cmshyperlink]{% \printfield{shorthand}}}} @@ -432,7 +655,7 @@ {\iffieldundef{shorthandintro}% {%\addspace%\setunit{\addspace}% Fix for after postnote field \printtext[parens]{% - \bibstring{citedas}\space% + \bibstring{citedas}\addspace% \printfield{shorthand}}}% {%\addspace%\setunit{\addspace}% Ditto \printfield{shorthandintro}}}} @@ -464,15 +687,31 @@ ) }% {\global\toggletrue{cms@loccit}}% - {}}} + {}}}% \newbibmacro*{cite:journal}{% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% {\iffieldundef{prenote}% {\bibsentence\usebibmacro{cite:ibid}}% - {\usebibmacro{cite:ibid}}}% + {\usebibmacro{cite:ibid}}% + \usebibmacro{cite:save}}% {\iffieldundef{journaltitle}% - {\usebibmacro{cite:short}}% + {\usebibmacro{cite:short}% + \usebibmacro{cite:save}}% + {\ifboolexpr{% + test {\ifciteidem}% + and + not test {\ifbibliography}% + and + not test {\iffirstonpage}% + and + not togl {cms@noidem}% + }% + {\iffieldundef{prenote}% + {\bibsentence\bibstring[\mkibid]{idem\thefield{gender}}% + \newcunit}% + {\bibstring[\mkibid]{idem\thefield{gender}}% + \newcunit}}% {\iffieldequalstr{authortype}{anon}% {\bibleftbracket\printnames{labelname}% \bibrightbracket\newcunit}% @@ -480,59 +719,104 @@ {\bibleftbracket\printnames{labelname}?% \bibrightbracket\newcunit}% {\printnames{labelname}% - \isdot\newcunit}}% - \iftoggle{cms@allshort}% + \isdot\newcunit}}}% + \iftoggle{cms@allshort}% + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\printtext[bibhyperref]{% + \printfield[shortjournal]{shortjournal}}}% {\printtext[bibhyperref]{% - \printfield[journaltitle]{journaltitle}}}% + \printfield[journaltitle]{journaltitle}}}}% + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\printtext[bibhyperlink]{% + \printfield[shortjournal]{shortjournal}}}% {\printtext[bibhyperlink]{% - \printfield[journaltitle]{journaltitle}}}% - \iffieldundef{volume}% - {\iffieldundef{number}% - {\iffieldundef{issue} - {\newcunit% - \usebibmacro{number+or+month}}% - {\newcunit% - \printfield{issue}% - \setunit{\addspace}% - \usebibmacro{cmsyear}}}% + \printfield[journaltitle]{journaltitle}}}}% + \iffieldundef{volume}% + {\iffieldundef{number}% + {\iffieldundef{issue}% {\newcunit% - \printfield[journum]{number}}}% - {\toggletrue{cms@fullnote}% - \togglefalse{cms@shortnote}% - \setunit{\addspace}% - \printfield[jourvol]{volume}% - \ifthenelse{\iffieldundef{pagination}\AND% - \iffieldundef{bookpagination}}% - {\setunit{\postvolpunct}}% - {\setunit{\addcolon\addspace}}}}}} + \usebibmacro{number+or+month}}% + {\newcunit% + \printfield{issue}% + \setunit{\addspace}% + \usebibmacro{cmsyear}}}% + {\newcunit% + \printfield[journum]{number}}}% + {\toggletrue{cms@fullnote}% + \togglefalse{cms@shortnote}% + \setunit{\addspace}% + \printfield[jourvol]{volume}% + \ifthenelse{\iffieldundef{pagination}\AND% + \iffieldundef{bookpagination}}% + {\setunit{\postvolpunct}}% + {\setunit{\addcolon\addspace}}}}}}% %% Macros from verbose.cbx %% \newbibmacro*{textcite}{% - \ifnameundef{labelname} - {\printfield[citetitle]{labeltitle}} - {\printnames{labelname}}} + \ifnameundef{labelname}% + {\printfield[citetitle]{labeltitle}}% + {\printnames{labelname}}% + \ifboolexpr{% + togl {cms@gencite}% + and + ( + test {\iflastcitekey}% + or + togl {cms@genallnames}% + ) + }% + {\thegen}% + {}}% \newbibmacro*{textcite:init}{% \citetrackerfalse% \pagetrackerfalse% \iffirstcitekey - {\global\undef\cbx@lasthash} - {}} + {\global\undef\cbx@lasthash}% + {}}% \newbibmacro*{textcite:count}{% \stepcounter{textcitetotal}% - \ifnumgreater{\value{uniquelist}}{\value{maxnames}} - {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}} - {\setcounter{textcitemaxnames}{\value{uniquelist}}} - {}} - {\ifnumless{\value{labelname}}{\value{maxnames}} - {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}} - {\setcounter{textcitemaxnames}{\value{labelname}}} - {}} - {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}} - {\setcounter{textcitemaxnames}{\value{maxnames}}} - {}}}} + \ifnumgreater{\value{uniquelist}}{\value{maxnames}}% + {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{uniquelist}}}% + {}}% + {\ifnumless{\value{labelname}}{\value{maxnames}}% + {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{labelname}}}% + {}}% + {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{maxnames}}}% + {}}}}% %%%% Citation Commands, internal and external %%%% @@ -558,14 +842,14 @@ {}% \toggletrue{cms@shortnote}% \togglefalse{cms@fullnote}% - \ifboolexpr{ + \ifboolexpr{% togl {cms@inheritshhand}% and not test {\iffieldundef{shorthand}}% - } + }% {\usebibmacro{cite}}% {\usebibmacro{cite:short}}}% Would {cite} be better? - {} + {}% {\usebibmacro{crossref:volume+postnote}}% Volume fix \DeclareCiteCommand{\bookbibxrefcite} @@ -669,10 +953,17 @@ \ifhyperref% {\hypertarget{cite.\the\c@refsection @\abx@field@entrykey}{}}% {}% - \nopunct\unspace}% Put \nopunct and \unspace here for 0.8e. + \nopunct% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\addspace}{\unspace}}%\unspace Put \nopunct and \unspace here for 0.8e. {\usedriver {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% \usebibmacro{clearpublin}\clearfield{shorthand}% + \usebibmacro{cms:titlehook}% \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}% \toggletrue{cms@origpublished}\frenchspacing}% {cite:\thefield{entrytype}}% @@ -684,9 +975,9 @@ {\usebibmacro{hlprenote}}% {\printtext[bibhypertarget]{% \usedriver - {\DeclareNameAlias{sortname}{default}\clearname{author}% + {\DeclareNameAlias{sortname}{default}\usebibmacro{cite:save}% \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}% - \usebibmacro{cite:save}}% + \usebibmacro{clear+labelname}\global\toggletrue{cms@noidem}}% {cite:\thefield{entrytype}}}}% {\multicitedelim}% {}%\usebibmacro{finentry}} @@ -695,10 +986,10 @@ {\usebibmacro{hlcprenote}} {\usebibmacro{citeindex}% \toggletrue{cms@headlessnote}% - \clearname{author}% - \clearname{shortauthor}% + \usebibmacro{clear+labelname}% \clearname{labelname}% - \usebibmacro{cite}} + \usebibmacro{cite}% + \global\toggletrue{cms@noidem}} {\multicitedelim} {\usebibmacro{cite:postnote}} @@ -706,10 +997,10 @@ {\usebibmacro{hlcprenote}} {\usebibmacro{citeindex}% \toggletrue{cms@headlessnote}% - \clearname{author}% - \clearname{shortauthor}% + \usebibmacro{clear+labelname}% \clearname{labelname}% - \usebibmacro{cite}} + \usebibmacro{cite}% + \global\toggletrue{cms@noidem}} {\multicitedelim} {\usebibmacro{cite:postnote}} @@ -719,10 +1010,9 @@ \toggletrue{cms@headlessnote}% \toggletrue{cms@shortnote}% \togglefalse{cms@fullnote}% - \clearname{author}% - \clearname{shortauthor}% \clearname{labelname}% - \usebibmacro{cite:short}} + \usebibmacro{cite:short}% + \global\toggletrue{cms@noidem}} {\multicitedelim} {\usebibmacro{cite:postnote}} @@ -735,8 +1025,9 @@ togl {cms@allshort}% }% {\usebibmacro{cite:short}} - {\toggletrue{cms@headlessnote}% - \usebibmacro{choose+surname}% + {\renewbibmacro*{author/editor}{\usebibmacro{choose+surname}}% + \renewbibmacro*{editor}{\usebibmacro{choose+surname}}% + \renewbibmacro*{author}{\usebibmacro{choose+surname}}% \usebibmacro{cite}}} {\multicitedelim} {\usebibmacro{cite:postnote}} @@ -748,7 +1039,8 @@ {\toggletrue{cms@shortnote}% \togglefalse{cms@fullnote}% \usebibmacro{citeindex}% - \usebibmacro{cite:short}} + \usebibmacro{cite:short}% + \usebibmacro{cite:save}} {\multicitedelim} {\usebibmacro{postnote}} @@ -757,11 +1049,14 @@ {\usebibmacro{citeindex}% \iftoggle{cms@shorthandibid}% {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% - {\usebibmacro{cite:ibid}}% + {\usebibmacro{cite:ibid}% + \usebibmacro{cite:save}}% {\usebibmacro{cite:shorthand}% - \usebibmacro{cite:save}}}% + \usebibmacro{cite:save}% + \global\toggletrue{cms@noidem}}}% {\usebibmacro{cite:shorthand}% - \usebibmacro{cite:save}}} + \usebibmacro{cite:save}% + \global\toggletrue{cms@noidem}}} {\multicitedelim} {\usebibmacro{postnote}} @@ -771,7 +1066,8 @@ \togglefalse{cms@fullnote}% \clearfield{pages}% \usebibmacro{citeindex}% - \usebibmacro{cite:journal}} + \usebibmacro{cite:journal}% + \usebibmacro{cite:save}} {\multicitedelim} {\iftoggle{cms@loccit}% {}% @@ -805,9 +1101,9 @@ \DeclareCiteCommand{\cbx@textcite} {\usebibmacro{textcite:init}} {\iffieldequals{namehash}{\cbx@lasthash} - {} + {}% {\iffirstcitekey - {} + {}% {\textcitedelim}% \stepcounter{textcitecount}% \usebibmacro{textcite}% @@ -819,16 +1115,16 @@ {\usebibmacro{textcite:init}% \gdef\cbx@savedkeys{}% \DeferNextCitekeyHook} - {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}% {\protected@xappto\cbx@footcite@args{% - (\thefield{multiprenote})(\thefield{multipostnote})}} + (\thefield{multiprenote})(\thefield{multipostnote})}}% {}% \xappto\cbx@savedkeys{\thefield{entrykey},}% - \iffieldequals{namehash}{\cbx@lasthash} - {} + \iffieldequals{namehash}{\cbx@lasthash}% + {}% {\usebibmacro{textcite:count}% \savefield{namehash}{\cbx@lasthash}}% - \ifnumequal{\value{citecount}}{\value{citetotal}} + \ifnumequal{\value{citecount}}{\value{citetotal}}% {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% \protected@xappto\cbx@footcite@args{% [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}% @@ -862,13 +1158,13 @@ \renewbibmacro{multipostnote}{}}}{}{} \renewcommand*{\textcitedelim}{% - \iffinalcitedelim - {\ifnumgreater{\value{textcitetotal}}{2} + \iffinalcitedelim% + {\ifnumgreater{\value{textcitetotal}}{2}% {\addcomma}% {}% - \addspace\bibstring{and}} + \addspace\bibstring{and}}% {\addcomma}% - \space} + \addspace}% \newrobustcmd{\cms@textcite@i}{% \iffootnote{\foottextcite}{\footcite}} @@ -880,6 +1176,97 @@ \newcommand{\foottextcites}{\addspace\headlessparenshortcites} +%%% The \gentextcite commands - \textcite in the genitive case %%% + +\DeclareCiteCommand{\cms@gentextcite@i} + {\usebibmacro{textcite:init}% + \toggletrue{cms@gencite}}% + {\iffieldequals{namehash}{\cbx@lasthash}% + {}% + {\iffirstcitekey + {}% + {\textcitedelim}% + \stepcounter{textcitecount}% + \usebibmacro{textcite}% + \savefield{namehash}{\cbx@lasthash}}} + {} + {\togglefalse{cms@gencite}}% + +\DeclareCiteCommand{\cms@gentextcite}[\cbx@textcite@init\cms@gentextcite@i\cms@textcite@i] + {\usebibmacro{textcite:init}% + \gdef\cbx@savedkeys{}% + \DeferNextCitekeyHook} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}% + {\protected@xappto\cbx@footcite@args{% + (\thefield{multiprenote})(\thefield{multipostnote})}}% + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash}% + {}% + {\usebibmacro{textcite:count}% + \savefield{namehash}{\cbx@lasthash}}% + \ifnumequal{\value{citecount}}{\value{citetotal}}% + {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% + \protected@xappto\cbx@footcite@args{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}% + \iflastcitekey + {\iffootnote + {\protected@xappto\cbx@textcite@args{\nopunct}% + \protected@xappto\cbx@footcite@args{\thefield{postpunct}}}% + {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% Switch + \protected@xappto\cbx@footcite@args{\nopunct}}}% these two? + {}} + {}} + {} + {} + +\DeclareMultiCiteCommand{\cms@gentextcite@is}{\cms@gentextcite@i}{} +\DeclareMultiCiteCommand{\cms@gentextcites} + [\cbx@textcites@init\cms@gentextcite@is\cms@textcites@i]{\cms@gentextcite}{} + +\newrobustcmd*{\gentextcite}[1][]{% + \@ifnextchar[%] + {\gencite@i[#1]}% + {\gencite@i[][#1]}}% + +\def\gencite@i[#1][#2]{% + \@ifnextchar[%] + {\gencite@ii[#1][#2]}% + {\gencite@ii[][#1][#2]}}% + +\def\gencite@ii[#1][#2][#3]#4{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \gencite@iii[#2][#3]{#4}}% + +\def\gencite@iii#1{\cms@gentextcite#1} + +\newrobustcmd*{\gentextcites}[1][]{% + \@ifnextchar(%) + {\gencites@iv[#1]}% + {\@ifnextchar[%] + {\gencites@i[#1]}% + {\gencites@i[][#1]}}}% + +\def\gencites@i[#1][#2]{% + \@ifnextchar[%] + {\gencites@ii[#1][#2]}% + {\gencites@ii[][#1][#2]}}% + +\def\gencites@ii[#1][#2][#3]#4{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \gencites@iii[#2][#3]{#4}}% + +\def\gencites@iii#1{\cms@gentextcites#1}% + +\def\gencites@iv[#1]#2{% + \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}% + \cms@gentextcites#2}% + +\newrobustcmd*{\Gentextcite}{\bibsentence\gentextcite} +\newrobustcmd*{\Gentextcites}{\bibsentence\gentextcites} + +%%% End code for \gentextcite %%% + %%%% Drivers for the Long Note Format %%%% \DeclareBibliographyDriver{cite:article}{% @@ -911,10 +1298,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} {\usebibmacro{bibindex}% \usebibmacro{author/editor}% @@ -945,10 +1338,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}}} \DeclareBibliographyDriver{cite:artwork}{% @@ -980,10 +1379,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:audio}{% @@ -1009,15 +1414,17 @@ \newcunit \usebibmacro{bybookauthor}% \usebibmacro{cbyeditor+others}% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\toggletrue{cms@usedvol}% \printfield{volume}% @@ -1026,10 +1433,10 @@ \bibstring{ofseries}% \setunit{\addspace} \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct} \printfield{maintitleaddon}}} \newcunit \usebibmacro{volume+or+volumes}% @@ -1052,10 +1459,16 @@ {}% \newcunit\newblock% \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:book}{% @@ -1078,20 +1491,20 @@ \newcunit \usebibmacro{cpart+editor+translator}% \newcunit - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@bookcitexref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@bookcitexref}% - } + }% {\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}% \newcunit\newblock \iffieldundef{edition}% @@ -1120,10 +1533,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{book:xref+finentry}}% {\ifpunctmark{.}% This seems to work. @@ -1157,20 +1576,20 @@ \newcunit \usebibmacro{cpart+editor+translator}% \setunit*{\addcomma\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@bookcitexref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@bookcitexref}% - } + }% {\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}% \newcunit \iffieldundef{edition}% @@ -1195,10 +1614,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{book:xref+finentry}}% {\ifpunctmark{.}% This seems to work. @@ -1236,10 +1661,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:collection}{% @@ -1252,27 +1683,29 @@ \setunit{\addspace} \usebibmacro{cite:xref+date}% \newcunit - \ifboolexpr{ + \usebibmacro{cpart+editor+translator}% + \newcunit + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@bookcitexref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@bookcitexref}% - } + }% {\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}% \newcunit\newblock \iffieldundef{edition}% {}% {\usebibmacro{edition}}% \newcunit - \usebibmacro{cbytranslator+others}% + \usebibmacro{cbyeditor+others}% \newcunit\newblock \usebibmacro{volume+or+volumes}% \newcunit\newblock @@ -1289,10 +1722,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{book:xref+finentry}}% {\ifpunctmark{.}% This seems to work. @@ -1350,10 +1789,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:inbook}{% @@ -1370,20 +1815,20 @@ \setunit{\addcomma\addspace}% \usebibmacro{cpart+editor+translator}% \setunit{\addcomma\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@citecrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@citecrossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}% \newcunit @@ -1409,10 +1854,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{cite:xref+finentry}}% {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed. @@ -1442,20 +1893,20 @@ \setunit{\addcomma\addspace}% \usebibmacro{cpart+editor+translator}% \setunit{\addcomma\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@citecrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@citecrossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}% \newcunit @@ -1481,10 +1932,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{cite:xref+finentry}}% {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed. @@ -1514,23 +1971,25 @@ \setunit{\addcomma\addspace}% \usebibmacro{cpart+editor+translator}% \setunit{\addcomma\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@citecrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@citecrossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}% \newcunit\newblock + \usebibmacro{cbyeditor+others}% + \newcunit\newblock \usebibmacro{volume+or+volumes}% \newcunit\newblock \usebibmacro{cser+num}% @@ -1547,10 +2006,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{cite:xref+finentry}}% {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed. @@ -1609,10 +2074,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:letter}{% @@ -1620,7 +2091,7 @@ \savefield{fullhash}{\bbx@lasthash}% \printtext[title]{% \printfield[noformat]{title}}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit*{\addcomma\addspace}% \usebibmacro{letter+date}% @@ -1629,20 +2100,20 @@ \newcunit\newblock% \usebibmacro{cpart+editor+translator}% \setunit*{\addcomma\addspace}% - \ifboolexpr{ + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@citecrossref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@citecrossref}% - } + }% {\usebibmacro{chapincoll}% \usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}% \newcunit @@ -1668,10 +2139,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{cite:xref+finentry}}% {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed. @@ -1715,10 +2192,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:misc}{% @@ -1732,11 +2215,11 @@ {\printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}% - \newcunit\newblock% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% - \newcunit\newblock + \newcunit% \usebibmacro{unpubl+letter+date}}% \newcunit \usebibmacro{byauthor}% @@ -1762,10 +2245,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:music}{% @@ -1791,15 +2280,17 @@ \newcunit \usebibmacro{bybookauthor}% \usebibmacro{cbyeditor+others}% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{addspace}}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\toggletrue{cms@usedvol}% \printfield{volume}% @@ -1808,10 +2299,10 @@ \bibstring{ofseries}% \setunit{\addspace} \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}} \newcunit \usebibmacro{volume+or+volumes}% @@ -1846,10 +2337,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyAlias{cite:mvbook}{cite:book} @@ -1895,10 +2392,16 @@ \printfield{url}% \newcunit\newblock \usebibmacro{caddendum}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:patent}{% @@ -1915,8 +2418,8 @@ \printfield{type}% \setunit*{\addspace}% \printfield{number}% - \iflistundef{location} - {} + \iflistundef{location}% + {}% {\setunit*{\addspace}% \printtext[parens]{% \printlist[][-\value{listtotal}]{location}}}% @@ -1937,10 +2440,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:periodical}{% @@ -1968,10 +2477,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}}% {\usebibmacro{bibindex}% \usebibmacro{editor}% @@ -1998,10 +2513,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}}} \DeclareBibliographyDriver{cite:proceedings}{% @@ -2014,21 +2535,25 @@ \setunit{\addspace} \usebibmacro{cite:xref+date}% \newcunit - \ifboolexpr{ + \usebibmacro{cpart+editor+translator}% + \newcunit + \ifboolexpr{% test {\iffieldundef{crossref}}% or not test {\ifentryseen{\thefield{crossref}}}% or togl {cms@bookcitexref}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% test {\iffieldundef{xref}}% or not test {\ifentryseen{\thefield{xref}}}% or togl {cms@bookcitexref}% - } + }% {\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}% + \newcunit + \usebibmacro{cbyeditor+others}% \newcunit\newblock \usebibmacro{volume+or+volumes}% \newcunit\newblock @@ -2046,10 +2571,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}% \usebibmacro{book:xref+finentry}}% {\ifpunctmark{.}% This seems to work. @@ -2105,10 +2636,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:report}{% @@ -2139,15 +2676,21 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:review}{% \usebibmacro{bibindex}% - \iffieldequalstr{entrysubtype}{magazine} + \iffieldequalstr{entrysubtype}{magazine}% {\usebibmacro{cmag+news+author}}% {\usebibmacro{author/editor}}% \newcunit\newblock @@ -2158,7 +2701,7 @@ \printfield{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}% - \newcunit\newblock + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -2171,7 +2714,7 @@ \setunit{\addcomma\addspace}% \printfield{note}% \setunit{\addcomma\addspace}% - \iffieldequalstr{entrysubtype}{magazine} + \iffieldequalstr{entrysubtype}{magazine}% {\usebibmacro{mag+news+date}}% {\usebibmacro{cjournal+issue+year+pages}}% \usebibmacro{fullpostnote}% @@ -2183,10 +2726,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:suppbook}{% @@ -2231,10 +2780,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyAlias{cite:suppcollection}{cite:suppbook} @@ -2261,10 +2816,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:unpublished}{% @@ -2293,10 +2854,16 @@ \usebibmacro{fullpostnote}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:video}{% @@ -2322,15 +2889,17 @@ \newcunit \usebibmacro{bybookauthor}% \usebibmacro{cbyeditor+others}% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}} {\toggletrue{cms@usedvol}% \printfield{volume}% @@ -2339,10 +2908,10 @@ \bibstring{ofseries}% \setunit{\addspace} \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}} \newcunit \usebibmacro{volume+or+volumes}% @@ -2365,10 +2934,16 @@ {}% \newcunit\newblock \usebibmacro{cite+doi+url}% - \setunit{\addspace}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \newcunit\newblock \usebibmacro{pageref}% + \newcunit\newblock + \iftoggle{cms@citerel}% + {\usebibmacro{related:init}% + \usebibmacro{related}% + \newcunit}% + {}% \usebibmacro{finentry}} %%%% List Formats %%%% @@ -2376,27 +2951,27 @@ \DeclareListFormat{language}{% \ifthenelse{\value{listcount}=1}% {\bibleftbracket\bibstring{inlang}%\addspace - for inflected langs. - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% {#1}}% \ifthenelse{\value{listtotal}=1}% {\bibrightbracket}% {}}% {\ifthenelse{\value{listcount}=\value{listtotal}}% {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% {#1}}% \bibrightbracket}% {\multilangdelim% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{lang#1} - {\bibstring{lang#1}} + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{lang#1}% + {\bibstring{lang#1}}% {#1}}}}% \usebibmacro{langlist:andothers}} @@ -2410,7 +2985,7 @@ \DeclareListFormat{periodplace}{\mkbibparens{#1}} \DeclareListFormat{lista}{% - \ifthenelse{\value{listtotal}<2} + \ifthenelse{\value{listtotal}<2}% {s\adddot v\adddot\addspace\mkbibquote{#1\isdot}}% {\ifthenelse{\value{listcount}=1}% {s\adddot vv\adddot\addspace \mkbibquote{#1\isdot}\addcomma}% @@ -2509,10 +3084,10 @@ {\mkpageprefix[bookpagination]{#1}}}}% \DeclareFieldFormat{edlang}{% - \ifbibstring{#1} - {\bibstring{#1}} - {\ifbibstring{ed#1} - {\bibstring{ed#1}} + \ifbibstring{#1}% + {\bibstring{#1}}% + {\ifbibstring{ed#1}% + {\bibstring{ed#1}}% {\ifcapital{\MakeCapital{#1}}{#1}}}} \DeclareFieldFormat[suppbook,suppcollection]{title}{\mkbibemph{#1}\isdot} @@ -2630,42 +3205,42 @@ \DeclareFieldFormat{urldate}{% 16th ed. \iffieldundef{userd}% - {\bibstring{urlseen}\space #1}% + {\bibstring{urlseen}\addspace #1}% {\printfield{userd}\addspace #1}} \DeclareFieldFormat[video]{urldate}{% 16th ed. \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{urlseen}\space #1}% + {\bibstring{urlseen}\addspace #1}% {\printfield{userd}\addspace #1}} \DeclareFieldFormat[music]{urldate}{% 16th ed. \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}% \OR\NOT\iffieldundef{origyear}}% - {\bibstring{urlseen}\space #1}% + {\bibstring{urlseen}\addspace #1}% {\printfield{userd}\addspace #1}} \DeclareFieldFormat[music]{origdate}{% 16th ed. \iftoggle{cms@reprint}% Date fix {#1}% {\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% - {\bibstring{recorded}\space #1}% + {\bibstring{recorded}\addspace #1}% {\printfield{userd}\addspace #1}}} \DeclareFieldFormat[music]{eventdate}{% 16th ed. \iffieldundef{userd}% - {\bibstring{recorded}\space #1}% + {\bibstring{recorded}\addspace #1}% {\printfield{userd}\addspace #1}} \DeclareFieldFormat[video]{eventdate}{% 16th ed. \iffieldundef{userd}% - {\bibstring{broadcast}\space #1}% + {\bibstring{broadcast}\addspace #1}% {\printfield{userd}\addspace #1}} \DeclareFieldAlias{userd}{titleaddon}% 16th ed. \DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?! -\DeclareFieldFormat[review]{nameaddon}{#1\bibsentence} +\DeclareFieldFormat[review,suppperiodical]{nameaddon}{#1\bibsentence} \DeclareFieldFormat[customc]{nameaddon}{% For cross-refs \ifbibstring{#1}% @@ -2706,14 +3281,20 @@ \DeclareFieldAlias{maintitleaddon}{titleaddon} +\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot} + \DeclareFieldFormat{issuetitle}{\mkbibquote{#1\isdot}} +\DeclareFieldFormat{shortjournal}{\mkbibemph{#1}\isdot} + +\DeclareFieldFormat[periodical]{shorttitle}{\mkbibemph{#1}\isdot} + \DeclareFieldFormat{jourser}{% \ifinteger{#1}% {\mkbibordseries{#1}% \addnbspace% \bibstring{jourser}}% - {\ifbibstring{#1}{\bibstring{#1}}{#1}}} + {\ifbibstring{#1}{\bibstring{#1}}{#1}}}% \DeclareFieldFormat{journum}{% Revised for 0.9.5 \ifboolexpr{% @@ -2722,7 +3303,9 @@ not test {\ifnumeral{#1}}% }% {\bibstring{numbers}\addspace #1}% - {\bibstring{number}\addspace #1}} + {\bibstring{number}\addspace #1}}% + +\DeclareFieldFormat{jourvol}{#1} \DeclareFieldFormat{sernum}{% \ifnumeral{#1}% @@ -2817,14 +3400,44 @@ \DeclareFieldAlias[suppperiodical]{volume}[article]{volume} +%%%% Related field formats from biblatex.def %%%% + +\DeclareFieldFormat{related:origpubas}{#1}% This and next remove parens + +\DeclareFieldFormat{related:origpubin}{#1} + +\DeclareFieldFormat{relatedstring:default}{% For notes + bib + \ifboolexpr{% + test {\iffieldundef{relatedstring}}% + or + test {\iffieldbibstring{relatedstring}}% + }% + {#1}% + {\ifcapital% + {\MakeCapital{#1}}% + {#1}}% + \printunit{\relatedpunct}}% + +\DeclareFieldFormat{relatedstring:reprintfrom}{% For notes + bib + \ifboolexpr{% + test {\iffieldundef{relatedstring}}% + or + test {\iffieldbibstring{relatedstring}}% + }% + {#1}% + {\ifcapital% + {\MakeCapital{#1}}% + {#1}}% + \addspace}% + %%%% Commands, for users and internal %%%% \newcommand*{\cbytypeeditor}{% - \iffieldundef{editortype} - {\bibstring{cbytypeeditor}} - {\bibstring{cbytype\thefield{editortype}}}} + \iffieldundef{editortype}% + {\bibstring{cbytypeeditor}}% + {\bibstring{cbytype\thefield{editortype}}}}% -\renewcommand*{\multicitedelim}{\addsemicolon\space} +\renewcommand*{\multicitedelim}{\addsemicolon\addspace} \renewcommand*{\iffinalcitedelim}{% \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} @@ -2832,12 +3445,12 @@ \newcommand{\custpunct}{% \iftoggle{cms@fullnote}% {\iffieldequalstr{type}{plain}% - {} + {}% {\addcomma}}% - {\iftoggle{cms@shortnote} + {\iftoggle{cms@shortnote}% {\iffieldundef{postnote}% {\ifthenelse{\value{multicitecount} < \value{multicitetotal}}% - {} + {}% {\addperiod}}% {\addcomma}}% {\addperiod}}} @@ -2845,12 +3458,12 @@ \newcommand{\custpunctb}{% \iftoggle{cms@fullnote}% {\iffieldequalstr{userb}{plain}% - {} + {}% {\addcomma}}% - {\iftoggle{cms@shortnote} + {\iftoggle{cms@shortnote}% {\iffieldundef{postnote}% {\ifthenelse{\value{multicitecount} < \value{multicitetotal}}% - {} + {}% {\addperiod}}% {\addcomma}}% {\addperiod}}} @@ -2888,14 +3501,14 @@ {\addperiod}% {\ifnameundef{author}% {\addperiod}% - {}}}} + {}}}}% \newcommand{\postvolpunct}{\addcolon}% For vol:page customization \newcommand{\parttrans}{% \iftoggle{cms@fullnote}% - {\bibstring{cbytranslator}\space}% - {\bibstring{bytranslator}\space}} + {\bibstring{cbytranslator}\addspace}% + {\bibstring{bytranslator}\addspace}}% \newcommand{\partedit}{% \iftoggle{cms@postposit}% Kludge to make it work in French. @@ -2904,37 +3517,37 @@ {\bibstring{byeditoralt}\addspace}}% {\iftoggle{cms@fullnote}% {\bibstring{cbyeditor}\addspace}% - {\bibstring{byeditor}\addspace}}} + {\bibstring{byeditor}\addspace}}}% \newcommand{\partcomp}{% \iftoggle{cms@fullnote}% - {\bibstring{cbycompiler}\space}% - {\bibstring{bycompiler}\space}} + {\bibstring{cbycompiler}\addspace}% + {\bibstring{bycompiler}\addspace}}% \newcommand{\parteditandcomp}{% \iftoggle{cms@fullnote}% - {\bibstring{cbyeditorcp}\space}% - {\bibstring{byeditorcp}\space}} + {\bibstring{cbyeditorcp}\addspace}% + {\bibstring{byeditorcp}\addspace}}% \newcommand{\parttransandcomp}{% \iftoggle{cms@fullnote}% - {\bibstring{cbytranslatorcp}\space}% - {\bibstring{bytranslatorcp}\space}} + {\bibstring{cbytranslatorcp}\addspace}% + {\bibstring{bytranslatorcp}\addspace}}% \newcommand{\partedittransandcomp}{% \iftoggle{cms@fullnote}% - {\bibstring{cbyeditortrcp}\space}% - {\bibstring{byeditortrcp}\space}} + {\bibstring{cbyeditortrcp}\addspace}% + {\bibstring{byeditortrcp}\addspace}}% \newcommand{\parteditandtrans}{% \iftoggle{cms@fullnote}% - {\bibstring{cbyeditortr}\space}% - {\bibstring{byeditortr}\space}} + {\bibstring{cbyeditortr}\addspace}% + {\bibstring{byeditortr}\addspace}}% \newcommand{\reprint}{% \iftoggle{cms@fullnote}% {\bibsstring{reprint}}% - {\bibstring{reprint}}} + {\bibstring{reprint}}}% \newcommand*{\multipubsdelim}{\addnbspace/\addspace} @@ -2945,14 +3558,14 @@ {\ifthenelse{\value{liststop}>2}% {\addcomma\addspace\bibstring{and}\addspace}% {\addspace\bibstring{and}\addspace}}}% - {}} + {}}% \newcommand*{\multilangdelim}{% \ifthenelse{\value{listtotal}<3}% {\addspace\bibstring{and}\addspace}% {\ifthenelse{\value{listcount}<\value{listtotal}}% {\addcomma\addspace}% - {\addcomma\addspace\bibstring{and}\addspace}}} + {\addcomma\addspace\bibstring{and}\addspace}}}% \renewcommand*{\postnotedelim}{% \iftoggle{cms@shortnote}% @@ -3009,45 +3622,54 @@ {\addperiod\addspace}% {\addcomma\addspace}} +\newcommand*{\nameadelim}{% + \ifboolexpr{% + test {\iffieldequalstr{nameatype}{none}}% + and + not togl {cms@fullnote}% + }% + {\addperiod\addspace}% + {\addcomma\addspace}} + \newcommand*{\lbx@cfromlang}{% Needed to eliminate "by" after "trans." - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\bibstring{cfrom\thefield{origlanguage}}}}% - {\unspace}} + {\unspace}}% \@ifpackagelater{biblatex}{2011/11/12} {\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\bibstring{from\thefield{origlanguage}}}}% - {\unspace}}} + {\unspace}}}% {\@ifpackagelater{biblatex}{2011/07/28} {\newcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\bibstring{from\thefield{origlanguage}}}}% {\unspace}}}% {\renewcommand*{\lbx@fromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\bibstring{from\thefield{origlanguage}}}}% {\unspace}}}} \renewcommand*{\lbx@lfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\biblstring{from\thefield{origlanguage}}}}% {\unspace}} \renewcommand*{\lbx@sfromlang}{% - \iffieldundef{userf} - {\iffieldundef{origlanguage} - {\unspace} + \iffieldundef{userf}% + {\iffieldundef{origlanguage}% + {\unspace}% {\bibsstring{from\thefield{origlanguage}}}}% {\unspace}} @@ -3056,86 +3678,93 @@ \newbibmacro*{finentry}{%{\finentry} To make annotated bibliography \togglefalse{cms@switchdates}% \ifbibliography - {\usebibmacro{entrytail}} + {\usebibmacro{entrytail}}% {}% \finentry} -\newbibmacro*{book:xref+finentry}{% - \iffieldundef{crossref}% - {\iffieldundef{xref}% +\newbibmacro*{book:xref+finentry}{% FIXME + \ifthenelse{\iffieldundef{crossref}\OR\ifbibliography}% + {\ifthenelse{\iffieldundef{xref}\OR\ifbibliography}% {}% {\iftoggle{cms@bookcitexref}% - {\cmsnoopcite{\thefield{xref}}}% - {\ifboolexpr{ - test {\ifpunct}% - or - test {\ifpunctmark{*}}% - }% - {\bibhypertarget{\thefield{xref}}% - {\cmsnoopcite{\thefield{xref}}}\nopunct}% - {\bibhypertarget{\thefield{xref}}% - {\cmsnoopcite{\thefield{xref}}}}}}}% + {\cms@citetracker@xref}% + {\bibhypertarget{\thefield{xref}}% + {\cms@citetracker@xref}}}}% {\iftoggle{cms@bookcitexref}% - {\cmsnoopcite{\thefield{crossref}}}% - {\ifboolexpr{ - test {\ifpunct}% - or - test {\ifpunctmark{*}}% - }% - {\bibhypertarget{\thefield{crossref}}% - {\cmsnoopcite{\thefield{crossref}}}\nopunct}% - {\bibhypertarget{\thefield{crossref}}% - {\cmsnoopcite{\thefield{crossref}}}}}}} + {\cms@citetracker@crossref}% + {\bibhypertarget{\thefield{crossref}}% + {\cms@citetracker@crossref}}}}% -\newbibmacro*{cite:xref+finentry}{% - \iffieldundef{crossref}% - {\iffieldundef{xref}% +\newbibmacro*{cite:xref+finentry}{% FIXME + \ifthenelse{\iffieldundef{crossref}\OR\ifbibliography}% + {\ifthenelse{\iffieldundef{xref}\OR\ifbibliography}% {}% {\iftoggle{cms@citecrossref}% - {\cmsnoopcite{\thefield{xref}}}% - {\ifboolexpr{ - test {\ifpunct}% - or - test {\ifpunctmark{*}}% - }% - {\bibhypertarget{\thefield{xref}}% - {\cmsnoopcite{\thefield{xref}}}\nopunct}% - {\bibhypertarget{\thefield{xref}}% - {\cmsnoopcite{\thefield{xref}}}}}}}% + {\cms@citetracker@xref}% + {\bibhypertarget{\thefield{xref}}% + {\cms@citetracker@xref}}}}% {\iftoggle{cms@citecrossref}% - {\cmsnoopcite{\thefield{crossref}}}% - {\ifboolexpr{ - test {\ifpunct}% - or - test {\ifpunctmark{*}}% - }% - {\bibhypertarget{\thefield{crossref}}% - {\cmsnoopcite{\thefield{crossref}}}\nopunct}% - {\bibhypertarget{\thefield{crossref}}% - {\cmsnoopcite{\thefield{crossref}}}}}}} + {\cms@citetracker@crossref}% + {\bibhypertarget{\thefield{crossref}}% + {\cms@citetracker@crossref}}}}% + +\newbibmacro*{allshort+firstcite+xref}{% + \ifboolexpr{% + ( + togl {cms@citecrossref}% + and + togl {cms@bookcitexref}% + ) + or + not togl {cms@allshort}% + }% + {}% + {\ifciteseen% + {}% + {\iffieldundef{crossref}% + {\iffieldundef{xref}% + {}% + {\cms@citetracker@xref}}% + {\cms@citetracker@crossref}}}}% + + +\def\cms@citetracker@crossref{% cf. \blx@citetracker@global + \ifbool{citetracker}% + {\xifinlistcs\abx@field@crossref{blx@bsee@\the\c@refsection}% + {}% + {\listcsxadd{blx@bsee@\the\c@refsection}\abx@field@crossref}}% + {}}% + +\def\cms@citetracker@xref{% cf. \blx@citetracker@global + \ifbool{citetracker}% + {\xifinlistcs\abx@field@xref{blx@bsee@\the\c@refsection}% + {}% + {\listcsxadd{blx@bsee@\the\c@refsection}\abx@field@xref}}% + {}}% + \newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography \newunit\newblock \iftoggle{cms@annotation}% {\usebibmacro{annotation}% - \newunit\newblock} + \newunit\newblock}% {}}% \newbibmacro*{author+holder}{% - \ifnameundef{author} - {} + \ifnameundef{author}% + {}% {\printnames{author}% - \ifthenelse{\ifnameundef{holder}\OR - \ifnamesequal{author}{holder}} - {} + \ifthenelse{\ifnameundef{holder}\OR% + \ifnamesequal{author}{holder}}% + {}% {\setunit{\addspace}% \printtext[parens]{\printnames{holder}}}}} \renewbibmacro*{byauthor}{% - \ifthenelse{\ifuseauthor\OR - \ifnameundef{author}} - {} - {\bibstring{by}\addspace + \ifthenelse{\ifuseauthor\OR% + \ifnameundef{author}}% + {}% + {\bibstring{by}\addspace% \printnames[byauthor]{author}}} \newbibmacro*{byauthorpunct}{% @@ -3144,10 +3773,10 @@ {\newcunit}} \renewbibmacro*{bybookauthor}{% - \ifnameundef{bookauthor} - {} - {\ifnamesequal{author}{bookauthor} - {} + \ifnameundef{bookauthor}% + {}% + {\ifnamesequal{author}{bookauthor}% + {}% {\bibstring{by}\addspace\printnames[default]{bookauthor}% \newcunit\newblock}}} @@ -3178,11 +3807,11 @@ \clearname{introduction}}} \newbibmacro*{langlist:andothers}{% - \ifthenelse{\value{listcount}=\value{liststop}\AND - \ifmoreitems} - {\ifnum\value{liststop}>1 \finalandcomma\fi - \andmoredelim\bibstring{andmore}\bibrightbracket} - {}} + \ifthenelse{\value{listcount}=\value{liststop}\AND% + \ifmoreitems}% + {\ifnum\value{liststop}>1 \finalandcomma\fi% + \andmoredelim\bibstring{andmore}\bibrightbracket}% + {}}% \newbibmacro*{mag+news+author}{% \ifnameundef{author}% @@ -3195,20 +3824,20 @@ \savefield{journaltitle}{\bbx@lasthash}}}% {\ifuseauthor% {\usebibmacro{author}}% - {}}} + {}}}% \newbibmacro*{cmag+news+author}{% \ifnameundef{author}% {}% 16th ed. {\ifuseauthor% {\usebibmacro{author}}% - {}}} + {}}}% \newbibmacro*{type+inst+year}{% - \printfield{type} + \printfield{type}% \newcunit \printlist{institution}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\addspace}% \usebibmacro{cmsyear}} \newbibmacro*{institution+organization}{% @@ -3225,7 +3854,7 @@ {\ifnameundef{editor}% {\iflistundef{organization}% {}% - {\ifboolexpr{ + {\ifboolexpr{% test {\iflistequals{organization}{\bbx@lasthash}}% and not test {\iffirstonpage}% @@ -3246,13 +3875,13 @@ {\usebibmacro{author/editor}}} \newbibmacro*{cbytypestrg}[2]{% - \iffieldundef{#1type} - {\bibstring{cby#2}} - {\bibstring{cby\thefield{#1type}}}} + \iffieldundef{#1type}% + {\bibstring{cby#2}}% + {\bibstring{cby\thefield{#1type}}}}% \newbibmacro*{cbyeditor}{% - \ifnameundef{editor} - {} + \ifnameundef{editor}% + {}% {\usebibmacro{cbytypestrg}{editor}{editor}% \setunit{\addspace}% \printnames[byeditor]{editor}% @@ -3260,105 +3889,105 @@ \usebibmacro{cbyeditorx}} \newbibmacro*{cbyeditorx}{% - \ifnameundef{editora} - {} + \ifnameundef{editora}% + {}% {\usebibmacro{cbytypestrg}{editora}{editor}% \setunit{\addspace}% \printnames[byeditora]{editora}% \newcunit}% - \ifnameundef{editorb} - {} + \ifnameundef{editorb}% + {}% {\usebibmacro{cbytypestrg}{editorb}{editor}% \setunit{\addspace}% \printnames[byeditorb]{editorb}% \newcunit}% - \ifnameundef{editorc} - {} + \ifnameundef{editorc}% + {}% {\usebibmacro{cbytypestrg}{editorc}{editor}% \setunit{\addspace}% \printnames[byeditorc]{editorc}% \newcunit}} \newbibmacro*{cbytranslator}{% - \ifnameundef{translator} - {} + \ifnameundef{translator}% + {}% {\bibstring{cbytranslator}% - \addspace + \addspace% \printnames[bytranslator]{translator}}} \newbibmacro*{cbycompiler}{% - \ifnameundef{namec} - {} - {\bibstring{cbycompiler}\addspace + \ifnameundef{namec}% + {}% + {\bibstring{cbycompiler}\addspace% \printnames[bycompiler]{namec}}} \newbibmacro*{cbyredactor}{% - \ifnameundef{redactor} - {} - {\bibstring{cbyredactor}\addspace + \ifnameundef{redactor}% + {}% + {\bibstring{cbyredactor}\addspace% \printnames[byredactor]{redactor}}} \newbibmacro*{cwithcommentator}{% - \ifnameundef{commentator} - {} - {\bibsstring{withcommentator}\addspace + \ifnameundef{commentator}% + {}% + {\bibsstring{withcommentator}\addspace% \printnames[withcommentator]{commentator}}} \newbibmacro*{cwithannotator}{% - \ifnameundef{annotator} - {} - {\bibsstring{withannotator}\addspace + \ifnameundef{annotator}% + {}% + {\bibsstring{withannotator}\addspace% \printnames[withannotator]{annotator}}} \newbibmacro*{cwithintroduction}{% - \ifnameundef{introduction} - {} - {\bibstring{withintroduction}\addspace + \ifnameundef{introduction}% + {}% + {\bibstring{withintroduction}\addspace% \printnames[withintroduction]{introduction}}} \newbibmacro*{cwithforeword}{% - \ifnameundef{foreword} - {} - {\bibstring{withforeword}\addspace + \ifnameundef{foreword}% + {}% + {\bibstring{withforeword}\addspace% \printnames[withforeword]{foreword}}} \newbibmacro*{cwithafterword}{% - \ifnameundef{afterword} - {} - {\bibstring{withafterword}\addspace + \ifnameundef{afterword}% + {}% + {\bibstring{withafterword}\addspace% \printnames[withafterword]{afterword}}} \newbibmacro*{cbyeditor+others}{% - \ifthenelse{\NOT\ifnameundef{editor}\AND - \(\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}\)} + \ifthenelse{\NOT\ifnameundef{editor}\AND% + \(\iffieldundef{editortype}\OR% + \iffieldequalstr{editortype}{editor}\)}% {\def\@tempa{cbyeditor}% - \ifnamesequal{editor}{translator} + \ifnamesequal{editor}{translator}% {\edef\@tempa{\@tempa tr}% - \clearname{translator}} + \clearname{translator}}% {}% - \ifnamesequal{editor}{namec} + \ifnamesequal{editor}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{editor}{commentator} + \ifnamesequal{editor}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{editor}{annotator} + \clearname{commentator}}% + {\ifnamesequal{editor}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{editor}{introduction} + \ifnamesequal{editor}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{editor}{foreword} + \clearname{introduction}}% + {\ifnamesequal{editor}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{editor}{afterword} + \clearname{foreword}}% + {\ifnamesequal{editor}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% - \bibstring{\@tempa}\space + \bibstring{\@tempa}\addspace% \printnames[byeditor]{editor}% \clearname{editor}% \newcunit% @@ -3367,58 +3996,58 @@ \usebibmacro{cbytranslator+others}} \newbibmacro*{cbytranslator+others}{% - \ifnameundef{translator} - {} + \ifnameundef{translator}% + {}% {\def\@tempa{cbytranslator}% - \ifnamesequal{translator}{namec} + \ifnamesequal{translator}{namec}% {\edef\@tempa{\@tempa cp}% - \clearname{namec}} + \clearname{namec}}% {}% - \ifnamesequal{translator}{commentator} + \ifnamesequal{translator}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{translator}{annotator} + \clearname{commentator}}% + {\ifnamesequal{translator}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{translator}{introduction} + \ifnamesequal{translator}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{translator}{foreword} + \clearname{introduction}}% + {\ifnamesequal{translator}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{translator}{afterword} + \clearname{foreword}}% + {\ifnamesequal{translator}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% - \bibstring{\@tempa}\space + \bibstring{\@tempa}\addspace% \printnames[bytranslator]{translator}% \clearname{translator}% \newcunit}% \usebibmacro{cbycompiler+others}} \newbibmacro*{cbycompiler+others}{% - \ifnameundef{namec} - {} + \ifnameundef{namec}% + {}% {\def\@tempa{cbycompiler}% - \ifnamesequal{namec}{commentator} + \ifnamesequal{namec}{commentator}% {\edef\@tempa{\@tempa co}% - \clearname{commentator}} - {\ifnamesequal{namec}{annotator} + \clearname{commentator}}% + {\ifnamesequal{namec}{annotator}% {\edef\@tempa{\@tempa an}% - \clearname{annotator}} + \clearname{annotator}}% {}}% - \ifnamesequal{namec}{introduction} + \ifnamesequal{namec}{introduction}% {\edef\@tempa{\@tempa in}% - \clearname{introduction}} - {\ifnamesequal{namec}{foreword} + \clearname{introduction}}% + {\ifnamesequal{namec}{foreword}% {\edef\@tempa{\@tempa fo}% - \clearname{foreword}} - {\ifnamesequal{namec}{afterword} + \clearname{foreword}}% + {\ifnamesequal{namec}{afterword}% {\edef\@tempa{\@tempa af}% - \clearname{afterword}} + \clearname{afterword}}% {}}}% - \bibstring{\@tempa}\space + \bibstring{\@tempa}\addspace% \printnames[bycompiler]{namec}% \clearname{namec}% \newcunit}% @@ -3441,6 +4070,60 @@ \setunit*{\addcomma\addspace}% \usebibmacro{cwithafterword}} +\newbibmacro*{part+editor+translator}{% + \ifnameundef{namea}% + {\ifnameundef{nameb}% + {}% + {\bibstring{bytranslator}\addspace% + \printnames[bytranslator]{nameb}}}% + {\ifthenelse{\iffieldundef{nameatype}\OR% + \iffieldequalstr{nameatype}{editor}}% + {\ifnamesequal{namea}{nameb}% + {\bibstring{byeditortr}\addspace% + \printnames[byeditor]{namea}}% + {\bibstring{byeditor}\addspace% + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newunit% + \bibstring{bytranslator}\addspace% + \printnames[bytranslator]{nameb}}}}% + {\usebibmacro{bytypestrg}{namea}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newunit% + \bibstring{bytranslator}\addspace% + \printnames[bytranslator]{nameb}}}}} + +\newbibmacro*{cpart+editor+translator}{% + \ifnameundef{namea}% + {\ifnameundef{nameb}% + {}% + {\bibstring{cbytranslator}\addspace% + \printnames[bytranslator]{nameb}}}% + {\ifthenelse{\iffieldundef{nameatype}\OR% + \iffieldequalstr{nameatype}{editor}}% + {\ifnamesequal{namea}{nameb}% + {\bibstring{cbyeditortr}\addspace% + \printnames[byeditor]{namea}}% + {\bibstring{cbyeditor}\addspace% Need this \space here? + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newcunit% + \bibstring{cbytranslator}\addspace% + \printnames[bytranslator]{nameb}}}}% + {\usebibmacro{cbytypestrg}{namea}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{namea}% + \ifnameundef{nameb}% + {}% + {\newunit% + \bibstring{cbytranslator}\addspace% + \printnames[bytranslator]{nameb}}}}} + \newbibmacro*{cms-in:}{% Fix for 0.9a compat. \iftoggle{cms@origpublished}% {}% Removed the cms@crspace test -- fixed a bug I had introduced @@ -3465,7 +4148,7 @@ \setunit{\addspace}% \bibstring{ofseries}% \setunit{\addspace}}% - {\usebibmacro{cms-in:}}}% + {\bibstring{in}\setunit{\addspace}}}% {\iffieldundef{part}% {\ifcsdef{cbx@incollpart}% {\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}% @@ -3479,7 +4162,7 @@ \setunit{\addspace}% \bibstring{ofseries}% \setunit{\addspace}}% - {\usebibmacro{cms-in:}}}}% + {\bibstring{in}\setunit{\addspace}}}}% {\iffieldundef{part}% {\ifcsdef{cbx@incollpart}% {\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}% @@ -3496,29 +4179,35 @@ \setunit{\addspace}% \bibstring{ofseries}% \setunit{\addspace}}% - {\usebibmacro{cms-in:}}}}% + {\bibstring{in}\setunit{\addspace}}}}% \newbibmacro*{chapincoll}{% \iffieldundef{chapter}% - {} + {}% {\printfield{chapter}\addspace% - \clearfield{chapter}}} + \clearfield{chapter}}}% \newbibmacro*{xrefchapincoll}{% \iffieldundef{chapter}% - {\printtext{\relax}} + {\printtext{\relax}}% {\printfield{chapter}\addspace% - \clearfield{chapter}}} + \clearfield{chapter}}}% \newbibmacro*{chapinscore}{% \iffieldundef{chapter}% - {\ifthenelse{\ifentrytype{music}% 16th ed. - \AND\NOT\iffieldundef{booktitle}}% + {\ifboolexpr{% + test {\ifentrytype{music}}% 16th ed. + and + not test {\iffieldundef{booktitle}}% + and + not togl {cms@origpublished}% + }% {\bibstring{on}\setunit{\addspace}}% - {}} - {\printfield{chapter}% - \addspace\bibstring{of}\setunit{\addspace}% - \clearfield{chapter}}} + {}}% + {\printfield{chapter}\clearfield{chapter}% + \iffieldundef{booktitle}% + {}% + {\addspace\bibstring{of}\setunit{\addspace}}}}% \newbibmacro*{caddendum}{% New macros for 16th ed. field exclusion \ifboolexpr{% @@ -3556,23 +4245,27 @@ {}% {\printeventdate}}% Date fix -\newbibmacro*{ctitle+stitle}{% - \printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work) - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \setunit{\addcomma\addspace}\newblock% +\newbibmacro*{ctitle+stitle}{% New test here for related entries. + \iffieldundef{title}% + {}% + {\printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work) + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}}% % \setunit{\addspace}}% % \usebibmacro{language+transtitle}% % \setunit*{\addcomma}\newblock} -\newbibmacro*{citaltitle+stitle}{% - \printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work) - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% - \newcunit\newblock% +\newbibmacro*{citaltitle+stitle}{% New test, as above. + \iffieldundef{title}% + {}% + {\printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work) + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -3583,7 +4276,7 @@ \printfield[noformat]{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \newunit%\setunit{\addspace}\newblock% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}}% % \setunit{\addspace}}% % \usebibmacro{language+transtitle}% @@ -3594,7 +4287,7 @@ \printfield[noformat]{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \newunit\newblock% + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% @@ -3605,7 +4298,7 @@ \printfield[noformat]{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \newunit%\setunit{\addcomma\addspace} + \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% }%\newcunit\newblock} @@ -3614,7 +4307,7 @@ \printfield[noformat]{title}% \setunit{\addcolon\addspace}% \printfield[noformat]{subtitle}}% - \setunit{\addcomma\addspace}% + \setunit{\ctitleaddonpunct}% \printfield{titleaddon}% }%\newcunit\newblock} @@ -3625,34 +4318,34 @@ \newbibmacro*{issuetitle}{% \iffieldundef{issuetitle}% - {} + {}% {\ifthenelse{\ifentrytype{article}\OR% \ifentrytype{review}\OR% \ifentrytype{suppperiodical}}% This test is for {\usebibmacro{cms-in:}}% periodical entries {}% \printtext[issuetitle]{% - \printfield[noformat]{issuetitle}% + \printfield[itnoformat]{issuetitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{issuesubtitle}}}} + \printfield[sitnoformat]{issuesubtitle}}}} \newbibmacro*{btitle+bstitle}{% - \iffieldundef{booktitle} - {} + \iffieldundef{booktitle}% + {}% {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% \ifentrytype{video}}% {}% {\usebibmacro{cms-in:}}% \printtext[booktitle]{% - \printfield[noformat]{booktitle}% + \printfield[btnoformat]{booktitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{booksubtitle}}% - \newcunit + \printfield[sbtnoformat]{booksubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{booktitleaddon}% \setunit*{\addcomma\addspace}}} \newbibmacro*{publ+loc+year}{% Revised for reprint - \ifboolexpr{ + \ifboolexpr{% togl {cms@reprint}% and not test {\ifentrytype{video}}% @@ -3687,10 +4380,10 @@ {}% \printlist{location}% \iffieldundef{howpublished}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% + {\setunit*{\addcomma\addspace}}% + {\setunit*{\addcolon\addspace}}% \printfield{howpublished}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\addspace}% \usebibmacro{date}% } @@ -3702,15 +4395,15 @@ {}% \printlist{location}% \iflistundef{institution}% - {\setunit*{\addcomma\space}}% - {\setunit*{\addcolon\space}}% + {\setunit*{\addcomma\addspace}}% + {\setunit*{\addcolon\addspace}}% \printlist{institution}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\addspace}% \usebibmacro{date}% }% \newbibmacro*{cpubl+loc+year}{% Revised for reprint - \ifboolexpr{ + \ifboolexpr{% test {\iflistundef{location}}% and test {\iflistundef{publisher}}% @@ -3724,7 +4417,7 @@ \printtext[parens]{% \usebibmacro{origpubl+loc+year}%{cmsorigdate}%\printfield{origyear}% \setunit*{\addsemicolon\addspace}% - \ifboolexpr{ + \ifboolexpr{% togl {cms@reprint}% and not test{\ifentrytype{video}}% @@ -3733,15 +4426,15 @@ \newcunit}% {}% \printlist{location}% - \iflistundef{publisher} - {\setunit*{\addspace}} - {\setunit*{\addcolon\space}}% + \iflistundef{publisher}% + {\setunit*{\addspace}}% + {\setunit*{\addcolon\addspace}}% \printlist{publisher}% - \setunit{\addcomma\space}% + \setunit{\addcomma\addspace}% \usebibmacro{date}}}}% \newbibmacro*{cpubletter+loc+year}{% - \ifboolexpr{ + \ifboolexpr{% test {\iflistundef{location}}% and test {\iflistundef{publisher}}% @@ -3752,23 +4445,27 @@ {\setunit{\addspace}% \printtext[parens]{% \printlist{location}% - \iflistundef{publisher} - {\setunit*{\addspace}} - {\setunit*{\addcolon\space}}% + \iflistundef{publisher}% + {\setunit*{\addspace}}% + {\setunit*{\addcolon\addspace}}% \printlist{publisher}% - \setunit{\addcomma\space}% + \setunit{\addcomma\addspace}% \usebibmacro{date}}}}% Changed for 0.9 \newbibmacro*{originally+published+as}{% Punctuation fix now in \iffieldundef{userf}% \origfullcite for 0.8e. {\iffieldundef{reprinttitle}% - {} - {\bibstring{origpublin}% + {}% + {\usebibmacro{begrelated}% + \bibstring{reprintfrom}% ? \origpublcite{\thefield{reprinttitle}}% - \newunit}} - {\iffieldundef{origlanguage}% + \usebibmacro{endrelated}% + \newunit}}% + {\usebibmacro{begrelated}% + \iffieldundef{origlanguage}% {\bibstring{origpub}% - \origfullcite{\thefield{userf}} + \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% \newunit}% {\iftoggle{cms@postposit}% {\bibstring{origedition}% @@ -3776,11 +4473,13 @@ \printfield[edlang]{origlanguage}% \addcolon% \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% \newunit}% {\printfield[edlang]{origlanguage}% \setunit{\addspace}% \bibstring{origedition}% - \origfullcite{\thefield{userf}} + \origfullcite{\thefield{userf}}% + \usebibmacro{endrelated}% \newunit}}}} \newbibmacro*{org+publ+loc+year}{% What was wrong with \ifthenelse here? @@ -3796,7 +4495,7 @@ {\setunit*{\addcolon\addspace}}}% {\setunit*{\addcolon\addspace}}% \printlist{organization}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\addspace}% \printlist{publisher}% \setunit*{\addcomma\addspace}% \usebibmacro{date}} @@ -3823,7 +4522,7 @@ {\addcomma\addspace}}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed. {\newcunit% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -3831,7 +4530,7 @@ \addcomma\addspace}% {\setunit{\addspace}% \printtext[parens]{% parens is the default here - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -3854,7 +4553,7 @@ {\addcomma\addspace}}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed. {\newcunit% - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -3862,7 +4561,7 @@ \addcomma\addspace}% {\setunit{\addspace}% \printtext[parens]{% parens is the default here - \iffieldundef{issue} + \iffieldundef{issue}% {\usebibmacro{number+or+month}}% {\printfield{issue}% \setunit{\addspace}% @@ -3903,7 +4602,7 @@ \usebibmacro{choosepubstring}% \printdate}}}% {\iffieldundef{origyear}% - {} + {}% {\printtext{% 16th ed. \usebibmacro{choosepubstring}% \printorigdate}}}}% @@ -3921,7 +4620,7 @@ {\printdate}} \newbibmacro{cite:xref+date}{% - \ifboolexpr{ + \ifboolexpr{% togl {cms@omitxrefdate}% or togl {cms@bookcitexref}% @@ -3942,8 +4641,8 @@ )) or not test {\ifentryseen{\thefield{crossref}}}% - } - {\ifboolexpr{ + }% + {\ifboolexpr{% togl {cms@omitxrefdate}% or togl {cms@bookcitexref}% @@ -3964,7 +4663,7 @@ )) or not test {\ifentryseen{\thefield{xref}}}% - } + }% {}% {\printtext[parens]{\usebibmacro{date}}}}% {\printtext[parens]{\usebibmacro{date}}}} @@ -4022,9 +4721,9 @@ \setunit*{\addspace}% \printlist[periodplace]{location}% \setunit*{\addspace}% - \iffieldundef{series} - {} - {\newcunit + \iffieldundef{series}% + {}% + {\newcunit% \printfield[jourser]{series}% \newcunit}%\setunit*{\addspace}? \printfield[jourvol]{volume}% @@ -4032,19 +4731,36 @@ \printfield[journum]{number}% \setunit{\addcomma\addspace}% \printfield{eid}% - \newunit} + \newunit}% \newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, - \printtext[title]{% article subtype - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% + \ifboolexpr{% article subtype + not test {\iffieldundef{shorttitle}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}% \setunit*{\addspace}% \printlist[periodplace]{location}% \setunit*{\addspace}% - \iffieldundef{series} - {} - {\newcunit + \iffieldundef{series}% + {}% + {\newcunit% \printfield[jourser]{series}% \newcunit}%\setunit*{\addspace}? \printfield[jourvol]{volume}% @@ -4055,16 +4771,33 @@ \newunit} \newbibmacro*{journal+sub}{% - \iffieldundef{journaltitle} - {} - {\printtext[journaltitle]{% - \printfield[noformat]{journaltitle}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{journalsubtitle}}}} + \iffieldundef{journaltitle}% + {}% + {\ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\clearlist{location}\printtext[shortjournal]{% + \printfield[jtsnoformat]{shortjournal}}}% + {\printtext[journaltitle]{% + \printfield[jtnoformat]{journaltitle}% + \setunit{\addcolon\addspace}% + \printfield[sjtnoformat]{journalsubtitle}}}}}% \newbibmacro*{cite+doi+url}{% 16th ed. - \iffieldundef{urlyear} - {} + \iffieldundef{urlyear}% + {}% {\printurldate}% Date fix \newcunit\newblock \iftoggle{cms@doionly}% @@ -4072,21 +4805,33 @@ {}% {\printfield{doi}% \clearfield{url}}}% - {\iftoggle{cms@doi}% + {\ifboolexpr{% + togl {cms@doi}% + and + not test {\iffieldundef{doi}}% + }% {\printfield{doi}}% {}}% \newcunit\newblock - \iftoggle{cms@eprint}% + \ifboolexpr{% + togl {cms@eprint}% + and + not test {\iffieldundef{eprint}}% + }% {\usebibmacro{eprint}}% {}% \newcunit\newblock - \iftoggle{cms@url}% + \ifboolexpr{% + togl {cms@url}% + and + not test {\iffieldundef{url}}% + }% {\printfield{url}}% {}}% \newbibmacro*{chap+pag}{% \printfield{chapter}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\addspace}% \printfield{pages}} \newbibmacro*{mag+news+date}{% 16th ed. @@ -4097,7 +4842,7 @@ {\usebibmacro{mag+date+issue}}}} \newbibmacro*{date+issue}{% - \iffieldundef{issue} + \iffieldundef{issue}% {\iffieldundef{number}% {\usebibmacro{date}}% {\iftoggle{cms@numbermonth}% For exclusion of month @@ -4119,10 +4864,27 @@ \usebibmacro{date+issue}} \newbibmacro*{periodical+date+issue}{% For periodical type & - \printtext[title]{% magazine subtype - \printfield[noformat]{title}% - \setunit{\addcolon\addspace}% - \printfield[noformat]{subtitle}}% + \ifboolexpr{% magazine subtype + not test {\iffieldundef{shorttitle}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + )) + }% + {\clearlist{location}\printtext[shorttitle]{% + \printfield[tnoformat]{shorttitle}}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\addcolon\addspace}% + \printfield[stnoformat]{subtitle}}}% \setunit*{\addspace}% \printlist[periodplace]{location}% \newcunit\newblock @@ -4131,56 +4893,58 @@ \usebibmacro{date+issue}} \newbibmacro*{cmtitle+mstitle+vol+part+title+stitle}{% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% - {\usebibmacro{cms-in:}% + {\iffieldundef{title}% + {\usebibmacro{cms-in:}}% + {\bibstring{in}\setunit{\addspace}}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}}% {\toggletrue{cms@usedvol}% \printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}}} \newbibmacro*{cmtitle+mstitle+vol+part+btitle+bstitle}{% \usebibmacro{btitle+bstitle}% - \iffieldundef{maintitle} - {} + \iffieldundef{maintitle}% + {}% {\ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)\OR% \(\iffieldundef{booktitle}\AND\NOT\ifentrytype{bookinbook}\)}% {\iffieldundef{booktitle}% Fix for origpublin ??? {\usebibmacro{cms-in:}}% {\bibstring{in}\setunit{\addspace}}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}% \toggletrue{cms@vol}}% InIn fix {\toggletrue{cms@usedvol}% \printfield{volume}% \printfield{part}% - \setunit{\addspace} + \setunit{\addspace}% \bibstring{ofseries}% - \setunit{\addspace} + \setunit{\addspace}% \printtext[maintitle]{% - \printfield[noformat]{maintitle}% + \printfield[mtnoformat]{maintitle}% \setunit{\addcolon\addspace}% - \printfield[noformat]{mainsubtitle}}% - \newcunit + \printfield[smtnoformat]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% \printfield{maintitleaddon}}}} \newbibmacro*{backref+check}{% @@ -4202,32 +4966,34 @@ \renewbibmacro*{postnote}{% \iftoggle{cms@fullnote}% {\global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}} - {\iftoggle{cms@printshhand} + \global\togglefalse{cms@fullnote}}% + {\iftoggle{cms@printshhand}% {\iffieldundef{postnote}% - {\iffieldundef{shorthand} + {\iffieldundef{shorthand}% {\global\togglefalse{cms@printshhand}% \global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}} - {\usebibmacro{cms:shorthandintro}% + \global\togglefalse{cms@fullnote}}% + {\setunit{\shorthandpunct}% + \usebibmacro{cms:shorthandintro}% \global\togglefalse{cms@printshhand}% \global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}}} - {\iffieldundef{shorthand} + \global\togglefalse{cms@fullnote}}}% + {\iffieldundef{shorthand}% {\postnotewrapper%delim% \usebibmacro{semel:postnote}% \global\togglefalse{cms@printshhand}% \global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}} + \global\togglefalse{cms@fullnote}}% {\postnotewrapper%delim% \usebibmacro{semel:postnote}% + \setunit{\shorthandpunct}% \usebibmacro{cms:shorthandintro}% \global\togglefalse{cms@printshhand}% \global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}}}} + \global\togglefalse{cms@fullnote}}}}% {\iffieldundef{postnote}% {\global\togglefalse{cms@shortnote}% - \global\togglefalse{cms@fullnote}} + \global\togglefalse{cms@fullnote}}% {\postnotewrapper%delim% \usebibmacro{semel:postnote}% \global\togglefalse{cms@shortnote}% @@ -4310,7 +5076,7 @@ {\printfield{volumes}}% {\printfield{volume}% \printfield{part}}}% - {\ifboolexpr{ + {\ifboolexpr{% togl {cms@hidevolumes}% and ( @@ -4381,7 +5147,7 @@ {\newcunit\printfield{volume}\printfield{part}}% {\usebibmacro{pages+cref+print}}}}% {\usebibmacro{postnote+cref+print}}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollvol}}% and ( @@ -4393,7 +5159,7 @@ {\restorefield{volume}{\cbx@incollvol}% \iffieldundef{part}% {\ifcsdef{cbx@incollpart}{\restorefield{part}{\cbx@incollpart}}{}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollpart}}% and ( @@ -4412,7 +5178,7 @@ {\newcunit\printfield{volume}\printfield{part}}% {\usebibmacro{pages+cref+print}}}}% {\usebibmacro{postnote+cref+print}}}% - {\ifboolexpr{ + {\ifboolexpr{% test {\ifcsdef{cbx@incollpart}}% and ( @@ -4420,7 +5186,7 @@ or togl {cms@xrefpart}% ) - } + }% {\iffieldundef{postnote}% {\ifcsdef{cbx@incollpages}% {\restorefield{pages}{\cbx@incollpages}% @@ -4488,6 +5254,11 @@ \iflistundef{pageref}{}{\savelist{pageref}{\cbx@incollpgref}}}% \newbibmacro*{xrefpostnote}{% + \iftoggle{cms@xrefurl}% + {\ifbibliography% + {\usebibmacro{bib+doi+url}}% + {\usebibmacro{cite+doi+url}}}% + {}% \ifcsdef{cbx@incollpgref}% Here we print and clear the child's {\restorelist{pageref}{\cbx@incollpgref}% backrefs \newunit% @@ -4501,11 +5272,11 @@ \global\let\cbx@incollpages\undefined% \global\let\cbx@incollpart\undefined% \global\let\cbx@incollpgn\undefined% - \global\let\cbx@incollbkpgn\undefined} + \global\let\cbx@incollbkpgn\undefined}% \newbibmacro*{hlprenote}{% Removes spurious comma after prenote in \iffieldundef{prenote}% \headlessfullnote citations. - {} + {}% {\printfield{prenote}% \nopunct}}% Do we need \unspace here? @@ -4528,54 +5299,40 @@ \newbibmacro*{choose+surname}{% \ifciteseen% - {} - {\ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}% - {\printnames{labelname}% - \clearname{author}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}% - {\printnames[labelname]{namea}\newcunit% - \usebibmacro{parteditstrg}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}% - {\printnames{labelname}\newcunit% - \usebibmacro{editstrg}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}% - {\printnames[labelname]{nameb}\newcunit% - \usebibmacro{parttransstrg}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}% - {\printnames{labelname}\newcunit% - \usebibmacro{transstrg}}% - {\ifboolexpr{% - not test {\ifnameundef{namec}}% - and - togl {cms@usecompiler}% - }% - {\printnames[labelname]{namec}\newcunit% - \usebibmacro{compilestrg}}% - {}}}}}}}}% - -\newbibmacro*{choose+labelname}{% - \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}% - {\printnames{labelname}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}% - {\printnames[labelname]{namea}}% - {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}% - {\printnames{labelname}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}% - {\printnames[labelname]{nameb}}% - {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}% - {\printnames{labelname}}% - {\ifboolexpr{% - not test {\ifnameundef{namec}}% - and - togl {cms@usecompiler}% - }% - {\printnames[labelname]{namec}}% - {}}}}}}}% + {}% + {\printnames{labelname}\savefield{fullhash}{\bbx@lasthash}% + \ifthenelse{\iffieldequalstr{labelnamesource}{shortauthor}\OR% + \iffieldequalstr{labelnamesource}{author}}% + {\clearname{author}}% + {\iffieldequalstr{labelnamesource}{shorteditor}% + {\ifnameundef{namea}% + {\newcunit\usebibmacro{editstrg}}% + {\newcunit\usebibmacro{parteditstrg}}}%% + {\iffieldequalstr{labelnamesource}{editor}% + {\newcunit\usebibmacro{editstrg}}% + {\iffieldequalstr{labelnamesource}{translator}% + {\newcunit\usebibmacro{transstrg}}% + {\iffieldequalstr{labelnamesource}{namea}% + {\newcunit\usebibmacro{parteditstrg}}% + {\iffieldequalstr{labelnamesource}{nameb}% + {\newcunit\usebibmacro{parttransstrg}}% + {\iffieldequalstr{labelnamesource}{namec}% + {\newcunit\usebibmacro{compilestrg}}% + {}}}}}}}}}% + +\newbibmacro*{clear+labelname}{% + \iffieldequalstr{labelnamesource}{shortauthor}% + {\clearname{author}\clearname{shortauthor}}% + {\iffieldequalstr{labelnamesource}{shorteditor}% + {\ifnameundef{namea}% + {\clearname{editor}\clearname{shorteditor}}% + {\clearname{namea}\clearname{shorteditor}}}% + {\clearname{\thefield{labelnamesource}}}}} \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4 {\DeclareLabelname{\field{shortauthor} \field{author}% \field{shorteditor} \field{namea} \field{editor}% - \field{nameb} \field{translator} \field{namec}}} + \field{nameb} \field{translator} \field{namec}}}% {\DeclareLabelname{shortauthor,author,shorteditor,namea,% editor,nameb,translator,namec}} @@ -4627,9 +5384,17 @@ \DeclareDataInheritance{*}{*}{% \noinherit{namea} \noinherit{nameb} + \noinherit{nameatype} \noinherit{sortyear} \noinherit{sortname} - \noinherit{sorttitle}} + \noinherit{sorttitle} + \noinherit{urlyear} + \noinherit{urlmonth} + \noinherit{urlday} + \noinherit{doi} + \noinherit{eprint} + \noinherit{eprinttype} + \noinherit{url}} \DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}% {*}{% ??? @@ -4680,48 +5445,20 @@ } } -\newbibmacro*{part+editor+translator}{% - \ifnameundef{namea}% - {\ifnameundef{nameb}% - {} - {\bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}% -{\ifnamesequal{namea}{nameb}% - {\bibstring{byeditortr}\space% - \printnames[byeditor]{namea}}% - {\bibstring{byeditor}\space% - \printnames[byeditor]{namea}% - \ifnameundef{nameb}% - {} - {\newunit - \bibstring{bytranslator}\space% - \printnames[bytranslator]{nameb}}}}} - -\newbibmacro*{cpart+editor+translator}{% - \ifnameundef{namea}% - {\ifnameundef{nameb}% - {} - {\bibstring{cbytranslator}\space% - \printnames[bytranslator]{nameb}}}% -{\ifnamesequal{namea}{nameb}% - {\bibstring{cbyeditortr}\space% - \printnames[byeditor]{namea}}% - {\bibstring{cbyeditor}\space% Need this \space here? - \printnames[byeditor]{namea}% - \ifnameundef{nameb}% - {} - {\newcunit - \bibstring{cbytranslator}\space% - \printnames[bytranslator]{nameb}}}}} +\DeclareSortingScheme{shortjournal}{% + \sort{ + \field{shortjournal} + } +} \newbibmacro*{compilestrg}{% - \ifthenelse{\value{namec}>1\OR\ifandothers{namec}} - {\bibstring{compilers}} - {\bibstring{compiler}} - \clearname{namec}} + \ifthenelse{\value{namec}>1\OR\ifandothers{namec}}% + {\bibstring{compilers}}% + {\bibstring{compiler}}% + \clearname{namec}}% \newbibmacro*{transstrg}{% - \ifthenelse{\value{translator}>1\OR\ifandothers{translator}} + \ifthenelse{\value{translator}>1\OR\ifandothers{translator}}% {\ifnamesequal{translator}{namec}% {\bibstring{transcompilers}% \clearname{namec}}% @@ -4729,11 +5466,11 @@ {\ifnamesequal{translator}{namec}% {\bibstring{transcompiler}% \clearname{namec}}% - {\bibstring{translator}}} - \clearname{translator}} + {\bibstring{translator}}}% + \clearname{translator}}% \newbibmacro*{parttransstrg}{% - \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}} + \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}}% {\ifnamesequal{nameb}{namec}% {\bibstring{transcompilers}% \clearname{namec}}% @@ -4741,15 +5478,15 @@ {\ifnamesequal{nameb}{namec}% {\bibstring{transcompiler}% \clearname{namec}}% - {\bibstring{translator}}} - \clearname{nameb}} + {\bibstring{translator}}}% + \clearname{nameb}}% \newbibmacro*{editstrg}{% Test added for 0.9 - \ifthenelse{\iffieldundef{editortype}\OR - \iffieldequalstr{editortype}{editor}} - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} + \ifthenelse{\iffieldundef{editortype}\OR% + \iffieldequalstr{editortype}{editor}}% + {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% + {\ifthenelse{\ifnamesequal{editor}{translator}\AND% + \ifnamesequal{editor}{namec}}% {\bibstring{editortranscompilers}% \clearname{translator}% \clearname{namec}}% @@ -4760,8 +5497,8 @@ {\bibstring{editortranslators}% \clearname{translator}}% {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{editor}{translator}\AND - \ifnamesequal{editor}{namec}} + {\ifthenelse{\ifnamesequal{editor}{translator}\AND% + \ifnamesequal{editor}{namec}}% {\bibstring{editortranscompiler}% \clearname{translator}% \clearname{namec}}% @@ -4772,15 +5509,17 @@ {\bibstring{editortranslator}% \clearname{translator}}% {\bibstring{editor}}}}}}% - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}} - {\bibstring{\thefield{editortype}s}} - {\bibstring{\thefield{editortype}}}} - \clearname{editor}} + {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% + {\bibstring{\thefield{editortype}s}}% + {\bibstring{\thefield{editortype}}}}% + \clearname{editor}}% \newbibmacro*{parteditstrg}{% - \ifthenelse{\value{namea}>1\OR\ifandothers{namea}} - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} + \ifthenelse{\iffieldundef{nameatype}\OR% + \iffieldequalstr{nameatype}{editor}}% + {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% + {\ifthenelse{\ifnamesequal{namea}{nameb}\AND% + \ifnamesequal{namea}{namec}}% {\bibstring{editortranscompilers}% \clearname{nameb}% \clearname{namec}}% @@ -4791,8 +5530,8 @@ {\bibstring{editortranslators}% \clearname{nameb}}% {\bibstring{editors}}}}}% - {\ifthenelse{\ifnamesequal{namea}{nameb}\AND - \ifnamesequal{namea}{namec}} + {\ifthenelse{\ifnamesequal{namea}{nameb}\AND% + \ifnamesequal{namea}{namec}}% {\bibstring{editortranscompiler}% \clearname{nameb}% \clearname{namec}}% @@ -4802,8 +5541,11 @@ {\ifnamesequal{namea}{nameb}% {\bibstring{editortranslator}% \clearname{nameb}}% - {\bibstring{editor}}}}}% - \clearname{namea}} + {\bibstring{editor}}}}}}% + {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% + {\bibstring{\thefield{nameatype}s}}% + {\bibstring{\thefield{nameatype}}}}% + \clearname{namea}}% \newbibmacro*{clearorigin}{% \toggletrue{cms@origcite}% @@ -4832,19 +5574,305 @@ {\savefield{fullhash}{\bbx@lasthash}% \clearname{author}}}}% {\clearname{author}}% - \clearname{namea}% - \clearname{nameb}% + \ifthenelse{\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR% + \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}}% + {}% + {\clearname{namea}% + \clearname{nameb}}% \clearfield{nameaddon}% - \ifthenelse{\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR% + \ifthenelse{\(\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR% \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR% - \ifentrytype{mvreference}}% + \ifentrytype{mvreference}\OR\ifentrytype{collection}\OR% + \ifentrytype{proceedings}\OR\ifentrytype{reference}\OR% + \ifentrytype{suppbook}\OR\ifentrytype{suppcollection}\)\OR% + \(\(\ifentrytype{audio}\OR\ifentrytype{music}\OR% + \ifentrytype{video}\)\AND\iffieldundef{booktitle}\)}% {}% {\clearfield{title}% \clearfield{subtitle}% - \clearfield{titleaddon}}% + \clearfield{titleaddon}% + \clearfield{usere}% + \clearlist{language}}% + \ifentrytype{letter}% + {\iftoggle{cms@switchdates}% + {\clearfield{year}\clearfield{month}}% + {\clearfield{origyear}\clearfield{origmonth}}% + \clearfield{origlocation}}% + {}% \clearfield{reprinttitle}% - \clearfield{usere}% - \clearlist{language}% } +%%%% Related macros from biblatex.def %%%% + +\renewbibmacro*{related:origpubas}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \usebibmacro{cite:origfull}}}% + +\renewbibmacro*{related:reprintfrom}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \nopunct% ??? + \usebibmacro{cite:origpubl}}}% + +\renewbibmacro*{related:bytranslator}[1]{% + \entrydata{#1}{% + \usebibmacro{at+every+item}% + \renewbibmacro*{name:hook}[1]{% + \ifnumequal{\value{listcount}}{1}% + {\begingroup + \mkrelatedstring% + \lbx@initnamehook{#1}% + \endgroup} + {}}% + \printnames[bytranslator]{translator}% + \setunit*{\addspace\bibstring[\mkrelatedstring]{astitle}\addspace}% + \clearname{translator}% + \usebibmacro{cite:origfull}}}% + +\renewbibmacro*{related:default}[1]{% + \entrydata*{#1}{% + \usedriver + {\ifnameundef{savedauthor}% + {\ifnameundef{savededitor}% + {}% + {\ifnamesequal{editor}{savededitor}% + {\clearname{editor}}% + {}}}% + {\ifnamesequal{author}{savedauthor}% + {\clearname{author}}% + {}}% + \usebibmacro{at+every+item}% + \renewbibmacro*{related:init}{}% + \DeclareNameAlias{sortname}{default}% + \renewbibmacro*{pageref}{}% + \toggletrue{cms@fullnote}% + \togglefalse{cms@shortnote}}% + {cite:\thefield{entrytype}}}} + +\renewbibmacro*{related:multivolume}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% + {}% + {\printtext{% + \printfield{volume}% + \printfield{part}}% + \setunit{\addcolon\addspace}}% + \usebibmacro{ctitle+stitle}% + \ifboolexpr{% + test {\ifnamesequal{author}{savedauthor}}% + or + test {\ifnameundef{author}}% + }% + {}% + {\usebibmacro{bytypestrg}{author}{author}% + \setunit{\addspace}% + \printnames[byauthor]{author}% + \newcunit\newblock}% + \ifboolexpr{% + test {\ifnamesequal{namea}{savednamea}}% + or + test {\ifnameundef{namea}}% + }% + {\ifboolexpr{% + test {\ifnamesequal{editor}{savededitor}}% + or + test {\ifnameundef{editor}}% + }% + {\ifboolexpr{% + test {\ifnamesequal{nameb}{savednameb}}% + or + test {\ifnameundef{nameb}}% + }% + {}% + {\bibstring{cbytranslator}\addspace% + \printnames[bytranslator]{nameb}\newcunit}}% + {\usebibmacro{cbyeditor+others}% + \newcunit}}% + {\usebibmacro{cpart+editor+translator}% + \newcunit}% + \usebibmacro{date}}}% + +\renewbibmacro*{related:origpubin}[1]{% + \entrydata*{#1}{% + \usebibmacro{at+every+item}% + \usebibmacro{cmsyear}% + \ifboolexpr{% + test {\iflistsequal{publisher}{savedpublisher}}% + or + test {\iflistundef{publisher}}% + }% + {}% + {\midsentence% Why is this kludge necessary? + \setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}% + \printlist{publisher}% + \setunit{\addcomma\space}% + \iflistsequal{location}{savedlocation}% + {}% + {\printlist{location}}}}} + +\DeclareFieldFormat{title:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibemph{#1}} + +\DeclareFieldFormat{ititle:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibquote{#1}} + +\DeclareFieldFormat{chapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1\addspace\bibstring{in}}% + +\DeclareFieldFormat{avchapter:hook}{% + \begingroup + \mkrelatedstring% + \ifboolexpr{% + togl {cms@otherlang}% + and + not test {\iffieldundef{langid}}% + }% + {\unspace}{}% + \lbx@inittitlehook{\bibstring{chapter}}% + \endgroup + \bibstring{chapter}~#1}% + +\DeclareFieldFormat{sitnoformat}{#1} +\DeclareFieldFormat{sjtnoformat}{#1} +\DeclareFieldFormat{stnoformat}{#1} +\DeclareFieldFormat{sbtnoformat}{#1} +\DeclareFieldFormat{smtnoformat}{#1} +\DeclareFieldFormat{itnoformat}{#1} +\DeclareFieldFormat{jtnoformat}{#1} +\DeclareFieldFormat{jtsnoformat}{#1} +\DeclareFieldFormat{tnoformat}{#1} +\DeclareFieldFormat{btnoformat}{#1} +\DeclareFieldFormat{mtnoformat}{#1} + +\providetoggle{cms@otherlang} + +\apptocmd\blx@opt@autolang@other% +{\toggletrue{cms@otherlang}}% +{\blx@info@noline{Patching 'autolang=other' option}} +{\PackageWarningNoLine{biblatex-chicago}% + {Upgrading biblatex to >v2.7a recommended,\MessageBreak + especially if you are using the "related"\MessageBreak + functionality}} + +\newbibmacro*{cms:titlehook}{% Needed for full drivers in reprintfrom + \ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR% + \ifentrytype{inbook}\OR\ifentrytype{incollection}\OR% + \ifentrytype{inproceedings}\OR\ifentrytype{letter}\OR% + \ifentrytype{music}\OR\ifentrytype{video}\)}% + {\iffieldundef{issuetitle}% + {\iffieldundef{title}% + {\iffieldundef{booktitle}% + {\iffieldundef{maintitle}% + {\iffieldundef{journaltitle}% + {}% + {\DeclareFieldAlias{jtnoformat}{title:hook}% + \DeclareFieldAlias{sjtnoformat}{title}% + \DeclareFieldAlias{journaltitle}{default}% + \DeclareFieldAlias{shortjournal}{series}% + \DeclareFieldAlias{jtsnoformat}{title:hook}}}% + {\DeclareFieldAlias{mtnoformat}{title:hook}% + \DeclareFieldAlias{smtnoformat}{title}% + \DeclareFieldAlias{maintitle}{default}}}% + {\DeclareFieldAlias{btnoformat}{title:hook}% + \DeclareFieldAlias{sbtnoformat}{title}% + \DeclareFieldAlias{booktitle}{default}}}% + {\DeclareFieldAlias{tnoformat}{title:hook}% + \DeclareFieldAlias{stnoformat}{citetitle}% + \DeclareFieldAlias[video]{title}{default}% + \DeclareFieldAlias[audio]{title}{default}% + \DeclareFieldAlias[music]{title}{default}% + \DeclareFieldAlias{title}{default}% + \DeclareFieldAlias[periodical]{shorttitle}{series}}}% + {\iffieldundef{issuesubtitle}% + {\DeclareFieldAlias{itnoformat}{ititle:hook}% + \DeclareFieldAlias{issuetitle}{default}}% + {\DeclareFieldAlias{issuetitle}{ititle:hook}}}}% + {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% + \ifentrytype{video}}% + {\iffieldundef{title}% + {\DeclareFieldAlias{chapter}{avchapter:hook}}% + {\DeclareFieldAlias{tnoformat}{title:hook}% + \DeclareFieldAlias{stnoformat}{citetitle}% + \DeclareFieldAlias[video]{title}{default}% + \DeclareFieldAlias[audio]{title}{default}% + \DeclareFieldAlias[music]{title}{default}}}% + {\DeclareFieldAlias{chapter}{chapter:hook}}}}% + +\newbibmacro*{cite:origfull}{% + \printtext[cmshypertarget]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \clearname{author}\clearfield{userf}\clearfield{shorthand}% + \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}% + \frenchspacing}% + {cite:\thefield{entrytype}}}} + +\newbibmacro*{cite:origpubl}{% + \printtext[cmshypertarget]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\clearfield{postnote}% + \usebibmacro{clearpublin}\clearfield{shorthand}% + \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}% + \toggletrue{cms@origpublished}\frenchspacing% + \usebibmacro{cms:titlehook}}% + {cite:\thefield{entrytype}}}} + +\newbibmacro*{at+every+item}{% + \iffieldequalstr{pubstate}{reprint}% + {\toggletrue{cms@reprint}}% + {\togglefalse{cms@reprint}}% + \ifboolexpr{% + test {\iffieldundef{origyear}}% + or + test {\iffieldundef{year}}% + or + not test {\iffieldint{year}}% + or + togl {cms@switchdates}% + }% + {}% + {\ifboolexpr{% Needed for open-ended ranges + test {\iffieldundef{endyear}}% + or + not test {\iffieldnum{endyear}}% + }% + {\ifthenelse{\thefield{origyear}>\thefield{year}}% + {\toggletrue{cms@switchdates}}% + {}}% + {\ifthenelse{\thefield{origyear}>\thefield{endyear}}% + {\toggletrue{cms@switchdates}}% + {}}}}% + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-american.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-american.lbx index 49f8987d745..7f20c9bff08 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-american.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-american.lbx @@ -1,6 +1,6 @@ -% $Id: cms-american.lbx,v 0.10.1.35 2013/10/29 14:13:10 dfussner Exp $ +% $Id: cms-american.lbx,v 0.10.1.36 2016/06/01 11:02:59 dfussner Exp $ -\ProvidesFile{cms-american.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-american.lbx}[2016/06/01 v 3.4 biblatex localization] \InheritBibliographyExtras{american} @@ -808,45 +808,45 @@ \protected\gdef\lbx@cms@mkbibrangetrunc@long#1#2{% \ifthenelse{\iffieldundef{#2year}\AND\iffieldundef{#2month}}% - {} + {}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} + \iffieldsequal{#2year}{#2endyear}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? {\csuse{mkbibdate#1}{}{#2month}{#2day}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2endday}} - {\csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{#2endyear}{}{#2endday}} - {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2endday}}% + {\csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{#2endyear}{}{#2endday}}% + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}% {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}} \protected\gdef\lbx@cms@mkbibrangetrunc@short#1#2{% Modify ??? \ifthenelse{\iffieldundef{#2year}\AND\iffieldundef{#2month}}% - {} + {}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} + \iffieldsequal{#2year}{#2endyear}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -858,11 +858,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-british.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-british.lbx index 20bca56a1d6..4e6e0927947 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-british.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-british.lbx @@ -1,6 +1,6 @@ -% $Id: cms-british.lbx,v 0.7 2013/10/29 14:13:55 dfussner Exp $ +% $Id: cms-british.lbx,v 0.8 2016/06/01 11:06:59 dfussner Exp $ -\ProvidesFile{cms-british.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-british.lbx}[2016/06/01 v 3.4 biblatex localization] \InheritBibliographyExtras{british} @@ -30,35 +30,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -70,11 +70,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-finnish.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-finnish.lbx index e136fd56e1c..7383f84b5f8 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-finnish.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-finnish.lbx @@ -1,6 +1,6 @@ -% $Id: cms-finnish.lbx,v 0.6 2013/10/29 14:15:17 dfussner Exp $ +% $Id: cms-finnish.lbx,v 0.7 2016/06/01 11:09:39 dfussner Exp $ -\ProvidesFile{cms-finnish.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-finnish.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated by a native speaker (Antti-Juhani Kaijanaho). @@ -826,35 +826,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -866,11 +866,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-french.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-french.lbx index fe046122525..e9447443c5f 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-french.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-french.lbx @@ -1,6 +1,6 @@ -% $Id: cms-french.lbx,v 0.9.5.27 2013/10/29 14:16:06 dfussner Exp $ +% $Id: cms-french.lbx,v 0.9.5.30 2016/06/01 17:16:43 dfussner Exp $ -\ProvidesFile{cms-french.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-french.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Some strings still missing @@ -15,6 +15,8 @@ \toggletrue{cms@postposit}% \savecommand\mkbibnamelast \protected\def\mkbibnamelast#1{#1}% No small caps for Chicago (?) + \savecommand\mkbibnamefamily + \protected\def\mkbibnamefamily#1{\textnohyphenation{#1}}% \savecommand\cms@datelong \savecommand\cms@datelongalt \savecommand\mkbibrangecomp @@ -32,6 +34,7 @@ \UndeclareBibliographyExtras{% \restorecommand\postvolpunct% \restorecommand\mkbibnamelast + \restorecommand\mkbibnamefamily \restorecommand\cms@datelong \restorecommand\cms@datelongalt \togglefalse{cms@postposit}% @@ -359,8 +362,8 @@ s\'er\adddot}}, cbynone = {{}{}}, cbyauthor = {{par}{par}}, - cbyeditor = {{sous la dir\adddot\smartof}% - {sous la dir\adddot\smartof}}, + cbyeditor = {{sous la dir\adddotspace\smartof}% + {sous la dir\adddotspace\smartof}}, cbyeditoralt = {{sous la dir\adddot}{sous la dir\adddot}}, byeditoralt = {{sous la direction}{sous la dir\adddot}}, cbytranslator = {{trad\adddot\addspace\lbx@cfromlang}% @@ -372,8 +375,8 @@ % cbyfounder = {{}{}}, % FIXME % cbycontinuator = {{}{}}, % FIXME % cbycollaborator = {{}{}}, % FIXME - cbyconductor = {{sous la dir\adddot\smartof}% - {sous la dir\adddot\smartof}}, + cbyconductor = {{sous la dir\adddotspace\smartof}% + {sous la dir\adddotspace\smartof}}, cbydirector = {{r\'eal\adddot}{r\'eal\adddot}}, cbyproducer = {{prod\adddot}{prod\adddot}}, cbyeditortr = {{\'ed\adddotspace \'etablie et trad\adddot\ @@ -649,7 +652,7 @@ bynone = {{}{}}, bycompiler = {{compil\'e par}{comp\adddot}}, byconductor = {{sous la direction \smartof}% - {sous la dir\adddot\smartof}}, + {sous la dir\adddotspace\smartof}}, bydirector = {{r\'ealis\'e par}{r\'eal\adddot}}, byproducer = {{produit par}{prod\adddot}}, byeditorcp = {{\'edition \'etablie et compil\'ee par}% @@ -787,35 +790,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -827,11 +830,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-german.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-german.lbx index 6697704de2a..ed7f10237df 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-german.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-german.lbx @@ -1,6 +1,6 @@ -% $Id: cms-german.lbx,v 0.9.5.27 2013/10/29 14:17:00 dfussner Exp $ +% $Id: cms-german.lbx,v 0.9.5.29 2016/06/01 11:15:48 dfussner Exp $ -\ProvidesFile{cms-german.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-german.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated strings and formatting decisions need review by native @@ -321,6 +321,17 @@ {\"uberarb\adddot\space Aufl\adddot}}, broadcast = {{\"ubertragen}{\"ubertragen}}, recorded = {{aufgenommen}{aufgenommen}}, + reprintfrom = {{neu gedruckt nach}{neu gedruckt nach}},% FIXME +% translationof = {{}{}},% FIXME: missing +% translationas = {{}{}},% FIXME: missing +% translationfrom = {{}{}},% FIXME: missing +% reviewof = {{}{}},% FIXME: missing + origpubas = {{urspr\"unglich ver\"offentlicht als}% + {urspr\adddot\ ver\"offtl\adddot\ als}},% FIXME + origpubin = {{urspr\"unglich ver\"offentlicht im Jahr\addspace}% + {urspr\adddot\ ver\"offtl\adddot\addspace}},% FIXME + astitle = {{als}{als}},% FIXME + bypublisher = {{von}{von}},% FIXME numbers = {{Nrn\adddot}{Nrn\adddot}}, nodate = {{{}o\adddot Dat\adddot}{{}o\adddot Dat\adddot}},% ? pseudonym = {{Pseud\adddot}{Pseud\adddot}}, @@ -944,35 +955,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -984,11 +995,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-icelandic.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-icelandic.lbx index 8ac97d571ed..05f0a826771 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-icelandic.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-icelandic.lbx @@ -1,6 +1,6 @@ -% $Id: cms-icelandic.lbx,v 0.10 2013/10/29 14:18:01 dfussner Exp $ +% $Id: cms-icelandic.lbx,v 0.11 2016/06/01 11:19:41 dfussner Exp $ -\ProvidesFile{cms-icelandic.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-icelandic.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated by a native speaker (Baldur Kristinsson). @@ -455,35 +455,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -495,11 +495,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-ngerman.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-ngerman.lbx index 6bbe9710ac1..101815445d5 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-ngerman.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-ngerman.lbx @@ -1,6 +1,6 @@ -% $Id: cms-german.lbx,v 0.9.5.27 2013/10/29 14:17:00 dfussner Exp $ +% $Id: cms-german.lbx,v 0.9.5.29 2016/06/01 11:15:48 dfussner Exp $ -\ProvidesFile{cms-ngerman.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-ngerman.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated strings and formatting decisions need review by native @@ -321,6 +321,17 @@ {\"uberarb\adddot\space Aufl\adddot}}, broadcast = {{\"ubertragen}{\"ubertragen}}, recorded = {{aufgenommen}{aufgenommen}}, + reprintfrom = {{neu gedruckt nach}{neu gedruckt nach}},% FIXME +% translationof = {{}{}},% FIXME: missing +% translationas = {{}{}},% FIXME: missing +% translationfrom = {{}{}},% FIXME: missing +% reviewof = {{}{}},% FIXME: missing + origpubas = {{urspr\"unglich ver\"offentlicht als}% + {urspr\adddot\ ver\"offtl\adddot\ als}},% FIXME + origpubin = {{urspr\"unglich ver\"offentlicht im Jahr\addspace}% + {urspr\adddot\ ver\"offtl\adddot\addspace}},% FIXME + astitle = {{als}{als}},% FIXME + bypublisher = {{von}{von}},% FIXME numbers = {{Nrn\adddot}{Nrn\adddot}}, nodate = {{{}o\adddot Dat\adddot}{{}o\adddot Dat\adddot}},% ? pseudonym = {{Pseud\adddot}{Pseud\adddot}}, @@ -944,35 +955,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -984,11 +995,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norsk.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norsk.lbx index 8e5dc4a2706..848884d4d30 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norsk.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norsk.lbx @@ -1,6 +1,6 @@ -% $Id: cms-norsk.lbx,v 1.6 2013/10/29 14:19:01 dfussner Exp $ +% $Id: cms-norsk.lbx,v 1.7 2016/06/01 11:22:00 dfussner Exp $ -\ProvidesFile{cms-norsk.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-norsk.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated by a native speaker (H{\aa}kon Malmedal). @@ -712,35 +712,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -752,11 +752,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norwegian.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norwegian.lbx index 11e05e73d0e..83de0f3ddd1 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norwegian.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-norwegian.lbx @@ -1,6 +1,6 @@ -% $Id: cms-norwegian.lbx,v 1.6 2013/10/29 14:19:41 dfussner Exp $ +% $Id: cms-norwegian.lbx,v 1.7 2016/06/01 11:03:14 dfussner Exp $ -\ProvidesFile{cms-norwegian.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-norwegian.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated by a native speaker (H{\aa}kon Malmedal). @@ -712,35 +712,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -752,11 +752,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-nynorsk.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-nynorsk.lbx index 46dd5d2cdd0..e58c034877f 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-nynorsk.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-nynorsk.lbx @@ -1,6 +1,6 @@ -% $Id: cms-nynorsk.lbx,v 1.6 2013/10/29 14:20:26 dfussner Exp $ +% $Id: cms-nynorsk.lbx,v 1.7 2016/06/01 11:25:40 dfussner Exp $ -\ProvidesFile{cms-nynorsk.lbx}[2013/10/29 v 2.8 biblatex localization] +\ProvidesFile{cms-nynorsk.lbx}[2016/06/01 v 3.4 biblatex localization] % STATUS OF THIS FILE % - Translated by a native speaker (H{\aa}kon Malmedal). @@ -712,35 +712,35 @@ \protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX \iffieldundef{#2year}% - {\iffieldundef{#2month} - {} + {\iffieldundef{#2month}% + {}% {\printtext[#2date]{% - \iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\csuse{mkbibdate#1}{}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {\iffieldundef{#2endmonth} - {} - {\bibdatedash - \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% {\printtext[#2date]{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} - {\csuse{mkbibdate#1}{}{}{#2day}} + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% {\csuse{mkbibdate#1}{#2year}{}{}% \clearfield{#2endyear}}% Clear up inheritance problem ??? - {\csuse{mkbibdate#1}{}{#2month}{#2day}}}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% - \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \protected\gdef\lbx@cms@mkbibrangefull#1#2{% @@ -752,11 +752,11 @@ {}% \printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}} - {} - {\iffieldequalstr{#2endyear}{} - {\mbox{\bibdatedash}} - {\bibdatedash + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cms-swedish.lbx b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-swedish.lbx new file mode 100644 index 00000000000..6f9d26c70c8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cms-swedish.lbx @@ -0,0 +1,762 @@ +% $Id$ + +\ProvidesFile{cms-swedish.lbx}[2016/06/01 v 3.4 biblatex localization] + +% STATUS OF THIS FILE +% - Translated by a native speaker (Stefan Bj\"{o}rk). +% - Date handling modified by dfussner. + +\InheritBibliographyExtras{swedish} + +\DeclareBibliographyExtras{% + \savecommand\cms@datelong + \savecommand\cms@datelongalt + \savecommand\mkbibrangecomp + \savecommand\mkbibrangeterse + \savecommand\mkbibrangefull + \protected\def\mkbibrangecomp{% + \lbx@cms@mkbibrangetrunc{long}}% + \protected\def\mkbibrangeterse{% + \lbx@cms@mkbibrangetrunc{short}}% + \protected\def\mkbibrangefull{% + \lbx@cms@mkbibrangefull}% + \def\cms@datelong{\printorigdate}% + \def\cms@datelongalt{\printdate}}% + +\UndeclareBibliographyExtras{% + \restorecommand\cms@datelong + \restorecommand\cms@datelongalt + \restorecommand\mkbibrangecomp% + \restorecommand\mkbibrangefull% + \restorecommand\mkbibrangeterse}% + +\NewBibliographyString{bynone} +\NewBibliographyString{bycompiler} +\NewBibliographyString{byconductor} +\NewBibliographyString{bydirector} +\NewBibliographyString{byproducer} +\NewBibliographyString{byeditorcp} +\NewBibliographyString{byeditortrcp} +\NewBibliographyString{byeditortrcpco} +\NewBibliographyString{byeditortrcpan} +\NewBibliographyString{byeditortrcpin} +\NewBibliographyString{byeditortrcpfo} +\NewBibliographyString{byeditortrcpaf} +\NewBibliographyString{byeditortrcpcoin} +\NewBibliographyString{byeditortrcpcofo} +\NewBibliographyString{byeditortrcpcoaf} +\NewBibliographyString{byeditortrcpanin} +\NewBibliographyString{byeditortrcpanfo} +\NewBibliographyString{byeditortrcpanaf} +\NewBibliographyString{byeditorcpco} +\NewBibliographyString{byeditorcpan} +\NewBibliographyString{byeditorcpin} +\NewBibliographyString{byeditorcpfo} +\NewBibliographyString{byeditorcpaf} +\NewBibliographyString{byeditorcpcoin} +\NewBibliographyString{byeditorcpcofo} +\NewBibliographyString{byeditorcpcoaf} +\NewBibliographyString{byeditorcpanin} +\NewBibliographyString{byeditorcpanfo} +\NewBibliographyString{byeditorcpanaf} +\NewBibliographyString{bytranslatorcp} +\NewBibliographyString{bytranslatorcpco} +\NewBibliographyString{bytranslatorcpan} +\NewBibliographyString{bytranslatorcpin} +\NewBibliographyString{bytranslatorcpfo} +\NewBibliographyString{bytranslatorcpaf} +\NewBibliographyString{bytranslatorcpcoin} +\NewBibliographyString{bytranslatorcpcofo} +\NewBibliographyString{bytranslatorcpcoaf} +\NewBibliographyString{bytranslatorcpanin} +\NewBibliographyString{bytranslatorcpanfo} +\NewBibliographyString{bytranslatorcpanaf} +\NewBibliographyString{bycompilerco} +\NewBibliographyString{bycompileran} +\NewBibliographyString{bycompilerin} +\NewBibliographyString{bycompilerfo} +\NewBibliographyString{bycompileraf} +\NewBibliographyString{bycompilercoin} +\NewBibliographyString{bycompilercofo} +\NewBibliographyString{bycompilercoaf} +\NewBibliographyString{bycompileranin} +\NewBibliographyString{bycompileranfo} +\NewBibliographyString{bycompileranaf} +\NewBibliographyString{cbynone} +\NewBibliographyString{cbyauthor} +\NewBibliographyString{cbyeditor} +\NewBibliographyString{cbytranslator} +\NewBibliographyString{cbycompiler} +\NewBibliographyString{cbyredactor} +\NewBibliographyString{cbycommentator} +\NewBibliographyString{cbyannotator} +\NewBibliographyString{cbyfounder} +\NewBibliographyString{cbycontinuator} +\NewBibliographyString{cbycollaborator} +\NewBibliographyString{cbyconductor} +\NewBibliographyString{cbydirector} +\NewBibliographyString{cbyproducer} +\NewBibliographyString{cbyeditortr} +\NewBibliographyString{cbyeditorcp} +\NewBibliographyString{cbyeditorco} +\NewBibliographyString{cbyeditoran} +\NewBibliographyString{cbyeditorin} +\NewBibliographyString{cbyeditorfo} +\NewBibliographyString{cbyeditoraf} +\NewBibliographyString{cbyeditortrcp} +\NewBibliographyString{cbyeditortrco} +\NewBibliographyString{cbyeditortran} +\NewBibliographyString{cbyeditortrin} +\NewBibliographyString{cbyeditortrfo} +\NewBibliographyString{cbyeditortraf} +\NewBibliographyString{cbyeditortrcpco} +\NewBibliographyString{cbyeditortrcpan} +\NewBibliographyString{cbyeditortrcpin} +\NewBibliographyString{cbyeditortrcpfo} +\NewBibliographyString{cbyeditortrcpaf} +\NewBibliographyString{cbyeditorcoin} +\NewBibliographyString{cbyeditorcofo} +\NewBibliographyString{cbyeditorcoaf} +\NewBibliographyString{cbyeditoranin} +\NewBibliographyString{cbyeditoranfo} +\NewBibliographyString{cbyeditoranaf} +\NewBibliographyString{cbyeditortrcoin} +\NewBibliographyString{cbyeditortrcofo} +\NewBibliographyString{cbyeditortrcoaf} +\NewBibliographyString{cbyeditortranin} +\NewBibliographyString{cbyeditortranfo} +\NewBibliographyString{cbyeditortranaf} +\NewBibliographyString{cbyeditortrcpcoin} +\NewBibliographyString{cbyeditortrcpcofo} +\NewBibliographyString{cbyeditortrcpcoaf} +\NewBibliographyString{cbyeditortrcpanin} +\NewBibliographyString{cbyeditortrcpanfo} +\NewBibliographyString{cbyeditortrcpanaf} +\NewBibliographyString{cbyeditorcpco} +\NewBibliographyString{cbyeditorcpan} +\NewBibliographyString{cbyeditorcpin} +\NewBibliographyString{cbyeditorcpfo} +\NewBibliographyString{cbyeditorcpaf} +\NewBibliographyString{cbyeditorcpcoin} +\NewBibliographyString{cbyeditorcpcofo} +\NewBibliographyString{cbyeditorcpcoaf} +\NewBibliographyString{cbyeditorcpanin} +\NewBibliographyString{cbyeditorcpanfo} +\NewBibliographyString{cbyeditorcpanaf} +\NewBibliographyString{cbytranslatorcp} +\NewBibliographyString{cbytranslatorco} +\NewBibliographyString{cbytranslatoran} +\NewBibliographyString{cbytranslatorin} +\NewBibliographyString{cbytranslatorfo} +\NewBibliographyString{cbytranslatoraf} +\NewBibliographyString{cbytranslatorcpco} +\NewBibliographyString{cbytranslatorcpan} +\NewBibliographyString{cbytranslatorcpin} +\NewBibliographyString{cbytranslatorcpfo} +\NewBibliographyString{cbytranslatorcpaf} +\NewBibliographyString{cbytranslatorcoin} +\NewBibliographyString{cbytranslatorcofo} +\NewBibliographyString{cbytranslatorcoaf} +\NewBibliographyString{cbytranslatoranin} +\NewBibliographyString{cbytranslatoranfo} +\NewBibliographyString{cbytranslatoranaf} +\NewBibliographyString{cbytranslatorcpcoin} +\NewBibliographyString{cbytranslatorcpcofo} +\NewBibliographyString{cbytranslatorcpcoaf} +\NewBibliographyString{cbytranslatorcpanin} +\NewBibliographyString{cbytranslatorcpanfo} +\NewBibliographyString{cbytranslatorcpanaf} +\NewBibliographyString{cbycompilerco} +\NewBibliographyString{cbycompileran} +\NewBibliographyString{cbycompilerin} +\NewBibliographyString{cbycompilerfo} +\NewBibliographyString{cbycompileraf} +\NewBibliographyString{cbycompilercoin} +\NewBibliographyString{cbycompilercofo} +\NewBibliographyString{cbycompilercoaf} +\NewBibliographyString{cbycompileranin} +\NewBibliographyString{cbycompileranfo} +\NewBibliographyString{cbycompileranaf} +\NewBibliographyString{cfromamerican} +\NewBibliographyString{cfrombrazilian} +\NewBibliographyString{cfromdanish} +\NewBibliographyString{cfromdutch} +\NewBibliographyString{cfromenglish} +\NewBibliographyString{cfromfrench} +\NewBibliographyString{cfromgerman} +\NewBibliographyString{cfromgreek} +\NewBibliographyString{cfromitalian} +\NewBibliographyString{cfromlatin} +\NewBibliographyString{cfromnorwegian} +\NewBibliographyString{cfromportuguese} +\NewBibliographyString{cfromrussian} +\NewBibliographyString{cfromspanish} +\NewBibliographyString{cfromswedish} +\NewBibliographyString{partvolume} +\NewBibliographyString{by} +\NewBibliographyString{of} +\NewBibliographyString{on} +\NewBibliographyString{afterwordto} +\NewBibliographyString{forewordto} +\NewBibliographyString{introductionto} +\NewBibliographyString{origpub} +\NewBibliographyString{origpublin} +\NewBibliographyString{origpubyear} +\NewBibliographyString{origpubyearalt} +\NewBibliographyString{origreleaseyear} +\NewBibliographyString{origshownyear} +\NewBibliographyString{origedition} +\NewBibliographyString{revisededition} +\NewBibliographyString{broadcast} +\NewBibliographyString{recorded} +\NewBibliographyString{numbers} +\NewBibliographyString{nodate} +\NewBibliographyString{pseudonym} +\NewBibliographyString{patentfiled}% Needed for CMS style patent entries +\NewBibliographyString{patentissued}% +\NewBibliographyString{inlang} +\NewBibliographyString{langrussian} +\NewBibliographyString{fromrussian} +\NewBibliographyString{edamerican} +\NewBibliographyString{edbrazilian} +\NewBibliographyString{eddanish} +\NewBibliographyString{eddutch} +\NewBibliographyString{edenglish} +\NewBibliographyString{edfrench} +\NewBibliographyString{edgerman} +\NewBibliographyString{edgreek} +\NewBibliographyString{editalian} +\NewBibliographyString{edlatin} +\NewBibliographyString{ednorwegian} +\NewBibliographyString{edportuguese} +\NewBibliographyString{edrussian} +\NewBibliographyString{edspanish} +\NewBibliographyString{edswedish} +\NewBibliographyString{review} +\NewBibliographyString{reviewof} +\NewBibliographyString{section} +\NewBibliographyString{sections} +\NewBibliographyString{compiler} +\NewBibliographyString{compilers} +\NewBibliographyString{conductor} +\NewBibliographyString{conductors} +\NewBibliographyString{director} +\NewBibliographyString{directors} +\NewBibliographyString{none} +\NewBibliographyString{nones} +\NewBibliographyString{producer} +\NewBibliographyString{producers} +\NewBibliographyString{transcompiler} +\NewBibliographyString{transcompilers} +\NewBibliographyString{editortranscompiler} +\NewBibliographyString{editorcompiler} +\NewBibliographyString{editortranslator} +\NewBibliographyString{editortranscompilers} +\NewBibliographyString{editorcompilers} +\NewBibliographyString{editortranslators} + +\DeclareBibliographyStrings{% + inherit = {swedish}, + afterwordto = {{efterord till}{efterord till}}, + forewordto = {{f\"{o}rord till}{f\"{o}rord till}}, + introductionto = {{inledning till}{inl\adddot\space till}}, + partvolume = {{del}{del}}, + by = {{av}{av}}, + of = {{av}{av}}, + on = {{p{\aa}}{p{\aa}}}, + compiler = {{sammanst\adddot}{sammanst\adddot}}, + compilers = {{sammanst\adddot}{sammanst\adddot}}, + transcompiler = {{\"{o}vers\adddot\addspace och sammanst\adddot}% + {\"{o}vers\adddot\addspace och sammanst\adddot}}, + transcompilers = {{\"{o}vers\adddot\addspace och sammanst\adddot}% + {\"{o}vers\adddot\addspace och sammanst\adddot}}, + editortranscompiler = {{red\adddot\addcomma\addspace + \"{o}vers\adddot\addcomma\addspace och sammanst\adddot}% + {red\adddot\addcomma\addspace + \"{o}vers\adddot\addcomma\addspace och sammanst\adddot}}, + editorcompiler = {{red\adddot\addspace och sammanst\adddot}% + {red\adddot\addspace och sammanst\adddot}}, + editortranslator = {{red\adddot\addspace och \"{o}vers\adddot}% + {red\adddot\addspace och \"{o}vers\adddot}}, + editortranscompilers = {{red\adddot\addcomma\addspace + \"{o}vers\adddot\addcomma\addspace och sammanst\adddot}% + {red\adddot\addcomma\addspace + \"{o}vers\adddot\addcomma\addspace och sammanst\adddot}}, + editorcompilers = {{red\adddot\addspace och sammanst\adddot}% + {red\adddot\addspace och sammanst\adddot}}, + editortranslators = {{red\adddot\addspace och \"{o}vers\adddot}% + {red\adddot\addspace och \"{o}vers\adddot}}, + conductor = {{dir\adddot}{dir\adddot}}, + conductors = {{dir\adddot}{dir\adddot}}, + director = {{regi}{regi}}, + directors = {{regi}{regi}}, + none = {{}{}}, + nones = {{}{}}, + producer = {{prod\adddot}{prod\adddot}}, + producers = {{prod\adddot}{prod\adddot}}, + editor = {{red\adddot}{red\adddot}}, + editors = {{red\adddot}{red\adddot}}, + ibidem = {{ibid\adddot}{ibid\adddot}}, + origpub = {{ursprungligen publicerad som}% + {urspr\adddot\ pub\adddot\ som}}, + origpublin = {{ursprungligen publicerad i\addspace}% + {urspr\adddot\ pub\adddot\addspace i\addspace}}, + origpubyear = {{ursprungligen publicerad i\addspace}% + {urspr\adddot\ utg\adddot\addspace}}, + origpubyearalt = {{f{\o}rst publicerad\addspace}% + {f{\o}rst pub\adddot\addspace}}, + origreleaseyear = {{ursprungligen publicerad i\addspace}% + {urspr\adddot\ pub\adddotspace}}, + origshownyear = {{ursprungligen visad i\addspace}% + {urspr\adddot\ visad\addspace}}, + origedition ={{utg{\aa}va\addcolon\addspace}% + {utg\adddot\addcolon\addspace}}, + revisededition = {{reviderad utg{\aa}va\addspace}% + {rev\adddot\addspace utg\adddot}}, + broadcast = {{kringkastet}{kringkastet}}, + recorded = {{spilt inn}{spilt inn}}, + numbers = {{nr\adddot}{nr\adddot}}, + nodate = {{udatert}{udatert}}, + pseudonym = {{pseud\adddot}{pseud\adddot}}, + patentfiled = {{s{\o}kt}{s{\o}kt}}, + patentissued = {{meddelt}{meddelt}}, + inlang = {{p{\aa}\addspace}{p{\aa}\addspace}}, + edamerican = {{amerikanska}{amerikanska}}, + edbrazilian = {{brasilianska}{brasilianska}}, + eddanish = {{danska}{danska}}, + eddutch = {{nederländska}{nederländska}}, + edenglish = {{engelska}{engelska}}, + edfrench = {{franska}{franska}}, + edgerman = {{tyska}{tyska}}, + edgreek = {{grekiska}{grekiska}}, + editalian = {{italienska}{italienska}}, + edlatin = {{latin}{latin}}, + ednorwegian = {{norska}{norska}}, + edportuguese = {{portugisiska}{portugisiska}}, + edrussian = {{ryska}{ryska}} + edspanish = {{spanska}{spanska}}, + edswedish = {{svenska}{svenska}}, + translator = {{\"{o}vers\adddot}{\"{o}vers\adddot}}, + translators = {{\"{o}vers\adddot}{\"{o}vers\adddot}}, + redactor = {{bearb\adddot}{bearb\adddot}}, + redactors = {{bearb\adddot}{bearb\adddot}}, + founder = {{grunnl\adddot}{grunnl\adddot}}, + founders = {{grunnl\adddot}{grunnl\adddot}}, + continuator = {{videref\adddot}{videref\adddot}}, + continuators = {{videref\adddot}{videref\adddot}}, + collaborator = {{samarb\adddot}{samarb\adddot}}, + collaborators = {{samarb\adddot}{samarb\adddot}}, + annotator = {{forkl\adddot}{forkl\adddot}}, + annotators = {{forkl\adddot}{forkl\adddot}}, + review = {{omtale}{omtale}}, + reviewof = {{omtale av}{omtale av}}, + cbynone = {{}{}}, + cbyauthor = {{av}{av}}, + cbyeditor = {{red\adddot}{red\adddot}}, + cbytranslator = {{\"{o}vers\adddot\addspace\lbx@cfromlang}% + {\"{o}vers\adddot\addspace\lbx@cfromlang}}, + cbycompiler = {{sammanst\adddot}{sammanst\adddot}}, + cbyredactor = {{bearb\adddot}{bearb\adddot}}, + cbycommentator = {{komm\adddot}{komm\adddot}}, + cbyannotator = {{forkl\addot}{forkl\addot}}, + cbyfounder = {{grunnl\adddot}{grunnl\adddot}}, + cbycontinuator = {{videref\adddot}{videref\adddot}}, + cbycollaborator = {{i samarb\adddotspace med}% + {i samarb\adddotspace med}}, + cbyconductor = {{dir\adddot}{dir\adddot}}, + cbydirector = {{regi}{regi}}, + cbyproducer = {{prod\adddot}{prod\adddot}}, + cbyeditortr = {{red\adddot\space och + \"{o}vers\adddot\addspace\lbx@cfromlang}% + {red\adddot\space och \"{o}vers\adddot\addspace\lbx@cfromlang}}, + cbyeditorcp = {{red\adddot\space och sammanst\adddot}% + {red\adddot\space och sammanst\adddot}}, + cbyeditorco = {{red\adddot\space och komm\adddot}% + {red\adddot\space och komm\adddot}}, + cbyeditoran = {{red\adddot\space och forkl\adddot}% + {red\adddot\space och forkl\adddot}}, + cbyeditorin = {{red\adddot,\addabbrvspace med inl\adddot, av}% + {red\adddot,\addabbrvspace med inl\adddot, av}}, + cbyeditorfo = {{red.,\addabbrvspace med f\"{o}rord, av}% + {red.,\addabbrvspace med f\"{o}rord, av}}, + cbyeditoraf = {{red.,\addabbrvspace med efterord, av}% + {red.,\addabbrvspace med efterord, av}}, + cbyeditortrcp = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och + sammanst\adddot}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst\adddot}}, + cbyeditortrco = {{red.,\addabbrvspace + \"{o}vers\adddot\addspace\lbx@fromlang\space och + komm\adddot}% + {red.,\addabbrvspace + \"{o}vers\adddot\addspace\lbx@fromlang\space och komm\adddot}}, + cbyeditortran = {{red.,\addabbrvspace + \"{o}vers\adddot\addspace\lbx@fromlang\space och + forkl\adddot}% + {red.,\addabbrvspace + \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl\adddot}}, + cbyeditortrin = {{red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med inl., av}% + {red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med inl., av}}, + cbyeditortrfo = {{red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med f\"{o}rord, av}% + {red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med f\"{o}rord, av}}, + cbyeditortraf = {{red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med efterord, av}% + {red\adddotspace och \"{o}vers\adddot\ \lbx@sfromlang, med efterord, av}}, + cbyeditorcpco = {{red.,\addabbrvspace sammanst. och komm\adddot}% + {red.,\addabbrvspace sammanst. och komm\adddot}}, + cbyeditorcpan = {{red.,\addabbrvspace sammanst. och forkl\adddot}% + {red.,\addabbrvspace sammanst. och forkl\adddot}}, + cbyeditorcpin = {{red\adddot\space och sammanst., med inl., av}% + {red\adddot\space och sammanst., med inl., av}}, + cbyeditorcpfo = {{red\adddot\space och sammanst., med f\"{o}rord, av}% + {red\adddot\space och sammanst., med f\"{o}rord, av}}, + cbyeditorcpaf = {{red\adddot\space och sammanst., med efterord, av}% + {red\adddot\space och sammanst., med efterord, av}}, + cbyeditorcpcoin = {{red.,\addabbrvspace sammanst. och komm., med inl., av}% + {red.,\addabbrvspace sammanst. och komm., med inl., av}}, + cbyeditorcpcofo = {{red.,\addabbrvspace sammanst. och komm., med f\"{o}rord, av}% + {red.,\addabbrvspace sammanst. och komm., med f\"{o}rord, av}}, + cbyeditorcpcoaf = {{red.,\addabbrvspace sammanst. och komm., med efterord, av}% + {red.,\addabbrvspace sammanst. och komm., med efterord, av}}, + cbyeditorcpanin = {{red.,\addabbrvspace sammanst. och forkl., med inl., av}% + {red.,\addabbrvspace sammanst. och forkl., med inl., av}}, + cbyeditorcpanfo = {{red.,\addabbrvspace sammanst. och forkl., med f\"{o}rord, av}% + {red.,\addabbrvspace sammanst. och forkl., med f\"{o}rord, av}}, + cbyeditorcpanaf = {{red.,\addabbrvspace sammanst. och forkl., med efterord, av}% + {red.,\addabbrvspace sammanst. och forkl., med efterord, av}}, + cbyeditortrcpco = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och komm\adddot}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm\adddot}}, + cbyeditortrcpan = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och forkl\adddot}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl\adddot}}, + cbyeditortrcpin = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., med inl., av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., + med inl., av}}, + cbyeditortrcpfo = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., + med f\"{o}rord, av}}, + cbyeditortrcpaf = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst., + med efterord, av}}, + cbyeditortrcpcoin = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och komm., med inl., av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm., med inl., av}}, + cbyeditortrcpcofo = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och komm., med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm., med f\"{o}rord, av}}, + cbyeditortrcpcoaf = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och komm., med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm., med efterord, av}}, + cbyeditortrcpanin = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och forkl., med inl., av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl., med inl., av}}, + cbyeditortrcpanfo = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och forkl., med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl., med f\"{o}rord, av}}, + cbyeditortrcpanaf = {{red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, + sammanst. och forkl., med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl., med efterord, av}}, + cbyeditorcoin = {{red\adddot\space och komm., med inl., av}% + {red\adddot\space och komm., med inl., av}}, + cbyeditorcofo = {{red\adddot\space och komm., med f\"{o}rord, av}% + {red\adddot\space och komm., med f\"{o}rord, av}}, + cbyeditorcoaf = {{red\adddot\space och komm., med efterord, av}% + {red\adddot\space och komm., med efterord, av}}, + cbyeditoranin = {{red\adddot\space och forkl., med inl., av}% + {red\adddot\space och forkl., med inl., av}}, + cbyeditoranfo = {{red\adddot\space och forkl., med f\"{o}rord, av}% + {red\adddot\space och forkl., med f\"{o}rord, av}}, + cbyeditoranaf = {{red\adddot\space och forkl., med efterord, av}% + {red\adddot\space och forkl., med efterord, av}}, + cbyeditortrcoin = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med inl., av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med inl., av}}, + cbyeditortrcofo = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med f\"{o}rord, av}}, + cbyeditortrcoaf = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med efterord, av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och komm., med efterord, av}}, + cbyeditortranin = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med inl., av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med inl., av}}, + cbyeditortranfo = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med f\"{o}rord, av}}, + cbyeditortranaf = {{red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med efterord, av}% + {red.,\addabbrvspace \"{o}vers\adddot\addspace\lbx@fromlang\space och forkl., med efterord, av}}, + cbytranslatorcp = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst\adddot}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst\adddot}}, + cbytranslatorco = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och komm\adddot}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och komm\adddot}}, + cbytranslatoran = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl\adddot}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl\adddot}}, + cbytranslatorin = {{\"{o}vers\adddot\addspace\lbx@fromlang, med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, med inl., av}}, + cbytranslatorfo = {{\"{o}vers\adddot\addspace\lbx@fromlang, med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, med f\"{o}rord, av}}, + cbytranslatoraf = {{\"{o}vers\adddot\addspace\lbx@fromlang, med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, med efterord, av}}, + cbytranslatorcoin = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., + med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., med inl., av}}, + cbytranslatorcofo = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., + med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., med f\"{o}rord, av}}, + cbytranslatorcoaf = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., + med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och komm., med efterord, av}}, + cbytranslatoranin = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., + med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., med inl., av}}, + cbytranslatoranfo = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., + med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., med f\"{o}rord, av}}, + cbytranslatoranaf = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., + med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och forkl., med efterord, av}}, + cbytranslatorcpco = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm\adddot}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm\adddot}}, + cbytranslatorcpan = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl\adddot}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl\adddot}}, + cbytranslatorcpin = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., + med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med inl., av}}, + cbytranslatorcpfo = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., + med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med f\"{o}rord, av}}, + cbytranslatorcpaf = {{\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., + med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med efterord, av}}, + cbytranslatorcpcoin = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., + med inl., av}}, + cbytranslatorcpcofo = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., + med f\"{o}rord, av}}, + cbytranslatorcpcoaf = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., + med efterord, av}}, + cbytranslatorcpanin = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., med inl., av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., + med inl., av}}, + cbytranslatorcpanfo = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., + med f\"{o}rord, av}}, + cbytranslatorcpanaf = {{\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., + med efterord, av}}, + cbycompilerco = {{sammanst\adddot\space och komm\adddot}% + {sammanst\adddot\space och komm\adddot}}, + cbycompileran = {{sammanst\adddot\space och forkl\adddot}% + {sammanst\adddot\space och forkl\adddot}}, + cbycompilerin = {{sammanst.,\addabbrvspace med inl., av}% + {sammanst.,\addabbrvspace med inl., av}}, + cbycompilerfo = {{sammanst.,\addabbrvspace med f\"{o}rord, av}% + {sammanst.,\addabbrvspace med f\"{o}rord, av}}, + cbycompileraf = {{sammanst.,\addabbrvspace med efterord, av}% + {sammanst.,\addabbrvspace med efterord, av}}, + cbycompilercoin = {{sammanst\adddot\space och komm., med inl., av}% + {sammanst\adddot\space och komm., med inl., av}}, + cbycompilercofo = {{sammanst\adddot\space och komm., med f\"{o}rord, av}% + {sammanst\adddot\space och komm., med f\"{o}rord, av}}, + cbycompilercoaf = {{sammanst\adddot\space och komm., med efterord, av}% + {sammanst\adddot\space och komm., med efterord, av}}, + cbycompileranin = {{sammanst\adddot\space och forkl., med inl., av}% + {sammanst\adddot\space och forkl., med inl., av}}, + cbycompileranfo = {{sammanst\adddot\space och forkl., med f\"{o}rord, av}% + {sammanst\adddot\space och forkl., med f\"{o}rord, av}}, + cbycompileranaf = {{sammanst\adddot\space och forkl., med efterord, av}% + {sammanst\adddot\space och forkl., med efterord, av}}, + volume = {{bd\adddot}{bd\adddot}}, + volumes = {{bd\adddot}{bd\adddot}}, + jourvol = {{{\aa}rg\adddot}{{\aa}rg\adddot}}, + jourser = {{ser\adddot}{ser\adddot}}, + oldseries = {{gl\adddotspace ser\adddot}{gl\adddotspace ser\adddot}}, + edition = {{utg\adddot}{utg\adddot}}, + page = {{s\adddot}{s\adddot}}, + pages = {{s\adddot}{s\adddot}}, + column = {{sp\adddot}{sp\adddot}}, + columns = {{sp\adddot}{sp\adddot}}, + line = {{l\adddot}{l\adddot}}, + lines = {{l\adddot}{l\adddot}}, + paragraph = {{avsn\adddot}{avsn\adddot}}, + paragraphs = {{avsn\adddot}{avsn\adddot}}, + section = {{avsn\adddot}{avsn\adddot}}, + sections = {{avsn\adddot}{avsn\adddot}}, + verse = {{v\adddot}{v\adddot}}, + verses = {{v\adddot}{v\adddot}}, + number = {{nr\adddot}{nr\adddot}}, + chapter = {{kap\adddot}{kap\adddot}}, + cfromamerican = {{fr{\aa}n engelska av}{fr{\aa}n engelska av}}, + cfrombrazilian = {{fr{\aa}n portugisiska av}{fr{\aa}n portugisiska av}}, + cfromdanish = {{fr{\aa}n danska av}{fr{\aa}n danska av}}, + cfromdutch = {{fr{\aa}n nederländska av}{fr{\aa}n nederländska av}}, + cfromenglish = {{fr{\aa}n engelska av}{fr{\aa}n engelska av}}, + cfromfrench = {{fr{\aa}n franska av}{fr{\aa}n franska av}}, + cfromgerman = {{fr{\aa}n tyska av}{fr{\aa}n tyska av}}, + cfromgreek = {{fr{\aa}n grekiska av}{fr{\aa}n grekiska av}}, + cfromitalian = {{fr{\aa}n italienska av}{fr{\aa}n italienska av}}, + cfromlatin = {{fr{\aa}n latin av}{fr{\aa}n latin av}}, + cfromnorwegian = {{fr{\aa}n norska av}{fr{\aa}n norska av}}, + cfromportuguese = {{fr{\aa}n portugisiska av}{fr{\aa}n portugisiska av}}, + cfromrussian = {{fr{\aa}n ryska av}{fr{\aa}n ryska av}}, + cfromspanish = {{fr{\aa}n spanska av}{fr{\aa}n spanska av}}, + cfromswedish = {{fr{\aa}n svenska av}{fr{\aa}n svenska av}}, + bynone = {{}{}}, + byconductor = {{dirigerad av}{dir\adddot}}, + bydirector = {{regisserad av}{regi}}, + byproducer = {{producerad av}{prod\adddot}}, + byeditorcp = {{redigerad och sammanst\"{a}lld av}{red\adddot\space och sam\adddot}}, + byeditortrcp = {{redigerad, \"{o}versatt \lbx@fromlang och sammanst\"{a}lld av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst\adddot}}, + byeditortrcpco = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm\adddot}}, + byeditortrcpan = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl\adddot}}, + byeditortrcpin = {{redigerad, \"{o}versatt \lbx@fromlang och sammanst\"{a}lld, med inledning, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst\adddot, + med inledning, av}}, + byeditortrcpfo = {{redigerad, \"{o}versatt \lbx@fromlang och sammanst\"{a}lld, med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst\adddot, + med f\"{o}rord, av}}, + byeditortrcpaf = {{redigerad, \"{o}versatt \lbx@fromlang och sammanst\"{a}lld, med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang och sammanst\adddot, + med efterord, av}}, + byeditortrcpcoin = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, med inledning, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm\adddot, med inledning, av}}, + byeditortrcpcofo = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm\adddot, med f\"{o}rord, av}}, + byeditortrcpcoaf = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och komm\adddot, med efterord, av}}, + byeditortrcpanin = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, med inledning, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl\adddot, med inledning, av}}, + byeditortrcpanfo = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, med f\"{o}rord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl\adddot, med f\"{o}rord, av}}, + byeditortrcpanaf = {{redigerad, \"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, med efterord, av}% + {red.,\addabbrvspace \"{o}vers.\addspace\lbx@fromlang, sammanst. och forkl\adddot, med efterord, av}}, + byeditorcpco = {{redigerad, sammanst\"{a}lld och kommenterad av}% + {red.,\addabbrvspace sammanst. och komm\adddot}}, + byeditorcpan = {{redigerad, sammanst\"{a}lld och f\"{o}rklarad av}% + {red.,\addabbrvspace sammanst. och forkl\adddot}}, + byeditorcpin = {{redigerad och sammanst\"{a}lld, med inledning, av}% + {red\adddot\space och sammanst., med inledning, av}}, + byeditorcpfo = {{redigerad och sammanst\"{a}lld, med f\"{o}rord, av}% + {red\adddot\space och sammanst., med f\"{o}rord, av}}, + byeditorcpaf = {{redigerad och sammanst\"{a}lld, med efterord, av}% + {red\adddot\space och sammanst., med efterord, av}}, + byeditorcpcoin = {{redigerad, sammanst\"{a}lld och kommenterad, med inledning, av}% + {red.,\addabbrvspace sammanst. och komm., med inledning, av}}, + byeditorcpcofo = {{redigerad, sammanst\"{a}lld och kommenterad, med f\"{o}rord, + av}% + {red.,\addabbrvspace sammanst. och komm., med f\"{o}rord, av}}, + byeditorcpcoaf = {{redigerad, sammanst\"{a}lld och kommenterad, med efterord, av}% + {red.,\addabbrvspace sammanst. och komm., med efterord, av}}, + byeditorcpanin = {{redigerad, sammanst\"{a}lld och f\"{o}rklarad, med inledning, av}% + {red.,\addabbrvspace sammanst. och forkl., med inledning, av}}, + byeditorcpanfo = {{redigerad, sammanst\"{a}lld och f\"{o}rklarad, med f\"{o}rord, + av}% + {red.,\addabbrvspace sammanst. och forkl., med f\"{o}rord, av}}, + byeditorcpanaf = {{redigerad, sammanst\"{a}lld och f\"{o}rklarad, med efterord, av}% + {red.,\addabbrvspace sammanst. och forkl., med efterord, av}}, + bytranslatorcp = {{\"{o}versatt \lbx@fromlang\ och sammanst\"{a}lld av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst\adddot}}, + bytranslatorcpco = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm\adddot}}, + bytranslatorcpan = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl\adddot}}, + bytranslatorcpin = {{\"{o}versatt \lbx@fromlang\ och sammanst\"{a}lld, med inledning, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med inledning, av}}, + bytranslatorcpfo = {{\"{o}versatt \lbx@fromlang\ och sammanst\"{a}lld, med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med f\"{o}rord, av}}, + bytranslatorcpaf = {{\"{o}versatt \lbx@fromlang\ och sammanst\"{a}lld, med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang\ och sammanst., med efterord, av}}, + bytranslatorcpcoin = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, + med inledning, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., med inledning, av}}, + bytranslatorcpcofo = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, + med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., + med f\"{o}rord, av}}, + bytranslatorcpcoaf = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och kommenterad, + med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och komm., med efterord, av}}, + bytranslatorcpanin = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, + med inledning, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., med inledning, av}}, + bytranslatorcpanfo = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, + med f\"{o}rord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., + med f\"{o}rord, av}}, + bytranslatorcpanaf = {{\"{o}versatt \lbx@fromlang, sammanst\"{a}lld och f\"{o}rklarad, + med efterord, av}% + {\"{o}vers\adddot\addspace\lbx@fromlang, sammanst. och forkl., + med efterord, av}}, + bycompilerco = {{sammanst\"{a}lld och kommenterad av}% + {sammanst\adddot\space och komm\adddot}}, + bycompileran = {{sammanst\"{a}lld och f\"{o}rklarad av}% + {sammanst\adddot\space och forkl\adddot}}, + bycompilerin = {{sammanst\"{a}lld, med inledning, av}% + {sammanst\adddot, med inledning, av}}, + bycompilerfo = {{sammanst\"{a}lld, med f\"{o}rord, av}% + {sammanst\adddot, med f\"{o}rord, av}}, + bycompileraf = {{sammanst\"{a}lld, med efterord, av}% + {sammanst\adddot, med efterord, av}}, + bycompilercoin = {{sammanst\"{a}lld och kommenterad, med inledning, av}% + {sammanst\adddot\space och komm\adddot, med inledning, av}}, + bycompilercofo = {{sammanst\"{a}lld och kommenterad, med f\"{o}rord, av}% + {sammanst\adddot\space och komm\adddot, med f\"{o}rord, av}}, + bycompilercoaf = {{sammanst\"{a}lld och kommenterad, med efterord, av}% + {sammanst\adddot\space och komm\adddot, med efterord, av}}, + bycompileranin = {{sammanst\"{a}lld och f\"{o}rklarad, med inledning, av}% + {sammanst\adddot\space och forkl\adddot, med inledning, av}}, + bycompileranfo = {{sammanst\"{a}lld och f\"{o}rklarad, med f\"{o}rord, av}% + {sammanst\adddot\space och forkl\adddot, med f\"{o}rord, av}}, + bycompileranaf = {{sammanst\"{a}lld och f\"{o}rklarad, med efterord, av}% + {sammanst\adddot\space och forkl\adddot, med efterord, av}}, +} + +\protected\gdef\lbx@cms@mkbibrangetrunc#1#2{% DATE FIX + \iffieldundef{#2year}% + {\iffieldundef{#2month}% + {}% + {\printtext[#2date]{% + \iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% + {\csuse{mkbibdate#1}{}{#2month}{#2day}}% + \iffieldundef{#2endyear}% + {\iffieldundef{#2endmonth}% + {}% + {\bibdatedash% + \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}}% + {\printtext[#2date]{% + \iffieldsequal{#2year}{#2endyear}% + {\iffieldsequal{#2month}{#2endmonth}% + {\csuse{mkbibdate#1}{}{}{#2day}}% + {\ifthenelse{\iffieldundef{#2month}\AND\iffieldundef{#2day}}% + {\csuse{mkbibdate#1}{#2year}{}{}% + \clearfield{#2endyear}}% Clear up inheritance problem ??? + {\csuse{mkbibdate#1}{}{#2month}{#2day}}}}% + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% + \iffieldundef{#2endyear}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + +\protected\gdef\lbx@cms@mkbibrangefull#1#2{% + \ifthenelse{\iffieldundef{#2year}\AND\iffieldundef{#2month}}% + {}% + {\ifthenelse{\iffieldsequal{#2year}{#2endyear}\AND% + \iffieldundef{#2month}\AND\iffieldundef{#2day}}% + {\clearfield{#2endyear}}% Clear up inheritance problem ??? + {}% + \printtext[#2date]{% + \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + \ifthenelse{\iffieldundef{#2endyear}\AND\iffieldundef{#2endmonth}}% + {}% + {\iffieldequalstr{#2endyear}{}% + {\mbox{\bibdatedash}}% + {\bibdatedash% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + +\endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/cmsdocs.sty b/Master/texmf-dist/tex/latex/biblatex-chicago/cmsdocs.sty new file mode 100644 index 00000000000..5a7df2634a0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/cmsdocs.sty @@ -0,0 +1,384 @@ +\ProvidesPackage{cmsdocs} + +\RequirePackage{refcount} +\RequirePackage{listings} +\RequirePackage[svgnames]{xcolor} +\RequirePackage{hyperref} + +%%% This file contains kludges and hacks to enable the bespoke +%%% cross-referencing system found in cms-notes-intro.pdf and +%%% cms-dates-intro.pdf. It contains code adapted from several +%%% sources, especially from Ulrich Dirr's hyperendnotes.sty, found on +%%% comp.text.tex. Please don't load it unless you really mean to, as +%%% it messes with the standard biblatex-chicago macros. + +%%% These counters are for the slightly more informative endnote marks +%%% used in the notes intro. + +\newcounter{Article}\setcounter{Article}{1} +\newcounter{Artwork}\setcounter{Artwork}{2} +\newcounter{Audio}\setcounter{Audio}{3} +\newcounter{Book}\setcounter{Book}{4} +\newcounter{BookInBook}\setcounter{BookInBook}{5} +\newcounter{Booklet}\setcounter{Booklet}{6} +\newcounter{Collection}\setcounter{Collection}{7} +\newcounter{CustomC}\setcounter{CustomC}{8} +\newcounter{Image}\setcounter{Image}{9} +\newcounter{InBook}\setcounter{InBook}{10} +\newcounter{InCollection}\setcounter{InCollection}{11} +\newcounter{InProceedings}\setcounter{InProceedings}{12} +\newcounter{InReference}\setcounter{InReference}{13} +\newcounter{Letter}\setcounter{Letter}{14} +\newcounter{Manual}\setcounter{Manual}{15} +\newcounter{MastersThesis}\setcounter{MastersThesis}{16} +\newcounter{Misc}\setcounter{Misc}{17} +\newcounter{Music}\setcounter{Music}{18} +\newcounter{MVBook}\setcounter{MVBook}{19} +\newcounter{MVCollection}\setcounter{MVCollection}{20} +\newcounter{MVProceedings}\setcounter{MVProceedings}{21} +\newcounter{MVReference}\setcounter{MVReference}{22} +\newcounter{Online}\setcounter{Online}{23} +\newcounter{Patent}\setcounter{Patent}{24} +\newcounter{Periodical}\setcounter{Periodical}{25} +\newcounter{Proceedings}\setcounter{Proceedings}{26} +\newcounter{Reference}\setcounter{Reference}{27} +\newcounter{Report}\setcounter{Report}{28} +\newcounter{Review}\setcounter{Review}{29} +\newcounter{SuppBook}\setcounter{SuppBook}{30} +\newcounter{SuppCollection}\setcounter{SuppCollection}{31} +\newcounter{SuppPeriodical}\setcounter{SuppPeriodical}{32} +\newcounter{TechReport}\setcounter{TechReport}{33} +\newcounter{Thesis}\setcounter{Thesis}{34} +\newcounter{Unpublished}\setcounter{Unpublished}{35} +\newcounter{Video}\setcounter{Video}{36} + +%%% Here starts the adaptation of hyperendnotes.sty + +\newif\ifenotelinks +\newcounter{Hendnote} +% Redefining portions of endnotes-package: +\let\savedhref\href +\let\savedurl\url +\def\endnotemark{% + \@ifnextchar[\@xendnotemark{% + \stepcounter{endnote}% + \protected@xdef\@theenmark{\theendnote}% + \protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \@endnotemark + }% +}% +\def\@xendnotemark[#1]{% + \begingroup\c@endnote#1\relax + \unrestored@protected@xdef\@theenmark{\theendnote}% + \unrestored@protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \endgroup + \@endnotemark +}% +\def\endnotetext{% + \@ifnextchar[\@xendnotenext{% + \protected@xdef\@theenmark{\theendnote}% + \protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \@endnotetext + }% +}% +\def\@xendnotenext[#1]{% + \begingroup + \c@endnote=#1\relax + \unrestored@protected@xdef\@theenmark{\theendnote}% + \unrestored@protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \endgroup + \@endnotetext +}% +\def\endnote{% + \@ifnextchar[\@xendnote{% + \stepcounter{endnote}% + \protected@xdef\@theenmark{\theendnote}% + \protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \@endnotemark\@endnotetext + }% +}% +\def\@xendnote[#1]{% + \begingroup + \c@endnote=#1\relax + \unrestored@protected@xdef\@theenmark{\theendnote}% + \unrestored@protected@xdef\@theenvalue{\number\c@refsection\number\c@endnote}% + \show\@theenvalue + \endgroup + \@endnotemark\@endnotetext +}% +\def\@endnotemark{% + \leavevmode + \ifhmode + \edef\@x@sf{\the\spacefactor}\nobreak + \fi + \ifenotelinks + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi + {% + \Hy@raisedlink{% + \hyper@@anchor{Hendnotepage.\@theenvalue}{\empty}% + }% + }% + \hyper@linkstart{link}{Hendnote.\@theenvalue}% + \makeenmark + \hyper@linkend + \ifhmode + \spacefactor\@x@sf + \fi + \relax +}% +\long\def\@endnotetext#1{% + \if@enotesopen + \else + \@openenotes + \fi + \immediate\write\@enotes{% + \@doanenote{\@theenmark}{\@theenvalue}% + }% + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\@enotes{\meaning\next}% + \endgroup + \immediate\write\@enotes{% + \@endanenote + }% +}% +\def\theendnotes{% + \immediate\closeout\@enotes + \global\@enotesopenfalse + \begingroup + \makeatletter + \edef\@tempa{`\string>}% + \ifnum\catcode\@tempa=12 + \let\@ResetGT\relax + \else + \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}% + \@makeother\>% + \fi + \def\@doanenote##1##2##3>{% + \def\@theenmark{##1}% + \def\@theenvalue{##2}% + \par +% \smallskip %<-small vertical gap between endnotes + \begingroup + \def\href{\expandafter\savedhref}% + \def\url{\expandafter\savedurl}% + \@ResetGT + \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}% + \enoteformat + }% + \def\@endanenote{% + \par\endgroup + }% + % Redefine, how numbers are formatted in the endnotes-section: + \renewcommand*\@makeenmark{% + \hbox{\normalfont\@theenmark~}% + }% + % header of endnotes-section + \enoteheading + % font-size of endnotes + \enotesize + \input{\jobname.ent}% + \endgroup +}% +\def\enoteformat{% + \renewcommand{\makeenmark}% + {\color{DarkBlue}{\textsf{\theenmark:\,\,}}}% + \rightskip\z@ + \leftskip\z@ + \parindent=2.3em + \leavevmode\llap{% + \setcounter{Hendnote}{\@theenvalue}% + \addtocounter{Hendnote}{-1}% + \refstepcounter{Hendnote}% + \ifenotelinks + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + {\@firstofone}% + {\hyperlink{Hendnotepage.\@theenvalue}}% + {\makeenmark}% + }% +}% +% stop redefining portions of endnotes-package: + +% Toggle switch in order to turn on/off back-links in the +% endnote-section: +\enotelinkstrue +% \enotelinksfalse + +%%% Here we substitute entry types for the usual numbers for endnote +%%% marks. + +\def\cmssymbol#1{\expandafter\@cmssymbol\csname c@#1\endcsname} + +\def\@cmssymbol#1{\ifcase#1\or Article\or Artwork\or Audio\or Book\or + BookInBook\or Booklet\or Collection\or CustomC\or Image\or InBook\or + InCollection\or InProceedings\or InReference\or Letter\or Manual\or + MastersThesis\or Misc\or Music\or MVBook\or MVCollection\or + MVProceedings\or MVReference\or Online\or Patent\or Periodical\or + Proceedings\or Reference\or Report\or Review\or SuppBook\or + SuppCollection\or SuppPeriodical\or TechReport\or Thesis\or + Unpublished\or Video\else\@ctrerr\fi} + +\renewcommand{\theendnote}{\cmssymbol{endnote}} + +%%% Now we define parameters and a command for the lstlisting +%%% environments, which print the .bib entries at the end of the .pdf. + +\lstset{% + basicstyle=\footnotesize\ttfamily, + breaklines=true, + breakatwhitespace=true, + breakautoindent=false, + breakindent=40pt, + escapechar=*, + keywordstyle=\color{DarkBlue}, + columns=fullflexible, +}% + +\lstdefinelanguage{BibTeX} +{keywords={% + @string% + }, + comment=[l][\itshape]{@comment}, + sensitive=false, +}% + +\newrobustcmd*{\lnbackref}[2]{% + \hyperlink{Hendnote.#2\the\value{#1}}{\color{DarkBlue}@#1}} + +\newrobustcmd*{\adlnbackref}[2]{% + \@ifnextchar[%] + {\adlnbackref@i{#1}{#2}}% + {\adlnbackref@i{#1}{#2}[{#2}]}}% + +\def\adlnbackref@i#1#2[#3]{% + \hyperlink{cite.0@#3}{\color{DarkBlue}@#1}\{#2}% + +%%% Here we renew some macros from chicago-notes.cbx, and add some +%%% field formats to make navigating the intro easier. + +\renewbibmacro*{cite:full}{% + \ifnumequal{\the\value{refsection}}{8}% + {\printtext[cmsbiblink]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\frenchspacing} + {cite:\thefield{entrytype}}}} + {\iffieldequalstr{entrykey}{loc:leaders}% + {\printtext{% + \usedriver + {\DeclareNameAlias{sortname}{default}\frenchspacing} + {cite:\thefield{entrytype}}}}% + {\printtext[bibhyperref]{% + \usedriver + {\DeclareNameAlias{sortname}{default}\frenchspacing} + {cite:\thefield{entrytype}}}}}}% + +\renewbibmacro*{cite:short}{% + \ifthenelse{\ifnameundef{labelname}\OR% + \ifentrytype{inreference}\OR% + \ifentrytype{reference}\OR% + \ifentrytype{mvreference}}% + {\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation + {\ifuseauthor% + {\printfield[journaltitle]{journaltitle}\isdot\newcunit}% + {}}% + {\ifentrytype{manual}% + {\printlist{organization}\isdot\newcunit}% + {}}}% + {\iffieldequalstr{authortype}{anon}% + {\bibleftbracket\printnames{labelname}% + \bibrightbracket\classicpunct}% + {\iffieldequalstr{authortype}{anon?}% + {\bibleftbracket\printnames{labelname}?% + \bibrightbracket\classicpunct}% + {\printnames{labelname}%\usebibmacro{choose+labelname}% + \isdot\classicpunct}}}% + \ifboolexpr{(% + test {\ifbibliography}% + or + test {\ifnumgreater{\the\value{refsection}}{3}}% + ) + and + not test {\ifnumequal{\the\value{refsection}}{8}}% + }% + {\printtext[bibhyperref]{% + \printfield[citetitle]{labeltitle}}}% + {\printtext[cmsbiblink]{% + \printfield[citetitle]{labeltitle}}}}%:\thefield{entrytype}? + + +\renewbibmacro*{cite:journal}{% + \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% + {\iffieldundef{prenote}% + {\bibsentence\usebibmacro{cite:ibid}}% + {\usebibmacro{cite:ibid}}}% + {\iffieldundef{journaltitle}% + {\usebibmacro{cite:short}}% + {\iffieldequalstr{authortype}{anon}% + {\bibleftbracket\printnames{labelname}% + \bibrightbracket\newcunit}% + {\iffieldequalstr{authortype}{anon?}% + {\bibleftbracket\printnames{labelname}?% + \bibrightbracket\newcunit}% + {\printnames{labelname}% + \isdot\newcunit}}% + \iftoggle{cms@allshort}% + {\printtext[cmsbiblink]{% + \printfield[journaltitle]{journaltitle}}}% + {\printtext[cmsbiblink]{% + \printfield[journaltitle]{journaltitle}}}% + \iffieldundef{volume}% + {\iffieldundef{number}% + {\iffieldundef{issue} + {\newcunit% + \usebibmacro{number+or+month}}% + {\newcunit% + \printfield{issue}% + \setunit{\addspace}% + \usebibmacro{cmsyear}}}% + {\newcunit% + \printfield[journum]{number}}}% + {\toggletrue{cms@fullnote}% + \togglefalse{cms@shortnote}% + \setunit{\addspace}% + \printfield[jourvol]{volume}% + \ifthenelse{\iffieldundef{pagination}\AND% + \iffieldundef{bookpagination}}% + {\setunit{\postvolpunct}}% + {\setunit{\addcolon\addspace}}}}}} + +\DeclareFieldFormat{cmsbiblink}{% + \hyperlink{\getrefbykeydefault{\abx@field@entrykey}{anchor}{}}{#1}} + +\def\cmsdocref@entry{% + \iffieldundef{clonesourcekey}% + {\printfield{entrykey}}% + {\printfield{clonesourcekey}}} + +\def\cmsdoc@entrykey{% + \iffieldundef{clonesourcekey}% + {\abx@field@entrykey}% + {\abx@field@clonesourcekey}} + +\newcommand*{\cmslink}[1]{% + \hyperlink{\getrefbykeydefault{#1}{anchor}{}}% + {\texttt{#1}}} + +\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep% + \hyperlink{\getrefbykeydefault{\cmsdoc@entrykey}{anchor}{}}% + {\small{\textbf{[\cmsdocref@entry]\addspace}}}\small#1} + +%%% These commands provide the hyperlinks to the external docs in +%%% biblatex-chicago.pdf. + +\newrobustcmd*{\cmssecref}[2][]{\marginpar{\href{\@baseurl% + \getrefbykeydefault{#2}{anchor}{}}{\small §\,\getrefnumber{#2}}% + \ifblank{#1}{}{\scriptsize,\, s.v.\\[1pt]\enquote{#1}}}} +\newrobustcmd*{\cmspagref}[1]{\marginpar{\href{\@baseurl% + page.\getpagerefnumber{#1}}{p.~\getpagerefnumber{#1}}}} -- cgit v1.2.3