summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx939
1 files changed, 650 insertions, 289 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx
index 66907a36043..e0d5e5a59af 100644
--- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.bbx
@@ -1,15 +1,20 @@
-% $Id: chicago-notes.bbx,v 0.9.7.64 2016/03/21 18:06:34 dfussner Exp $
+% $Id: chicago-notes.bbx,v 0.9.8.28 2016/06/07 07:43:24 dfussner Exp $
% This is a biblatex style file, adapted mainly from Lehman's standard.bbx
% It provides the bibliography formatting for the Chicago notes +
% bibliography style.
-\ProvidesFile{chicago-notes.bbx}[2016/03/21 v 2.9a biblatex bibliography style]
+\ProvidesFile{chicago-notes.bbx}[2016/06/07 v 3.4 biblatex bibliography style]
%%%% Initialize and format bibliography and los %%%%
+\providetoggle{cms@citejtabb}% Here for Sourcemap declaration
+\providetoggle{cms@bibjtabb}%
+
\DeclareFieldFormat{shorthandwidth}{#1}
+\DeclareFieldFormat{shortjournalwidth}{\mkbibemph{\textbf{#1}}\isdot}
+
\newlength{\lositemsep}
\defbibenvironment{bibliography}% New for 0.9a
@@ -37,8 +42,8 @@
\defbibenvironment{shorthands}% For biblatex < 2.9
{\list
- {\printfield[shorthandwidth]{shorthand}}%
- {\setlength{\labelwidth}{\shorthandwidth}%
+ {\printfield[shorthandwidth]{shorthand}}%
+ {\setlength{\labelwidth}{\shorthandwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
@@ -76,6 +81,62 @@
{\endlist\nopunct\vspace{-\baselineskip}}% Kludges for endnotes
{\item}
+\defbibenvironment{shortjournal}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.7\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist}
+ {\item}
+
+\defbibenvironment{sjnotes}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\footnotesize%
+ \setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.3\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist}
+ {\item}
+
+\defbibenvironment{sjendnotes}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\enotesize%
+ \setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.3\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist\nopunct\vspace{-\baselineskip}}
+ {\item}
+
+\defbibcheck{shortjournal}{% Only one list
+ \iffieldundef{shortjournal}%
+ {\skipentry}%
+ {\ifcsdef{\strfield{shortjournal}}%
+ {\skipentry}%
+ {\savefieldcs{shortjournal}%
+ {\strfield{shortjournal}}}}}%
+
+% \defbibcheck{shortjournal}{% Multiple lists
+% \ifcsdef{cms@shjour}%
+% {\iffieldequals{shortjournal}{\cms@shjour}%
+% {\skipentry}%
+% {\savefield{shortjournal}{\cms@shjour}}}%
+% {\savefield{shortjournal}{\cms@shjour}}}
+
\AtBeginBibliography{%
\togglefalse{cms@headlessnote}%
\togglefalse{cms@shortnote}%
@@ -154,12 +215,12 @@
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
- {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}%
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\addhighpenspace}}%
\mkbibnamelast{#1}\isdot
\ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#2}\isdot}%
- \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}
+ \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}%
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot%
@@ -174,8 +235,8 @@
\ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\addlowpenspace}%
\ifblank{#3}{}{%
\mkbibnameprefix{#3}\isdot
- \ifpunctmark{'}
- {}
+ \ifpunctmark{'}%
+ {}%
{\ifuseprefix{\addhighpenspace}{\addlowpenspace}}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{%
@@ -183,51 +244,51 @@
{\ifnumeral{#4}%
{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot%
- \ifboolexpr{
+ \ifboolexpr{%
test{\ifnumless{\value{listcount}}{\value{listtotal}}}%
and
test{\ifnumless{\value{listcount}}{\value{maxnames}}}%
- }
+ }%
{\addcomma}%
{}}}%
{\addlowpenspace\mkbibnameaffix{#4}\isdot}}}
-\@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3/3.4
+\@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3
{\renewbibmacro*{name:family-given}[4]{%
- \ifuseprefix%
+ \ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifdefvoid{#3}{}{%
- \ifcapital%
+ \ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}%
{\mkbibnameprefix{#3}\isdot}%
\ifprefchar{}{\bibnamedelimc}}%
- \mkbibnamefamily{#1}\isdot%
+ \mkbibnamefamily{#1}\isdot
\ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}%
{\usebibmacro{name:delim}{#1}%
- \usebibmacro{name:hook}{#1}%
- \mkbibnamefamily{#1}\isdot%
- \ifboolexpr{%
- test {\ifdefvoid{#2}}%
- and
- test {\ifdefvoid{#3}}%
- }%
- {}{\revsdnamepunct}%
- \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
- \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
- \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}%
+ \usebibmacro{name:hook}{#1}%
+ \mkbibnamefamily{#1}\isdot
+ \ifboolexpr{%
+ test {\ifdefvoid{#2}}%
+ and
+ test {\ifdefvoid{#3}}%
+ }%
+ {}{\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
+ \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+ \ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}%
\renewbibmacro*{name:given-family}[4]{%
\usebibmacro{name:delim}{#2#3#1}%
\usebibmacro{name:hook}{#2#3#1}%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
\ifdefvoid{#3}{}{%
- \mkbibnameprefix{#3}\isdot%
- \ifprefchar%
+ \mkbibnameprefix{#3}\isdot
+ \ifprefchar
{}%
{\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
- \mkbibnamefamily{#1}\isdot%
+ \mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{%
\iftoggle{cms@jrcomma}%
{\ifnumeral{#4}%
@@ -242,88 +303,38 @@
{}}}%
{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}}{}%
-\newbibmacro*{author/editors/translators}{%
- \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
- {\usebibmacro{author}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}%
- {\usebibmacro{parteditor}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}%
- {\usebibmacro{editor}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}%
- {\usebibmacro{parttranslator}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}%
- {\usebibmacro{translator}}%
- {\ifnameundef{namec}%
- {\let\bbx@lasthash\undefined}%
- {\usebibmacro{compiler}}}}}}}}
-
\renewbibmacro*{author/editor}{%
- \ifuseauthor%
- {\usebibmacro{author}}%
+ \ifboolexpr{%
+ test {\ifuseauthor}%
+ or
+ togl {cms@headlessnote}
+ }%
+ {\usebibmacro{author}}%
+ {\ifusenamea%
+ {\usebibmacro{pickeditor}}%
{\ifuseeditor%
- {\ifnameundef{namea}%
- {\usebibmacro{moreeditor}}%
- {\usebibmacro{parteditor}}}%
- {\ifusetranslator%
- {\ifnameundef{nameb}%
+ {\usebibmacro{moreeditor}}%
+ {\ifusenameb%
+ {\usebibmacro{picktranslator}}%
+ {\ifusetranslator%
{\usebibmacro{moretranslator}}%
- {\usebibmacro{parttranslator}}}%
- {\iftoggle{cms@usecompiler}%
- {\usebibmacro{compiler}}%
- {\let\bbx@lasthash\undefined%
- \settoggle{cms@usecompiler}{true}}}}}}
+ {\ifusenamec%
+ {\usebibmacro{compiler}}%
+ {\let\bbx@lasthash\undefined}}}}}}}%
\renewbibmacro*{author}{%
\iftoggle{cms@headlessnote}%
{\usebibmacro{justauthor}}%
{\usebibmacro{moreauthor}}}
-\newbibmacro*{allauthor}{%
- \ifnameundef{author}%
- {\ifnameundef{editor}%
- {\ifnameundef{translator}%
- {\ifnameundef{namec}%
- {\let\bbx@lasthash\undefined}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames[sortname]{namec}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{compilestrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames[sortname]{translator}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{transstrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames{editor}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{editstrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\iffieldundef{nameaddon}%
- {\bibnamedash\addperiod\addspace}
- {\bibnamedash\addspace}}%
- {\iffieldequalstr{authortype}{anon}%
- {\bibleftbracket\printnames{author}\bibrightbracket%
- \savefield{namehash}{\bbx@lasthash}}%
- {\iffieldequalstr{authortype}{anon?}%
- {\bibleftbracket\printnames{author}\addquestion\bibrightbracket%
- \savefield{namehash}{\bbx@lasthash}}%
- {\printnames{author}%
- \savefield{namehash}{\bbx@lasthash}}}}}}
-
\newbibmacro*{justauthor}{%
- \ifnameundef{author}
+ \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}%
{\iftoggle{cms@origcite}{}{\let\bbx@lasthash\undefined}}%
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
{\iffieldundef{nameaddon}%
- {\bibnamedash\addperiod\addspace}
- {\bibnamedash\addspace}}
+ {\bibnamedash\addperiod\addspace}%
+ {\bibnamedash\addspace}}%
{\iffieldequalstr{authortype}{anon}%
{\bibleftbracket\printnames{author}\bibrightbracket%
\savefield{fullhash}{\bbx@lasthash}}%
@@ -334,13 +345,13 @@
\savefield{fullhash}{\bbx@lasthash}}}}}}
\newbibmacro*{moreauthor}{%
- \ifnameundef{author}
- {\usebibmacro{pickeditor}}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
+ \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}%
+ {\usebibmacro{pickeditor}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
{\iffieldundef{nameaddon}%
- {\bibnamedash\addperiod\addspace}
- {\bibnamedash\addspace}}
+ {\bibnamedash\addperiod\addspace}%
+ {\bibnamedash\addspace}}%
{\iffieldequalstr{authortype}{anon}%
{\bibleftbracket\printnames{author}\bibrightbracket%
\savefield{fullhash}{\bbx@lasthash}}%
@@ -351,76 +362,81 @@
\savefield{fullhash}{\bbx@lasthash}}}}}}
\newbibmacro*{pickeditor}{%
- \ifnameundef{namea}
+ \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
{\usebibmacro{moreeditor}}%
{\usebibmacro{parteditor}}}
\newbibmacro*{moreeditor}{%
\ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}%
- {\usebibmacro{picktranslator}}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
{\bibnamedash\editordelim}%
{\printnames{editor}\editordelim%
\savefield{fullhash}{\bbx@lasthash}}%
\usebibmacro{editstrg}}}
\renewbibmacro*{editor}{%
- \ifnameundef{editor}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\editordelim}%
- {\printnames{editor}\editordelim%
+ \iftoggle{cms@headlessnote}%
+ {}%
+ {\ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
+ {\ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}%
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\editordelim}%
+ {\printnames{editor}\editordelim%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{editstrg}}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\nameadelim}%
+ {\printnames[sortname]{namea}\nameadelim%
\savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{editstrg}}}
+ \usebibmacro{parteditstrg}}}}%
\newbibmacro*{parteditor}{%
- \ifnameundef{namea}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\printnames[sortname]{namea}\addcomma\space
+ \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\nameadelim}%
+ {\printnames[sortname]{namea}\nameadelim%
\savefield{fullhash}{\bbx@lasthash}}%
\usebibmacro{parteditstrg}}}
\newbibmacro*{picktranslator}{%
- \ifnameundef{nameb}
+ \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}%
{\usebibmacro{moretranslator}}%
{\usebibmacro{parttranslator}}}
\newbibmacro*{moretranslator}{%
\ifthenelse{\ifnameundef{translator}\OR\NOT\ifusetranslator}%
- {\usebibmacro{compiler}}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\printnames[sortname]{translator}\addcomma\space
+ {\usebibmacro{compiler}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\printnames[sortname]{translator}\addcomma\addspace%
\savefield{fullhash}{\bbx@lasthash}}%
\usebibmacro{transstrg}}}
\newbibmacro*{parttranslator}{%
- \ifnameundef{nameb}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\printnames[sortname]{nameb}\addcomma\space
+ \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}%
+ {\usebibmacro{compiler}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\printnames[sortname]{nameb}\addcomma\addspace%
\savefield{fullhash}{\bbx@lasthash}}%
\usebibmacro{parttransstrg}}}
\newbibmacro*{compiler}{%
- \ifboolexpr{
- test {\ifnameundef{namec}}%
- or
- not togl {cms@usecompiler}%
- }%
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\printnames[sortname]{namec}\addcomma\space
+ \ifthenelse{\ifnameundef{namec}\OR\NOT\ifusenamec}%
+ {\let\bbx@lasthash\undefined}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\printnames[sortname]{namec}\addcomma\addspace%
\savefield{fullhash}{\bbx@lasthash}}%
\usebibmacro{compilestrg}}}
@@ -446,10 +462,36 @@
{\printtext[bibhyperref]{\printlist{organization}\newcunit}}%
{}}}%
{\usebibmacro{author/editor}%
- \setunit{\addcomma\space}}%
+ \setunit{\addcomma\addspace}}%
\printfield[lostitle]{title}%
\finentry}}
+\DeclareBibliographyDriver{shortjournal}{%
+ \iffieldundef{journaltitle}%
+ {\printtext[title]{%
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}%
+ \setunit*{\addspace}%
+ \printlist[periodplace]{location}}%
+ {\printtext[journaltitle]{%
+ \printfield[jtnoformat]{journaltitle}%
+ \setunit{\addcolon\addspace}%
+ \printfield[sjtnoformat]{journalsubtitle}}%
+ \setunit*{\addspace}%
+ \printlist[periodplace]{location}}%
+ \finentry}%
+
+\DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map{
+ \pertype{periodical}
+ \step[fieldsource=shorttitle, final]
+ \step[fieldset=shortjournal, origfieldval]
+ }
+ }
+}%
+
\DeclareBibliographyDriver{shorthands}{% For biblatex < 2.9
\iftoggle{cms@fullshhand}%
{\usedriver{\frenchspacing}%
@@ -464,7 +506,7 @@
{\printtext[bibhyperref]{\printlist{organization}\newcunit}}%
{}}}%
{\usebibmacro{author/editor}%
- \setunit{\addcomma\space}}%
+ \setunit{\addcomma\addspace}}%
\printfield[lostitle]{title}%
\finentry}}
@@ -501,6 +543,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
@@ -534,6 +581,12 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
+ \newunit\newblock
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -569,6 +622,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -586,7 +644,7 @@
\newcunit%\setunit{\addperiod\addspace}%
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\setunit{\addperiod\addspace}}% Fix customc?
{\setunit{\addcomma\addspace}}%
\iffieldundef{edition}%
@@ -596,15 +654,15 @@
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\printfield{volume}%
\printfield{part}%
@@ -615,7 +673,7 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit\newblock
\usebibmacro{volume+pages}%
@@ -642,6 +700,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
@@ -710,32 +773,47 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -759,16 +837,16 @@
\newunit\newblock
\usebibmacro{part+editor+translator}%
\setunit*{\addperiod\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@bookbibxref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@bookbibxref}%
- }
+ }%
{\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -776,7 +854,7 @@
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -801,32 +879,47 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -852,6 +945,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -865,6 +963,8 @@
\setunit{\addspace}%
\usebibmacro{bib:xref+date}%
\newunit\newblock
+ \usebibmacro{part+editor+translator}%
+ \newunit\newblock
\ifboolexpr{%
test {\iffieldundef{crossref}}%
or
@@ -881,7 +981,7 @@
{}%
{\usebibmacro{edition}}%
\usebibmacro{editorpunct}%
- \usebibmacro{bytranslator+others}%
+ \usebibmacro{byeditor+others}%
\newunit
\usebibmacro{volume+or+volumes}%
\newunit\newblock
@@ -903,32 +1003,47 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -973,6 +1088,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -989,16 +1109,16 @@
\usebibmacro{byauthor}%
\setunit{\addperiod\addspace}%
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@bibcrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@bibcrossref}%
- }
+ }%
{\setunit{\addperiod\addspace}%
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
@@ -1030,13 +1150,18 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1044,13 +1169,18 @@
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\newunit}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1058,6 +1188,11 @@
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1074,16 +1209,16 @@
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@bibcrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@bibcrossref}%
- }
+ }%
{\newunit\newblock
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
@@ -1115,13 +1250,18 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1129,13 +1269,18 @@
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1143,6 +1288,11 @@
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1159,20 +1309,22 @@
\usebibmacro{byauthor}%
\setunit{\addperiod\addspace}%
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@bibcrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@bibcrossref}%
- }
+ }%
{\setunit{\addperiod\addspace}%
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newcunit\newblock
\usebibmacro{volume+pages}%
\newunit\newblock
\usebibmacro{ser+num}%
@@ -1191,13 +1343,18 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1205,13 +1362,18 @@
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1219,6 +1381,11 @@
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1241,7 +1408,7 @@
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -1275,6 +1442,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1286,7 +1458,7 @@
\newunit\newblock
\printtext[title]{%
\printfield[noformat]{title}}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit*{\addcomma\addspace}%
\usebibmacro{letter+date}%
@@ -1295,16 +1467,16 @@
\newunit\newblock%\bibsentence
\usebibmacro{part+editor+translator}%
\setunit*{\addperiod\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@bibcrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@bibcrossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
@@ -1333,13 +1505,18 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\newunit}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1347,13 +1524,18 @@
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\newunit}%
\usebibmacro{xrefprenote}% Volume fix
@@ -1361,6 +1543,11 @@
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1394,6 +1581,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1408,7 +1600,7 @@
{\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -1441,6 +1633,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1460,7 +1657,7 @@
\newunit\newblock
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\newunit}% Fix customc?
{\newcunit}%
\iffieldundef{edition}%
@@ -1470,15 +1667,15 @@
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\printfield{volume}%
\printfield{part}%
@@ -1489,7 +1686,7 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit\newblock
\usebibmacro{volume+pages}%
@@ -1526,6 +1723,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1555,8 +1757,8 @@
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
- \iffieldundef{urlyear}
- {}
+ \iffieldundef{urlyear}%
+ {}%
{\printurldate}% Date fix
\newunit\newblock
\iftoggle{cms@doionly}%
@@ -1574,6 +1776,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1590,8 +1797,8 @@
\printfield{type}%
\setunit{\addspace}%
\printfield{number}%
- \iflistundef{location}
- {}
+ \iflistundef{location}%
+ {}%
{\setunit*{\addspace}%
\printtext[parens]{%
\printlist[][-\value{listtotal}]{location}}}%
@@ -1613,6 +1820,12 @@
\usebibmacro{bib+doi+url}%
\newunit\newblock
\usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{periodical}{%
@@ -1673,6 +1886,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1686,6 +1904,8 @@
\setunit{\addspace}%
\usebibmacro{bib:xref+date}%
\newunit\newblock
+ \usebibmacro{part+editor+translator}%
+ \newunit\newblock
\ifboolexpr{%
test {\iffieldundef{crossref}}%
or
@@ -1697,6 +1917,8 @@
togl {cms@bookbibxref}%
}%
{\usebibmacro{mtitle+mstitle+vol+part+title+stitle}%
+ \usebibmacro{editorpunct}%
+ \usebibmacro{byeditor+others}%
\newunit\newblock
\usebibmacro{volume+or+volumes}%
\newunit\newblock
@@ -1716,32 +1938,47 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1764,7 +2001,7 @@
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -1789,6 +2026,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1822,6 +2064,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1838,7 +2085,7 @@
\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}%
- \setunit{\addspace}%
+ \setunit{\ptitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -1851,7 +2098,7 @@
\usebibmacro{editorpunct}%\newunit\newblock
\printfield{note}%
\setunit*{\addcomma\addspace}\newblock%
- \iffieldequalstr{entrysubtype}{magazine}
+ \iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{mag+news+date}%
\newcunit\newblock
\usebibmacro{chap+pag}}%
@@ -1867,6 +2114,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1918,6 +2170,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1947,6 +2204,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1978,6 +2240,11 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1992,8 +2259,8 @@
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
\iffieldundef{booktitle}% Comma after italics, period after quotes
- {\newcunit}
- {\newunit}%\setunit{\addspace}\newblock%
+ {\setunit{\ctitleaddonpunct}}%
+ {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock%
\printfield{titleaddon}%\usebibmacro{title+stitle}%
\setunit{\addspace}\newblock%\bibsentence
\usebibmacro{language+transtitle}%
@@ -2004,7 +2271,7 @@
\setunit{\addperiod\addspace}%
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\setunit{\addperiod\addspace}}% Fix customc?
{\setunit{\addcomma\addspace}}%
\iffieldundef{edition}%
@@ -2014,16 +2281,16 @@
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\printfield{volume}%
\printfield{part}%
\setunit{\addspace}
@@ -2033,8 +2300,8 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}%
\newcunit\newblock
\usebibmacro{volume+pages}%
\newunit\newblock
@@ -2060,14 +2327,19 @@
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
%%%% Other Formatting Macros %%%%
\newbibmacro*{bib+doi+url}{% 16th ed.
- \iffieldundef{urlyear}
- {}
+ \iffieldundef{urlyear}%
+ {}%
{\printurldate}% Date fix
\iffieldundef{addendum}% Punctuation fixes in 0.9.9c
{\newunit\newblock}%
@@ -2078,20 +2350,32 @@
{\printfield{doi}%
\setunit*{\addperiod\addspace}\newblock%
\clearfield{url}}}%
- {\iftoggle{cms@doi}%
+ {\ifboolexpr{%
+ togl {cms@doi}%
+ and
+ not test {\iffieldundef{doi}}%
+ }%
{\printfield{doi}%
\setunit*{\addperiod\addspace}\newblock}%
{}}%
- \iftoggle{cms@eprint}%
+ \ifboolexpr{%
+ togl {cms@eprint}%
+ and
+ not test {\iffieldundef{eprint}}%
+ }%
{\usebibmacro{eprint}%
\setunit*{\addperiod\addspace}\newblock}%
{}%
- \iftoggle{cms@url}%
+ \ifboolexpr{%
+ togl {cms@url}%
+ and
+ not test {\iffieldundef{url}}%
+ }%
{\printfield{url}}%
{}}%
\newbibmacro{bib:xref+date}{% Experiment for xrefs
- \ifboolexpr{
+ \ifboolexpr{%
togl {cms@omitxrefdate}%
or
togl {cms@bookbibxref}%
@@ -2110,8 +2394,8 @@
or
not togl {cms@switchdates}%
))
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
togl {cms@omitxrefdate}%
or
togl {cms@bookbibxref}%
@@ -2130,13 +2414,13 @@
or
not togl {cms@switchdates}%
))
- }
+ }%
{}%
{\printtext[parens]{\usebibmacro{date}}}}%
{\printtext[parens]{\usebibmacro{date}}}}
\newbibmacro*{volume+pages}{% Volume fix (modified)
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{maintitle}}%
or
togl {cms@vol}%
@@ -2161,7 +2445,7 @@
\printfield{part}%
\newcunit%
\printfield{pages}}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
togl {cms@hidevolumes}%
and
(
@@ -2176,15 +2460,15 @@
\printfield{volumes}}}}%
\newbibmacro*{mtitle+mstitle+vol+part+title+stitle}{%
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}% 16th ed (Also 15th?)
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\printfield{volume}%
\printfield{part}%
@@ -2195,12 +2479,12 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
\newbibmacro*{mtitle+mstitle+vol+part+btitle+bstitle}{%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{maintitle}
+ \iffieldundef{maintitle}%
{}%
{\ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)\OR%
\(\iffieldundef{booktitle}\AND\NOT\ifentrytype{bookinbook}\)}% ???
@@ -2209,7 +2493,7 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}
\printfield{maintitleaddon}%
\toggletrue{cms@vol}}% InIn fix
{\printfield{volume}%
@@ -2221,7 +2505,7 @@
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
\newbibmacro*{journal+issue+year+pages}{%
@@ -2241,7 +2525,7 @@
{\newcunit\printfield{pages}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -2249,7 +2533,7 @@
\newcunit\printfield{pages}}%
{\setunit{\addspace}%
\printtext[parens]{%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -2274,7 +2558,7 @@
{\newcunit\printfield{pages}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -2282,7 +2566,7 @@
\newcunit\printfield{pages}}%
{\setunit{\addspace}%
\printtext[parens]{%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -2291,14 +2575,14 @@
\printfield{pages}}}}
\newbibmacro*{bycompiler}{%
- \ifnameundef{namec}
- {}
- {\bibstring{bycompiler}\addspace
+ \ifnameundef{namec}%
+ {}%
+ {\bibstring{bycompiler}\addspace%
\printnames[bycompiler]{namec}}}
\renewbibmacro*{byeditor}{%
- \ifnameundef{editor}
- {}
+ \ifnameundef{editor}%
+ {}%
{\usebibmacro{bytypestrg}{editor}{editor}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
@@ -2306,20 +2590,20 @@
\usebibmacro{byeditorx}}
\renewbibmacro*{byeditorx}{%
- \ifnameundef{editora}
- {}
+ \ifnameundef{editora}%
+ {}%
{\usebibmacro{bytypestrg}{editora}{editor}%
\setunit{\addspace}%
\printnames[byeditora]{editora}%
\usebibmacro{editorpunct}}%
- \ifnameundef{editorb}
- {}
+ \ifnameundef{editorb}%
+ {}%
{\usebibmacro{bytypestrg}{editorb}{editor}%
\setunit{\addspace}%
\printnames[byeditorb]{editorb}%
\usebibmacro{editorpunct}}%
- \ifnameundef{editorc}
- {}
+ \ifnameundef{editorc}%
+ {}%
{\usebibmacro{bytypestrg}{editorc}{editor}%
\setunit{\addspace}%
\printnames[byeditorc]{editorc}%
@@ -2328,32 +2612,32 @@
\renewbibmacro*{byeditor+others}{%
\ifthenelse{\NOT\ifnameundef{editor}\AND
\(\iffieldundef{editortype}\OR
- \iffieldequalstr{editortype}{editor}\)}
+ \iffieldequalstr{editortype}{editor}\)}%
{\def\@tempa{byeditor}%
- \ifnamesequal{editor}{translator}
+ \ifnamesequal{editor}{translator}%
{\edef\@tempa{\@tempa tr}%
- \clearname{translator}}
+ \clearname{translator}}%
{}%
- \ifnamesequal{editor}{namec}
+ \ifnamesequal{editor}{namec}%
{\edef\@tempa{\@tempa cp}%
- \clearname{namec}}
+ \clearname{namec}}%
{}%
- \ifnamesequal{editor}{commentator}
+ \ifnamesequal{editor}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{editor}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{editor}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{editor}{introduction}
+ \ifnamesequal{editor}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{editor}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{editor}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{editor}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{editor}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
\bibstring{\@tempa}%
\setunit{\addspace}%
@@ -2365,62 +2649,62 @@
\usebibmacro{bytranslator+others}}
\renewbibmacro*{bytranslator+others}{%
- \ifnameundef{translator}
- {}
+ \ifnameundef{translator}%
+ {}%
{\def\@tempa{bytranslator}%
- \ifnamesequal{translator}{namec}
+ \ifnamesequal{translator}{namec}%
{\edef\@tempa{\@tempa cp}%
- \clearname{namec}}
+ \clearname{namec}}%
{}%
- \ifnamesequal{translator}{commentator}
+ \ifnamesequal{translator}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{translator}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{translator}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{translator}{introduction}
+ \ifnamesequal{translator}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{translator}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{translator}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{translator}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{translator}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
- \bibstring{\@tempa}\space
+ \bibstring{\@tempa}\addspace%
\printnames[bytranslator]{translator}%
\clearname{translator}%
\usebibmacro{editorpunct}}%
\usebibmacro{bycompiler+others}}
\newbibmacro*{bycompiler+others}{%
- \ifnameundef{namec}
- {}
+ \ifnameundef{namec}%
+ {}%
{\def\@tempa{bycompiler}%
- \ifnamesequal{namec}{commentator}
+ \ifnamesequal{namec}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{namec}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{namec}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{namec}{introduction}
+ \ifnamesequal{namec}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{namec}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{namec}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{namec}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{namec}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
- \bibstring{\@tempa}\space
+ \bibstring{\@tempa}\addspace%
\printnames[bycompiler]{namec}%
\clearname{namec}%
\usebibmacro{editorpunct}}%
- \usebibmacro{byothers}}
+ \usebibmacro{byothers}}%
\newbibmacro*{byothers}{% Changed for 0.9
\usebibmacro{bytranslator}%
@@ -2439,4 +2723,81 @@
\usebibmacro{editorpunct}%
\usebibmacro{withafterword}}
+%%%% Related functionality from standard.bbx %%%%
+
+\newcounter{bbx:relatedcount}
+\newcounter{bbx:relatedtotal}
+
+\newbibmacro*{related:init}{%
+ \csundef{bbx:relatedloop}}
+
+\newbibmacro*{begrelated}{\ifcsdef{bbx@lasthash}%
+ {\let\cms@related@hash\bbx@lasthash}{}}%
+\newbibmacro*{endrelated}{\ifcsdef{cms@related@hash}%
+ {\global\let\bbx@lasthash\cms@related@hash%
+ \let\cms@related@hash\undefined}{}}%
+\newbibmacro*{begrelatedloop}{}
+\newbibmacro*{endrelatedloop}{}
+
+\def\ifrelatedloop{%
+ \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}%
+ or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}
+
+\newbibmacro*{related}{%
+ \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }%
+ {}%
+ {\usebibmacro{begrelated}%
+ \def\bbx@tempa{}%
+ \setcounter{bbx:relatedtotal}{0}%
+ \def\do##1{%
+ \entrydata{##1}{%
+ \ifrelatedloop
+ {}%
+ {\stepcounter{bbx:relatedtotal}%
+ \gappto{\bbx@tempa}{##1,}}}}%
+ \docsvfield{related}%
+ \restorefield{related}{\bbx@tempa}%
+ \ifnumgreater{\value{bbx:relatedtotal}}{0}%
+ {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}%
+ \iffieldundef{clonesourcekey}%
+ {}%
+ {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}%
+ \setcounter{bbx:relatedcount}{0}%
+ \def\do{%
+ \stepcounter{bbx:relatedcount}%
+ \ifnumgreater{\value{bbx:relatedcount}}{1}%
+ {\printtext{\relateddelim}}%
+ {}}%
+ \ifbibmacroundef{related:\strfield{relatedtype}}%
+ {\appto{\do}{\usebibmacro{related:default}}}
+ {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
+ \iffieldformatundef{related:\strfield{relatedtype}}%
+ {\def\bbx@tempa{related}}
+ {\def\bbx@tempa{related:\strfield{relatedtype}}}%
+ \iffieldformatundef{relatedstring:\strfield{relatedtype}}
+ {\def\bbx@tempb{relatedstring:default}}
+ {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
+ \printtext[\bbx@tempa]{%
+ \usebibmacro{begrelatedloop}%
+ \iffieldundef{relatedstring}%
+ {\ifboolexpr{%
+ test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}%
+ and
+ test {\ifbibxstring{\thefield{relatedtype}s}}%
+ }%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}s}}}%
+ {\iffieldbibstring{relatedtype}%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}}}}%
+ {}}}%
+ {\iffieldbibstring{relatedstring}%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedstring}}}}%
+ {\printfield[\bbx@tempb]{relatedstring}}}%
+ \docsvfield{related}%
+ \usebibmacro{endrelatedloop}}}%
+ {}%
+ \usebibmacro{endrelated}}}
+
\endinput