diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx | 1629 |
1 files changed, 971 insertions, 658 deletions
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 index 6b8e1a41737..902b41fa645 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx @@ -1,17 +1,18 @@ -% $Id: chicago-dates-common.cbx,v 0.10.1.15 2018/01/11 09:49:53 dfussner Exp $ +% This is a biblatex citation style file, originally 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, +% 17th edition. -% 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}[2018/01/11 v 3.10 biblatex +\ProvidesFile{chicago-dates-common.cbx}[2020/04/20 v 3.14 biblatex citation style] %%%% Biblatex initialization + Chicago options + Toggles %%%% \newbool{cbx:parens} +\newbool{cms:bracket} +\newbool{cms:extraparens} +\newbool{cms:comma} \providecommand*{\mkibid}[1]{#1} @@ -20,35 +21,43 @@ citation style] \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@bc}% Attempt to provide correct dateera handling +\providetoggle{cms@alwaysrange}% Turns off decade and century handling +\providetoggle{cms@decaderange}% Only turns off decade handling +\providetoggle{cms@centuryrange}% Only turns off century handling +\providetoggle{cms@nodatebrackets}% For brackets in uncertain & circa +\providetoggle{cms@noyearbrackets}% \providetoggle{cms@authorparens} -\providetoggle{cms@datedash} \providetoggle{cms@modpostnote} \providetoggle{cms@ukord} \providetoggle{cms@fullnote}% For the legal entry types \providetoggle{cms@shortnote}% Ditto \providetoggle{cms@url}% These are for the field-exclusion options +\providetoggle{cms@urltime}% 17th ed. \providetoggle{cms@doi} \providetoggle{cms@doionly} \providetoggle{cms@eprint} \providetoggle{cms@isbn} \providetoggle{cms@numbermonth} \providetoggle{cms@bookpages} +\providetoggle{cms@shser} \providetoggle{cms@addendum} \providetoggle{cms@hidevolumes}% Modify Volume fix \providetoggle{cms@comprange} +\providetoggle{cms@compyears} \providetoggle{cms@jrcomma}% Comma after Jr./Sr. +\providetoggle{cms@strict} \providetoggle{cms@headlessnote}% Keep \providetoggle{cms@noibid}% Keep +\providetoggle{cms@namedash} \providetoggle{cms@usecompiler}% Keep \providetoggle{cms@origpublished}% Keep \providetoggle{cms@annotation}% Keep @@ -58,6 +67,7 @@ citation style] \providetoggle{cms@noneshort}% Ditto \providetoggle{cms@legalnotes}% Ditto \providetoggle{cms@supranotes}% Ditto +\providetoggle{cms@running@text}% For Jurisdiction entries \providetoggle{cms@vol}% \providetoggle{cms@crossref}% \providetoggle{cms@bookcrossref} @@ -66,15 +76,13 @@ citation style] \providetoggle{cms@xrefurl} \providetoggle{cms@related} \providetoggle{cms@linkit} +\providetoggle{cms@authortitle} \AtEveryCitekey{% \iffieldundef{userc}% {}% {\nocite{\thefield{userc}}}% - \global\csundef{@cmsst}% - \iffieldequalstr{pubstate}{reprint}% - {\toggletrue{cms@reprint}}% - {\togglefalse{cms@reprint}}}% + \global\csundef{@cmsst}}% \protected\def\cms@warning@noline#1{% \begingroup @@ -82,27 +90,26 @@ citation style] \PackageWarningNoLine{biblatex-chicago}{#1}% \endgroup}% -\DeclareBibliographyOption{avdate}[true]{% +\DeclareBibliographyOption[string]{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{eventdate}% - \field{origdate} \field{date} \field{year} \field{urldate}}}% - {\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}}% + \DeclareLabeldate[music,review,standard,suppperiodical,video]% 17th ed. + {\field{eventdate} \field{origdate} \field{date} \field{year}% + \field{urldate} \literal{nodate}}% + \toggletrue{cms@avdate}}% \def\cms@opt@avdate@false{% \togglefalse{cms@avdate}}% -\DeclareBibliographyOption{cmsdate}[off]{% Trying to implement origyear as +\DeclareBibliographyOption[string]{cmsdate}[off]{% Implement origyear as \ifcsdef{cms@global@cmsdate@#1}% labelyear. Sorting will be an issue. {\csuse{cms@global@cmsdate@#1}}% - {\blx@err@invopt{cmsdate=#1}{}}}% + {\csuse{cms@global@cmsdate@off}\cms@warning@noline% + {'cmsdate=#1' isn't a valid option.\MessageBreak + The default - 'off' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% \def\cms@global@cmsdate@on{% \toggletrue{cms@origlabel}% \ExecuteBibliographyOptions{cmsorigdate=true}}% @@ -118,40 +125,28 @@ citation style] \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 ??? +\DeclareBibliographyOption[string]{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{origdate} \field{date} \field{year}% - \field{eventdate} \field{urldate}}% - \DeclareLabeldate[patent]{\field{date} \field{year}% - \field{eventdate} \field{origdate} \field{urldate}}}% - {\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}}% + \DeclareLabeldate{\field{origdate} \field{origyear} \field{date}% + \field{year} \field{eventdate} \field{urldate}% + \literal{nodate}}% + \DeclareLabeldate[patent]{\field{date} \field{year}% + \field{eventdate} \field{origdate} \field{origyear}% + \field{urldate}}% \global\toggletrue{cms@ordate}}% \def\cms@opt@origdate@false{\togglefalse{cms@ordate}}% -\DeclareEntryOption{cmsdate}[off]{% Trying to implement origyear as +\DeclareEntryOption[string]{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}{}}}% + {\csuse{cms@opt@cmsdate@#1}}% + {\csuse{cms@opt@cmsdate@off}\cms@warning@noline% + {'cmsdate=#1' isn't a valid option.\MessageBreak + The default - 'off' - has been set.\MessageBreak + Please see biblatex-chicago.pdf for valid\MessageBreak + option keys}}}% \def\cms@opt@cmsdate@on{% \toggletrue{cms@origlabel}}% \def\cms@opt@cmsdate@new{% @@ -164,38 +159,44 @@ citation style] \toggletrue{cms@fulldate}}% \def\cms@opt@cmsdate@off{}% -\DeclareBibliographyOption[boolean]{genallnames}[true]{% - \settoggle{cms@genallnames}{#1}}% +\DeclareBiblatexOption{global,entry}[boolean]{alwaysrange}[true]{% + \settoggle{cms@alwaysrange}{#1}}% -\DeclareEntryOption[boolean]{genallnames}[true]{% - \settoggle{cms@genallnames}{#1}}% +\DeclareBiblatexOption{global,entry}[boolean]{decaderange}[true]{% + \settoggle{cms@decaderange}{#1}}% -\DeclareBibliographyOption[boolean]{hypertitle}[true]{% - \settoggle{cms@linkit}{#1}}% +\DeclareBiblatexOption{global,entry}[boolean]{centuryrange}[true]{% + \settoggle{cms@centuryrange}{#1}}% -\DeclareEntryOption[boolean]{hypertitle}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{nodatebrackets}[true]{% + \settoggle{cms@nodatebrackets}{#1}}% + +\DeclareBiblatexOption{global,type,entry}[boolean]{noyearbrackets}[true]{% + \settoggle{cms@noyearbrackets}{#1}}% + +\DeclareBiblatexOption{global,entry}[boolean]{genallnames}[true]{% + \settoggle{cms@genallnames}{#1}}% + +\DeclareBiblatexOption{global,entry}[boolean]{hypertitle}[true]{% \settoggle{cms@linkit}{#1}}% \DeclareBibliographyOption[boolean]{annotation}[true]{% \global\settoggle{cms@annotation}{#1}}% +\DeclareBibliographyOption[boolean]{dashed}[true]{% + \settoggle{cms@namedash}{#1}} + \DeclareBibliographyOption[boolean]{short}[true]{% \global\settoggle{cms@allshort}{#1}} -\DeclareBibliographyOption[boolean]{noneshort}[true]{% - \global\settoggle{cms@noneshort}{#1}} - -\DeclareEntryOption[boolean]{noneshort}[true]{% +\DeclareBiblatexOption{global,entry}[boolean]{noneshort}[true]{% \settoggle{cms@noneshort}{#1}} \DeclareBibliographyOption[boolean]{legalnotes}[true]{% \global\settoggle{cms@legalnotes}{#1}} -\DeclareBibliographyOption[boolean]{supranotes}[true]{% - \global\settoggle{cms@supranotes}{#1}} - -\DeclareEntryOption[boolean]{supranotes}[true]{% - \global\settoggle{cms@supranotes}{#1}} +\DeclareBiblatexOption{global,entry}[boolean]{supranotes}[true]{% + \settoggle{cms@supranotes}{#1}} \DeclareBibliographyOption[boolean]{cmslos}[true]{% \global\settoggle{cms@los}{#1}}% @@ -203,18 +204,13 @@ citation style] \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[boolean]{compresspages}[true]{% + \global\settoggle{cms@comprange}{#1}}% + +\DeclareBibliographyOption[boolean]{compressyears}[true]{% + \global\settoggle{cms@compyears}{#1}}% -\DeclareBibliographyOption{postnotepunct}[true]{% +\DeclareBibliographyOption[string]{postnotepunct}[true]{% \ifcsdef{cms@opt@ppunct@#1}% {\csuse{cms@opt@ppunct@#1}}% {\blx@err@invopt{postnotepunct=#1}{}}}% @@ -222,25 +218,19 @@ citation style] \global\toggletrue{cms@modpostnote}}% \def\cms@opt@ppunct@false{}% -\DeclareBibliographyOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}}% +\DeclareBiblatexOption{global,entry}[boolean]{usecompiler}[true]{% + \settoggle{blx@usenamec}{#1}}% -\DeclareBibliographyOption{nodates}[true]{% +\DeclareBiblatexOption{global,entry}[boolean]{nodates}[true]{% \settoggle{cms@nodates}{#1}}% -\DeclareEntryOption{usecompiler}[true]{% - \settoggle{cms@usecompiler}{#1}}% - -\DeclareBibliographyOption{juniorcomma}[true]{% +\DeclareBiblatexOption{global,entry}[boolean]{juniorcomma}[true]{% \settoggle{cms@jrcomma}{#1}}% -\DeclareEntryOption{juniorcomma}[true]{% - \settoggle{cms@jrcomma}{#1}}% - -\DeclareBibliographyOption{shorthandfull}[true]{% +\DeclareBibliographyOption[boolean]{shorthandfull}[true]{% \settoggle{cms@fullshhand}{#1}}% -\DeclareBibliographyOption{longcrossref}[false]{% +\DeclareBiblatexOption{global,entry}[string]{longcrossref}[false]{% \ifcsdef{cms@opt@lxref@#1}% {\csuse{cms@opt@lxref@#1}}% {\blx@err@invopt{longcrossref=#1}{}}}% @@ -256,12 +246,7 @@ citation style] \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]{% +\DeclareBiblatexOption{global,entry}[boolean]{booklongxref}[true]{% \ifcsdef{cms@opt@bklxref@#1}% {\csuse{cms@opt@bklxref@#1}}% {\blx@err@invopt{booklongxref=#1}{}}}% @@ -274,18 +259,10 @@ citation style] \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]{% +\DeclareBiblatexOption{global,entry}[boolean]{xrefurl}[true]{% \settoggle{cms@xrefurl}{#1}}% -\DeclareBibliographyOption[string]{journalabbrev}[false]{% +\DeclareBiblatexOption{global,entry}[string]{journalabbrev}[false]{% \ifcsdef{cms@opt@jtabb@#1}% {\csuse{cms@opt@jtabb@#1}}% {\csuse{cms@opt@jtabb@false}\cms@warning@noline% @@ -306,19 +283,10 @@ citation style] \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}}}% +\DeclareBiblatexOption{global,type,entry}[boolean]{seriesabbrev}[true]{% + \settoggle{cms@shser}{#1}} -\DeclareBibliographyOption[boolean]{related}[true]{% - \settoggle{cms@related}{#1}}% - -\DeclareEntryOption[boolean]{related}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{related}[true]{% \settoggle{cms@related}{#1}}% \DeclareBibliographyOption[boolean]{ordinalgb}[true]{% @@ -326,7 +294,7 @@ citation style] % Controlling punctuation before titleaddon fields % -\DeclareBibliographyOption[string]{ptitleaddon}[period]{% +\DeclareBiblatexOption{global,type,entry}[string]{ptitleaddon}[period]{% \ifcsdef{cms@opt@ptao@#1}% {\csuse{cms@opt@ptao@#1}}% {\csuse{cms@opt@ptao@period}\cms@warning@noline% @@ -347,16 +315,7 @@ citation style] \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]{% +\DeclareBiblatexOption{global,type,entry}[string]{ctitleaddon}[comma]{% \ifcsdef{cms@opt@ctao@#1}% {\csuse{cms@opt@ctao@#1}}% {\csuse{cms@opt@ctao@comma}\cms@warning@noline% @@ -377,22 +336,16 @@ citation style] \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]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{urlstamp}[true]{% + \settoggle{cms@urltime}{#1}}% + +\DeclareBiblatexOption{global,type,entry}[boolean]{isbn}[true]{% \settoggle{cms@isbn}{#1}}% -\DeclareBibliographyOption{url}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{url}[true]{% \settoggle{cms@url}{#1}}% -\DeclareBibliographyOption{doi}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{doi}[true]{% \ifcsdef{cms@opt@doi@#1}% {\csuse{cms@opt@doi@#1}}% {\blx@err@invopt{doi=#1}{}}}% @@ -402,63 +355,45 @@ citation style] \togglefalse{cms@doi}}% \def\cms@opt@doi@only{% \toggletrue{cms@doionly}}% -\DeclareBibliographyOption{eprint}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{% \settoggle{cms@eprint}{#1}}% -\DeclareBibliographyOption{numbermonth}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{numbermonth}[true]{% \settoggle{cms@numbermonth}{#1}}% -\DeclareBibliographyOption{bookpages}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{bookpages}[true]{% \settoggle{cms@bookpages}{#1}}% -\DeclareBibliographyOption{includeall}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{includeall}[true]{% \settoggle{cms@isbn}{#1}% \settoggle{cms@url}{#1}% + \settoggle{cms@urltime}{#1}% 17th ed. \settoggle{cms@doi}{#1}% \settoggle{cms@eprint}{#1}% \settoggle{cms@numbermonth}{#1}% \settoggle{cms@bookpages}{#1}}% -\DeclareBibliographyOption{hidevolumes}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{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}}% +\DeclareBiblatexOption{type,entry}[boolean]{authortitle}[true]{% + \settoggle{cms@authortitle}{#1}}% \ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref,related,% - ctitleaddon,ptitleaddon,journalabbrev=notes,legalnotes,supranotes}% + ctitleaddon,ptitleaddon,journalabbrev=notes,legalnotes,supranotes,% + dashed}% -\@ifpackagelater{biblatex}{2016/09/01}% For biblatex 2.6 ff. -{\ExecuteBibliographyOptions{labeldateparts=true}}% -{\@ifpackagelater{biblatex}{2013/03/30} - {\ExecuteBibliographyOptions{labeldate=true}} - {\ExecuteBibliographyOptions{labelyear=true}}}% +\ExecuteBibliographyOptions[standard]{useeditor=false,usenamec=false}% +\ExecuteBibliographyOptions[dataset]{authortitle=true}% \iftoggle{cms@legalnotes}% {\ExecuteBibliographyOptions[jurisdiction,legal,legislation]{skipbib}}% {}% -\@ifpackagelater{biblatex}{2016/09/01}% For biblatex 3.5 ff. -{\global\togglefalse{cms@datedash}} -{\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff. - {\global\toggletrue{cms@datedash}}% - {\global\togglefalse{cms@datedash}}}% +\AtEndPreamble{% Automatic sorting by shorthand when it appears + \iftoggle{cms@los}% at the head of the entry. + {\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[fieldsource=shorthand, final] + \step[fieldset=sortname, origfieldval]}}}}% + {}} \DeclareLabeltitle[legislation]{% \field{shorttitle}% @@ -520,6 +455,9 @@ citation style] \noinherit{urlyear} \noinherit{urlmonth} \noinherit{urlday} + \noinherit{urlseason} + \noinherit{urlhour} + \noinherit{urlminute} \noinherit{doi} \noinherit{eprint} \noinherit{eprinttype} @@ -530,18 +468,32 @@ citation style] \noinherit{year} \noinherit{month} \noinherit{day} + \noinherit{season} \noinherit{endyear} \noinherit{endmonth} \noinherit{endday} + \noinherit{endseason} \noinherit{origyear} \noinherit{origmonth} \noinherit{origday} + \noinherit{origseason} \noinherit{origendyear} \noinherit{origendmonth} - \noinherit{origendday}} + \noinherit{origendday} + \noinherit{origendseason}} % More authordate options % +\DeclareExtradate{% + \scope{ + \field{labelyear} + \field{year} + } + \scope{ + \field{verbc} + } +} + \DeclareSortingTemplate{cms}{% Updated to >3.7 format \sort{ \field{presort} @@ -573,46 +525,63 @@ citation style] \field{title} } \sort{ + \field{endyear} + \field{eventendyear} + \field{origendyear} + } + \sort{ \field[padside=left,padwidth=4,padchar=0]{volume} \literal{0000} } } +\DeclareSortExclusion{misc,online}{organization} +\DeclareSortExclusion{inreference,mvreference,reference}{% + author,editor,namea,nameb,namec,translator} + \DeclareSortingTemplate{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}}% +\DeclareSortingTemplate{shortseries}{% + \sort{ + \field{shortseries} + } +} + +\DeclareLabelname{\field{shortauthor} \field{author}% + \field{shorteditor} \field{namea} \field{editor}% + \field{nameb} \field{translator} \field{namec}}% -\DeclareEntryOption{switchdates}[true]{% +\DeclareEntryOption[boolean]{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}% - }}% +\DeclareBibliographyOption[boolean]{strict}[true]{% + \settoggle{cms@strict}{#1}% + \iftoggle{cms@strict}% + {\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}}% + \iftoggle{blx@keepunit}% + {}% + {\global\let\blx@unitpunct\newcunitpunct + \global\toggletrue{blx@unit}}}% \appto\blx@blxinit{% \let\newcunit\blx@newcunit}% @@ -660,14 +629,18 @@ citation style] \newbibmacro*{cite}{% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% {\usebibmacro{cite:ibid}}% - {\iffieldequalstr{entrysubtype}{classical}% Similar to notes+bib + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\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}% + \setunit{\cms@testspace}% Is this right? \usebibmacro{cite:reinit}}% {\iffieldequals{fullhash}{\cbx@lasthash}% {\iffieldundef{postnote}% @@ -677,10 +650,12 @@ citation style] {\iffieldequals{fullhash}{\cbx@lastyear}% {}% {\usebibmacro{cmsbracketname}% For names in [] - \ifentrytype{customc}% - {\newcunit}% - {\setunit{\cms@testspace}}}% - \usebibmacro{cite:label}% + \ifthenelse{\ifentrytype{misc}\AND% + \iffieldequalstr{entrysubtype}{classical}}% + {\cms@testspace}{\newcunit}}% Wrong? + \ifthenelse{\ifentrytype{manual}\OR\ifentrytype{standard}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}% + {\usebibmacro{cite:label}}% \iffieldundef{postnote}% {\savefield{fullhash}{\cbx@lasthash}}% {\savefield{fullhash}{\cbx@lastyear}}}}}% @@ -691,7 +666,7 @@ citation style] \ifentrytype{reference}\OR \ifentrytype{mvreference}}% Simplified for CMS {\usebibmacro{cite:label}% - \setunit{\cms@testspace}% + \setunit{\nameyeardelim}%cms@testspace% \usebibmacro{cmscitesortdate}% \usebibmacro{cite:reinit}}% {\iffieldequals{fullhash}{\cbx@lasthash}% @@ -712,15 +687,19 @@ citation style] \newbibmacro*{cmsbracketname}{% \iffieldequalstr{authortype}{anon}% - {\bibleftbracket\printnames{labelname}% - \bibrightbracket}% + {\printtext{\bibleftbracket\printnames{labelname}% + \bibrightbracket}}% {\iffieldequalstr{authortype}{anon?}% - {\bibleftbracket\printnames{labelname}?% - \bibrightbracket}% + {\printtext{\bibleftbracket\printnames{labelname}?% + \bibrightbracket}}% {\printnames{labelname}}}}% \newbibmacro*{citeyear}{% - \iffieldequalstr{entrysubtype}{classical}% + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% {\iffieldundef{shorthand}% {\usebibmacro{citeyear:noshort}}% {\iftoggle{cms@los}% @@ -734,7 +713,11 @@ citation style] \setunit{\multicitedelim}}% \newbibmacro*{citeyear:noshort}{% - \iffieldequalstr{entrysubtype}{classical}% Altered for CMS + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% Altered for CMS {\iffieldequals{fullhash}{\cbx@lasthash}% {\iffieldundef{postnote}% {\setunit{\compcitedelim}}% @@ -765,11 +748,19 @@ citation style] {\iffieldequals{fullhash}{\cbx@lastyear}% {\setunit{\multicitedelim}% \global\undef\cbx@lastyear}% - {\iffieldequalstr{entrysubtype}{classical}% + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% {\setunit{\multicitedelim}}% {\setunit{\compcitedelim}}}}% {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% {\usebibmacro{cite:label}}% {\usebibmacro{cmscitesortdate}}}% {\iffieldundef{shorthand}% @@ -777,14 +768,28 @@ citation style] \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}}% + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% + {\ifentrytype{customc}% + {\setunit{% + \global\booltrue{cbx:parens}% + \multicitedelim}%\bibopenparen% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}\clearfield{prenote}}% + {}% + \savefield{postnote}{\cms@tempz}\clearfield{postnote}% + \usebibmacro{cite:label}% + \restorefield{postnote}{\cms@tempz}}% + {\setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cite:label}}}% {\usebibmacro{cite:label}% \ifboolexpr{% togl {cms@gencite}% @@ -822,8 +827,14 @@ citation style] \ifnumequal{\value{citecount}}{1}% {\usebibmacro{prenote}}% {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% + {\ifthenelse{\ifentrytype{manual}\OR\ifentrytype{standard}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}% + {\usebibmacro{cite:label}}}% {\usebibmacro{cmscitesortdate}}% \savefield{fullhash}{\cbx@lasthash}}}% {\printfield{shorthand}% @@ -844,8 +855,14 @@ citation style] \ifnumequal{\value{citecount}}{1}% {\usebibmacro{prenote}}% {}% - \iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% + {\ifthenelse{\ifentrytype{manual}\OR\ifentrytype{standard}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}% + {\usebibmacro{cite:label}}}% {\usebibmacro{cmscitesortdate}}% \savefield{fullhash}{\cbx@lasthash}}% \stepcounter{textcitecount}}% Added ??? @@ -862,11 +879,19 @@ citation style] {\iffieldequals{fullhash}{\cbx@lastyear}% {\setunit{\multicitedelim}% \global\undef\cbx@lastyear}% - {\iffieldequalstr{entrysubtype}{classical}% + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% {\setunit{\multicitedelim}}% {\setunit{\compcitedelim}}}}% {\setunit{\multicitedelim}}% - \iffieldequalstr{entrysubtype}{classical}% + \ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% {\usebibmacro{cite:label}}% {\usebibmacro{cmscitesortdate}}}% {\iffieldundef{postnote}% @@ -882,14 +907,28 @@ citation style] \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}}% + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% + {\ifentrytype{customc}% + {\setunit{% + \global\booltrue{cbx:parens}% + \multicitedelim}%\bibopenparen% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}\clearfield{prenote}}% + {}% + \savefield{postnote}{\cms@tempz}\clearfield{postnote}% + \usebibmacro{cite:label}% + \restorefield{postnote}{\cms@tempz}}% + {\setunit{% + \global\booltrue{cbx:parens}% + \cms@testspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1}% + {\usebibmacro{prenote}}% + {}% + \usebibmacro{cite:label}}}% {\usebibmacro{cite:label}% \ifboolexpr{% togl {cms@gencite}% @@ -930,8 +969,14 @@ citation style] {\usebibmacro{prenote}}% {}% \iffieldundef{shorthand}% - {\iffieldequalstr{entrysubtype}{classical}% - {\usebibmacro{cite:label}}% + {\ifboolexpr{% + togl {cms@authortitle}% + or + test {\iffieldequalstr{entrysubtype}{classical}}% + }% + {\ifthenelse{\ifentrytype{manual}\OR\ifentrytype{standard}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}% + {\usebibmacro{cite:label}}}% {\usebibmacro{cmscitesortdate}}}% {\printtext[bibhyperref]{% \printfield{shorthand}}}% @@ -983,8 +1028,10 @@ citation style] \usebibmacro{cite:label}}}% {\printfield{shorthand}% \printtext[cmshyper]{% - \setunit{\cms@testspace}% FIXME - \usebibmacro{cite:label}}% + \setunit{\addcomma\addspace}% FIXME: wrong in 16th _and_ 17th eds? + \ifthenelse{\ifentrytype{standard}\OR\ifentrytype{manual}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}% + {\usebibmacro{cite:label}}}% \savefield{fullhash}{\cbx@lasthash}}}% {\printtext[bibhyperref]{\printfield{shorthand}}% \usebibmacro{cite:reinit}}}% @@ -1010,9 +1057,30 @@ citation style] }% {\printtext[cmshyper]{\printfield[shortjournal]{shortjournal}}}% {\printtext[cmshyper]{\printfield[journaltitle]{journaltitle}}}}% - {\ifentrytype{manual}% + {\ifthenelse{\ifentrytype{manual}\OR\ifentrytype{standard}}% {\printtext[cmshyper]{\printlist{organization}}}% - {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}}}% + {\ifboolexpr{% + test {\ifentrytype{video}}% + and + test {\iffieldequalstr{entrysubtype}{tvepisode}}% + and + not test {\iffieldundef{title}}% + and + not test {\iffieldundef{booktitle}}% + }% + {\iffieldundef{shorttitle}% + {\printtext[cmshyper]{% + \printfield{booktitle}% + \setunit{\subtitlepunct}% + \printfield[booksubtitle]{booksubtitle}}% (?) + \setunit{\ctitleaddonpunct}% + \printfield{booktitleaddon}% + \iffieldundef{booktitleaddon}{}{\addcomma\addspace}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{booktitleaddon}% + \iffieldundef{booktitleaddon}{}{\addcomma\addspace}}}% + {\printtext[cmshyper]{\printfield[citetitle]{labeltitle}}}}}}% {\printtext[cmshyper]{\printfield{label}}}}% \newbibmacro*{cite:labelyear+extrayear}{% @@ -1021,6 +1089,8 @@ citation style] or test {\ifentrytype{review}}% or + test {\ifentrytype{standard}}% + or test {\ifentrytype{suppperiodical}}% or test {\ifentrytype{video}}% @@ -1039,76 +1109,30 @@ citation style] {\ifboolexpr{% test {\ifentrytype{misc}}% or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% + test {\ifentrytype{dataset}}% or not togl {cms@nodates}% }% {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% + {\printtext[cmsyearhyper]{\bibstring{nodate}}}}% For CMS? + {\printtext[cmsyearhyper]{% \iffieldundef{year}% {\iffieldundef{eventyear}% {\iffieldundef{origyear}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{urlendyear}% - {}% + {\iffieldundef{userd}% {\ifboolexpr{% - test {\iffieldequalstr{urlendyear}{}}% + togl {cms@nodates}% and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{origendyear}{}}% + not test {\ifentrytype{misc}}% and - not togl {cms@datedash}% + not test {\ifentrytype{dataset}}% }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{endyear}% DATE FIX - {}% - {\ifboolexpr{% - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}}}% + {\bibstring{nodate}}% + {}}% + {\printurldateextra}}% + {\printorigdateextra}}% + {\printeventdateextra}}% + {\printdateextra}}}}% \newbibmacro*{cite:origfirst+labelyear+extrayear}{% \ifthenelse{\iffieldundef{labelyear}\OR% @@ -1116,76 +1140,30 @@ citation style] {\ifboolexpr{% test {\ifentrytype{misc}}% or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% + test {\ifentrytype{dataset}}% or not togl {cms@nodates}% }% {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% + {\printtext[cmsyearhyper]{\bibstring{nodate}}}}% For CMS? + {\printtext[cmsyearhyper]{% \iffieldundef{origyear}% {\iffieldundef{year}% {\iffieldundef{eventyear}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{urlendyear}% - {}% + {\iffieldundef{userd}% {\ifboolexpr{% - test {\iffieldequalstr{urlendyear}{}}% + togl {cms@nodates}% and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{eventendyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{eventendyear}{}}% + not test {\ifentrytype{misc}}% and - not togl {cms@datedash}% + not test {\ifentrytype{dataset}}% }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{endyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{origendyear}% DATE FIX - {}% - {\ifboolexpr{% - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}}}% + {\bibstring{nodate}}% + {}}% + {\printurldateextra}}% + {\printeventdateextra}}% + {\printdateextra}}% + {\printorigdateextra}}}}% \newbibmacro*{cite:av+labelyear+extrayear}{% \ifthenelse{\iffieldundef{labelyear}\OR% @@ -1193,84 +1171,30 @@ citation style] {\ifboolexpr{% test {\ifentrytype{misc}}% or - test {\ifentrytype{inreference}}% - or - test {\ifentrytype{reference}}% - or - test {\ifentrytype{mvreference}}% + test {\ifentrytype{dataset}}% or not togl {cms@nodates}% }% {}% - {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? - {\printtext[bibhyperref]{% + {\printtext[cmsyearhyper]{\bibstring{nodate}}}}% For CMS? + {\printtext[cmsyearhyper]{% \iffieldundef{eventyear}% {\iffieldundef{origyear}% {\iffieldundef{year}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{urlendyear}% - {}% + {\iffieldundef{userd}% {\ifboolexpr{% - test {\iffieldequalstr{urlendyear}{}}% + togl {cms@nodates}% and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{endyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{endyear}{}}% + not test {\ifentrytype{misc}}% and - not togl {cms@datedash}% + not test {\ifentrytype{dataset}}% }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{origendyear}% - {}% - {\ifboolexpr{% - test {\iffieldequalstr{origendyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}% - {\printfield{labelyear}% - \iffieldundef{extradate}% - {}% - {\setunit*{}% - \printfield{extradate}}% - \iffieldundef{eventendyear}% DATE FIX - {}% - {\ifboolexpr{% - test {\iffieldequalstr{eventendyear}{}}% - and - not togl {cms@datedash}% - }% - {\mbox{\bibdatedash}}% - {\usebibmacro{cms@test@labelend}}}}}}}% - -\newbibmacro*{cms@test@labelend}{% For printing year ranges in 3.5 ff. - \iffieldundef{labelendyear}% - {}% - {\ifthenelse{\iffieldequalstr{labelendyear}{}\OR% - \iffieldsequal{labelyear}{labelendyear}}% - {}% - {\bibdatedash\printfield{labelendyear}}}}% + {\bibstring{nodate}}% + {}}% + {\printurldateextra}}% + {\printdateextra}}% + {\printorigdateextra}}% + {\printeventdateextra}}}}% \newbibmacro*{cmscitesortdate}{% Attempt to solve date-related problems \ifboolexpr{% @@ -1305,11 +1229,15 @@ citation style] {\iftoggle{cms@bothlabelold}% {\usebibmacro{cite:bothyear+oldstyle}}% {\iftoggle{cms@fulldate}% - {\newcunit\printtext[bibhyperref]{\printdate}}% Consistency(?) - {\usebibmacro{cite:labelyear+extrayear}}}}}}% - \ifcsdef{@cms@tempdate}% - {\toggletrue{\@cms@tempdate}}% - {}}% + {\printtext[cmsyearhyper]{% + \csuse{print\strfield{labeldatesource}date}% + \iffieldundef{\strfield{labeldatesource}hour}% + {}% Consistency(?) + {\newcunit\csuse{print\strfield{labeldatesource}time}}}}% + {\usebibmacro{cite:labelyear+extrayear}}}}}}}% + % \ifcsdef{@cms@tempdate}% + % {\toggletrue{\@cms@tempdate}}% + % {}% \newbibmacro*{cite:origyear+labelyear}{% \ifboolexpr{ ( @@ -1317,6 +1245,8 @@ citation style] or test {\ifentrytype{review}}% or + test {\ifentrytype{standard}}% + or test {\ifentrytype{suppperiodical}}% or test {\ifentrytype{video}}% @@ -1334,8 +1264,9 @@ citation style] \usebibmacro{cite:standard+labelyear+extrayear}}% {\iftoggle{cms@ordate}% {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \usebibmacro{origyear+endyear}}}}}}}% + {\clearfield{extradate}% + \printtext[cmsyearhyper]{% + \printorigdateextra}}}}}}% \usebibmacro{origyear+endyear} \newbibmacro*{cite:bothyear+oldstyle}{% \ifboolexpr{ ( @@ -1343,6 +1274,8 @@ citation style] or test {\ifentrytype{review}}% or + test {\ifentrytype{standard}}% + or test {\ifentrytype{suppperiodical}}% or test {\ifentrytype{video}}% @@ -1352,11 +1285,13 @@ citation style] }% {\usebibmacro{cite:av+labelyear+extrayear}}% {\iftoggle{cms@switchdates}% - {\printtext[bibhyperref]{% + {\printtext[cmsyearhyper]{% \bibopenparen% \usebibmacro{cite:labelyear+extrayear}% \bibcloseparen% - \addspace\usebibmacro{origyear+endyear}}}% + \clearfield{extradate}% + \addspace% + \printorigdateextra}}% \usebibmacro{origyear+endyear} {\iffieldundef{origyear}% ??? {\iftoggle{cms@ordate}% {}% @@ -1365,18 +1300,23 @@ citation style] {\iftoggle{cms@ordate}% Added test for year field ??? {\iffieldundef{year}% {\usebibmacro{cite:origfirst+labelyear+extrayear}}% - {\printtext[bibhyperref]{% + {\printtext[cmsyearhyper]{% \bibopenparen% \usebibmacro{cite:origfirst+labelyear+extrayear}% \bibcloseparen% \setunit{\addspace}%\addspace% ??? - \usebibmacro{year+endyear}}}}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{origyear+endyear}% - \bibcloseparen% - \clearfield{extradate}\addspace% - \usebibmacro{cite:standard+labelyear+extrayear}}}}}}}% + \clearfield{extradate}% + \printdateextra}}}%\usebibmacro{year+endyear} + {\iffieldundef{year}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\printtext[cmsyearhyper]{% + \bibopenparen% + \clearfield{extradate}% + \printorigdateextra% + % \usebibmacro{origyear+endyear}% + \bibcloseparen% + \addspace% + \usebibmacro{cite:standard+labelyear+extrayear}}}}}}}}% \newbibmacro*{cite:save}{% \savefield{entrykey}{\cbx@lastkey}}% @@ -1443,8 +1383,36 @@ citation style] {}% {\usebibmacro{postnote}} +\DeclareCiteCommand{\cmshypercite}% Intended for CustomC comments + {\usebibmacro{cite:init}% + \togglefalse{blx@skipbib}% + \togglefalse{cms@authortitle}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {}%\multicitedelim + {}%\usebibmacro{postnote} Stops double printing + +\DeclareCiteCommand{\atcite} + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \toggletrue{cms@authortitle}% + \usebibmacro{cite}} + {}%\multicitedelim + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\atpcite}[\mkbibparens] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \toggletrue{cms@authortitle}% + \usebibmacro{cite}} + {}%\multicitedelim + {\usebibmacro{postnote}} + %%% Commands, macros and formats for the Legal entry types %%% - + \DeclareCiteCommand{\footfullcite}[\mkbibfootnote] {\usebibmacro{prenote}}%\bibsentence {\usebibmacro{citeindex}% @@ -1478,6 +1446,15 @@ citation style] {\multicitedelim} {} +\DeclareCiteCommand{\runcite}% 17th ed. + {\usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \toggletrue{cms@running@text}% + \usebibmacro{cite}% + \togglefalse{cms@running@text}} + {\multicitedelim} + {\usebibmacro{cite:postnote}} + \newbibmacro*{cite:full}{% \iftoggle{cms@noneshort}% {\ifboolexpr{% @@ -1678,6 +1655,8 @@ citation style] \ifboolexpr{% test {\iffootnote}% and + togl {cms@supranotes}% + and ( test {\ifentrytype{legal}}% or @@ -1767,7 +1746,7 @@ citation style] \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}\AND% \iffieldundef{titleaddon}}% {}% - {\printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work) + {\printtext[title]{% \printfield[noformat]{title}% \setunit{\subtitlepunct}% \printfield[noformat]{subtitle}}% @@ -1861,8 +1840,15 @@ citation style] togl {cms@url}% and not test {\iffieldundef{urlyear}}% + }% + {\printurldate% + \ifboolexpr{% 17th ed. + togl {cms@urltime}% + and + not test {\iffieldundef{urlhour}}% }% - {\printurldate}% Date fix + {\newcunit\printurltime}% + {}}% Date fix {}% \newcunit\newblock \iftoggle{cms@doionly}% @@ -1929,7 +1915,11 @@ citation style] {\printtext{at}\addspace #1}}}}% \DeclareFieldFormat[jurisdiction,legal,legislation]{postnote}{% - \iftoggle{cms@comprange}% + \ifboolexpr{% + togl {cms@comprange}% + and + test {\ifpages{#1}}% + }% {\iffieldundef{pagination}% {\mkcomprange[\mkjuridprefix]{#1}}% {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% @@ -1937,7 +1927,12 @@ citation style] {\mkjuridprefix{#1}}% {\mkpageprefix[pagination]{#1}}}}% -\DeclareFieldFormat[jurisdiction,legal]{title}{#1\isdot} +\DeclareFieldFormat[jurisdiction]{title}{% + \iftoggle{cms@running@text}% + {\mkbibemph{#1}\isdot}% + {#1\isdot}} + +\DeclareFieldFormat[legal]{title}{#1\isdot} \DeclareFieldFormat[legislation]{title}{% \iffieldequalstr{entrysubtype}{hearing}% @@ -2008,7 +2003,41 @@ citation style] {c\adddotspace #1}% {\bibsstring{chapter}~#1}}% -%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% +\DeclareFieldFormat[music]{chapter}{\bibstring{track}~#1} + +\newbibmacro*{patenttitle+stitle}{% Unify Patent entries across 2 AD styles + \printtext{% + \printfield{title}% + \setunit{\subtitlepunct}% + \printfield[subtitle]{subtitle}}% + \setunit{\ptitleaddonpunct}% + \printfield{titleaddon}% + \setunit{\addspace}% + \usebibmacro{language+transtitle}% + \newunit\newblock} + +\DeclareFieldFormat[patent]{title}{% + \iffieldundef{title}% + {}% + {\MakeSentenceCase*{#1}}} + +\DeclareFieldFormat[patent]{citetitle}{\MakeSentenceCase*{#1}} + +\DeclareFieldFormat[patent]{lostitle}{\MakeSentenceCase*{#1}} + +\DeclareFieldFormat[patent]{subtitle}{% + \iffieldundef{subtitle}% + {}% + {\MakeSentenceCase*{#1}}} + +\DeclareFieldFormat[dataset]{title}{% + \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} + +\DeclareFieldAlias[dataset]{citetitle}[dataset]{title} + +\DeclareFieldAlias[dataset]{lostitle}[dataset]{title} + +%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% \DeclareCiteCommand{\cbx@textcite} {\usebibmacro{cite:init}} @@ -2216,7 +2245,7 @@ citation style] \DeclareListFormat{periodplace}{\mkbibparens{#1}} -\DeclareListFormat{lista}{% +\DeclareListFormat{lista}{% \ifthenelse{\value{listtotal}<2}% {\bibsstring{subverbo}\addspace\mkbibquote{#1\isdot}}% {\ifthenelse{\value{listcount}=1}% @@ -2229,19 +2258,12 @@ citation style] \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}% + \ifboolexpr{% + togl {cms@comprange}% + and + test {\ifpages{#1}}% + }% {\iffieldundef{pagination}% {\mkcomprange{#1}}% {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% @@ -2250,7 +2272,11 @@ citation style] {\mkpageprefix[pagination]{#1}}}}% \DeclareFieldFormat[inreference]{postnote}{% - \iftoggle{cms@comprange}% + \ifboolexpr{% + togl {cms@comprange}% + and + test {\ifpages{#1}}% + }% {\iffieldundef{pagination}% {\bibsstring{subverbo}\addnbspace\mkbibquote{#1}}% {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}% @@ -2259,7 +2285,11 @@ citation style] {\mkpageprefix[pagination]{#1}}}}% \DeclareFieldFormat{pages}{% - \iftoggle{cms@comprange}% + \ifboolexpr{% + togl {cms@comprange}% + and + test {\ifpages{#1}}% + }% {\iffieldundef{bookpagination}% {\mkcomprange{#1}\isdot}% {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}}% @@ -2269,13 +2299,6 @@ citation style] \DeclareFieldFormat{bibnote}{\MakeCapital{#1}} -% \DeclareFieldFormat{edlang}{% -% \ifbibstring{#1}% -% {\bibstring{#1}}% -% {\ifbibstring{ed#1}% -% {\bibstring{ed#1}}% -% {\ifcapital{\MakeCapital{#1}}{#1}}}} - \DeclareListFormat{edlang}{% Required for feminine forms in some \usebibmacro{list:delim}{% languages \ifbibstring{#1}% @@ -2298,13 +2321,21 @@ citation style] {#1}} \DeclareFieldFormat[customc]{citetitle}{% - \ifnameundef{author}% - {#1}% - {\iffieldundef{nameaddon}% - {\mkbibemph{\bibstring{see}}% - \addspace% - #1}% - {\printfield{nameaddon}\addspace #1}}} + \iffieldequalstr{pubstate}{cms-generated}% Comments 17th ed. + {\ifbibstring{#1}% + {\bibstring{#1}}% + {#1}% + \StrGobbleRight{\strfield{entrykey}}{8}[\cms@aa]% + \addspace\cmshypercite{\cms@aa}}% + {\ifnameundef{author}% + {#1}% + {\iffieldundef{nameaddon}% + {\mkbibemph{\bibstring{see}}% + \addspace% + #1}% + {\printfield{nameaddon}\addspace #1}}}} + +\DeclareFieldAlias[customc]{lostitle}[customc]{title} \DeclareFieldFormat{shortjournal}{\mkbibemph{#1}\isdot} @@ -2312,8 +2343,6 @@ citation style] %%%% Other Field Formats %%%% -\DeclareNumChars*{:}% - \DeclareFieldFormat{letterday}{\mkbibcurdinal{#1}} \DeclareFieldFormat{note}{% @@ -2328,18 +2357,21 @@ citation style] {\MakeCapital{#1\isdot}}% {#1\isdot}}} -\DeclareFieldFormat[artwork,image]{type}{% +\DeclareFieldFormat[artwork,image,online,article,review,suppperiodical,book] +{type}{% \ifcapital% {\MakeCapital{#1}}% {#1}} +\DeclareFieldFormat[video]{usera}{% + \bibstring{on}\addspace #1} + +\DeclareFieldFormat{version}{\bibsstring{version}\addspace #1}% + \DeclareFieldFormat{url}{\url{#1}} \DeclareFieldFormat{doi}{% - \textrm{doi}\addcolon - \ifhyperref - {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}% - {\nolinkurl{#1}}} + \url{https://doi.org/#1}} \DeclareFieldFormat[music]{date}{% Generalize userd ??? \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% @@ -2356,6 +2388,37 @@ citation style] {#1}% {\printfield{userd}\addspace #1}} +\DeclareFieldFormat[artwork,image]{date}{% + \iffieldundef{origyear}% + {#1}% + {\iftoggle{cms@switchdates}% + {#1}% + {\iffieldundef{userd}% + {\bibstring{printed}\addspace #1}% + {\printfield{userd}\addspace #1}}}} + +\DeclareFieldFormat[artwork,image]{origdate}{% + \iffieldundef{year}% + {#1}% + {\iftoggle{cms@switchdates}% + {\iffieldundef{userd}% + {\bibstring{printed}\addspace #1}% + {\printfield{userd}\addspace #1}}% + {#1}}} + +\DeclareFieldFormat[artwork,image]{urldate}{% + \ifboolexpr{% + test {\iffieldundef{userd}}% + or + ( + not test {\iffieldundef{year}}% + and + not test {\iffieldundef{origyear}}% + ) + }% + {\bibstring{urlseen}\addspace #1}% + {\printfield{userd}\addspace #1}} + \DeclareFieldFormat{date}{% Generalize userd ??? \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}}% {#1}% @@ -2378,7 +2441,7 @@ citation style] {\printfield{userd}\addspace #1}} \DeclareFieldFormat[music]{origdate}{% 16th ed. - \iftoggle{cms@reprint}% Date fix + \iffieldequalstr{pubstate}{reprint}% Date fix {#1}% {\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}% {\bibstring{discrecorded}\space #1}% @@ -2398,7 +2461,12 @@ citation style] \DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?! -\DeclareFieldFormat[review,suppperiodical]{nameaddon}{#1\bibsentence}% 16th ed. +\DeclareFieldFormat[online,review,suppperiodical]{nameaddon}{#1\bibsentence}% + +\DeclareFieldFormat[misc]{nameaddon}{% + \iffieldundef{entrysubtype}% + {\mkbibbrackets{#1\bibsentence}}% + {#1\bibsentence}} \DeclareFieldFormat[customc]{nameaddon}{% For cross-refs \ifbibstring{#1}% @@ -2442,6 +2510,10 @@ citation style] {\addnbspace #1}% {\addcomma\addspace #1}} +\DeclareFieldFormat{series}{#1\isdot} + +\DeclareFieldFormat{shortseries}{#1\isdot} + \DeclareFieldFormat{addendum}{% \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} @@ -2461,8 +2533,11 @@ citation style] \DeclareFieldFormat{cmshyper}{% Control the number of elements hyperlinked. \ifboolexpr{% - ( + (( not test {\iffieldequalstr{entrysubtype}{classical}}% + and + not togl {cms@authortitle}% + ) or togl {blx@skipbib}% ) @@ -2472,6 +2547,11 @@ citation style] {#1}% {\bibhyperref{#1}}}% +\DeclareFieldFormat{cmsyearhyper}{% Only link when in ref list + \iftoggle{blx@skipbib} + {#1}% + {\bibhyperref{#1}}}% + %%%% Related field formats from biblatex.def %%%% \DeclareFieldFormat{related:origpubas}{#1}% This and next remove parens @@ -2526,24 +2606,125 @@ citation style] \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. + \ifboolexpr{% + ( + togl {cms@bothlabelnew}% + or + togl {cms@bothlabelold}% + ) + and + ( + not test {\iffieldundef{year}}% + and + not test {\iffieldundef{origyear}}% + ) + }% + {\cms@testspace}% + {\cms@pre@punct% + \ifboolexpr{% + test {\iffieldundef{labelyear}}% + or + ( + test {\iffieldundef{userd}}% + and + test {\iffieldequalstr{labeldatesource}{url}}% + ) + or + test {\iffieldequalstr{labelyear}{nodate}}% + or + togl {cms@fulldate}% + or + bool {cms:comma}% + }% + {\addcomma\addspace}% + {\iffieldundef{origyear}% + {\iffieldundef{year}% {\cms@testspace}% - {\addcomma\addspace}}}% 16th ed. wants comma before n.d. (!) - {\cms@testspace}}} + {\ifboolexpr{% + test {\iffieldnums{year}}% + or + test {\iffieldstart{year}{[}}%] For backward compatibility + }% + {\cms@testspace}% + {\addcomma\addspace}}}% + {\cms@testspace}}\global\boolfalse{cms:comma}}} -\newcommand{\classicpunct}{% - \ifthenelse{\iffieldequalstr{entrysubtype}{classical}\OR% - \ifentrytype{letter}}% - {\setunit*{\addspace}}% - {\setunit*{\addcomma\addspace}}} +\newrobustcmd*{\cms@citepunct@helper}[1]{% + \begingroup + \blx@metadateinfo{#1}% + \ifboolexpr{% + test {\if@cms@bracket}% + and + not togl {cms@noyearbrackets}% + }% + {}% + {\if@cms@circa% + {\global\booltrue{cms:comma}}% + {\if@cms@adfirst% + {\iffieldnum{#1year}% + {\ifboolexpr{% + test {\ifdefstring\blx@dateera{christian}}% + and + not test {\iffieldequalstr{#1dateera}{bce}}% + and + test {\ifnumless{\thefield{#1year}}\blx@dateeraauto}% + }% + {\global\booltrue{cms:comma}}% + {}}% + {}}% + {\ifboolexpr{% + test {\ifdefstring\blx@languagename{french}}% + or + test {\ifdefstring\blx@languagename{dutch}}% + }% + {\ifboolexpr{% + not test {\iffieldequalstr{#1dateunspecified}{yearindecade}}% + or + togl {cms@alwaysrange}% + or + togl {cms@decaderange}% + }% + {}% + {\global\booltrue{cms:comma}}}% + {\ifboolexpr{% + test {\ifdefstring\blx@languagename{brazilian}}% + or + test {\ifdefstring\blx@languagename{brazil}}% + }% + {\ifboolexpr{% + test {\iffieldundef{#1dateunspecified}}% + or + togl {cms@alwaysrange}% + }% + {}% + {\ifboolexpr{% + ( + test {\iffieldequalstr{#1dateunspecified}{yearindecade}}% + and + not togl {cms@decaderange}% + ) + or + ( + test {\iffieldequalstr{#1dateunspecified}{yearincentury}}% + and + not togl {cms@centuryrange}% + ) + }% + {\global\booltrue{cms:comma}}% + {}}}% + {}}}}}% + \endgroup} + +\newrobustcmd*{\cms@pre@punct}{% + \iftoggle{cms@origlabel}% + {\cms@citepunct@helper{orig}}% + {\ifdefstring\abx@field@labeldatesource{year}% + {\cms@citepunct@helper{}}% + {\ifdefstring\abx@field@labeldatesource{origyear}% + {\cms@citepunct@helper{orig}}% + {\ifdefstring\abx@field@labeldatesource{nodate}% + {}% + {\cms@citepunct@helper{\abx@field@labeldatesource}}}}}} \renewcommand*{\subtitlepunct}{% Follows CMS16 spec. \ifboolexpr{% @@ -2556,15 +2737,17 @@ citation style] \global\csundef{@cmsst}}% } -\newcommand{\postvolpunct}{\addcolon}% +\newcommand*{\reprintpunct}{% + \ifthenelse{\ifentrytype{artwork}\OR\ifentrytype{image}}% + {}% + {\ifentrytype{dataset}% + {\setunit{\addspace}}% + {\printunit{\addcomma\addspace}}}} -\newcommand{\parttrans}{% - {\bibstring{bytranslator}\space}}% +\newcommand*{\postvolpunct}{\addcolon}% -% \newcommand{\partedit}{% -% \iftoggle{cms@postposit}% Kludge to make it work in French. -% {\bibstring{byeditoralt}\addspace}% -% {\bibstring{byeditor}\addspace}}% +\newcommand*{\parttrans}{% + {\bibstring{bytranslator}\space}}% \protected\def\partedit#1{% \ifcat\noexpand~\noexpand#1% @@ -2597,24 +2780,24 @@ citation style] \cms@tempa% }% -\newcommand{\part@edit@i}{\bibstring{byeditor}\addspace}% +\newcommand*{\part@edit@i}{\bibstring{byeditor}\addspace}% -\newcommand{\partcomp}{% +\newcommand*{\partcomp}{% {\bibstring{bycompiler}\space}}% -\newcommand{\parteditandcomp}{% +\newcommand*{\parteditandcomp}{% {\bibstring{byeditorcp}\space}}% -\newcommand{\parttransandcomp}{% +\newcommand*{\parttransandcomp}{% {\bibstring{bytranslatorcp}\space}}% -\newcommand{\partedittransandcomp}{% +\newcommand*{\partedittransandcomp}{% {\bibstring{byeditortrcp}\space}}% -\newcommand{\parteditandtrans}{% +\newcommand*{\parteditandtrans}{% {\bibstring{byeditortr}\space}}% -\newcommand{\reprint}{\bibstring{reprint}}% +\newcommand*{\reprint}{\bibstring{reprint}}% \newcommand*{\multipubsdelim}{\addnbspace/\addspace} @@ -2653,11 +2836,11 @@ citation style] {}% {\cms@testspace}}% {\iffieldequalstr{entrysubtype}{classical}% For Notes+Bib, too? - {\NumCheckSetup{\DeclareNumChars*{abcdeABCDE}}% + {\DeclareNumChars*{abcdeABCDE:}% \iffieldpages{postnote}% {\cms@testspace}% {\addcomma\addspace}}% - {\addcomma\addspace}}}} + {\addcomma\addspace}\DeclareNumChars{.}}}} \newcommand*{\postnotewrapper}{% \iftoggle{cms@modpostnote}% @@ -2689,13 +2872,16 @@ citation style] \newcommand*{\editordelim}{% Otherwise you get an inaccurate comma. \iffieldequalstr{editortype}{none}% - {\addperiod\addspace}% - {\addcomma\addspace}} + {\newunit}%\addperiod\addspace + {\newcunit}}%\addcomma\addspace \newcommand*{\nameadelim}{% Otherwise you get an inaccurate comma. \iffieldequalstr{nameatype}{none}% - {\addperiod\addspace}% - {\addcomma\addspace}} + {\newunit}%\addperiod\addspace + {\newcunit}}%\addcomma\addspace + +\DeclareDelimFormat{dateeradelim}{\addnbspace}% +\DeclareDelimFormat{dateaddelim}{\addnbspace}% \DeclareListFormat{cfromoriglanguage}{% Needed for notes, to provide \begingroup% final {by}. @@ -2710,7 +2896,7 @@ citation style] {\ifboolexpr{% test {\ifnumless{\value{listcount}}{\value{liststop}}}% or - test \ifmoreitems% + test {\ifmoreitems}% }% {\bibstring{from#1}}% {\bibstring{cfrom#1}}}% @@ -2724,7 +2910,7 @@ citation style] \ifboolexpr{% test {\ifnumequal{\value{listcount}}{\value{liststop}}}% and - test \ifmoreitems% + test {\ifmoreitems}% }% {\ifnumgreater{\value{liststop}}{1}% {\finalandcomma}% @@ -2805,6 +2991,14 @@ citation style] {\bibstring{by}\addspace\printnames[default]{bookauthor}% \newcunit\newblock}}} +\newbibmacro*{music+bookauthor}{% + \ifnameundef{bookauthor}% + {}% + {\ifnamesequal{author}{bookauthor}% + {}% + {\printnames[default]{bookauthor}% + \newcunit\newblock}}} + \newbibmacro*{editorpunct}{% \ifthenelse{\(\iffieldundef{booktitle}\AND% \iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)% @@ -2819,6 +3013,10 @@ citation style] \printfield{edition}% \clearfield{edition}}% +\newbibmacro*{version}{% + \printfield{version}% + \clearfield{version}}% + \newbibmacro*{inforaft}{% \ifnameundef{introduction}% {\ifnameundef{afterword}% @@ -2838,12 +3036,42 @@ citation style] \andmoredelim\bibstring{andmore}\bibrightbracket}% {}} +\newbibmacro*{video+tv+title}{% For 17th ed. + \ifboolexpr{% + test {\iffieldequalstr{entrysubtype}{tvepisode}}% + and + ( + not test {\iffieldundef{title}}% + and + not test {\iffieldundef{booktitle}}% + ) + }% + {\printtext{% + \printfield{booktitle}% + \setunit{\subtitlepunct}% + \printfield[booksubtitle]{booksubtitle}}% + \setunit{\ptitleaddonpunct}% + \printfield{booktitleaddon}% + \ifundef\bbx@lasthash{}{\newcunit}}% + {\usebibmacro{video+title}% Simplifies trad style + \iffieldundef{booktitle}% Comma after italics, period after quotes + {\setunit{\ctitleaddonpunct}}% + {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock% + \printfield{titleaddon}%\usebibmacro{title+stitle}% + \setunit{\addspace}\newblock%\bibsentence + \usebibmacro{language+transtitle}}} + \newbibmacro*{reference+title}{% - \ifthenelse{\iffieldequals{title}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% - {\usebibmacro{italtitle+stitle}% - \savefield{title}{\bbx@lasthash}}} + \ifboolexpr{% + test {\iffieldequals{title}{\bbx@lasthash}}% + and + not test {\iffirstonpage}% + and + togl {cms@namedash}% + }% + {\printtext{\bibnamedash}}% + {\usebibmacro{italtitle+stitle}% + \savefield{title}{\bbx@lasthash}}} \newbibmacro*{mag+news+author}{% \ifboolexpr{% @@ -2855,28 +3083,26 @@ citation style] and not togl {cms@origpublished}% }% - {\ifthenelse{\iffieldequals{journaltitle}{\bbx@lasthash}\AND\NOT - \iffirstonpage}% - {\bibnamedash\addperiod\addspace}% + {\ifboolexpr{% + test {\iffieldequals{journaltitle}{\bbx@lasthash}}% + and + not test {\iffirstonpage}% + and + togl {cms@namedash}% + }% + {\printtext{\bibnamedash}}% {\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}} + \printdate}% Was printfield{year}? \newbibmacro*{institution+organization}{% \iflistundef{organization}% @@ -2887,6 +3113,31 @@ citation style] \newcunit% \printlist{institution}}} +\newbibmacro*{misc+institution+organization}{% 17th ed. + \iffieldundef{number}% + {\iflistundef{organization}% + {\iflistundef{institution}% + {}% + {\printlist{institution}}}% + {\printlist{organization}% + \newcunit% + \printlist{institution}}}% + {\iflistundef{organization}% + {\iflistundef{institution}% + {\newcunit\printfield{number}}% + {\newcunit\printfield{number}% + \newunit% + \printlist{institution}}}% + {\iflistundef{institution}% + {\newcunit\printfield{number}% + \newunit% + \printlist{organization}}% + {\printlist{organization}% + \newcunit% + \printfield{number}% + \newcunit% + \printlist{institution}}}}} + \newbibmacro*{author+org}{% \ifnameundef{author}% {\ifnameundef{editor}% @@ -2896,8 +3147,10 @@ citation style] test {\iflistequals{organization}{\bbx@lasthash}}% and not test {\iffirstonpage}% + and + togl {cms@namedash}% }% - {\bibnamedash\addperiod\addspace}% + {\printtext{\bibnamedash}}% {\iftoggle{cms@authorparens}% {\bibopenparen\printlist{organization}\bibcloseparen}% {\printlist{organization}}% @@ -2905,10 +3158,19 @@ citation style] {\usebibmacro{editor}}}% {\usebibmacro{author/editor}}} -\newbibmacro*{cbytypestrg}[2]{% +\renewbibmacro*{bytypestrg}[2]{% From biblatex.def \iffieldundef{#1type}% {\bibstring{by#2}}% - {\bibstring{by\thefield{#1type}}}} + {\ifbibxstring{by\thefield{#1type}}% + {\bibstring{by\thefield{#1type}}}% + {\printtext[note]{\thefield{#1type}}}}}% + +\newbibmacro*{cbytypestrg}[2]{% + \iffieldundef{#1type}% + {\bibstring{cby#2}}% + {\ifbibxstring{cby\thefield{#1type}}% + {\bibstring{cby\thefield{#1type}}}% + {\printtext[note]{\thefield{#1type}}}}}% \newbibmacro*{cbyeditor}{% \ifnameundef{editor}% @@ -3121,45 +3383,52 @@ citation style] \newbibmacro*{chapinscore}{% \iffieldundef{chapter}% {\ifboolexpr{% - test {\ifentrytype{music}}% + not test {\iffieldundef{eventyear}}% and not test {\iffieldundef{booktitle}}% and + test {\ifentrytype{audio}}% + and not togl {cms@origpublished}% }% - {\bibstring{on}\setunit{\addspace}}% + {\bibstring{in}\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}% +\newbibmacro*{chap+as+track}{% + \iffieldundef{chapter}% + {\ifboolexpr{% + not test {\iffieldundef{booktitle}}% + and + not togl {cms@origpublished}% + }% + {\bibstring{on}\setunit{\addspace}}% + {}}% + {\printfield{chapter}\clearfield{chapter}% + \iffieldundef{booktitle}% {}% - {\printfield{pubstate}}}% - {\printfield{howpublished}}}% + {\addspace\bibstring{on}\setunit{\addspace}}}}% \newbibmacro*{music+origdate}{% - \iftoggle{cms@reprint}% 16th ed. + \iffieldequalstr{pubstate}{reprint}% 17th ed. {}% {\iftoggle{cms@switchdates}% Date fix - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}\AND% + \iffieldundef{season}}% {}% {\usebibmacro{cmsorigdate}}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}\AND% + \iffieldundef{origseason}}% {}% - {\usebibmacro{cmsorigdate}}}}}% + {\usebibmacro{cmsorigdate}}}% + \iffieldundef{pubstate}% + {}% + {\iffieldbibstring{pubstate}% + {\newunit\biblstring{\thefield{pubstate}}}% + {\newunit\printfield[prenote]{pubstate}}}}}% \newbibmacro*{music+eventdate}{% Date fix \ifthenelse{\iffieldundef{eventyear}\AND\iffieldundef{eventmonth}}% @@ -3167,10 +3436,17 @@ citation style] {\printeventdate}} \newbibmacro*{ser+num}{% - \printfield{series}% + \usebibmacro{series+or+shortser}% \printfield[sernum]{number}% \newunit} +\newbibmacro*{series+or+shortser}{% + \iffieldundef{shortseries}% + {\printfield{series}}% + {\iftoggle{cms@shser}% + {\printfield{shortseries}}% + {\printfield{series}}}} + \newbibmacro*{language+transtitle}{% \iffieldundef{usere}% {\printlist[][-\value{listtotal}]{language}}% @@ -3191,10 +3467,7 @@ citation style] \iflistundef{origpublisher}% {\setunit*{\addcomma\addspace}}% {\setunit*{\addcolon\addspace}}% - \printlist{origpublisher}% -% \setunit*{\addcomma\addspace}% -% \usebibmacro{cmsorigdate}% -}% + \printlist{origpublisher}}% \newbibmacro*{howpubl+loc+year}{% \printlist{location}% @@ -3216,8 +3489,8 @@ citation style] \usebibmacro{date}% }% -\newbibmacro*{originally+published+as}{% Punctuation fix now in - \iffieldundef{userf}% \origfullcite for 0.8e. +\newbibmacro*{originally+published+as}{% Punctuation fix now in + \iffieldundef{userf}% \origfullcite for 0.8e. {\iffieldundef{reprinttitle}% {}% {\usebibmacro{begrelated}% @@ -3270,25 +3543,29 @@ citation style] {\printlist{origlocation}% \newcunit\newblock}% \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}\AND% + \iffieldundef{season}}% {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {\cms@datelong{}}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}\AND% + \iffieldundef{origseason}}% {}% - {\cms@datelong}}} + {\cms@datelong{orig}}}} \newbibmacro*{unpubl+letter+date}{% For the Misc type. - \iflistundef{origlocation}% + \iffieldundef{venue}% {}% - {\printlist{origlocation}% + {\printfield{venue}% \newcunit\newblock}% \iftoggle{cms@switchdates}% - {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% + {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}\AND% + \iffieldundef{season}}% {}% - {\cms@datelongalt}}% - {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}}% + {\cms@datelong{}}}% + {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}\AND% + \iffieldundef{origseason}}% {\printdate}% For interviews and other dated non-letters - {\cms@datelong}}} + {\cms@datelong{orig}}}} \newbibmacro*{cmsbookdate}{% \ifthenelse{\iffieldundef{year}\AND\iffieldundef{origyear}}% @@ -3304,44 +3581,54 @@ citation style] \renewbibmacro*{date}{% Adding the test solved some issues in 0.9 with \iftoggle{cms@switchdates}% {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}% - \AND\iffieldundef{origday}}% + \AND\iffieldundef{origday}\AND\iffieldundef{origseason}}% {}% {\printorigdate}}% {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}% - \AND\iffieldundef{day}}% punctuation in some entry types (Misc). The - {}% whole \printdate thing may need further work. + \AND\iffieldundef{day}\AND\iffieldundef{season}}% 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 +\newbibmacro*{time+stamp}{% 17th ed. + \iftoggle{cms@switchdates}% + {\iffieldundef{orighour}% {}% - {\iffieldundef{month}% - {\printfield{year}}% - {\printfield[letterday]{day}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{month}}\setunit{\nobreakspace}% - \printfield{year}}}}% - {\iffieldundef{origyear}% + {\newcunit\printorigtime}}% + {\iffieldundef{hour}% {}% - {\iffieldundef{origmonth}% - {\printfield{origyear}}% - {\printfield[letterday]{origday}\setunit*{\nobreakspace}% - \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% - \printfield{origyear}}}}}% + {\newcunit\printtime}}} + +\newcommand*{\cms@datelong}[1]{% Modified for 17th ed. + \begingroup + \protected\def\mkbibdatelong##1##2##3{% + \iffieldundef{##3}% + {}% + {\iftoggle{cms@ukord}% + {\mkbibordinal{\thefield{##3}}}% + {\stripzeros{\thefield{##3}}}% + \iffieldundef{##2}{}{\nobreakspace}}% + \iffieldundef{##2}% + {}% + {\mkbibmonth{\thefield{##2}}% + \iffieldundef{##1}{}{\space}}% + \iffieldbibstring{##1}% + {\bibstring{\thefield{##1}}}% + {\cmsdateeraprintpre{##1}\stripzeros{\thefield{##1}}}}% + \cms@mkbibrangetrunc{long}{#1}% + \endgroup}% + +\newrobustcmd*{\letterdatelong}{% For users: 17th ed. + \ifboolexpr{% + test {\ifdefstring{\blx@languagename}{american}}% + or + test {\ifdefstring{\blx@languagename}{english}}% i.e., no babel + }% + {\iftoggle{cms@switchdates}% + {\cms@datelong{}}% + {\cms@datelong{orig}}}% + {\iftoggle{cms@switchdates}% + {\printdate}% + {\printorigdate}}}% \newbibmacro*{journal+sub}{% \iffieldundef{journaltitle}% @@ -3383,17 +3670,29 @@ citation style] and not togl {cms@origpublished}% }% - {\usebibmacro{date+issue}}% + {\usebibmacro{date+issue}{a}}% {\usebibmacro{mag+date+issue}}} -\newbibmacro*{date+issue}{% +\newbibmacro*{date+issue}[1]{% + \iffieldundef{maintitle}% + {\ifblank{#1}{\newcunit\newblock}{\newunit\newblock}}% + {\printtext{% + \printfield{maintitle}% + \setunit{\subtitlepunct}% + \printfield[mainsubtitle]{mainsubtitle}}% + \setunit{\ctitleaddonpunct}% + \printfield{maintitleaddon}% + \newcunit\newblock}% + \printfield{usera}% For network ID and possible section of newspaper. + \setunit*{\addcomma\addspace}\newblock% \iffieldundef{issue}% {\iffieldundef{number}% - {\usebibmacro{date}}% + {\usebibmacro{date}% + \usebibmacro{time+stamp}}% 17th ed. {\iftoggle{cms@numbermonth}% {\usebibmacro{date}}% {\usebibmacro{cmsyear}}% - \setunit*{\addcomma\addspace}% Starred version for when the + \setunit*{\addcomma\addspace}% Starred version for when the \printfield[journum]{number}}}% month isn't printed because of {\printfield{issue}% the toggle. \setunit{\addspace}% @@ -3403,22 +3702,20 @@ citation style] \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}} + \newunit\newblock + \usebibmacro{date+issue}{}} \newbibmacro*{cmsyear}{% \iftoggle{cms@switchdates}% - {\printfield{origyear}}% - {\printfield{year}}} + {\clearfield{extradate}\printorigdateextra}% \printfield{origyear} + {\clearfield{extradate}\printdateextra}}% \printfield{year} \newbibmacro*{cmsorigdate}{% New for 0.9 \iftoggle{cms@switchdates}% {\printdate}% {\printorigdate}} -\newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, +\newbibmacro*{cperiodical+ser+vol+num}[1]{% For periodical entries, \ifboolexpr{% article subtype togl {cms@citejtabb}% and @@ -3449,16 +3746,20 @@ citation style] {\newcunit \printfield[jourser]{series}% \newcunit}%\setunit*{\addspace}? - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}}% + \ifthenelse{\iffieldundef{#1year}\AND\iffieldundef{#1month}\AND% + \iffieldundef{issue}\AND\iffieldundef{#1season}}% New, more accurate + {\iffieldundef{volume}% test, also in article + {\newcunit% + \printfield[journum]{number}% + \clearfield{number}% + \setunit{\addcomma\addspace}}% + {\printfield[jourvol]{volume}% + \setunit{\addcomma\addspace}}}% {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}% need * here? + \newcunit% \printfield[journum]{number}% \clearfield{number}% - \setunit{\addcomma\addspace}}% - \printfield{eid}% - \newunit} + \setunit{\addcomma\addspace}}}% Moved eid for 17th ed. \newbibmacro*{periodical+date+issue}{% For periodical type & \ifboolexpr{% magazine subtype @@ -3485,10 +3786,8 @@ citation style] \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}} + \newunit\newblock + \usebibmacro{date+issue}{}} \renewbibmacro*{postnote}{% \iffieldundef{postnote}% @@ -3581,9 +3880,11 @@ citation style] {\bibstring{editortranslator}% \clearname{translator}}% {\bibstring{editor}}}}}}% - {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% - {\bibstring{\thefield{editortype}s}}% - {\bibstring{\thefield{editortype}}}}% + {\ifbibxstring{\thefield{editortype}}% + {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}% + {\bibstring{\thefield{editortype}s}}% + {\bibstring{\thefield{editortype}}}}% + {\printtext[note]{\thefield{editortype}}}}% \clearname{editor}} \newbibmacro*{parteditstrg}{% @@ -3614,13 +3915,15 @@ citation style] {\bibstring{editortranslator}% \clearname{nameb}}% {\bibstring{editor}}}}}}% - {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% - {\bibstring{\thefield{nameatype}s}}% - {\bibstring{\thefield{nameatype}}}}% + {\ifbibxstring{\thefield{nameatype}}% + {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}% + {\bibstring{\thefield{nameatype}s}}% + {\bibstring{\thefield{nameatype}}}}% + {\printtext[note]{\thefield{nameatype}}}}% \clearname{namea}} \newbibmacro*{clearpublin}{% - \clearname{author}% + \clearname{author}\clearfield{shorthand}% \ifthenelse{\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR% \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}}% {}% @@ -3633,17 +3936,22 @@ citation style] \ifentrytype{collection}\OR\ifentrytype{reference}\OR% \ifentrytype{suppbook}\OR\ifentrytype{suppcollection}\)\OR% \(\(\ifentrytype{audio}\OR\ifentrytype{music}\OR% - \ifentrytype{video}\)\AND\iffieldundef{booktitle}\)}% + \ifentrytype{video}\)\AND\(\iffieldundef{booktitle}\AND% + \iffieldundef{entrysubtype}\)\)}% {}% {\clearfield{title}% \clearfield{subtitle}% \clearfield{titleaddon}% \clearfield{usere}% - \clearlist{language}}% + \clearlist{language}% + \ifentrytype{music}% + {\clearfield{note}\clearfield{howpublished}\clearfield{eventyear}% + \clearfield{eventmonth}}% + {}}% \ifentrytype{letter}% {\iftoggle{cms@switchdates}% - {\clearfield{year}\clearfield{month}}% - {\clearfield{origyear}\clearfield{origmonth}}% + {\clearfield{year}\clearfield{month}\clearfield{season}}% + {\clearfield{origyear}\clearfield{origmonth}\clearfield{origseason}}% \clearfield{origlocation}}% {}% \clearfield{reprinttitle}% @@ -3713,6 +4021,9 @@ citation style] \renewbibmacro*{pageref}{}}% {\thefield{entrytype}}}} +\letbibmacro*{related:maintitlenc}{related:multivolume}% From N & B +\letbibmacro*{related:maintitle}{related:multivolume}% + \renewbibmacro*{related:multivolume}[1]{% \entrydata*{#1}{% \usebibmacro{at+every+item}% @@ -3757,6 +4068,11 @@ citation style] \newcunit}% \usebibmacro{date}}}% +\newbibmacro*{related:commenton}[1]{% 17th ed. + \togglefalse{cms@fulldate}% Let cloned entry set it + \entrydata*{#1}{% + \cmshypercite{\strfield{clonesourcekey}}}} + \providetoggle{cms@otherlang} \apptocmd\blx@opt@autolang@other% @@ -3787,9 +4103,6 @@ citation style] {\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 |