summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx1126
1 files changed, 842 insertions, 284 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
index 82f4a000d6..9d5616564d 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
@@ -4,7 +4,7 @@
% formatted according to the specifications of the Chicago Manual of
% Style.
-\ProvidesFile{chicago-notes.cbx}[2020/04/20 v 3.14 biblatex citation style]
+\ProvidesFile{chicago-notes.cbx}[2021/03/27 v 3.16 biblatex citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -58,6 +58,9 @@
\providetoggle{cms@noibid}
\providetoggle{cms@noidem}
\providetoggle{cms@namedash}
+\providetoggle{cms@bibnona}
+\providetoggle{cms@citenona}
+\providetoggle{cms@subseqnona}
\providetoggle{cms@useibid}
\providetoggle{cms@usecompiler}
\providetoggle{cms@shorthandibid}
@@ -65,9 +68,12 @@
\providetoggle{cms@fullshhand}
\providetoggle{cms@inheritshhand}
\providetoggle{cms@firstshort}
+\providetoggle{cms@noshintro}
+\providetoggle{cms@shandonly}
\providetoggle{cms@origpublished}
\providetoggle{cms@loccit}
\providetoggle{cms@annotation}
+\providetoggle{cms@cbxannote}
\providetoggle{cms@postposit}
\providetoggle{cms@legalnotes}% For legal types
\providetoggle{cms@supranotes}% Ditto
@@ -95,6 +101,7 @@
\providetoggle{cms@blogurl}% For 17th ed. blogs w/ comments
\providetoggle{cms@related}
\providetoggle{cms@citerel}
+\providetoggle{cms@reprintfrom}% maintitle type w/in relatedfrom type
\providetoggle{cms@gencite}
\providetoggle{cms@genallnames}
@@ -102,6 +109,16 @@
\iffieldundef{userc}%
{}%
{\nocite{\thefield{userc}}}%
+ \ifboolexpr{%
+ togl {cms@subseqnona}%
+ and
+ not togl {cms@citenona}%
+ and
+ test {\ifciteseen}%
+ and
+ not togl {cms@noneshort}%
+ }%
+ {\global\let\cms@lastna\undefined}{}%
\global\togglefalse{cms@loccit}%
\global\csundef{@cmsst}%
\ifboolexpr{%
@@ -157,8 +174,131 @@
\DeclareBiblatexOption{global,entry}[boolean]{genallnames}[true]{%
\settoggle{cms@genallnames}{#1}}
-\DeclareBibliographyOption{annotation}[true]{%
- \global\toggletrue{cms@annotation}}
+\DeclareBiblatexOption{global,type,entry}[string]{annotation}[true]{%
+ \ifcsdef{cms@opt@annot@#1}%
+ {\csuse{cms@opt@annot@#1}}%
+ {\blx@err@invopt{annotation=#1}{}}}%
+\def\cms@opt@annot@true{%
+ \toggletrue{cms@annotation}%
+ \togglefalse{cms@cbxannote}}
+\def\cms@opt@annot@false{%
+ \togglefalse{cms@annotation}%
+ \togglefalse{cms@cbxannote}}
+\def\cms@opt@annot@notes{%
+ \togglefalse{cms@annotation}%
+ \toggletrue{cms@cbxannote}}
+\def\cms@opt@annot@bib{%
+ \toggletrue{cms@annotation}%
+ \togglefalse{cms@cbxannote}}
+\def\cms@opt@annot@all{%
+ \toggletrue{cms@annotation}%
+ \toggletrue{cms@cbxannote}}
+
+\DeclareBiblatexOption{global,type,entry}[string]{bibannotesep}[vpar]{%
+ \ifcsdef{cms@opt@bannsep@#1}%
+ {\csuse{cms@opt@bannsep@#1}}%
+ {\blx@err@invopt{bibannotesep=#1}{}}}
+\def\cms@opt@bannsep@none{%
+ \let\bibannotesep\@empty}%
+\def\cms@opt@bannsep@comma{%
+ \def\bibannotesep{\addcomma\addspace}}%
+\def\cms@opt@bannsep@colon{%
+ \def\bibannotesep{\addcolon\addspace}}%
+\def\cms@opt@bannsep@space{%
+ \def\bibannotesep{\addspace}}%
+\def\cms@opt@bannsep@semicolon{%
+ \def\bibannotesep{\addsemicolon\addspace}}%
+\def\cms@opt@bannsep@period{%
+ \def\bibannotesep{\addperiod\addspace}}%
+\def\cms@opt@bannsep@par{%
+ \def\bibannotesep{\addperiod\par\nobreak}}%
+\def\cms@opt@bannsep@vpar{%
+ \def\bibannotesep{\addperiod\par\nobreak \vskip \bibitemsep}}%
+\def\cms@opt@bannsep@parbreak{%
+ \def\bibannotesep{\addperiod\par}}%
+\def\cms@opt@bannsep@vparbreak{%
+ \def\bibannotesep{\addperiod\par \vskip \bibitemsep}}%
+
+\DeclareBiblatexOption{global,type,entry}[string]{citeannotesep}[period]{%
+ \ifcsdef{cms@opt@cannsep@#1}%
+ {\csuse{cms@opt@cannsep@#1}}%
+ {\blx@err@invopt{citeannotesep=#1}{}}}
+\def\cms@opt@cannsep@none{%
+ \let\citeannotesep\@empty}%
+\def\cms@opt@cannsep@comma{%
+ \def\citeannotesep{\addcomma\addspace}}%
+\def\cms@opt@cannsep@colon{%
+ \def\citeannotesep{\addcolon\addspace}}%
+\def\cms@opt@cannsep@space{%
+ \def\citeannotesep{\addspace}}%
+\def\cms@opt@cannsep@semicolon{%
+ \def\citeannotesep{\addsemicolon\addspace}}%
+\def\cms@opt@cannsep@period{%
+ \def\citeannotesep{\addperiod\addspace}}%
+\def\cms@opt@cannsep@par{%
+ \def\citeannotesep{\addperiod\par\nobreak}}%
+\def\cms@opt@cannsep@vpar{%
+ \def\citeannotesep{\addperiod\par\nobreak \vskip\p@}}%
+\def\cms@opt@cannsep@parbreak{%
+ \def\citeannotesep{\addperiod\par}}%
+\def\cms@opt@cannsep@vparbreak{%
+ \def\citeannotesep{\addperiod\par \vskip\p@}}%
+
+\DeclareBiblatexOption{global}[string]{formatbib}[max]{%
+ \ifcsdef{cms@opt@formatbib@#1}%
+ {\csuse{cms@opt@formatbib@#1}}%
+ {\blx@err@invopt{formatbib=#1}{}}}%
+\def\cms@opt@formatbib@max{}%
+\def\cms@opt@formatbib@min{%
+ \renewcommand*{\bibsetup}{%
+ \interlinepenalty=0\relax
+ \widowpenalty=0\relax
+ \@clubpenalty=0\relax
+ \clubpenalty=0\relax
+ \brokenpenalty=0\relax
+ \raggedbottom
+ \frenchspacing
+ \biburlsetup}}%
+\def\cms@opt@formatbib@minwo{%
+ \patchcmd\bibsetup%
+ {\interlinepenalty=5000\relax}%
+ {\interlinepenalty=0\relax}{}{}}%
+\def\cms@opt@formatbib@annote{%
+ \patchcmd\bibsetup%
+ {\interlinepenalty=5000\relax}%
+ {\interlinepenalty=0\relax}{}{}%
+ \AtEveryBibitem{%
+ \interlinepenalty=5000\relax}}%
+\def\cms@opt@formatbib@annotenp{%
+ \AtEndPreamble{%
+ \ifdefvoid{\cms@entrybreak}%
+ {\patchcmd\bibsetup%
+ {\interlinepenalty=5000\relax}%
+ {\interlinepenalties\cmspens{3}\relax}{}{}}%
+ {\patchcmd\bibsetup%
+ {\interlinepenalty=5000\relax}%
+ {\interlinepenalties\cmspens{\cms@entrybreak}\relax}{}{}}}}%
+
+\DeclareBiblatexOption{global}[integer]{entrybreak}[3]{%
+ \IfInteger{#1}%
+ {\numdef\cms@entrybreak{#1}}%
+ {\numdef\cms@entrybreak{3}\cms@warning@noline%
+ {'entrybreak=#1' isn't a valid option.\MessageBreak
+ This option only accepts integers.\MessageBreak
+ It has been set to the default '3'.\MessageBreak
+ Please see biblatex-chicago.pdf for\MessageBreak
+ more information}}}
+
+\def\cmspens@i#1{\space
+ \ifnum#1>\@ne\number5000
+ \expandafter\cmspens@i
+ \expandafter{\number\numexpr#1-\@ne\expandafter}%
+ \else
+ \ifnum#1>\z@\number10
+ \else\unspace
+ \fi\fi}
+
+\def\cmspens#1{\space #1\cmspens@i{#1}}
\DeclareBibliographyOption[boolean]{noibid}[true]{%
\global\toggletrue{cms@noibid}}
@@ -166,7 +306,7 @@
\DeclareBibliographyOption[boolean]{useibid}[true]{%
\global\toggletrue{cms@useibid}}
-\DeclareBibliographyOption[boolean]{dashed}[true]{%
+\DeclareBiblatexOption{global,type,entry}[boolean]{dashed}[true]{%
\settoggle{cms@namedash}{#1}}
\DeclareBibliographyOption[boolean]{short}[true]{%
@@ -830,30 +970,31 @@
\settoggle{cms@fullshhand}{#1}}
\DeclareBibliographyOption[boolean]{inheritshorthand}[true]{%
- \settoggle{cms@inheritshhand}{#1}%
- \iftoggle{cms@inheritshhand}%
- {\DeclareDataInheritance{*}{*}{%
- \inherit{shorthand}{shorthand}
- \inherit{shorthandintro}{shorthandintro}
- }}%
- {}}%
+ \settoggle{cms@inheritshhand}{#1}}%
\DeclareBiblatexOption{global,entry}[boolean]{shorthandfirst}[true]{%
\settoggle{cms@firstshort}{#1}}
+\DeclareBiblatexOption{global,type,entry}[string]{shorthandintro}[full]{%
+ \ifcsdef{cms@opt@shhintro@#1}%
+ {\csuse{cms@opt@shhintro@#1}}%
+ {\blx@err@invopt{shorthandintro=#1}{}}}
+\def\cms@opt@shhintro@full{%
+ \togglefalse{cms@noshintro}%
+ \togglefalse{cms@shandonly}}%
+\def\cms@opt@shhintro@short{%
+ \toggletrue{cms@shandonly}}%
+\def\cms@opt@shhintro@none{%
+ \toggletrue{cms@noshintro}}%
+
\DeclareBibliographyOption[boolean]{compresspages}[true]{%
\global\settoggle{cms@comprange}{#1}}%
\DeclareBibliographyOption[boolean]{compressyears}[true]{%
\global\settoggle{cms@compyears}{#1}}%
-\DeclareBibliographyOption[string]{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[boolean]{postnotepunct}[true]{%
+ \global\settoggle{cms@modpostnote}{#1}}%
\DeclareBiblatexOption{global,entry}[boolean]{usecompiler}[true]{%
\settoggle{blx@usenamec}{#1}}
@@ -1007,6 +1148,52 @@
\settoggle{cms@bookseries}{#1}%
\settoggle{cms@notefield}{#1}}%
+\DeclareBibliographyOption[string]{nameaddon}[all]{%
+ \ifcsdef{cms@gopt@na@#1}%
+ {\csuse{cms@gopt@na@#1}}%
+ {\csuse{cms@gopt@na@all}\cms@warning@noline%
+ {'nameaddon=#1' is not a valid global\MessageBreak
+ option. The default - 'all' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@gopt@na@all{}%
+\def\cms@gopt@na@none{%
+ \settoggle{cms@bibnona}{true}%
+ \settoggle{cms@citenona}{true}}%
+\def\cms@gopt@na@cite{\settoggle{cms@bibnona}{true}}%
+\def\cms@gopt@na@bib{\settoggle{cms@citenona}{true}}%
+\def\cms@gopt@na@first{\settoggle{cms@subseqnona}{true}}%
+\def\cms@gopt@na@citefirst{%
+ \settoggle{cms@bibnona}{true}%
+ \settoggle{cms@subseqnona}{true}}%
+\def\cms@gopt@na@bibfirst{%
+ \settoggle{cms@citenona}{true}%
+ \settoggle{cms@subseqnona}{true}}%
+
+\DeclareTypeOption[string]{nameaddon}[all]{%
+ \ifcsdef{cms@opt@na@#1}%
+ {\csuse{cms@opt@na@#1}}%
+ {\csuse{cms@opt@na@all}\cms@warning@noline%
+ {'nameaddon=#1' is not a valid type\MessageBreak
+ option. The default - 'all' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@na@all{}%
+\def\cms@opt@na@none{%
+ \settoggle{cms@bibnona}{true}%
+ \settoggle{cms@citenona}{true}}%
+\def\cms@opt@na@cite{\settoggle{cms@bibnona}{true}}%
+\def\cms@opt@na@bib{\settoggle{cms@citenona}{true}}%
+
+\DeclareEntryOption[string]{nameaddon}[all]{%
+ \ifcsdef{cms@opt@na@#1}%
+ {\csuse{cms@opt@na@#1}}%
+ {\csuse{cms@opt@na@all}\cms@warning@noline%
+ {'nameaddon=#1' is not a valid entry\MessageBreak
+ option. The default - 'all' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+
\DeclareBiblatexOption{global,type,entry}[string]{related}[bib]{%
\ifcsdef{cms@opt@rel@#1}%
{\csuse{cms@opt@rel@#1}}%
@@ -1057,6 +1244,32 @@
\def\cms@opt@shxp@period{%
\def\shortextrapunct{\addperiod\addspace}}%
+% Controlling formatting of, and punctuation before, nameaddon fields %
+
+\DeclareBiblatexOption{global,type,entry}[string]{nameaddonformat}{%
+ \def\cms@naformat{#1}}
+
+\DeclareBiblatexOption{global,type,entry}[string]{nameaddonsep}[space]{%
+ \ifcsdef{cms@opt@nasep@#1}%
+ {\csuse{cms@opt@nasep@#1}}%
+ {\csuse{cms@opt@nasep@space}\cms@warning@noline%
+ {'nameaddonsep=#1' is not a valid option.\MessageBreak
+ The default - 'space' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@nasep@none{%
+ \let\nameaddonpunct\@empty}%
+\def\cms@opt@nasep@comma{%
+ \def\nameaddonpunct{\addcomma\addspace}}%
+\def\cms@opt@nasep@colon{%
+ \def\nameaddonpunct{\addcolon\addspace}}%
+\def\cms@opt@nasep@space{%
+ \def\nameaddonpunct{\addspace}}%
+\def\cms@opt@nasep@semicolon{%
+ \def\nameaddonpunct{\addsemicolon\addspace}}%
+\def\cms@opt@nasep@period{%
+ \def\nameaddonpunct{\addperiod\addspace}}%
+
% Controlling punctuation before titleaddon fields %
\DeclareBiblatexOption{global,type,entry}[string]{ptitleaddon}[period]{%
@@ -1078,7 +1291,7 @@
\def\cms@opt@ptao@semicolon{%
\def\ptitleaddonpunct{\addsemicolon\addspace}}%
\def\cms@opt@ptao@period{%
- \def\ptitleaddonpunct{\addperiod\addspace}}%
+ \def\ptitleaddonpunct{\newunitpunct}}%
\DeclareBiblatexOption{global,type,entry}[string]{ctitleaddon}[comma]{%
\ifcsdef{cms@opt@ctao@#1}%
@@ -1099,7 +1312,7 @@
\def\cms@opt@ctao@semicolon{%
\def\ctitleaddonpunct{\addsemicolon\addspace}}%
\def\cms@opt@ctao@period{%
- \def\ctitleaddonpunct{\addperiod\addspace}}%
+ \def\ctitleaddonpunct{\newunitpunct}}%
% Controlling punctuation before shorthand in notes %
@@ -1130,10 +1343,14 @@
\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,%
related,booklongxref,ptitleaddon,ctitleaddon,shorthandpunct,urlnotes,%
- legalnotes,supranotes,shortextrapunct,dashed}
+ legalnotes,supranotes,shortextrapunct,dashed,bibannotesep,citeannotesep,%
+ nameaddonsep=space}
\ExecuteBibliographyOptions[standard]{useeditor=false,usenamec=false}%
+\ExecuteBibliographyOptions[jurisdiction,legal,legislation]{%
+ shorthandintro=full}%
+
\iftoggle{cms@legalnotes}%
{\ExecuteBibliographyOptions[jurisdiction,legal,legislation]{skipbib}}%
{}%
@@ -1147,25 +1364,8 @@
\DeclareBibliographyOption{cmsdate}{}%
-\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}%
- }}%
- {}}
-
+\DeclareBiblatexOption{global}[boolean]{strict}[true]{%
+ \settoggle{cms@strict}{#1}}%
\protected\def\blx@newcunit{%
\iftoggle{blx@keepunit}%
@@ -1266,7 +1466,11 @@
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:save}%
\global\toggletrue{cms@noidem}}%
- {\iftoggle{cms@allshort}%
+ {\ifboolexpr{%
+ togl {cms@allshort}%
+ and
+ not togl {cms@noneshort}%
+ }%
{\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
\global\toggletrue{cms@printshhand}%
@@ -1537,6 +1741,8 @@
togl {cms@supranotes}%
and
test {\iffootnote}%
+ and
+ test {\ifciteseen}%
}%
{\newcunit%
\printtext{\bibstring{supranote}\addnbspace%
@@ -1563,6 +1769,14 @@
and
not test {\iffieldint{volume}}%
)
+ or
+ (
+ test {\iffieldundef{volume}}% Bug fix; correct?
+ and
+ test {\iffieldundef{series}}%
+ and
+ not test {\iffieldundef{titleaddon}}%
+ )
}%
{\ifboolexpr{%
test {\iffieldundef{entrysubtype}}%
@@ -1601,6 +1815,8 @@
and
test {\iffootnote}%
and
+ test {\ifciteseen}%
+ and
(
test {\iffieldequalstr{entrysubtype}{un}}%
or
@@ -1809,6 +2025,8 @@
and
togl {cms@supranotes}%
and
+ test {\ifciteseen}%
+ and
(
test {\ifentrytype{legal}}%
or
@@ -1824,23 +2042,33 @@
{\newcunit%
\printtext{\bibstring{supranote}\addnbspace%
\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
- \newcunit}}% ??
- {}}%
+ \iffieldundef{postnote}{}{\printunit{\addcomma\addspace}}}}% ??
+ {}}% The printunit is for when a shorthand is also an ibidem.
\newbibmacro*{cms:shorthandintro}{% For changing the citedas phrase
- \iffieldundef{shorthand}%
+ \ifboolexpr{%
+ test {\iffieldundef{shorthand}}%
+ or
+ togl {cms@noshintro}% option shorthandintro=none
+ or
+ togl {cms@noneshort}% mainly for Bluebook
+ }%
{}%
- {\iffieldundef{shorthandintro}%
+ {\iftoggle{cms@shandonly}% option shorthandintro=short
{\ifthenelse{\ifentrytype{jurisdiction}\OR\ifentrytype{legal}\OR%
\ifentrytype{legislation}}%
- {\printtext[brackets]{%
- \bibstring{hereinafter}\addspace%
- \printfield{shorthand}}}%
- {\printtext[parens]{%
- \bibstring{citedas}\addspace%
- \printfield{shorthand}}}}%
- {%\addspace%\setunit{\addspace}% Ditto
- \printfield{shorthandintro}}}}
+ {\printtext[brackets]{\printfield{shorthand}}}%
+ {\printtext[parens]{\printfield{shorthand}}}}%
+ {\iffieldundef{shorthandintro}%
+ {\ifthenelse{\ifentrytype{jurisdiction}\OR\ifentrytype{legal}\OR%
+ \ifentrytype{legislation}}%
+ {\printtext[brackets]{%
+ \bibstring{hereinafter}\addspace%
+ \printfield{shorthand}}}%
+ {\printtext[parens]{%
+ \bibstring{citedas}\addspace%
+ \printfield{shorthand}}}}%
+ {\printfield{shorthandintro}}}}}
\newbibmacro*{cite:ibid}{%
\ifthenelse{\ifentrytype{jurisdiction}\OR\ifentrytype{legal}\OR%
@@ -1988,7 +2216,7 @@
\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
{\setunit{\postvolpunct}}%
- {\setunit{\addcolon\addspace}}}}}}%
+ {\setunit{\journalpagespunct}}}}}}%
%% Macros from verbose.cbx %%
@@ -2166,21 +2394,18 @@
\ifhyperref%
{\hypertarget{cite.\the\c@refsection @\abx@field@entrykey}{}}%
{}%
- \nopunct%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\addspace}{\unspace}}%\unspace Put \nopunct and \unspace here for 0.8e.
+ \nopunct% Remove otherlang test for 3.16
+ }%\unspace Put \nopunct and \unspace here for 0.8e.
{\usedriver
{\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
\usebibmacro{clearpublin}\clearfield{shorthand}%
\usebibmacro{cms:titlehook}%
+ \global\toggletrue{cms@reprintfrom}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\toggletrue{cms@origpublished}\frenchspacing}%
{cite:\thefield{entrytype}}%
- \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}%
+ \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}%
+ \global\togglefalse{cms@reprintfrom}}%
{\multicitedelim}%
{\finentry}
@@ -2258,15 +2483,87 @@
\DeclareMultiCiteCommand{\surnamecites}{surnamecite}{\multicitedelim}
+\DeclareCitePunctuationPosition{\citeincitef}{d}
+
+\DeclareCitePunctuationPosition{\citeincitefs}{d}
+
+\DeclareMultiCiteCommand{\citeincites}[\cmswrap]%
+{citeincite}{\multicitedelim}
+
+\DeclareMultiCiteCommand{\citeincitefs}[\cmswrapf]%
+{citeincitef}{\multicitedelim}
+
+\DeclareMultiCiteCommand{\fullciteincites}[\cmsfwrap]%
+{fullciteincite}{\multicitedelim}
+
+\DeclareCiteCommand{\citeincite}[\cmswrap]
+{\usebibmacro{backref+check}%
+ \usebibmacro{prenote}}%
+{\toggletrue{cms@shortnote}%
+ \togglefalse{cms@fullnote}%
+ \toggletrue{cms@noidem}%
+ \usebibmacro{citeindex}%
+ \usebibmacro{cite:short}{\thefield{entrytype}}%
+ \usebibmacro{cite:save}}
+{\multicitedelim}
+{\usebibmacro{postnote}}%
+
+\DeclareCiteCommand{\citeincitef}[\cmswrapf]
+{\usebibmacro{backref+check}%
+ \usebibmacro{prenote}}%
+{\toggletrue{cms@shortnote}%
+ \togglefalse{cms@fullnote}%
+ \toggletrue{cms@noidem}%
+ \usebibmacro{citeindex}%
+ \usebibmacro{cite:short}{\thefield{entrytype}}%
+ \usebibmacro{cite:save}}
+{\multicitedelim}
+{\usebibmacro{postnote}}%
+
+\DeclareCiteCommand{\fullciteincite}[\cmsfwrap]
+{\usebibmacro{backref+check}%
+ \usebibmacro{prenote}}%
+{\usebibmacro{citeindex}%
+ \toggletrue{cms@fullnote}%
+ \togglefalse{cms@shortnote}%
+ \usebibmacro{footcite:save}%
+ \usebibmacro{cite:full}%
+ \usebibmacro{cite:save}}
+{\multicitedelim}
+{}
+
+\def\cmsfwrap#1{\clearfield{prenote}#1}%
+
+\def\cmswrap#1{%
+ \gundef{\cms@pncic}%
+ \savefield{postnote}{\cms@pncic}%
+ \clearfield{postnote}\clearfield{prenote}%
+ \begingroup#1\endgroup%
+ \ifdef{\blx@thepostpunct}%
+ {\ifdefvoid{\abx@field@postpunct}%
+ {\blx@dopostpunct}{}}%
+ {}%
+ \global\let\abx@field@postnote\cms@pncic%
+ \global\let\abx@field@postpunct\@empty}%
+
+\def\cmswrapf#1{%
+ \gundef{\cms@pncic}%
+ \savefield{postnote}{\cms@pncic}%
+ \clearfield{postnote}\clearfield{prenote}%
+ \begingroup#1\ifdef{\blx@thepostpunct}{\cms@cicpunct}{}\endgroup
+ \global\let\abx@field@postnote\cms@pncic}%
+
+\def\cms@cicpunct{}% Only needed in US; redefine in lbx
+
\DeclareCiteCommand{\shortcite}
- {\usebibmacro{prenote}}
+ {\usebibmacro{prenote}}%
{\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
\usebibmacro{citeindex}%
\usebibmacro{cite:short}{\thefield{entrytype}}%
\usebibmacro{cite:save}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{postnote}}%
\DeclareCiteCommand*{\shortcite}
{\boolfalse{citetracker}%
@@ -2576,6 +2873,7 @@
\DeclareBibliographyDriver{cite:article}{%
\iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{cmag+news+author}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{cmag+news+title}%
@@ -2620,6 +2918,7 @@
{}%
\usebibmacro{finentry}}%
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{cmag+news+title}%
@@ -2668,6 +2967,7 @@
\DeclareBibliographyDriver{cite:artwork}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
@@ -2720,6 +3020,7 @@
\DeclareBibliographyDriver{cite:audio}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{ctitle+stitle}%
@@ -2757,12 +3058,12 @@
\printfield{volume}%
\printfield{part}%
\setunit{\addspace}
- \bibstring{ofseries}%
- \setunit{\addspace}
- \printtext[maintitle]{%
- \printfield[mtnoformat]{maintitle}%
+ \bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}%
+ \printtext[default]{%
+ \printfield[title:hook:alt]{maintitle}%
\setunit{\subtitlepunct}%
- \printfield[smtnoformat]{mainsubtitle}}%
+ \printfield[title]{mainsubtitle}}%
\setunit{\ctitleaddonpunct}
\printfield{maintitleaddon}}}
\newcunit
@@ -2804,6 +3105,7 @@
\DeclareBibliographyDriver{cite:book}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{citaltitle+stitle}%
@@ -2938,6 +3240,7 @@
\DeclareBibliographyDriver{cite:bookinbook}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{citaltitle+stitle}%
@@ -3091,6 +3394,7 @@
\DeclareBibliographyDriver{cite:booklet}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
@@ -3124,6 +3428,7 @@
\DeclareBibliographyDriver{cite:collection}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -3237,15 +3542,21 @@
\DeclareBibliographyDriver{cite:customc}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{justauthor}%
- \iffieldundef{nameaddon}%
- {\newcunit}
+ \ifboolexpr{%
+ test {\iffieldundef{nameaddon}}%
+ or
+ togl {cms@citenona}%
+ }%
+ {\newcunit}%
{\setunit{\addspace}}%
\usebibmacro{italtitle+stitle}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:dataset}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\iftoggle{cms@headlessnote}{}{\setunit{\addspace}\newblock}%
\printtext[parens]{%
@@ -3319,6 +3630,7 @@
\DeclareBibliographyDriver{cite:image}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
@@ -3371,6 +3683,7 @@
\DeclareBibliographyDriver{cite:inbook}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{ctitle+stitle}%
@@ -3511,6 +3824,7 @@
\DeclareBibliographyDriver{cite:incollection}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock%
\usebibmacro{ctitle+stitle}%
@@ -3651,6 +3965,7 @@
\DeclareBibliographyDriver{cite:inproceedings}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{ctitle+stitle}%
@@ -3696,6 +4011,14 @@
\usebibmacro{cser+num}%
\newcunit\newblock
\usebibmacro{cnotefield}%
+ \newcunit\newblock
+ \printfield{eventtitle}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{eventtitleaddon}%
+ \newcunit%
+ \printfield{venue}%
+ \newcunit\newblock
+ \printeventdate%
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
@@ -3787,6 +4110,7 @@
\DeclareBibliographyDriver{cite:inreference}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\iffieldundef{clonesourcekey}{}{\newcunit}%
\usebibmacro{citaltitle+stitle}%
\newcunit\newblock
@@ -3847,6 +4171,7 @@
\DeclareBibliographyDriver{cite:jurisdiction}{%
\iffieldequalstr{entrysubtype}{square}% FIXME?
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{clegis+news+title}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -3908,6 +4233,7 @@
\usebibmacro{finentry}}
{\iffieldequalstr{entrysubtype}{round}% FIXME?
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{clegis+news+title}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -3968,6 +4294,7 @@
{}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{clegis+news+title}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -4038,6 +4365,7 @@
\DeclareBibliographyDriver{cite:legal}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{clegis+news+title}%
@@ -4107,6 +4435,7 @@
\DeclareBibliographyDriver{cite:legislation}{%
\iffieldequalstr{entrysubtype}{uk}% FIXME?
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{clegis+news+title}%
@@ -4174,6 +4503,7 @@
\usebibmacro{finentry}}
{\iffieldequalstr{entrysubtype}{hansard}% FIXME?
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{clegis+news+title}%
@@ -4234,6 +4564,7 @@
{}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{clegis+news+title}%
@@ -4310,6 +4641,7 @@
\DeclareBibliographyDriver{cite:letter}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\savefield{fullhash}{\bbx@lasthash}%
\printtext[title]{%
\printfield[noformat]{title}}%
@@ -4452,6 +4784,7 @@
\DeclareBibliographyDriver{cite:manual}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author+org}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -4495,6 +4828,7 @@
\DeclareBibliographyDriver{cite:misc}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\iffieldundef{entrysubtype}%
@@ -4556,6 +4890,7 @@
\DeclareBibliographyDriver{cite:music}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
@@ -4598,12 +4933,12 @@
\printfield{volume}%
\printfield{part}%
\setunit{\addspace}
- \bibstring{ofseries}%
- \setunit{\addspace}
- \printtext[maintitle]{%
- \printfield[mtnoformat]{maintitle}%
+ \bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}%
+ \printtext[default]{%
+ \printfield[title:hook:alt]{maintitle}%
\setunit{\subtitlepunct}%
- \printfield[smtnoformat]{mainsubtitle}}%
+ \printfield[title]{mainsubtitle}}%
\setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit
@@ -4657,6 +4992,7 @@
\DeclareBibliographyDriver{cite:mvbook}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{citaltitle+stitle}%
@@ -4797,6 +5133,7 @@
\DeclareBibliographyDriver{cite:mvcollection}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -4931,6 +5268,7 @@
\DeclareBibliographyDriver{cite:mvproceedings}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -4976,6 +5314,14 @@
{\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
\newcunit\newblock
\usebibmacro{cnotefield}%
+ \newcunit\newblock
+ \printfield{eventtitle}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{eventtitleaddon}%
+ \newcunit%
+ \printfield{venue}%
+ \newcunit\newblock
+ \printeventdate%
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
@@ -5062,6 +5408,7 @@
\DeclareBibliographyDriver{cite:mvreference}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{citaltitle+stitle}%
\newcunit\newblock
\iffieldundef{edition}%
@@ -5128,6 +5475,7 @@
\DeclareBibliographyDriver{cite:online}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\IfBeginWith{\thefield{title}}{CCCCCC}%
@@ -5204,6 +5552,7 @@
\DeclareBibliographyDriver{cite:patent}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author+holder}% +holder?
\usebibmacro{hlpunct}%\newcunit\newblock
\iffieldundef{title}%
@@ -5264,6 +5613,7 @@
\DeclareBibliographyDriver{cite:performance}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
@@ -5313,6 +5663,7 @@
\DeclareBibliographyDriver{cite:periodical}{%
\iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{issuetitle}%
@@ -5349,6 +5700,7 @@
{}%
\usebibmacro{finentry}}%
{\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{issuetitle}%
@@ -5391,6 +5743,7 @@
\DeclareBibliographyDriver{cite:proceedings}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -5422,6 +5775,14 @@
\usebibmacro{cser+num}%
\newcunit\newblock
\usebibmacro{cnotefield}%
+ \newcunit\newblock
+ \printfield{eventtitle}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{eventtitleaddon}%
+ \newcunit%
+ \printfield{venue}%
+ \newcunit\newblock
+ \printeventdate%
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
@@ -5501,6 +5862,7 @@
\DeclareBibliographyDriver{cite:reference}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\iffieldundef{clonesourcekey}{}{\newcunit}%
\usebibmacro{citaltitle+stitle}%
\newcunit\newblock
@@ -5553,6 +5915,7 @@
\DeclareBibliographyDriver{cite:report}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\iffieldequalstr{entrysubtype}{unpublished}%
@@ -5600,6 +5963,7 @@
\DeclareBibliographyDriver{cite:review}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{cmag+news+author}}%
{\usebibmacro{author/editor}}%
@@ -5707,12 +6071,14 @@
\DeclareBibliographyDriver{cite:standard}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\iffieldundef{entrysubtype}%
{}%
{\ifnameundef{author}%
{\iflistundef{organization}%
{}%
- {\printlist{organization}}}%
+ {\printlist{organization}%
+ \usebibmacro{print+nameaddon}}}%
{\usebibmacro{justauthor}}%
\usebibmacro{hlpunct}}%\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
@@ -5782,6 +6148,7 @@
\DeclareBibliographyDriver{cite:suppbook}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author}%
\usebibmacro{hlpunct}%\newcunit\newblock
\usebibmacro{inforaft}%
@@ -5845,6 +6212,7 @@
\DeclareBibliographyDriver{cite:thesis}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{ctitle+stitle}%
@@ -5880,6 +6248,7 @@
\DeclareBibliographyDriver{cite:unpublished}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\usebibmacro{author/editor}%
\usebibmacro{hlpunct}%\setunit{\addcomma\addspace}\newblock
\usebibmacro{ctitle+stitle}%
@@ -5929,6 +6298,7 @@
\DeclareBibliographyDriver{cite:video}{%
\usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
\ifboolexpr{%
test {\iffieldequalstr{entrysubtype}{tvepisode}}%
and
@@ -5984,12 +6354,12 @@
\printfield{volume}%
\printfield{part}%
\setunit{\addspace}
- \bibstring{ofseries}%
- \setunit{\addspace}
- \printtext[maintitle]{%
- \printfield[mtnoformat]{maintitle}%
+ \bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}%
+ \printtext[default]{%
+ \printfield[title:hook:alt]{maintitle}%
\setunit{\subtitlepunct}%
- \printfield[smtnoformat]{mainsubtitle}}%
+ \printfield[title]{mainsubtitle}}%
\setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit
@@ -6158,29 +6528,29 @@
%% comprange code moved to .sty
\DeclareFieldFormat{postnote}{% Changed for page compression option
- \ifboolexpr{%
- togl {cms@comprange}%
- and
- test {\ifpages{#1}}%
- }%
- {\iffieldundef{pagination}%
- {\mkcomprange{#1}}%
- {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}%
+ \ifpages{#1}% xetex and luatex revealed a bug in original logic
+ {\iftoggle{cms@comprange}%
+ {{\iffieldundef{pagination}%
+ {\mkcomprange{#1}}%
+ {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}}%
+ {{\iffieldundef{pagination}%
+ {\mknormrange{#1}}%
+ {\mknormrange[{\mkpageprefix[pagination]}]{#1}}}}}%
{\iffieldundef{pagination}%
{#1}%
{\mkpageprefix[pagination]{#1}}}}%
\DeclareFieldFormat[inreference]{postnote}{%
- \ifboolexpr{%
- togl {cms@comprange}%
- and
- test {\ifpages{#1}}%
- }%
- {\iffieldundef{pagination}%
- {\bibsstring{subverbo}\addspace\mkbibquote{#1}}%
- {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}%
+ \ifpages{#1}%
+ {\iftoggle{cms@comprange}%
+ {\iffieldundef{pagination}%
+ {\bibsstring{subverbo}\addnbspace\mkbibquote{#1}}%
+ {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}%
+ {\iffieldundef{pagination}%
+ {\bibsstring{subverbo}\addnbspace\mkbibquote{#1}}%
+ {\mknormrange[{\mkpageprefix[pagination]}]{#1}}}}%
{\iffieldundef{pagination}%
- {\bibsstring{subverbo}\addspace\mkbibquote{#1}}%
+ {\bibsstring{subverbo}\addnbspace\mkbibquote{#1}}%
{\mkpageprefix[pagination]{#1}}}}%
\newrobustcmd*{\mkjuridprefix}[1]{%
@@ -6251,20 +6621,47 @@
\mkbibemph{#1}\isdot}
\DeclareFieldFormat[customc]{title}{%
- \iffieldundef{nameaddon}%
+ \ifboolexpr{%
+ test {\iffieldundef{nameaddon}}%
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibnona}%
+ )
+ or
+ (
+ test {\ifcitation}%
+ and
+ togl {cms@citenona}%
+ )
+ }%
{\mkbibemph{\bibstring{see}}%
\addspace%
#1}%
{#1}}
\DeclareFieldFormat[customc]{citetitle}{%
- \iffieldundef{nameaddon}%
+ \ifboolexpr{%
+ test {\iffieldundef{nameaddon}}%
+ or
+ togl {cms@citenona}%
+ }%
{\mkbibemph{\bibstring{see}}%
\addspace%
#1}%
{\printfield{nameaddon}\addspace #1}}
-\DeclareFieldAlias[customc]{lostitle}[customc]{title}
+\DeclareFieldFormat[customc]{lostitle}{%
+ \ifboolexpr{%
+ test {\iffieldundef{nameaddon}}%
+ or
+ togl {cms@bibnona}%
+ }%
+ {\mkbibemph{\bibstring{see}}%
+ \addspace%
+ #1}%
+ {\addspace #1}}
\DeclareFieldFormat[misc]{title}{%
\iffieldundef{entrysubtype}%
@@ -6288,6 +6685,7 @@
\mkbibparens{\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}}
\DeclareFieldFormat[dataset]{lostitle}{%
+ \addspace% Instead of in shorthand driver (2.1)
\mkbibparens{\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}}
\DeclareFieldFormat[review,suppperiodical]{title}{%
@@ -6387,7 +6785,10 @@
\DeclareFieldFormat{letterday}{\mkbibcurdinal{#1}}
\DeclareFieldFormat{note}{%
- \ifcapital{\MakeCapital{#1}}{#1}}%
+ \if@cms@capital{#1}{\MakeCapital{#1}}{#1}}%
+
+\DeclareFieldFormat{capital}{%
+ \ifcapital{\MakeCapital{#1}}{#1}}
\DeclareFieldFormat
[audio,manual,music,patent,report,suppbook,suppcollection,thesis,video]
@@ -6502,14 +6903,34 @@
\DeclareFieldAlias{userd}{titleaddon}% 16th ed.
-\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?!
+\DeclareFieldFormat{nameaddon}{%
+ \ifdefvoid{\cms@naformat}%
+ {\mkbibbrackets{#1\bibsentence}}%
+ {\printtext[\cms@naformat]{#1\isdot}}}%
-\DeclareFieldFormat[online,review,suppperiodical]{nameaddon}{#1\bibsentence}
+\DeclareFieldFormat[online,review,suppperiodical]{nameaddon}{%
+ \ifdefvoid{\cms@naformat}%
+ {#1\ifboolexpr{%(
+ test {\IfEndWith{\thefield{nameaddon}}{)}}%[
+ or
+ test {\IfEndWith{\thefield{nameaddon}}{]}}%
+ }%
+ {\bibsentence}{\isdot}}%
+ {\printtext[\cms@naformat]{#1\isdot}}}
\DeclareFieldFormat[misc]{nameaddon}{%
\iffieldundef{entrysubtype}%
- {\mkbibbrackets{#1\bibsentence}}%
- {#1\bibsentence}}
+ {\ifdefvoid{\cms@naformat}%
+ {\mkbibbrackets{#1\bibsentence}}%
+ {\printtext[\cms@naformat]{#1\isdot}}}%
+ {\ifdefvoid{\cms@naformat}%
+ {#1\ifboolexpr{%(
+ test {\IfEndWith{\thefield{nameaddon}}{)}}%[
+ or
+ test {\IfEndWith{\thefield{nameaddon}}{]}}%
+ }%
+ {\bibsentence}{\isdot}}%
+ {\printtext[\cms@naformat]{#1\isdot}}}}
\DeclareFieldFormat[customc]{nameaddon}{% For cross-refs
\ifbibstring{#1}%
@@ -6544,7 +6965,7 @@
\DeclareFieldFormat{usere}{[#1]} % Better than mkbibbrackets?
\DeclareFieldFormat{titleaddon}{%
- \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}%
+ \if@cms@capital{#1}{\MakeCapital{#1\isdot}}{#1\isdot}}%
\DeclareFieldAlias{booktitleaddon}{titleaddon}
@@ -6559,10 +6980,14 @@
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat{injournaltitle}{\mkbibemph{#1}\isdot}
+
\DeclareFieldFormat{issuetitle}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat{shortjournal}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat{inshortjournal}{\mkbibemph{#1}\isdot}
+
\DeclareFieldFormat[periodical]{shorttitle}{\mkbibemph{#1}\isdot}
\DeclareFieldFormat{jourser}{%
@@ -6608,6 +7033,8 @@
\DeclareFieldFormat{jourvol}{#1}
+\DeclareFieldFormat{shortvol}{#1}
+
\DeclareFieldFormat{sernum}{%
\ifnumeral{#1}%
{\addnbspace #1}%
@@ -6618,15 +7045,38 @@
\DeclareFieldFormat{shortseries}{#1\isdot}
\DeclareFieldFormat{addendum}{%
- \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}
+ \if@cms@capital{#1}{\MakeCapital{#1\isdot}}{#1\isdot}}
\DeclareFieldFormat[jurisdiction,legal,legislation]{addendum}{%
\ifcapital{\mkbibparens{\MakeCapital{#1\isdot}}}{\mkbibparens{#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.
+% There was unfortunate interaction between the case-changing code and
+% cite commands when the latter were at the beginning of the
+% field. This modified \ifcapital will be used in the fields in which
+% the \citeincite(s) commands can appear.
+
+\newrobustcmd*{\if@cms@capital}[1]{%
+ \noexpandarg
+ \StrChar{#1}{1}[\cms@char]%
+ \ifboolexpr{%
+ test {\ifcapital}%
+ and
+ not test {\ifdefstring{\cms@char}{\citeincite}}%
+ and
+ not test {\ifdefstring{\cms@char}{\citeincitef}}%
+ and
+ not test {\ifdefstring{\cms@char}{\citeincites}}%
+ and
+ not test {\ifdefstring{\cms@char}{\citeincitefs}}%
+ }%
+ {\@firstoftwo}%
+ {\@secondoftwo}%
+}
-\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1}
+% For annotation fixes move all code for separators to the entrytail
+% macro, below.
+
+\DeclareFieldFormat{annotation}{#1}%
\DeclareFieldFormat{part}{% xref revision ???
\ifnumerals{#1}%
@@ -6723,10 +7173,14 @@
not togl {blx@skipbib}%
}%
{\printtext[bibhyperref]{#1}}%
- {#1}}%
+ {\ifentryinbib{\thefield{clonesourcekey}}%
+ {\printtext{\bibhyperref[\abx@field@clonesourcekey]{#1}}}%
+ {#1}}}%
{\iftoggle{cms@allshort}%
{\iftoggle{blx@skipbib}{#1}{\printtext[bibhyperref]{#1}}}%
- {\printtext[bibhyperlink]{#1}}}}%
+ {\iffieldundef{clonesourcekey}%
+ {\printtext[bibhyperlink]{#1}}%
+ {\printtext{\bibhyperlink{\abx@field@clonesourcekey}{#1}}}}}}%
\newrobustcmd*{\cmsshhyper}[1]{%
\iffootnote%
@@ -6765,7 +7219,7 @@
{#1}}%
\ifentrytype{jurisdiction}%
{\newcunit}%
- {\printunit{\relatedpunct}}}% Issue w/ printunit. Our bug?
+ {\iftoggle{smartof}{}{\printunit{\relatedpunct}}}}% Issue w/ printunit.
\DeclareFieldFormat{relatedstring:reprintfrom}{% For notes + bib
\ifboolexpr{%
@@ -6776,8 +7230,7 @@
{#1}%
{\ifcapital%
{\MakeCapital{#1}}%
- {#1}}%
- \addspace}%
+ {#1}}}%
%%%% Commands, for users and internal %%%%
@@ -6815,7 +7268,7 @@
\newcommand*{\reprintpunct}{%
\iftoggle{cms@fullnote}%
{\setunit*{\addsemicolon\addspace}}%
- {\setunit*{\addperiod\addspace}}}
+ {\setunit*{\newunitpunct}}}
\newcommand*{\encypunct}{% for named entries in an encyclopedia
\iftoggle{cms@fullnote}%
@@ -6931,7 +7384,9 @@
{\addcomma\addspace}%
{\addcomma\addspace\bibstring{and}\addspace}}}%
-\renewcommand*{\postnotedelim}{%
+\newcommand*{\journalpagespunct}{\addcolon\space}% Make it configurable
+
+\renewcommand*{\postnotedelim}{% v 2.1: Made all punct use units
\ifboolexpr{%
test {\ifciteibid}%
and
@@ -6943,40 +7398,59 @@
test {\ifentrytype{legislation}}%
)
}%
- {\addspace}%
+ {\setunit{\addspace}}%
{\iftoggle{cms@shortnote}%
{\iffieldequalstr{entrysubtype}{classical}%
{\DeclareNumChars*{abcdeABCDE:}% Makes classical
\iffieldpages{postnote}% test more accurate. See 17.253.
- {\addspace}%
- {\addcomma\addspace}\DeclareNumChars{.}}%
- {\addcomma\addspace}}% 16th ed -- no more volumes test.
+ {\setunit{\addspace}}%
+ {\newcunit}\DeclareNumChars{.}}%
+ {\newcunit}}% 16th ed -- no more volumes test.
{\iftoggle{cms@fullnote}%
{\ifthenelse{\(\ifentrytype{article}\OR
\ifentrytype{review}\OR
\ifentrytype{periodical}\OR
\ifentrytype{suppperiodical}\)\AND\NOT
\iffieldequalstr{entrysubtype}{magazine}}%
- {\addcolon\addspace}%
- {\addcomma\addspace}}%
- {\addcomma\addspace}}}}%
+ {\setunit{\journalpagespunct}}%
+ {\newcunit}}%
+ {\newcunit}}}}%
\newcommand*{\postnotewrapper}{%
- \iftoggle{cms@modpostnote}%
+ \iftoggle{cms@modpostnote}% Multiple bugs in v 2.0.
{\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}}}%
+ {\togglefalse{blx@unit}%
+ \expandarg
+ \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]%
+ \iffieldstart{postnote}{\ }%
+ {\setunit{\addcomma}}%
+ {\newcunit}}%
+ {\iffieldstart{postnote}{;}%
+ {\togglefalse{blx@unit}%
+ \expandarg
+ \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]%
+ \iffieldstart{postnote}{\ }%
+ {\setunit{\addsemicolon}}%
+ {\setunit{\addsemicolon\addspace}}}%
+ {\iffieldstart{postnote}{:}%
+ {\togglefalse{blx@unit}%
+ \expandarg
+ \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]%
+ \iffieldstart{postnote}{\ }%
+ {\setunit{\addcolon}}%
+ {\setunit{\addcolon\addspace}}}%
+ {\iffieldstart{postnote}{.}%
+ {\togglefalse{blx@unit}%
+ \expandarg
+ \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]%
+ \iffieldstart{postnote}{\ }%
+ {\setunit{\addperiod}}%
+ {\newunit}}%
+ {\postnotedelim}}}}}%
{\postnotedelim}}%
\newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from
@@ -7077,7 +7551,11 @@
\newbibmacro*{finentry}{%{\finentry} To make annotated bibliography
\togglefalse{cms@switchdates}%
- \ifbibliography
+ \ifboolexpr{%
+ togl {cms@annotation}%
+ or
+ togl {cms@cbxannote}%
+ }%
{\usebibmacro{entrytail}}%
{}%
\finentry}
@@ -7154,11 +7632,30 @@
{}}%
\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography
- \newunit\newblock
- \iftoggle{cms@annotation}%
- {\usebibmacro{annotation}%
- \newunit\newblock}%
- {}}%
+ \ifbibliography%
+ {\iftoggle{cms@annotation}%
+ {\togglefalse{blx@unit}%
+ \togglefalse{blx@keepunit}%
+ \setunit{\bibannotesep}%
+ \usebibmacro{annotation}%
+ \newunit\newblock}%
+ {\newunit}}%
+ {\iftoggle{cms@cbxannote}%
+ {\togglefalse{blx@unit}%
+ \togglefalse{blx@keepunit}%
+ \setunit{\citeannotesep}%
+ \usebibmacro{annotation}%
+ \newunit\newblock}%
+ {\newunit}}}%
+
+% From biblatex.def; biblatex 3.15 toggled blx@bibliography off here,
+% but we still need to be able to test it in Chicago, at least with
+% the current code, so redefine the macro.
+
+\renewbibmacro*{annotation}{%
+ \iffieldundef{annotation}%
+ {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}}
\newbibmacro*{author+holder}{%
\ifnameundef{author}%
@@ -7182,7 +7679,7 @@
{\bibstring{byauthor}\addspace%
\printnames[byauthor]{author}}}}
-\newbibmacro*{byauthorpunct}{%
+\newbibmacro*{byauthorpunct}{% Obsolete?
\ifthenelse{\ifuseauthor\OR\ifnameundef{author}}%
{\addperiod\addspace}%
{\newcunit}}
@@ -7254,7 +7751,7 @@
togl {cms@namedash}%
}%
{\printtext{\bibnamedash}}%
- {\usebibmacro{journal+sub}%
+ {\usebibmacro{journal+sub}{}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\savefield{journaltitle}{\bbx@lasthash}}}%
@@ -7346,14 +7843,14 @@
{\bibstring{by#2}}%
{\ifbibxstring{by\thefield{#1type}}%
{\bibstring{by\thefield{#1type}}}%
- {\printtext[note]{\thefield{#1type}}}}}%
+ {\printtext[capital]{\thefield{#1type}}}}}%
\newbibmacro*{cbytypestrg}[2]{%
\iffieldundef{#1type}%
{\bibstring{cby#2}}%
{\ifbibxstring{cby\thefield{#1type}}%
{\bibstring{cby\thefield{#1type}}}%
- {\printtext[note]{\thefield{#1type}}}}}%
+ {\printtext[capital]{\thefield{#1type}}}}}%
\newbibmacro*{cbyeditor}{%
\ifnameundef{editor}%
@@ -7618,7 +8115,9 @@
and
not test {\IfBeginWith{\thefield{relatedtype}}{maintitl}}%
}%
- {\printfield{volume}%
+ {\DeclareFieldAlias{citetitle}{title:hook:alt}%
+ \DeclareFieldAlias{shorthand}{shorthand:hook}%
+ \printfield{volume}%
\clearfield{volume}%
\global\let\cbx@incollvol\undefined% Volume fix
\printfield{part}%
@@ -7626,7 +8125,7 @@
\global\let\cbx@incollpart\undefined% Volume fix
\setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}}%
{\bibstring{in}\setunit{\addspace}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
@@ -7637,13 +8136,17 @@
test {\IfBeginWith{\thefield{entrytype}}{mv}}%
and
not test {\IfBeginWith{\thefield{relatedtype}}{maintitl}}%
+ and
+ togl {cms@xrefpart}%
}%
- {\printfield[xrefpart]{part}%
+ {\DeclareFieldAlias{citetitle}{title:hook:alt}%
+ \DeclareFieldAlias{shorthand}{shorthand:hook}%
+ \printfield[xrefpart]{part}%
\clearfield{part}%
\global\let\cbx@incollpart\undefined% Volume fix
\setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}}%
{\bibstring{in}\setunit{\addspace}}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
@@ -7652,7 +8155,9 @@
{}%
\ifthenelse{\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR%
\ifentrytype{mvproceedings}\OR\ifentrytype{mvreference}}%
- {\printfield{volume}%
+ {\DeclareFieldAlias{citetitle}{title:hook:alt}%
+ \DeclareFieldAlias{shorthand}{shorthand:hook}%
+ \printfield{volume}%
\clearfield{volume}%
\global\let\cbx@incollvol\undefined% Volume fix
\printfield{part}%
@@ -7660,7 +8165,7 @@
\global\let\cbx@incollpart\undefined% Volume fix
\setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}}%
{\bibstring{in}\setunit{\addspace}}}}%
\newbibmacro*{chapincoll}{%
@@ -7691,7 +8196,13 @@
{\printfield{chapter}\clearfield{chapter}%
\iffieldundef{booktitle}%
{}%
- {\addspace\bibstring{of}\setunit{\addspace}}}}%
+ {\iftoggle{cms@reprintfrom}%
+ {\DeclareFieldAlias{btnoformat}{title:hook}}%
+ {\DeclareFieldAlias{btnoformat}{title:hook:alt}}%
+ \DeclareFieldAlias{sbtnoformat}{title}%
+ \DeclareFieldAlias{booktitle}{default}%
+ \addspace\bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}}}}%
\newbibmacro*{chap+as+track}{%
\iffieldundef{chapter}%
@@ -7705,7 +8216,7 @@
{\printfield{chapter}\clearfield{chapter}%
\iffieldundef{booktitle}%
{}%
- {\addspace\bibstring{on}\setunit{\addspace}}}}%
+ {\addspace\bibstring[\cms@ofwrap]{on}\setunit{\addspace}}}}%
\newbibmacro*{caddendum}{% New macros for 16th ed. field exclusion
\ifboolexpr{%
@@ -7878,8 +8389,10 @@
{}%
\printtext[issuetitle]{%
\printfield[itnoformat]{issuetitle}%
- \setunit{\subtitlepunct}%
- \printfield[sitnoformat]{issuesubtitle}}}}
+ \iftoggle{cms@reprintfrom}% Complications due to \smartof
+ {}%
+ {\setunit{\subtitlepunct}%
+ \printfield[sitnoformat]{issuesubtitle}}}}}
\newbibmacro*{btitle+bstitle}{%
\iffieldundef{booktitle}%
@@ -8079,7 +8592,7 @@
{\bibstring{origedition}%
\setunit{\addspace}%
\printlist[edlang]{origlanguage}%
- \addcolon%
+ \addcolon\addspace%
\origfullcite{\thefield{userf}}%
\usebibmacro{endrelated}%
\newunit}%
@@ -8128,7 +8641,7 @@
{\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}\AND\iffieldundef{eid}}%
{\setunit{\postvolpunct}}%
- {\setunit{\addcolon\addspace}}}%
+ {\setunit{\journalpagespunct}}}%
{\addcomma\addspace}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
@@ -8310,7 +8823,7 @@
{\printorigdate}}}%
\newbibmacro*{cjournal+ser+vol+num}{%
- \usebibmacro{journal+sub}%
+ \usebibmacro{journal+sub}{in}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\setunit*{\addspace}%
@@ -8357,7 +8870,7 @@
\setunit{\addcomma\addspace}% need * here?
\printfield[journum]{number}}% Move eid field for 17th ed.
-\newbibmacro*{journal+sub}{%
+\newbibmacro*{journal+sub}[1]{%
\iffieldundef{journaltitle}%
{}%
{\ifboolexpr{%
@@ -8375,9 +8888,9 @@
togl {cms@bibjtabb}%
))
}%
- {\clearlist{location}\printtext[shortjournal]{%
+ {\clearlist{location}\printtext[#1shortjournal]{%
\printfield[jtsnoformat]{shortjournal}}}%
- {\printtext[journaltitle]{%
+ {\printtext[#1journaltitle]{%
\printfield[jtnoformat]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[sjtnoformat]{journalsubtitle}}}}}%
@@ -8467,7 +8980,7 @@
\usebibmacro{cmsyear}}}
\newbibmacro*{cmag+date+issue}{%
- \usebibmacro{journal+sub}%
+ \usebibmacro{journal+sub}{in}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\newcunit\newblock
@@ -8485,7 +8998,7 @@
\usebibmacro{date+issue}}
\newbibmacro*{mag+date+issue}{%
- \usebibmacro{journal+sub}%
+ \usebibmacro{journal+sub}{in}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\newunit\newblock
@@ -8540,6 +9053,8 @@
\newcunit\newblock
\usebibmacro{date+issue}}
+\def\cms@ofwrap#1{#1}
+
\newbibmacro*{cmtitle+mstitle+vol+part+title+stitle}{%
\iffieldundef{maintitle}%
{}%
@@ -8557,12 +9072,12 @@
\printfield{volume}%
\printfield{part}%
\setunit{\addspace}%
- \bibstring{ofseries}%
- \setunit{\addspace}%
- \printtext[maintitle]{%
- \printfield[mtnoformat]{maintitle}%
+ \bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}%
+ \printtext[default]{%
+ \printfield[title:hook:alt]{maintitle}%
\setunit{\subtitlepunct}%
- \printfield[smtnoformat]{mainsubtitle}}%
+ \printfield[title]{mainsubtitle}}%
\setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
@@ -8587,12 +9102,12 @@
\printfield{volume}%
\printfield{part}%
\setunit{\addspace}%
- \bibstring{ofseries}%
- \setunit{\addspace}%
- \printtext[maintitle]{%
- \printfield[mtnoformat]{maintitle}%
+ \bibstring[\cms@ofwrap]{ofseries}%
+ \iftoggle{smartof}{}{\setunit{\addspace}}%
+ \printtext[default]{%
+ \printfield[title:hook:alt]{maintitle}%
\setunit{\subtitlepunct}%
- \printfield[smtnoformat]{mainsubtitle}}%
+ \printfield[title]{mainsubtitle}}%
\setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
@@ -8747,7 +9262,7 @@
{\iffieldundef{part}%
{\ifthenelse{\iffieldnums{pages}\AND%
\iffieldundef{bookpagination}\AND\iffieldnums{volume}}%
- {\newcunit\printfield[default]{volume}%
+ {\newcunit\printfield[shortvol]{volume}%
\postvolpunct%
\printfield{pages}}%
{\newcunit\printfield{volume}%
@@ -8764,7 +9279,7 @@
{\iffieldundef{part}%
{\ifthenelse{\iffieldnums{postnote}\AND%
\iffieldundef{pagination}\AND\iffieldnums{volume}}%
- {\newcunit\printfield[default]{volume}%
+ {\newcunit\printfield[shortvol]{volume}%
\postvolpunct%
\usebibmacro{semel:postnote}}%
{\newcunit\printfield{volume}%
@@ -8925,7 +9440,7 @@
\iffieldundef{part}%
{\ifthenelse{\iffieldnums{pages}\AND%
\iffieldundef{bookpagination}\AND\iffieldnums{volume}}%
- {\newcunit\printfield[default]{volume}%
+ {\newcunit\printfield[shortvol]{volume}%
\postvolpunct%
\printfield{pages}}%
{\newcunit\printfield{volume}%
@@ -8940,7 +9455,7 @@
\iffieldundef{part}%
{\ifthenelse{\iffieldnums{postnote}\AND%
\iffieldundef{pagination}\AND\iffieldnums{volume}}%
- {\newcunit\printfield[default]{volume}%
+ {\newcunit\printfield[shortvol]{volume}%
\postvolpunct%
\usebibmacro{semel:postnote}}%
{\newcunit\printfield{volume}%
@@ -9003,7 +9518,7 @@
\newbibmacro*{hlpunct}{%
\iftoggle{cms@headlessnote}%
- {}%
+ {\iftoggle{cms@reprintfrom}{\setunit{\addspace}}{}}%
{\newcunit\newblock}}
\newbibmacro*{journalprenote}{%
@@ -9115,6 +9630,11 @@
}
\AtEndPreamble{%
+ \iftoggle{cms@inheritshhand}%
+ {\DeclareDataInheritance{*}{*}{%
+ \inherit{shorthand}{shorthand}
+ \inherit{shorthandintro}{shorthandintro}
+ }}{}%
\iftoggle{cms@blogurl}% 17th ed. blogs w/ comments
{\DeclareDataInheritance{article}{review,suppperiodical}{%
\inherit{url}{url}%
@@ -9125,6 +9645,29 @@
{\toggletrue{cms@endnote}\enoteformat}
{}
{\blx@err@patch{'endnotes' package}}}%
+ {}%
+ \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}%
+ }}%
+ {}%
+ \ifboolexpr{% Needed for nameaddon 'first' option in notes
+ test {\ifdefvoid{\blx@idemtracker}}%
+ and
+ togl {cms@subseqnona}%
+ }%
+ {\let\blx@idemtracker\blx@idemtracker@context}%
{}}%
\DeclareDataInheritance{*}{*}{%
@@ -9276,7 +9819,7 @@
{\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}%
{\bibstring{\thefield{editortype}s}}%
{\bibstring{\thefield{editortype}}}}%
- {\printtext[note]{\thefield{editortype}}}}%
+ {\printtext[capital]{\thefield{editortype}}}}%
\clearname{editor}}%
\newbibmacro*{parteditstrg}{%
@@ -9311,7 +9854,7 @@
{\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}%
{\bibstring{\thefield{nameatype}s}}%
{\bibstring{\thefield{nameatype}}}}%
- {\printtext[note]{\thefield{nameatype}}}}%
+ {\printtext[capital]{\thefield{nameatype}}}}%
\clearname{namea}}%
\newbibmacro*{clearorigin}{%
@@ -9361,7 +9904,7 @@
\clearfield{titleaddon}%
\clearfield{usere}%
\clearlist{language}%
- \ifentrytype{music}%
+ \ifthenelse{\ifentrytype{music}\OR\ifentrytype{audio}}%
{\clearfield{note}\clearfield{howpublished}\clearfield{eventyear}%
\clearfield{eventmonth}}%
{}}%
@@ -9396,6 +9939,11 @@
{\newcunitpunct}%
{\newunitpunct}}}
+\newcommand*{\relateddelimshort}{%
+ \ifnumequal{\value{bbx:relatedcount}}{\value{bbx:relatedtotal}}%
+ {\addsemicolon\addspace\bibstring{and}\space}%
+ {\addsemicolon\addspace}}%
+
\newbibmacro*{related:reviewof}[1]{%
\iftoggle{cms@shortnote}%
{\entrydata*{#1}{%
@@ -9555,13 +10103,13 @@
\usebibmacro{at+every+item}%
\renewbibmacro*{name:hook}[1]{%
\ifnumequal{\value{listcount}}{1}%
- {\begingroup
- \mkrelatedstring%
- \lbx@initnamehook{#1}%
- \endgroup}
- {}}%
+ {\begingroup
+ \mkrelatedstringtext{%
+ \lbx@initnamehook{##1}}%
+ \endgroup}%
+ {}}%
\printnames[bytranslator]{translator}%
- \setunit*{\addspace\bibstring[\mkrelatedstring]{astitle}\addspace}%
+ \setunit*{\addspace\bibstring[\mkrelatedstringtext]{astitle}\addspace}%
\clearname{translator}%
\usebibmacro{cite:origfull}}}%
@@ -9595,7 +10143,9 @@
\ifthenelse{\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR%
\ifentrytype{mvproceedings}\OR\ifentrytype{mvreference}}%
{\iffieldundef{volumes}{}{\savefield*{volumes}{\cms@mtvolumes}}%
- \bibstring{in}\nopunct}%
+ \iftoggle{cms@reprintfrom}%
+ {}%
+ {\bibstring{in}\nopunct}}%
{\ifcsdef{cms@mtvolumes}{\restorefield{savedvolumes}{\cms@mtvolumes}}{}%
\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\ifthenelse{\iffieldundef{volumes}\AND\iffieldundef{savedvolumes}}%
@@ -9637,8 +10187,12 @@
\ifcsequal{cms@mtnamec}{cms@mtsecnamec}%
{\clearname{namec}}%
{}}%
- {}}%
- \ifbibliography%
+ {}\iftoggle{cms@reprintfrom}{\newcunit}{}}%
+ \ifboolexpr{%
+ test {\ifbibliography}%
+ and
+ not togl {cms@reprintfrom}%
+ }%
{\printtext[cmsdefrelhypertarget]{%
\usedriver%
{\ifnameundef{savedauthor}%
@@ -9804,102 +10358,91 @@
}%
{}%
{\midsentence% Why is this kludge necessary?
- \setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}%
+ \setunit{\addspace\bibstring[\mkrelatedstringtext]{bypublisher}\space}%
\printlist{publisher}%
\setunit{\addcomma\space}%
\iflistsequal{location}{savedlocation}%
{}%
{\printlist{location}}}}}
+\newbibmacro*{related:short}[1]{% For cross-refs in bib.
+ \entrydata*{#1}{%
+ \toggletrue{cms@noidem}%
+ \togglefalse{cms@fullnote}%
+ \toggletrue{cms@shortnote}%
+ \usebibmacro{cite:short}{\thefield{entrytype}}}}%
+
\DeclareFieldFormat{title:hook}{%
\begingroup
- \mkrelatedstring%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\unspace}{}%
- \ifdefstring{\blx@main@language}{french}%
- {}%
- {\iftoggle{smartof}%
- {\let\lbx@inittitlehook\lbx@fr@smartof}%
- {}}%
- \lbx@inittitlehook{#1}%
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{#1}}%
\endgroup
\mkbibemph{#1}}
+\DeclareFieldFormat{title:hook:alt}{%
+ \iftoggle{cms@reprintmt}%
+ {\begingroup
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{#1}}%
+ \endgroup}%
+ {\lbx@inittitlehook{#1}}% Inside entries don't use main doc. lang.
+ \mkbibemph{#1}}
+
\DeclareFieldFormat{ititle:hook}{%
\begingroup
- \mkrelatedstring%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\unspace}{}%
- \ifdefstring{\blx@main@language}{french}%
- {}%
- {\iftoggle{smartof}%
- {\let\lbx@inittitlehook\lbx@fr@smartof}%
- {}}%
- \lbx@inittitlehook{#1}%
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{#1}}%
\endgroup
- \mkbibquote{#1}}
+ \iffieldundef{issuesubtitle}%
+ {\mkbibquote{#1}}%
+ {\mkbibquote{#1\subtitlepunct\printfield{issuesubtitle}}}}
\DeclareFieldFormat{chapter:hook}{%
\begingroup
- \mkrelatedstring%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\unspace}{}%
- \ifdefstring{\blx@main@language}{french}%
- {}%
- {\iftoggle{smartof}%
- {\let\lbx@inittitlehook\lbx@fr@smartof}%
- {}}%
- \lbx@inittitlehook{\bibstring{chapter}}%
- \endgroup
- \bibstring{chapter}~#1\addspace\bibstring{in}}%
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{\bibxstring{chapter}}%
+ \bibstring{chapter}~#1\addspace\bibstring{in}}%
+ \endgroup}%
\DeclareFieldFormat{avchapter:hook}{%
\begingroup
- \mkrelatedstring%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\unspace}{}%
- \ifdefstring{\blx@main@language}{french}%
- {}%
- {\iftoggle{smartof}%
- {\let\lbx@inittitlehook\lbx@fr@smartof}%
- {}}%
- \lbx@inittitlehook{\bibstring{chapter}}%
- \endgroup
- \bibstring{chapter}~#1}%
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{\bibxstring{chapter}}%
+ \bibstring{chapter}~#1}
+ \endgroup}%
\DeclareFieldFormat{muschapter:hook}{%
\begingroup
- \mkrelatedstring%
- \ifboolexpr{%
- togl {cms@otherlang}%
- and
- not test {\iffieldundef{langid}}%
- }%
- {\unspace}{}%
- \ifdefstring{\blx@main@language}{french}%
- {}%
- {\iftoggle{smartof}%
- {\let\lbx@inittitlehook\lbx@fr@smartof}%
- {}}%
- \lbx@inittitlehook{\bibstring{track}}%
- \endgroup
- \bibstring{track}~#1}%
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{\bibxstring{track}}%
+ \bibstring{track}~#1}%
+ \endgroup}
+
+\DeclareFieldFormat{volume:hook}{%
+ \begingroup
+ \mkrelatedstringtext{%
+ \lbx@inittitlehook{\bibxstring{volume}}%
+ \bibstring{volume}~#1}%
+ \endgroup}%
+
+\DeclareFieldFormat{parttoo:hook}{%
+ \ifnumerals{#1}%
+ {\addcomma\addspace\bibstring[\mkrelatedstringtext]{partvolume}~#1}%
+ {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}}
+
+\DeclareFieldFormat{part:hook}{%
+ \begingroup
+ \ifnumerals{#1}%
+ {\mkrelatedstringtext{%
+ \lbx@inittitlehook{\bibxstring{partvolume}}%
+ \bibstring{partvolume}~#1}}%
+ {\mkrelatedstringtext{\lbx@inittitlehook{#1}}%
+ \ifcapital{\MakeCapital{#1}}{#1}}%
+ \endgroup}
+
+\DeclareFieldFormat{shorthand:hook}{%
+ \lbx@inittitlehook{#1}%
+ #1}
\DeclareFieldFormat{sitnoformat}{#1}
\DeclareFieldFormat{sjtnoformat}{#1}
@@ -9913,15 +10456,7 @@
\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}}
+\providetoggle{cms@reprintmt}
\newbibmacro*{cms:titlehook}{% Needed for full drivers in reprintfrom
\ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR%
@@ -9933,14 +10468,35 @@
{\iffieldundef{booktitle}%
{\iffieldundef{journaltitle}% Switched order for 17th ed.
{\iffieldundef{maintitle}%
- {}%
- {\DeclareFieldAlias{mtnoformat}{title:hook}%
- \DeclareFieldAlias{smtnoformat}{title}%
- \DeclareFieldAlias{maintitle}{default}}}%
+ {\ifthenelse{\iffieldequalstr{relatedtype}{maintitle}\OR%
+ \iffieldequalstr{relatedtype}{maintitlenc}}%
+ {\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}}%
+ {}}%
+ {\toggletrue{cms@reprintmt}%
+ \ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)%
+ \OR\ifentrytype{inbook}\OR\ifentrytype{incollection}\OR%
+ \ifentrytype{inproceedings}\OR\ifentrytype{letter}}%
+ {\DeclareFieldAlias{mtnoformat}{title:hook}%
+ \DeclareFieldAlias{smtnoformat}{title}%
+ \DeclareFieldAlias{maintitle}{default}}%
+ {\iffieldundef{volume}%
+ {\DeclareFieldAlias{part}{part:hook}%
+ \let\cms@ofwrap\mkrelatedstringtext}%
+ {\DeclareFieldAlias{volume}{volume:hook}%
+ \DeclareFieldAlias{part}{parttoo:hook}%
+ \let\cms@ofwrap\mkrelatedstringtext}}}}%
{\DeclareFieldAlias{jtnoformat}{title:hook}%
\DeclareFieldAlias{sjtnoformat}{title}%
\DeclareFieldAlias{journaltitle}{default}%
+ \DeclareFieldAlias{injournaltitle}{default}%
\DeclareFieldAlias{shortjournal}{series}%
+ \DeclareFieldAlias{inshortjournal}{series}%
\DeclareFieldAlias{jtsnoformat}{title:hook}}}%
{\DeclareFieldAlias{btnoformat}{title:hook}%
\DeclareFieldAlias{sbtnoformat}{title}%
@@ -9952,16 +10508,16 @@
\DeclareFieldAlias[music]{title}{default}%
\DeclareFieldAlias{title}{default}%
\DeclareFieldAlias[periodical]{shorttitle}{series}}}%
- {\iffieldundef{issuesubtitle}%
- {\DeclareFieldAlias{itnoformat}{ititle:hook}%
- \DeclareFieldAlias{issuetitle}{default}}%
- {\DeclareFieldAlias{issuetitle}{ititle:hook}}}}%
+ {\DeclareFieldAlias{itnoformat}{ititle:hook}%
+ \DeclareFieldAlias{issuetitle}{default}}}%
{\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
\ifentrytype{video}}%
{\iffieldundef{title}%
{\ifentrytype{music}%
- {\DeclareFieldAlias[music]{chapter}{muschapter:hook}}%
- {\DeclareFieldAlias{chapter}{avchapter:hook}}}%
+ {\DeclareFieldAlias[music]{chapter}{muschapter:hook}%
+ \let\cms@ofwrap\mkrelatedstringtext}%
+ {\DeclareFieldAlias{chapter}{avchapter:hook}%
+ \let\cms@ofwrap\mkrelatedstringtext}}%
{\DeclareFieldAlias{tnoformat}{title:hook}%
\DeclareFieldAlias{stnoformat}{citetitle}%
\DeclareFieldAlias[video]{title}{default}%
@@ -9983,10 +10539,12 @@
\usedriver
{\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
\usebibmacro{clearpublin}\clearfield{shorthand}%
+ \clearfield{crossref}\clearfield{xref}%
+ \toggletrue{cms@bookcitexref}\global\toggletrue{cms@reprintfrom}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\toggletrue{cms@origpublished}\frenchspacing%
\usebibmacro{cms:titlehook}}%
- {cite:\thefield{entrytype}}}}
+ {cite:\thefield{entrytype}}}\global\togglefalse{cms@reprintfrom}}%
\newbibmacro*{cite:related:full}{%
\printtext[cmsdefrelhypertarget]{%