diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx | 797 |
1 files changed, 669 insertions, 128 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx index 9d5616564de..97b61e12e69 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx @@ -4,7 +4,7 @@ % formatted according to the specifications of the Chicago Manual of % Style. -\ProvidesFile{chicago-notes.cbx}[2021/03/27 v 3.16 biblatex citation style] +\ProvidesFile{chicago-notes.cbx}[2022/07/02 v 3.18 biblatex citation style] %%%% Biblatex initialization + Chicago options + Toggles %%%% @@ -24,6 +24,7 @@ \providetoggle{cms@urltime}% 17th ed. \providetoggle{cms@doi} \providetoggle{cms@doionly} +\providetoggle{cms@doinodate} \providetoggle{cms@eprint} \providetoggle{cms@isbn} \providetoggle{cms@numbermonth} @@ -35,9 +36,12 @@ \providetoggle{cms@bibshser} \providetoggle{cms@notefield} \providetoggle{cms@addendum} +\providetoggle{cms@notitle}% For classical short notes \providetoggle{cms@comprange} \providetoggle{cms@compyears} \providetoggle{cms@modpostnote} +\providetoggle{cms@strippunct} +\providetoggle{cms@postspace} \providetoggle{cms@url@innotes} \providetoggle{cms@ukord} @@ -81,6 +85,7 @@ \providetoggle{cms@running@text}% For Jurisdiction entries \providetoggle{cms@noterefs}% Backrefs inside notes \providetoggle{cms@forcenoteref}% For shortrefcite command +\providetoggle{cms@nonoterefs}% To turn off noterefs by type or entry \providetoggle{cms@zeropages}% For replacing zero sections \providetoggle{cms@hidezeros}% Ditto, but differently \providetoggle{cms@fullrefs}% Force printing of sec. no. w/in same sec. @@ -300,17 +305,17 @@ \def\cmspens#1{\space #1\cmspens@i{#1}} -\DeclareBibliographyOption[boolean]{noibid}[true]{% - \global\toggletrue{cms@noibid}} +\DeclareBiblatexOption{global,type,entry}[boolean]{noibid}[true]{% + \settoggle{cms@noibid}{#1}} -\DeclareBibliographyOption[boolean]{useibid}[true]{% - \global\toggletrue{cms@useibid}} +\DeclareBiblatexOption{global,type,entry}[boolean]{useibid}[true]{% + \settoggle{cms@useibid}{#1}} \DeclareBiblatexOption{global,type,entry}[boolean]{dashed}[true]{% \settoggle{cms@namedash}{#1}} -\DeclareBibliographyOption[boolean]{short}[true]{% - \global\settoggle{cms@allshort}{#1}} +\DeclareBiblatexOption{global,type,entry}[boolean]{short}[true]{% + \settoggle{cms@allshort}{#1}} \DeclareBibliographyOption[boolean]{hidezeros}[true]{% \global\settoggle{cms@hidezeros}{#1}} @@ -333,6 +338,9 @@ \DeclareBibliographyOption[string]{noterefintro}[preface]{% \def\cms@note@introname{#1}}% +\DeclareBiblatexOption{type,entry}[boolean]{suppressnoterefs}[true]{% + \settoggle{cms@nonoterefs}{#1}} + \DeclareBiblatexOption{global}[boolean]{fullnoterefs}[true]{% \global\settoggle{cms@fullrefs}{#1}}% @@ -1100,6 +1108,9 @@ % The field-exclusion options % +\DeclareBiblatexOption{global,type,entry}[boolean]{notitle}[true]{% + \settoggle{cms@notitle}{#1}}% + \DeclareBiblatexOption{global,type,entry}[boolean]{urlnotes}[true]{% \settoggle{cms@url@innotes}{#1}}% @@ -1120,6 +1131,9 @@ \togglefalse{cms@doi}}% \def\cms@opt@doi@only{% \toggletrue{cms@doionly}}% +\def\cms@opt@doi@onlynd{% + \toggletrue{cms@doionly}% + \toggletrue{cms@doinodate}}% \DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{% \settoggle{cms@eprint}{#1}}% \DeclareBiblatexOption{global,type,entry}[boolean]{numbermonth}[true]{% @@ -1314,6 +1328,27 @@ \def\cms@opt@ctao@period{% \def\ctitleaddonpunct{\newunitpunct}}% +\DeclareBiblatexOption{global,type,entry}[string]{jtitleaddon}[space]{% + \ifcsdef{cms@opt@jtao@#1}% + {\csuse{cms@opt@jtao@#1}}% + {\csuse{cms@opt@jtao@space}\cms@warning@noline% + {'jtitleaddon=#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@jtao@none{% + \let\jtitleaddonpunct\@empty}% +\def\cms@opt@jtao@comma{% + \def\jtitleaddonpunct{\addcomma\addspace}}% +\def\cms@opt@jtao@colon{% + \def\jtitleaddonpunct{\addcolon\addspace}}% +\def\cms@opt@jtao@space{% + \def\jtitleaddonpunct{\addspace}}% +\def\cms@opt@jtao@semicolon{% + \def\jtitleaddonpunct{\addsemicolon\addspace}}% +\def\cms@opt@jtao@period{% + \def\jtitleaddonpunct{\newunitpunct}}% + % Controlling punctuation before shorthand in notes % \DeclareBiblatexOption{global,type,entry}[string]{shorthandpunct}[space]{% @@ -1342,9 +1377,9 @@ \def\shorthandpunct{\addspace\textendash\addspace}}% \ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,% - related,booklongxref,ptitleaddon,ctitleaddon,shorthandpunct,urlnotes,% - legalnotes,supranotes,shortextrapunct,dashed,bibannotesep,citeannotesep,% - nameaddonsep=space} + related,booklongxref,ptitleaddon,ctitleaddon,jtitleaddon,shorthandpunct,% + urlnotes,legalnotes,supranotes,shortextrapunct,dashed,bibannotesep,% + citeannotesep,nameaddonsep=space} \ExecuteBibliographyOptions[standard]{useeditor=false,usenamec=false}% @@ -1396,11 +1431,354 @@ \DeclarePunctuationPairs{comma}{*!?}} %%%% Initialize and define bibstrings %%%% +%%%% This one needed for 16th edition. Others in cms-*.lbx %%%% \DefineBibliographyStrings{english}{% citedas = {hereafter cited as},} -%%%% This one needed for 16th edition. Others in cms-*.lbx %%%% +%%%% These are the macros and declarations needed to use non-default +%%%% name presentations, including new name parts and different +%%%% orderings of existing name parts. All of this becomes available +%%%% only when a user sets the "cmsnameparts" option. Nearly all of it +%%%% comes from the standard biblatex example file 93-nameparts.tex, +%%%% with changes to make it possible for users to add new name +%%%% treatments and also to set a new default name presentation style +%%%% for their documents. + +\ifdefvoid{\cms@ldt@cmsnameparts}{}{% + + %% Wrapper for biblatex's Template declarations, allowing a chosen + %% named template also to provide the default ("global") template. + %% <template command><[template name]><definition of template> + + \def\cms@template@wrapper#1[#2]#3{% + \def\cms@tpl{#2} + \ifx\cms@ldt@cmsnameparts\cms@tpl + #1{#3}% + #1[#2]{#3} + \blx@warning@noline{#2 is the So Global Template} + \else + #1[#2]{#3} + \blx@warning@noline{#2 is the Local Template} + \fi} + + %% Name format declarations for bibliography and notes. The + %% "default" format is for the head of long notes and for names in + %% the body of long notes and bibliography entries. They should work + %% for any name styles users might want to add themselves. + + \DeclareNameFormat{sortname}{% + \ifdefstring{\blx@refcontext@sortingnamekeytemplatename}{global}% + {\ifcsdef{cmssort:\cms@ldt@cmsnameparts-rev}% + {\ifnumequal{\value{listcount}}{1}% + {\csuse{cmssort:\cms@ldt@cmsnameparts-rev}}% + {\ifcsdef{cmssort:\cms@ldt@cmsnameparts}% + {\csuse{cmssort:\cms@ldt@cmsnameparts}}% + {\csuse{cmssort:western}}}}% + {\ifcsdef{cmssort:\cms@ldt@cmsnameparts}% + {\csuse{cmssort:\cms@ldt@cmsnameparts}}% + {\ifnumequal{\value{listcount}}{1}% + {\csuse{cmssort:western-rev}}% + {\csuse{cmssort:western}}}}}% + {\ifcsdef{cmssort:\blx@refcontext@sortingnamekeytemplatename-rev}% + {\ifnumequal{\value{listcount}}{1}% + {\csuse{cmssort:\blx@refcontext@sortingnamekeytemplatename-rev}}% + {\ifcsdef{cmssort:\blx@refcontext@sortingnamekeytemplatename}% + {\csuse{cmssort:\blx@refcontext@sortingnamekeytemplatename}}% + {\csuse{cmssort:western}}}}% + {\ifcsdef{cmssort:\blx@refcontext@sortingnamekeytemplatename}% + {\csuse{cmssort:\blx@refcontext@sortingnamekeytemplatename}}% + {\ifnumequal{\value{listcount}}{1}% + {\csuse{cmssort:western-rev}}% + {\csuse{cmssort:western}}}}}% + \usebibmacro{name:andothers}}% + + \DeclareNameFormat{default}{% + \ifdefstring{\blx@refcontext@sortingnamekeytemplatename}{global}% + {\ifcsdef{cmssort:\cms@ldt@cmsnameparts}% + {\csuse{cmssort:\cms@ldt@cmsnameparts}}% + {\csuse{cmssort:western}}}% + {\ifcsdef{cmssort:\blx@refcontext@sortingnamekeytemplatename}% + {\csuse{cmssort:\blx@refcontext@sortingnamekeytemplatename}}% + {\csuse{cmssort:western}}}% + \usebibmacro{name:andothers}}% + + \DeclareNameFormat{labelname}{% + \ifdefstring{\blx@refcontext@sortingnamekeytemplatename}{global}% + {\ifcsdef{cmslabel:\cms@ldt@cmsnameparts}% + {\csuse{cmslabel:\cms@ldt@cmsnameparts}}% + {\csuse{cmslabel:western}}}% + {\ifcsdef{cmslabel:\blx@refcontext@sortingnamekeytemplatename}% + {\csuse{cmslabel:\blx@refcontext@sortingnamekeytemplatename}}% + {\csuse{cmslabel:western}}}% + \usebibmacro{name:andothers}}% + + %% These are the template definitions for the four pre-defined + %% styles, each with two templates, one for the sortname and one for + %% the labelname. The "western" style, as in 93-nameparts.tex, is + %% identical to biblatex's default style, but giving it a name + %% allows other styles to become the default, if desired. You will + %% need one template of each sort for any new style you wish to + %% provide. + + \cms@template@wrapper{\DeclareSortingNamekeyTemplate}[cjk]{ + \keypart{ + \namepart{family} + } + \keypart{ + \namepart{given} + } + \keypart{ + \namepart{cjk} + } + } + + \cms@template@wrapper{\DeclareUniquenameTemplate}[cjk]{ + \namepart[base=true]{family} + \namepart[disambiguation=full]{given} + \namepart[disambiguation=full]{cjk} + } + + \cms@template@wrapper{\DeclareSortingNamekeyTemplate}[ethiopian]{ + \keypart{ + \namepart{given} + } + \keypart{ + \namepart{patronymic} + } + \keypart{ + \namepart{papponymic} + } + } + + \cms@template@wrapper{\DeclareUniquenameTemplate}[ethiopian]{ + \namepart[base=true]{given} + \namepart[disambiguation=full]{patronymic} + \namepart[disambiguation=full]{papponymic} + } + + \cms@template@wrapper{\DeclareSortingNamekeyTemplate}[russian]{ + \keypart{ + \namepart{family} + } + \keypart{ + \namepart{given} + } + \keypart{ + \namepart{patronymic} + } + } + + \cms@template@wrapper{\DeclareUniquenameTemplate}[russian]{ + \namepart[base=true]{family} + \namepart{given} + \namepart{patronymic} + } + + \DeclareSortingNamekeyTemplate[western]{ + \keypart{ + \namepart[use=true]{prefix} + \namepart{family} + } + \keypart{ + \namepart{given} + } + \keypart{ + \namepart{suffix} + } + \keypart{ + \namepart[use=false]{prefix} + } + } + + \DeclareUniquenameTemplate[western]{ + \namepart[use=true, base=true]{prefix} + \namepart[base=true]{family} + \namepart{given} + } + + %% These bibmacros print the names when the standard biblatex + %% equivalents are insufficient. You only need to provide a new one + %% for a new style if standard biblatex doesn't provide one that is + %% suitable. + + \newbibmacro*{name:cjk}[3]{% + \usebibmacro{name:delim}{#2#3#1}% + \usebibmacro{name:hook}{#2#3#1}% + \mkbibnamefamily{#1}% + \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}}% + \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}} + + \newbibmacro*{name:ethiopian}[3]{% + \usebibmacro{name:delim}{#1#2#3}% + \usebibmacro{name:hook}{#1#2#3}% + \mkbibethgiven{#1}% + \ifdefvoid{#2}{}{\bibnamedelimd\mkbibethpat{#2}\isdot}% + \ifdefvoid{#3}{}{\bibnamedelimd\mkbibethpap{#3}\isdot}} + + \let\mkbibethgiven\mkbibnamefamily + \let\mkbibethpat\mkbibnamegiven + \let\mkbibethpap\mkbibnamegiven + + \newbibmacro*{name:russian}[3]{% + \usebibmacro{name:delim}{#1#2#3}% + \usebibmacro{name:hook}{#1#2#3}% + \ifdefvoid{#2} + {} + {\mkbibnamegiven{#2}\isdot\bibnamedelimd + \ifdefvoid{#3} + {} + {\mkbibnamepatronymic{#3}\isdot\bibnamedelimd}}% + \mkbibnamefamily{#1}} + + \newbibmacro*{name:russian-rev}[3]{% + \usebibmacro{name:delim}{#1#2#3}% + \usebibmacro{name:hook}{#1#2#3}% + \mkbibnamefamily{#1}% + \ifdefvoid{#2} + {} + {\revsdnamepunct\bibnamedelimd + \mkbibnamegiven{#2}\isdot + \ifdefvoid{#3} + {} + {\bibnamedelimd\mkbibnamepatronymic{#3}\isdot}}} + + %% These macros call the name-printing bibmacros with the + %% appropriate arguments for the "sortname" and "default" name + %% formats. Each style needs at least one for printing sortnames, + %% and possibly a second if you wish to reverse the first name in a + %% list. + + \csdef{cmssort:cjk}{% + \usebibmacro{name:cjk} + {\namepartfamily} + {\namepartgiven} + {\namepartcjk}}% + + \csdef{cmssort:russian}{% + \usebibmacro{name:russian} + {\namepartfamily} + {\namepartgiven} + {\namepartpatronymic}}% + + \csdef{cmssort:russian-rev}{% + \usebibmacro{name:russian-rev} + {\namepartfamily} + {\namepartgiven} + {\namepartpatronymic}% + \ifboolexpe{% + test {\ifdefvoid\namepartgiven} + and + test {\ifdefvoid\namepartpatronymic}} + {}% + {\usebibmacro{name:revsdelim}}}% + + \csdef{cmssort:ethiopian}{% + \usebibmacro{name:ethiopian} + {\namepartgiven} + {\namepartpatronymic} + {\namepartpapponymic}}% + + \csdef{cmssort:western}{% + \usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}}% + + \csdef{cmssort:western-rev}{% + \usebibmacro{name:family-given} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% + \ifboolexpe{% + test {\ifdefvoid\namepartgiven} + and + test {\ifdefvoid\namepartprefix}} + {}% + {\usebibmacro{name:revsdelim}}}% + + %% These macros call the name-printing macros for the labelname, + %% i.e., in short notes. You'll need one for each new style you wish + %% to provide for your documents. + + \csdef{cmslabel:cjk}{% + \iffieldequalstr{uniquepart}{base}% + {\usebibmacro{name:cjk} + {\namepartfamily} + {\empty} + {\empty}} + {\iffieldequalstr{uniquepart}{given}% + {\usebibmacro{name:cjk} + {\namepartfamily} + {\namepartgiven} + {\empty}} + {\usebibmacro{name:cjk} + {\namepartfamily} + {\namepartgiven} + {\namepartcjk}}}} + + \csdef{cmslabel:ethiopian}{% + \iffieldequalstr{uniquepart}{base}% + {\usebibmacro{name:ethiopian} + {\namepartgiven} + {\empty} + {\empty}} + {\iffieldequalstr{uniquepart}{patronymic}% + {\usebibmacro{name:ethiopian} + {\namepartgiven} + {\namepartpatronymic} + {\empty}} + {\usebibmacro{name:ethiopian} + {\namepartgiven} + {\namepartpatronymic} + {\namepartpapponymic}}}} + + \csdef{cmslabel:russian}{% + \iffieldequalstr{uniquepart}{base}% + {\usebibmacro{name:russian} + {\namepartfamily} + {\empty} + {\empty}} + {\ifnum\namepartgivenun=1\relax + \usebibmacro{name:russian} + {\namepartfamily} + {\namepartgiveni} + {\namepartpatronymici}% + \else + \usebibmacro{name:russian} + {\namepartfamily} + {\namepartgiven} + {\namepartpatronymic}% + \fi}} + + \csdef{cmslabel:western}{% + \ifcase\value{uniquename}% + \usebibmacro{name:family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% + \or + \ifuseprefix + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffixi}} + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefixi} + {\namepartsuffixi}}% + \or + \usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% + \fi}} %%%% Cite macros for use by the citation commands %%%% @@ -1491,9 +1869,11 @@ % {<entrytype>} \newbibmacro*{cite:short}[1]{% \global\let\cms@pnsaved\undefined% - \ifcsundef{cite:short:#1}% - {\csuse{cite:short:book}}% - {\csuse{cite:short:#1}}} + \iftoggle{cms@notitle}% + {\usebibmacro{cite:short:ibid}}% + {\ifcsundef{cite:short:#1}% + {\csuse{cite:short:book}}% + {\csuse{cite:short:#1}}}} \newbibmacro*{cite:short:ibid}{% For 17th edition \ifthenelse{\ifnameundef{labelname}\OR% @@ -1516,6 +1896,10 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% )) }% {\cmshyper{\printfield[shortjournal]{shortjournal}}\newcunit}% @@ -1580,16 +1964,16 @@ {\printtext[\csuse{cms@xformat}]{% \printfield[letterday]{\csuse{cms@xfield}}}}% {\ifboolexpr{% - test {\ifcsstring{cms@xfield}{season}}% + test {\ifcsstring{cms@xfield}{yeardivision}}% or - test {\ifcsstring{cms@xfield}{origseason}}% + test {\ifcsstring{cms@xfield}{origyeardivision}}% or - test {\ifcsstring{cms@xfield}{eventseason}}% + test {\ifcsstring{cms@xfield}{eventyeardivision}}% or - test {\ifcsstring{cms@xfield}{urlseason}}% + test {\ifcsstring{cms@xfield}{urlyeardivision}}% }% {\printtext[\csuse{cms@xformat}]{% - \mkbibseason{\thefield{\csuse{cms@xfield}}}}}% + \mkbibyeardivision{\thefield{\csuse{cms@xfield}}}}}% {\IfSubStr{\cms@xfield}{year}% {\StrCut{\cms@xfield}{year}\cms@yeartype\cms@tempnull% \iffieldundef{\csuse{cms@yeartype}year}% @@ -1611,7 +1995,7 @@ {\StrCut{\cms@xfield}{date}\cms@datetype\cms@tempnull% \ifthenelse{\iffieldundef{\csuse{cms@datetype}year}\AND% \iffieldundef{\csuse{cms@datetype}month}\AND% - \iffieldundef{\csuse{cms@datetype}season}}% + \iffieldundef{\csuse{cms@datetype}yeardivision}}% {}% {\printtext[\csuse{cms@xformat}]{% \csuse{print\cms@datetype date}}}}% @@ -1648,6 +2032,8 @@ and not togl {cms@allshort}% and + not togl {cms@nonoterefs}% Type and entry option + and test {\iffootnote}% and not ( @@ -1681,6 +2067,10 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% )) }% {\printfield[shortjournal]{shortjournal}\newcunit}% @@ -1691,6 +2081,19 @@ \cmshyper{\printfield[citetitle]{labeltitle}}% \usebibmacro{cms+extra+test}}% +\csdef{cite:short:audio}{% + \usebibmacro{allshort+firstcite+xref}% + \ifnameundef{labelname}% + {}% + {\usebibmacro{cms+name+idem}}% + \iffieldundef{labeltitle}% + {\iffieldundef{booktitle}% + {}% + {\cmshyper{\printtext[booktitle]{% + \printfield[btnoformat]{booktitle}}}}}% + {\cmshyper{\printfield[citetitle]{labeltitle}}}% + \usebibmacro{cms+extra+test}}% + \csdef{cite:short:book}{% \usebibmacro{allshort+firstcite+xref}% \ifnameundef{labelname}% @@ -1843,6 +2246,8 @@ \cmshyper{\printfield[citetitle]{labeltitle}}% \usebibmacro{cms+extra+test}}% +\csletcs{cite:short:music}{cite:short:audio}% + \csletcs{cite:short:mvreference}{cite:short:inreference}% \csdef{cite:short:online}{% @@ -1893,6 +2298,10 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% )) }% {\printfield[shortjournal]{shortjournal}\newcunit}% @@ -1970,7 +2379,12 @@ {\cmshyper{\printfield[citetitle]{labeltitle}}% \setunit{\ctitleaddonpunct}% \printfield{booktitleaddon}}}% - {\cmshyper{\printfield[citetitle]{labeltitle}}}% + {\iffieldundef{labeltitle}% + {\iffieldundef{booktitle}% + {}% + {\cmshyper{\printtext[booktitle]{% + \printfield[btnoformat]{booktitle}}}}}% + {\cmshyper{\printfield[citetitle]{labeltitle}}}}% \usebibmacro{cms+extra+test}}% \newbibmacro*{cms+extra+test}{% Used in previous defs @@ -2084,7 +2498,7 @@ }% {\global\toggletrue{cms@shortnote}% \global\togglefalse{cms@fullnote}% - \usebibmacro{cite:short:legal}% + \usebibmacro{cite:short}{\thefield{entrytype}}% \usebibmacro{cite:save}}% {\cmshyper{\bibsstring[\mkbibemph]{ibidem}}% \ifboolexpr{% @@ -2103,7 +2517,11 @@ \newbibmacro*{cite:ibid:cms}{% \iftoggle{cms@useibid}% - {\ifbibliography% + {\ifboolexpr{% + test {\ifbibliography}% + or + togl {cms@noibid}% + }% {\global\toggletrue{cms@shortnote}% \global\togglefalse{cms@fullnote}% \usebibmacro{cite:short}{\thefield{entrytype}}% @@ -2123,10 +2541,19 @@ {\global\toggletrue{cms@loccit}% \global\let\cms@pnsaved\undefined}% {\global\let\cms@pnsaved\undefined}}}% - {\global\toggletrue{cms@shortnote}% - \global\togglefalse{cms@fullnote}% - \usebibmacro{cite:short:ibid}% - \usebibmacro{cite:save}}}% + {\ifboolexpr{% + test {\iffieldequalstr{entrysubtype}{classical}}% + or + togl {cms@noibid}% + }% + {\global\toggletrue{cms@shortnote}% + \global\togglefalse{cms@fullnote}% + \usebibmacro{cite:short}{\thefield{entrytype}}% + \usebibmacro{cite:save}}% + {\global\toggletrue{cms@shortnote}% + \global\togglefalse{cms@fullnote}% + \usebibmacro{cite:short:ibid}% + \usebibmacro{cite:save}}}}% \newbibmacro*{cite:journal}{% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}% @@ -2134,7 +2561,8 @@ {\bibsentence\usebibmacro{cite:ibid}}% {\usebibmacro{cite:ibid}}% \usebibmacro{cite:save}}% - {\iffieldundef{journaltitle}% + {\ifthenelse{\iffieldundef{journaltitle}\AND\iffieldundef{shortjournal}\AND% + \iffieldundef{journaltitleaddon}}% {\usebibmacro{cite:short}{\thefield{entrytype}}% \usebibmacro{cite:save}}% {\ifboolexpr{% @@ -2173,12 +2601,20 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% + and + test {\iffieldundef{journaltitleaddon}}% )) }% {\printtext[bibhyperref]{% \printfield[shortjournal]{shortjournal}}}% - {\printtext[bibhyperref]{% - \printfield[journaltitle]{journaltitle}}}}% + {\iffieldundef{journaltitle}% + {\printtext[bibhyperref]{\printfield{journaltitleaddon}}}% + {\printtext[bibhyperref]{% + \printfield[journaltitle]{journaltitle}}}}}% {\ifboolexpr{% not test {\iffieldundef{shortjournal}}% and @@ -2192,12 +2628,20 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% + and + test {\iffieldundef{journaltitleaddon}}% )) }% {\printtext[bibhyperlink]{% \printfield[shortjournal]{shortjournal}}}% - {\printtext[bibhyperlink]{% - \printfield[journaltitle]{journaltitle}}}}% + {\iffieldundef{journaltitle}% + {\printtext[bibhyperlink]{\printfield{journaltitleaddon}}}% + {\printtext[bibhyperlink]{% + \printfield[journaltitle]{journaltitle}}}}}% \iffieldundef{volume}% {\iffieldundef{number}% {\iffieldundef{issue}% @@ -2387,7 +2831,7 @@ {cite:\thefield{entrytype}}% \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}% {\multicitedelim}% - {\finentry}% Helps with annotated bibliographies (?) + {}%\finentry% (No longer) Helps with annotated bibliographies (?) \DeclareCiteCommand{\origpublcite}% Similar to above, w/o title. {\usebibmacro{backref+check}% @@ -2407,7 +2851,7 @@ \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}% \global\togglefalse{cms@reprintfrom}}% {\multicitedelim}% - {\finentry} + {}%\finentry \DeclareCiteCommand{\headlessfullcite} {\usebibmacro{prenote}}% @@ -5510,7 +5954,11 @@ \usebibmacro{fullpostnote}% \usebibmacro{caddendum}% \newcunit\newblock - \iffieldundef{urlyear}% + \ifboolexpr{% + test {\iffieldundef{urlyear}}% + or + togl {cms@doinodate}% + }% {}% {\printurldate% \ifboolexpr{% @@ -6967,10 +7415,19 @@ \DeclareFieldFormat{titleaddon}{% \if@cms@capital{#1}{\MakeCapital{#1\isdot}}{#1\isdot}}% +\DeclareFieldFormat[periodical]{titleaddon}{% + \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} + \DeclareFieldAlias{booktitleaddon}{titleaddon} \DeclareFieldAlias{maintitleaddon}{titleaddon} +\DeclareFieldAlias[article,periodical,review,suppperiodical]{maintitleaddon}% +{journaltitleaddon} + +\DeclareFieldFormat{journaltitleaddon}{% + \ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}} + \DeclareFieldFormat[jurisdiction,legal,legislation]{journaltitle}{% \iffieldundef{shortjournal}% {#1\isdot}% @@ -7416,42 +7873,67 @@ {\newcunit}}% {\newcunit}}}}% -\newcommand*{\postnotewrapper}{% - \iftoggle{cms@modpostnote}% Multiple bugs in v 2.0. - {\ifboolexpr{% - test {\iffieldstart{postnote}{,}}% - or - test {\iffieldstart{postnote}{\bibrangessep}}% - }% - {\togglefalse{blx@unit}% +\DeclareListParser{\docmslist}{|} +\DeclareListParser*{\forcmslist}{|} +\newcounter{cms@punct} + +\def\cms@strip@spaces#1{% + \def\do@i##1{% + \iffieldstart{postnote}{##1}% + {\toggletrue{cms@postspace}% \expandarg - \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]% - \iffieldstart{postnote}{\ }% - {\setunit{\addcomma}}% - {\newcunit}}% - {\iffieldstart{postnote}{;}% + \StrGobbleLeft{#1}{1}[#1]\listbreak}% + {}}% + \forcmslist{\do@i}{\space|\,|\addspace|\;|\:|\!}} + +\newcommand*{\postnotewrapper}{% To fix bugs in v 2.0 & ff. + \setcounter{cms@punct}{0}% + \iftoggle{cms@modpostnote}% + {\def\do##1{% + \iffieldstart{postnote}{##1}% {\togglefalse{blx@unit}% + \toggletrue{cms@strippunct}% + \ifcase\c@cms@punct% Allows US-style punctuation to work + \def\cms@userpunct{\addcolon}% + \or + \def\cms@userpunct{\addsemicolon}% + \or + \def\cms@userpunct{\addperiod}% + \or + \def\cms@userpunct{\addcomma}% + \or + \def\cms@userpunct{\addcomma}% + \else + \def\cms@userpunct{##1}% + \fi \expandarg \StrGobbleLeft{\abx@field@postnote}{1}[\abx@field@postnote]% + \cms@strip@spaces{\abx@field@postnote}% + \ifboolexpr{% + not test {\iffieldpages{postnote}}% + and + test {\iffieldstart{postnote}{ }}% + }% + {\StrSubstitute[1]{\abx@field@postnote}{ }{\ }[\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}}% + {\setunit{\cms@userpunct}}% + {\ifboolexpr{% + test {\iffieldstart{postnote}{ }}% + or + togl {cms@postspace}% + }% + {\togglefalse{cms@postspace}% + \setunit{\cms@userpunct\addspace}}% + {\setunit{\cms@userpunct}}}% + \listbreak}% + {\stepcounter{cms@punct}}}% + \docmslist{:|;|.|,|\bibrangessep|\addcolon|\addsemicolon| + \addcomma|\addperiod}% + \iftoggle{cms@strippunct}% + {\togglefalse{cms@strippunct}}% + {\postnotedelim}}% + {\postnotedelim}} \newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from \begingroup% comp.text.tex @@ -7752,7 +8234,7 @@ }% {\printtext{\bibnamedash}}% {\usebibmacro{journal+sub}{}% - \setunit*{\addspace}% + \setunit{\addspace}% \printlist[periodplace]{location}% \savefield{journaltitle}{\bbx@lasthash}}}% {\ifuseauthor% @@ -8190,6 +8672,12 @@ test {\ifentrytype{audio}}% and not togl {cms@origpublished}% + and + ( + not test {\iffieldundef{title}}% + or + not test {\iffieldundef{titleaddon}}% + ) }% {\bibstring{in}\setunit{\addspace}}% {}}% @@ -8210,6 +8698,12 @@ not test {\iffieldundef{booktitle}}% and not togl {cms@origpublished}% + and + ( + not test {\iffieldundef{title}}% + or + not test {\iffieldundef{titleaddon}}% + ) }% {\bibstring{on}\setunit{\addspace}}% {}}% @@ -8309,18 +8803,22 @@ \newcunit\newblock} \newbibmacro*{title+stitle}{% - \printtext[title]{% - \printfield[noformat]{title}% - \setunit{\subtitlepunct}% - \printfield[noformat]{subtitle}}% + \iffieldundef{title}% + {}% + {\printtext[title]{% + \printfield[noformat]{title}% + \setunit{\subtitlepunct}% + \printfield[noformat]{subtitle}}}% \setunit{\ptitleaddonpunct}% \printfield{titleaddon}}% \newbibmacro*{italtitle+stitle}{% - \printtext[title]{% - \printfield[noformat]{title}% - \setunit{\subtitlepunct}% - \printfield[noformat]{subtitle}}% + \iffieldundef{title}% + {}% + {\printtext[title]{% + \printfield[noformat]{title}% + \setunit{\subtitlepunct}% + \printfield[noformat]{subtitle}}}% \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% @@ -8666,11 +9164,11 @@ \newcunit\newblock}% \iftoggle{cms@switchdates}% {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}\AND% - \iffieldundef{season}}% + \iffieldundef{yeardivision}}% {}% {\cms@datelong{}}}% {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}\AND% - \iffieldundef{origseason}}% + \iffieldundef{origyeardivision}}% {}% {\cms@datelong{orig}}}} @@ -8681,11 +9179,11 @@ \newcunit\newblock}% \iftoggle{cms@switchdates}% {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}\AND% - \iffieldundef{season}}% + \iffieldundef{yeardivision}}% {}% {\cms@datelong{}}}% {\ifthenelse{\iffieldundef{origyear}\AND\iffieldundef{origmonth}\AND% - \iffieldundef{origseason}}% + \iffieldundef{origyeardivision}}% {\printdate}% For interviews and other dated non-letters. {\cms@datelong{orig}}}} @@ -8824,9 +9322,9 @@ \newbibmacro*{cjournal+ser+vol+num}{% \usebibmacro{journal+sub}{in}% - \setunit*{\addspace}% + \setunit{\addspace}% \printlist[periodplace]{location}% - \setunit*{\addspace}% + \setunit{\addspace}% \iffieldundef{series}% {}% {\newcunit% @@ -8850,15 +9348,25 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{title}}% + and + test {\iffieldundef{titleaddon}}% )) }% {\clearlist{location}\printtext[shorttitle]{% \printfield[tnoformat]{shorttitle}}}% - {\printtext[title]{% - \printfield[tnoformat]{title}% - \setunit{\subtitlepunct}% - \printfield[stnoformat]{subtitle}}}% - \setunit*{\addspace}% + {\iffieldundef{title}% + {\printfield{titleaddon}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\subtitlepunct}% + \printfield[stnoformat]{subtitle}}% + \setunit{\jtitleaddonpunct}% + \printfield{titleaddon}}}% + \setunit{\addspace}% \printlist[periodplace]{location}% \setunit*{\addspace}% \iffieldundef{series}% @@ -8871,29 +9379,39 @@ \printfield[journum]{number}}% Move eid field for 17th ed. \newbibmacro*{journal+sub}[1]{% - \iffieldundef{journaltitle}% - {}% - {\ifboolexpr{% - not test {\iffieldundef{shortjournal}}% - and - (( - test {\ifcitation}% - and - togl {cms@citejtabb}% - ) - or - ( - test {\ifbibliography}% - and - togl {cms@bibjtabb}% - )) - }% - {\clearlist{location}\printtext[#1shortjournal]{% - \printfield[jtsnoformat]{shortjournal}}}% - {\printtext[#1journaltitle]{% - \printfield[jtnoformat]{journaltitle}% - \setunit{\subtitlepunct}% - \printfield[sjtnoformat]{journalsubtitle}}}}}% + \ifboolexpr{% + not test {\iffieldundef{shortjournal}}% + and + (( + test {\ifcitation}% + and + togl {cms@citejtabb}% + ) + or + ( + test {\ifbibliography}% + and + togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{journaltitle}}% + and + test {\iffieldundef{journaltitleaddon}}% + )) + }% + {\clearlist{location}\printtext[#1shortjournal]{% + \printfield[jtsnoformat]{shortjournal}}}% + {\iffieldundef{journaltitle}% + {\iffieldundef{journaltitleaddon}% + {}% + {\printfield{journaltitleaddon}}}% + {\printtext[#1journaltitle]{% + \printfield[jtnoformat]{journaltitle}% + \setunit{\subtitlepunct}% + \printfield[sjtnoformat]{journalsubtitle}}% + \setunit{\jtitleaddonpunct}% + \printfield{journaltitleaddon}}}}% \newbibmacro*{cite+doi+url}{% 16th ed. \iftoggle{cms@url@innotes}% @@ -8901,6 +9419,8 @@ togl {cms@url}% and not test {\iffieldundef{urlyear}}% + and + not togl {cms@doinodate}% }% {\printurldate% \ifboolexpr{% 17th ed. @@ -8957,7 +9477,7 @@ \printfield[mtnoformat]{maintitle}% \setunit{\subtitlepunct}% \printfield[smtnoformat]{mainsubtitle}}% - \setunit{\ctitleaddonpunct}% + \setunit{\jtitleaddonpunct}% \printfield{maintitleaddon}% \newcunit\newblock}% \printfield{usera}% @@ -8981,7 +9501,7 @@ \newbibmacro*{cmag+date+issue}{% \usebibmacro{journal+sub}{in}% - \setunit*{\addspace}% + \setunit{\addspace}% \printlist[periodplace]{location}% \newcunit\newblock \iffieldundef{maintitle}% @@ -8990,7 +9510,7 @@ \printfield[mtnoformat]{maintitle}% \setunit{\subtitlepunct}% \printfield[smtnoformat]{mainsubtitle}}% - \setunit{\ctitleaddonpunct}% + \setunit{\jtitleaddonpunct}% \printfield{maintitleaddon}} \newcunit\newblock \printfield{usera}% For network ID and possible section of newspaper. @@ -8999,7 +9519,7 @@ \newbibmacro*{mag+date+issue}{% \usebibmacro{journal+sub}{in}% - \setunit*{\addspace}% + \setunit{\addspace}% \printlist[periodplace]{location}% \newunit\newblock \iffieldundef{maintitle}% @@ -9008,7 +9528,7 @@ \printfield[mtnoformat]{maintitle}% \setunit{\subtitlepunct}% \printfield[smtnoformat]{mainsubtitle}}% - \setunit{\ctitleaddonpunct}% + \setunit{\jtitleaddonpunct}% \printfield{maintitleaddon}} \newcunit\newblock \printfield{usera}% For network ID and possible section of newspaper. @@ -9029,15 +9549,25 @@ test {\ifbibliography}% and togl {cms@bibjtabb}% + ) + or + ( + test {\iffieldundef{title}}% + and + test {\iffieldundef{titleaddon}}% )) }% {\clearlist{location}\printtext[shorttitle]{% \printfield[tnoformat]{shorttitle}}}% - {\printtext[title]{% - \printfield[tnoformat]{title}% - \setunit{\subtitlepunct}% - \printfield[stnoformat]{subtitle}}}% - \setunit*{\addspace}% + {\iffieldundef{title}% + {\printfield{titleaddon}}% + {\printtext[title]{% + \printfield[tnoformat]{title}% + \setunit{\subtitlepunct}% + \printfield[stnoformat]{subtitle}}% + \setunit{\jtitleaddonpunct}% + \printfield{titleaddon}}}% + \setunit{\addspace}% \printlist[periodplace]{location}% \iftoggle{cms@fullnote}{\newcunit}{\newunit}% \iffieldundef{maintitle}% @@ -9046,7 +9576,7 @@ \printfield[mtnoformat]{maintitle}% \setunit{\subtitlepunct}% \printfield[smtnoformat]{mainsubtitle}}% - \setunit{\ctitleaddonpunct}% + \setunit{\jtitleaddonpunct}% \printfield{maintitleaddon}} \newcunit\newblock \printfield{usera}% For network ID and possible section of newspaper. @@ -9609,6 +10139,16 @@ \noinherit{indexsorttitle} } +\DeclareDataInheritance{audio,music,video}{audio,music,video}{% + \inherit{title}{booktitle} + \inherit{subtitle}{booksubtitle} + \inherit{titleaddon}{booktitleaddon} + \noinherit{shorttitle} + \noinherit{sorttitle} + \noinherit{indextitle} + \noinherit{indexsorttitle} +} + \DeclareDataInheritance{mvbook,mvcollection}{letter}{% \inherit{title}{maintitle} \inherit{subtitle}{mainsubtitle} @@ -9680,7 +10220,7 @@ \noinherit{urlyear} \noinherit{urlmonth} \noinherit{urlday} - \noinherit{urlseason} + \noinherit{urlyeardivision} \noinherit{urlhour} \noinherit{urlminute} \noinherit{doi} @@ -9693,19 +10233,19 @@ \noinherit{year} \noinherit{month} \noinherit{day} - \noinherit{season} + \noinherit{yeardivision} \noinherit{endyear} \noinherit{endmonth} \noinherit{endday} - \noinherit{endseason} + \noinherit{endyeardivision} \noinherit{origyear} \noinherit{origmonth} \noinherit{origday} - \noinherit{origseason} + \noinherit{origyeardivision} \noinherit{origendyear} \noinherit{origendmonth} \noinherit{origendday} - \noinherit{origendseason}} + \noinherit{origendyeardivision}} \DeclareSortingTemplate{cms}{% Updated for biblatex > 3.7 \sort{ @@ -9910,8 +10450,8 @@ {}}% \ifentrytype{letter}% {\iftoggle{cms@switchdates}% - {\clearfield{year}\clearfield{month}\clearfield{season}}% - {\clearfield{origyear}\clearfield{origmonth}\clearfield{origseason}}% + {\clearfield{year}\clearfield{month}\clearfield{yeardivision}}% + {\clearfield{origyear}\clearfield{origmonth}\clearfield{origyeardivision}}% \clearfield{origlocation}}% {}% \clearfield{reprinttitle}% @@ -9998,7 +10538,7 @@ {\usebibmacro{at+every+item}\toggletrue{cms@fullnote}% \iffieldundef{savedyear}{}{\clearfield{year}}% \iffieldundef{savedmonth}{}{\clearfield{month}}% - \iffieldundef{savedseason}{}{\clearfield{season}}% + \iffieldundef{savedyeardivision}{}{\clearfield{yeardivision}}% \iffieldundef{savedurl}{}{\clearfield{url}}% \iffieldundef{savedaddendum}{}{\clearfield{addendum}}% \usebibmacro{bib:related:full}}}}% @@ -10130,6 +10670,7 @@ {}% {\clearname{author}}}% {}}% + \togglefalse{cms@headlessnote}% \usebibmacro{at+every+item}% \renewbibmacro*{related:init}{}% \DeclareNameAlias{sortname}{default}% |