summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-10 23:19:01 +0000
committerKarl Berry <karl@freefriends.org>2016-06-10 23:19:01 +0000
commit236222daf66574317ed37f1a93119fd2f44d68bf (patch)
tree6d645a139acce506db78e8215a1ea870bbcdef33 /Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx
parentd9c1a93c79b4a973a205cfb1294668982d337d98 (diff)
biblatex-chicago (7jun16)
git-svn-id: svn://tug.org/texlive/trunk@41351 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx1251
1 files changed, 835 insertions, 416 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx
index 3db9745b33e..f864ea55b06 100644
--- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate.bbx
@@ -1,15 +1,20 @@
-% $Id: chicago-authordate.bbx,v 0.8.2.9 2016/03/21 18:06:54 dfussner Exp $
+% $Id: chicago-authordate.bbx,v 0.8.2.22 2016/06/07 08:46:51 dfussner Exp $
% This is a biblatex style file, adapted mainly from Lehman's
% standard.bbx and from chicago-notes.bbx. It provides the
% reference list formatting for the Chicago author-date style.
-\ProvidesFile{chicago-authordate.bbx}[2016/03/21 v 2.9a biblatex
+\ProvidesFile{chicago-authordate.bbx}[2016/06/07 v 3.4 biblatex
bibliography style]
%%%% Initialize and format bibliography and los %%%%
+\providetoggle{cms@citejtabb}% Here for Sourcemap declaration
+\providetoggle{cms@bibjtabb}%
+
\DeclareFieldFormat{shorthandwidth}{#1}
+\DeclareFieldFormat{shortjournalwidth}{\mkbibemph{\textbf{#1}}\isdot}
+
\newlength{\lositemsep}
\defbibenvironment{bibliography}% New for 0.9a
@@ -76,6 +81,62 @@ bibliography style]
{\endlist\nopunct\vspace{-\baselineskip}}% Kludges for endnotes
{\item}
+\defbibenvironment{shortjournal}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.7\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist}
+ {\item}
+
+\defbibenvironment{sjnotes}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\footnotesize%
+ \setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.3\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist}
+ {\item}
+
+\defbibenvironment{sjendnotes}%
+ {\list
+ {\printfield[shortjournalwidth]{shortjournal}}%
+ {\enotesize%
+ \setlength{\labelwidth}{\shortjournalwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.3\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\lositemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{##1\hss}}}
+ {\endlist\nopunct\vspace{-\baselineskip}}
+ {\item}
+
+\defbibcheck{shortjournal}{% Only one list
+ \iffieldundef{shortjournal}%
+ {\skipentry}%
+ {\ifcsdef{\strfield{shortjournal}=\strfield{journaltitle}}%
+ {\skipentry}%
+ {\savefieldcs{shortjournal}%
+ {\strfield{shortjournal}=\strfield{journaltitle}}}}}%
+
+% \defbibcheck{shortjournal}{% Multiple lists
+% \ifcsdef{cms@shjour}%
+% {\iffieldequals{shortjournal}{\cms@shjour}%
+% {\skipentry}%
+% {\savefield{shortjournal}{\cms@shjour}}}%
+% {\savefield{shortjournal}{\cms@shjour}}}
+
\AtBeginBibliography{%
\togglefalse{cms@headlessnote}}%
@@ -104,12 +165,12 @@ bibliography style]
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
- {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}%
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\addhighpenspace}}%
\mkbibnamelast{#1}\isdot
\ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#2}\isdot}%
- \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}
+ \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}%
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot%
@@ -124,8 +185,8 @@ bibliography style]
\ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\addlowpenspace}%
\ifblank{#3}{}{%
\mkbibnameprefix{#3}\isdot
- \ifpunctmark{'}
- {}
+ \ifpunctmark{'}%
+ {}%
{\ifuseprefix{\addhighpenspace}{\addlowpenspace}}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{%
@@ -133,37 +194,37 @@ bibliography style]
{\ifnumeral{#4}%
{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot%
- \ifboolexpr{
+ \ifboolexpr{%
test{\ifnumless{\value{listcount}}{\value{listtotal}}}%
and
test{\ifnumless{\value{listcount}}{\value{maxnames}}}%
- }
+ }%
{\addcomma}%
{}}}%
- {\addlowpenspace\mkbibnameaffix{#4}\isdot}}}
+ {\addlowpenspace\mkbibnameaffix{#4}\isdot}}}%
\@ifpackagelater{biblatex}{2016/03/01}% For biblatex 3.3
{\renewbibmacro*{name:family-given}[4]{%
- \ifuseprefix%
+ \ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifdefvoid{#3}{}{%
- \ifcapital%
- {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}%
{\mkbibnameprefix{#3}\isdot}%
\ifprefchar{}{\bibnamedelimc}}%
- \mkbibnamefamily{#1}\isdot%
+ \mkbibnamefamily{#1}\isdot
\ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}%
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
- \mkbibnamefamily{#1}\isdot%
+ \mkbibnamefamily{#1}\isdot
\ifboolexpr{%
test {\ifdefvoid{#2}}%
and
test {\ifdefvoid{#3}}%
}%
- {}{\revsdnamepunct}%
+ {}{\revsdnamepunct}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
\ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}%
@@ -173,11 +234,11 @@ bibliography style]
\usebibmacro{name:hook}{#2#3#1}%
\ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
\ifdefvoid{#3}{}{%
- \mkbibnameprefix{#3}\isdot%
- \ifprefchar%
+ \mkbibnameprefix{#3}\isdot
+ \ifprefchar
{}%
{\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
- \mkbibnamefamily{#1}\isdot%
+ \mkbibnamefamily{#1}\isdot
\ifdefvoid{#4}{}{%
\iftoggle{cms@jrcomma}%
{\ifnumeral{#4}%
@@ -187,93 +248,43 @@ bibliography style]
test{\ifnumless{\value{listcount}}{\value{listtotal}}}%
and
test{\ifnumless{\value{listcount}}{\value{maxnames}}}%
- }
+ }%
{\revsdnamepunct}%
{}}}%
{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}}{}%
-\newbibmacro*{author/editors/translators}{%
- \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
- {\usebibmacro{author}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}%
- {\usebibmacro{parteditor}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}%
- {\usebibmacro{editor}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}%
- {\usebibmacro{parttranslator}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}%
- {\usebibmacro{translator}}%
- {\ifnameundef{namec}%
- {\let\bbx@lasthash\undefined}%
- {\usebibmacro{compiler}}}}}}}}
-
\renewbibmacro*{author/editor}{%
- \ifuseauthor%
- {\usebibmacro{author}}%
+ \ifboolexpr{%
+ test {\ifuseauthor}%
+ or
+ togl {cms@headlessnote}%
+ }%
+ {\usebibmacro{author}}%
+ {\ifusenamea%
+ {\usebibmacro{pickeditor}}%
{\ifuseeditor%
- {\ifnameundef{namea}%
- {\usebibmacro{moreeditor}}%
- {\usebibmacro{parteditor}}}%
- {\ifusetranslator%
- {\ifnameundef{nameb}%
+ {\usebibmacro{moreeditor}}%
+ {\ifusenameb%
+ {\usebibmacro{picktranslator}}%
+ {\ifusetranslator%
{\usebibmacro{moretranslator}}%
- {\usebibmacro{parttranslator}}}%
- {\iftoggle{cms@usecompiler}%
- {\usebibmacro{compiler}}%
- {\let\bbx@lasthash\undefined%
- \settoggle{cms@usecompiler}{true}}}}}}
+ {\ifusenamec%
+ {\usebibmacro{compiler}}%
+ {\let\bbx@lasthash\undefined}}}}}}}%
\renewbibmacro*{author}{%
\iftoggle{cms@headlessnote}%
{\usebibmacro{justauthor}}%
{\usebibmacro{moreauthor}}}
-\newbibmacro*{allauthor}{%
- \ifnameundef{author}%
- {\ifnameundef{editor}%
- {\ifnameundef{translator}%
- {\ifnameundef{namec}%
- {\let\bbx@lasthash\undefined}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames[sortname]{namec}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{compilestrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames[sortname]{translator}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{transstrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\space}
- {\printnames{editor}\addcomma\space
- \savefield{namehash}{\bbx@lasthash}}%
- \usebibmacro{editstrg}}}%
- {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\iffieldundef{nameaddon}%
- {\bibnamedash\addperiod\addspace}
- {\bibnamedash\addspace}}%
- {\iffieldequalstr{authortype}{anon}%
- {\bibleftbracket\printnames{author}\bibrightbracket%
- \savefield{namehash}{\bbx@lasthash}}%
- {\iffieldequalstr{authortype}{anon?}%
- {\bibleftbracket\printnames{author}\addquestion\bibrightbracket%
- \savefield{namehash}{\bbx@lasthash}}%
- {\printnames{author}%
- \savefield{namehash}{\bbx@lasthash}}}}}}
-
\newbibmacro*{justauthor}{%
- \ifnameundef{author}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
+ \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}%
+ {\let\bbx@lasthash\undefined}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
{\iffieldundef{nameaddon}%
- {\bibnamedash\addperiod\addspace}
- {\bibnamedash\addspace}}
+ {\bibnamedash\addperiod\addspace}%
+ {\bibnamedash\addspace}}%
{\iffieldequalstr{authortype}{anon}%
{\bibleftbracket\printnames{author}\bibrightbracket%
\savefield{fullhash}{\bbx@lasthash}}%
@@ -284,7 +295,7 @@ bibliography style]
\savefield{fullhash}{\bbx@lasthash}}}}}}
\newbibmacro*{moreauthor}{%
- \ifnameundef{author}%
+ \ifthenelse{\ifnameundef{author}\OR\NOT\ifuseauthor}%
{\usebibmacro{pickeditor}}%
{\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
\iffirstonpage}%
@@ -303,15 +314,15 @@ bibliography style]
\savefield{fullhash}{\bbx@lasthash}}}}}}
\newbibmacro*{pickeditor}{%
- \ifnameundef{namea}
+ \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
{\usebibmacro{moreeditor}}%
{\usebibmacro{parteditor}}}
\newbibmacro*{moreeditor}{%
- \ifnameundef{editor}
- {\usebibmacro{picktranslator}}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
+ \ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}%
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
{\bibnamedash\editordelim}%
{\iftoggle{cms@authorparens}%
{\bibopenparen\printnames{editor}%
@@ -321,74 +332,86 @@ bibliography style]
\usebibmacro{editstrg}}}
\renewbibmacro*{editor}{%
- \ifnameundef{editor}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\editordelim}
- {\iftoggle{cms@authorparens}%
- {\bibopenparen\printnames{editor}%
- \bibcloseparen\editordelim}%
- {\printnames{editor}\editordelim}%
+ \iftoggle{cms@headlessnote}%
+ {}%
+ {\ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
+ {\ifthenelse{\ifnameundef{editor}\OR\NOT\ifuseeditor}%
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\editordelim}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames{editor}%
+ \bibcloseparen\editordelim}%
+ {\printnames{editor}\editordelim}%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{editstrg}}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\nameadelim}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames[sortname]{namea}%
+ \bibcloseparen\nameadelim}%
+ {\printnames[sortname]{namea}\nameadelim}%
\savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{editstrg}}}
+ \usebibmacro{parteditstrg}}}}
\newbibmacro*{parteditor}{%
- \ifnameundef{namea}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\iftoggle{cms@authorparens}%
- {\bibopenparen\printnames[sortname]{namea}%
- \bibcloseparen\addcomma\space}%
- {\printnames[sortname]{namea}\addcomma\space}%
- \savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{parteditstrg}}}
+ \ifthenelse{\ifnameundef{namea}\OR\NOT\ifusenamea}%
+ {\usebibmacro{picktranslator}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\nameadelim}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames[sortname]{namea}%
+ \bibcloseparen\nameadelim}%
+ {\printnames[sortname]{namea}\nameadelim}%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{parteditstrg}}}
\newbibmacro*{picktranslator}{%
- \ifnameundef{nameb}
+ \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}%
{\usebibmacro{moretranslator}}%
{\usebibmacro{parttranslator}}}
\newbibmacro*{moretranslator}{%
- \ifnameundef{translator}
- {\usebibmacro{compiler}}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\iftoggle{cms@authorparens}%
- {\bibopenparen\printnames[sortname]{translator}%
- \bibcloseparen\addcomma\space}%
- {\printnames[sortname]{translator}\addcomma\space}%
- \savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{transstrg}}}
+ \ifthenelse{\ifnameundef{translator}\OR\NOT\ifusetranslator}%
+ {\usebibmacro{compiler}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames[sortname]{translator}%
+ \bibcloseparen\addcomma\addspace}%
+ {\printnames[sortname]{translator}\addcomma\addspace}%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{transstrg}}}
\newbibmacro*{parttranslator}{%
- \ifnameundef{nameb}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\iftoggle{cms@authorparens}%
- {\bibopenparen\printnames[sortname]{nameb}%
- \bibcloseparen\addcomma\space}%
- {\printnames[sortname]{nameb}\addcomma\space}%
- \savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{parttransstrg}}}
+ \ifthenelse{\ifnameundef{nameb}\OR\NOT\ifusenameb}%
+ {\usebibmacro{compiler}}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames[sortname]{nameb}%
+ \bibcloseparen\addcomma\addspace}%
+ {\printnames[sortname]{nameb}\addcomma\addspace}%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{parttransstrg}}}
\newbibmacro*{compiler}{%
- \ifnameundef{namec}
- {\let\bbx@lasthash\undefined}
- {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT
- \iffirstonpage}
- {\bibnamedash\addcomma\addspace}
- {\iftoggle{cms@authorparens}%
- {\bibopenparen\printnames[sortname]{namec}%
- \bibcloseparen\addcomma\space}%
- {\printnames[sortname]{namec}\addcomma\space}%
- \savefield{fullhash}{\bbx@lasthash}}%
- \usebibmacro{compilestrg}}}
+ \ifthenelse{\ifnameundef{namec}\OR\NOT\ifusenamec}%
+ {\let\bbx@lasthash\undefined}%
+ {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
+ \iffirstonpage}%
+ {\bibnamedash\addcomma\addspace}%
+ {\iftoggle{cms@authorparens}%
+ {\bibopenparen\printnames[sortname]{namec}%
+ \bibcloseparen\addcomma\addspace}%
+ {\printnames[sortname]{namec}\addcomma\addspace}%
+ \savefield{fullhash}{\bbx@lasthash}}%
+ \usebibmacro{compilestrg}}}
\renewcommand*{\revsdnamedelim}{\addcomma}
@@ -400,7 +423,7 @@ bibliography style]
\DeclareBibliographyDriver{shorthand}{%
\iftoggle{cms@los}%
- {\ifnameundef{labelname}
+ {\ifnameundef{labelname}%
{\mkbibemph{\bibstring{see}}%
\addspace%
\usebibmacro{shorthand:label}}%
@@ -412,14 +435,14 @@ bibliography style]
{\usedriver{\frenchspacing}%
{\thefield{entrytype}}%
\finentry}%
- {\ifnameundef{labelname}
+ {\ifnameundef{labelname}%
{\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT%
\ifentrytype{periodical}}%
{\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}%
\newcunit}}%
{\ifentrytype{manual}%
{\printtext[bibhyperref]{\printlist{organization}\newcunit}}%
- {}}}
+ {}}}%
{\usebibmacro{author/editor}%
\setunit{\addcomma\space}}%
\printfield[lostitle]{title}%
@@ -427,7 +450,7 @@ bibliography style]
\DeclareBibliographyDriver{shorthands}{% biblatex < 2.9
\iftoggle{cms@los}%
- {\ifnameundef{labelname}
+ {\ifnameundef{labelname}%
{\mkbibemph{\bibstring{see}}%
\addspace%
\usebibmacro{shorthand:label}}%
@@ -439,19 +462,45 @@ bibliography style]
{\usedriver{\frenchspacing}%
{\thefield{entrytype}}%
\finentry}%
- {\ifnameundef{labelname}
+ {\ifnameundef{labelname}%
{\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT%
\ifentrytype{periodical}}%
{\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}%
\newcunit}}%
{\ifentrytype{manual}%
{\printtext[bibhyperref]{\printlist{organization}\newcunit}}%
- {}}}
+ {}}}%
{\usebibmacro{author/editor}%
\setunit{\addcomma\space}}%
\printfield[lostitle]{title}%
\finentry}}}
+\DeclareBibliographyDriver{shortjournal}{%
+ \iffieldundef{journaltitle}%
+ {\printtext[title]{%
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}%
+ \setunit*{\addspace}%
+ \printlist[periodplace]{location}}%
+ {\printtext[journaltitle]{%
+ \printfield[jtnoformat]{journaltitle}%
+ \setunit{\addcolon\addspace}%
+ \printfield[sjtnoformat]{journalsubtitle}}%
+ \setunit*{\addspace}%
+ \printlist[periodplace]{location}}%
+ \finentry}%
+
+\DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map{
+ \pertype{periodical}
+ \step[fieldsource=shorttitle, final]
+ \step[fieldset=shortjournal, origfieldval]
+ }
+ }
+}%
+
\DeclareBibliographyDriver{article}{%
\iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{bibindex}%
@@ -465,6 +514,8 @@ bibliography style]
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
\newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock
\usebibmacro{part+editor+translator}%
\newunit\newblock%
\usebibmacro{bibreprint}%
@@ -490,6 +541,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
@@ -529,6 +585,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -571,6 +632,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -581,10 +647,20 @@ bibliography style]
\setunit{\addspace}%
\printfield{nameaddon}%
\newunit\newblock
- \ifundef\bbx@lasthash{\usebibmacro{italtitle+stitle}}{}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ and
+ not test {\iffieldundef{title}}%
+ }%
+ {\usebibmacro{italtitle+stitle}}{}%
\usebibmacro{cmsbibsortdate}%
\newunit\newblock
- \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ or
+ test {\iffieldundef{title}}%
+ }%
+ {}{\usebibmacro{italtitle+stitle}}%
\newunit\newblock% 16th ed.
\usebibmacro{byauthor}%
\newunit\newblock
@@ -592,7 +668,7 @@ bibliography style]
\newcunit%\setunit{\addperiod\addspace}%
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\setunit{\addperiod\addspace}}% Fix customc?
{\setunit{\addcomma\addspace}}%
\iffieldundef{edition}%
@@ -602,27 +678,29 @@ bibliography style]
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
- {\usebibmacro{cms-in:}%
+ {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}%
+ {\usebibmacro{cms-in:}}%
+ {\bibstring{in}\setunit{\addspace}}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}%
\newcunit\newblock
\usebibmacro{volume+pages}%
\newunit\newblock
@@ -651,6 +729,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
@@ -672,7 +755,7 @@ bibliography style]
{\usebibmacro{edition}}}%
{}%
\newunit\newblock% 16th ed.
- \usebibmacro{byauthor}
+ \usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{part+editor+translator}%
\newunit\newblock
@@ -724,32 +807,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -792,7 +890,7 @@ bibliography style]
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -820,32 +918,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -878,6 +991,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -893,6 +1011,8 @@ bibliography style]
\newunit\newblock
\ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}%
\newunit\newblock
+ \usebibmacro{part+editor+translator}%
+ \newunit\newblock
\ifboolexpr{%
test {\iffieldundef{crossref}}%
or
@@ -909,7 +1029,7 @@ bibliography style]
{}%
{\usebibmacro{edition}}%
\usebibmacro{editorpunct}%
- \usebibmacro{bytranslator+others}%
+ \usebibmacro{byeditor+others}%
\newunit
\usebibmacro{volume+or+volumes}%
\newunit\newblock
@@ -934,32 +1054,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1011,6 +1146,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1029,16 +1169,16 @@ bibliography style]
\usebibmacro{byauthor}%
\setunit{\addperiod\addspace}%
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@crossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@crossref}%
- }
+ }%
{\setunit{\addperiod\addspace}%
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
@@ -1073,32 +1213,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1117,16 +1272,16 @@ bibliography style]
\usebibmacro{byauthor}%
\setunit{\addperiod\addspace}%
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@crossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@crossref}%
- }
+ }%
{\setunit{\addperiod\addspace}% Moved here.
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
@@ -1161,32 +1316,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1205,16 +1375,16 @@ bibliography style]
\usebibmacro{byauthor}%
\setunit{\addperiod\addspace}%
\usebibmacro{part+editor+translator}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@crossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@crossref}%
- }
+ }%
{\setunit{\addperiod\addspace}%
\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
@@ -1242,32 +1412,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1292,7 +1477,7 @@ bibliography style]
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -1329,6 +1514,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1343,7 +1533,7 @@ bibliography style]
\newunit\newblock
\printtext[title]{%
\printfield[noformat]{title}}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit*{\addcomma\addspace}%
\usebibmacro{letter+date}%
@@ -1352,16 +1542,16 @@ bibliography style]
\newunit\newblock%\bibsentence
\usebibmacro{part+editor+translator}%
\setunit*{\addperiod\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
togl {cms@crossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
togl {cms@crossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{mtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
@@ -1393,32 +1583,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\newunit}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\newunit}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1459,6 +1664,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1479,7 +1689,7 @@ bibliography style]
{\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -1515,6 +1725,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1525,10 +1740,20 @@ bibliography style]
\setunit{\addspace}%
\printfield{nameaddon}%
\newunit\newblock
- \ifundef\bbx@lasthash{\usebibmacro{italtitle+stitle}}{}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ and
+ not test {\iffieldundef{title}}%
+ }%
+ {\usebibmacro{italtitle+stitle}}{}%
\usebibmacro{cmsbibsortdate}%
\newunit\newblock
- \ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ or
+ test {\iffieldundef{title}}%
+ }%
+ {}{\usebibmacro{italtitle+stitle}}%
\newunit% 16th ed.
\usebibmacro{byauthor}%
\newunit\newblock
@@ -1538,7 +1763,7 @@ bibliography style]
\newunit\newblock
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\newunit}% Fix customc?
{\newcunit}%
\iffieldundef{edition}%
@@ -1548,27 +1773,29 @@ bibliography style]
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
- {\usebibmacro{cms-in:}%
+ {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}%
+ {\usebibmacro{cms-in:}}%
+ {\bibstring{in}\setunit{\addspace}}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}%
\newcunit\newblock
\usebibmacro{volume+pages}%
\newunit\newblock
@@ -1604,6 +1831,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1657,6 +1889,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1675,8 +1912,8 @@ bibliography style]
\printfield{type}%
\setunit{\addspace}%
\printfield{number}%
- \iflistundef{location}
- {}
+ \iflistundef{location}%
+ {}%
{\setunit*{\addspace}%
\printtext[parens]{%
\printlist[][-\value{listtotal}]{location}}}%
@@ -1709,6 +1946,11 @@ bibliography style]
\usebibmacro{bib+doi+url}%
\newunit\newblock
\usebibmacro{pageref}%
+ \iftoggle{cms@related}%
+ {\newunit%
+ \usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{periodical}{%
@@ -1718,11 +1960,15 @@ bibliography style]
\setunit{\addspace}%
\printfield{nameaddon}%
\newunit\newblock
- \ifundef\bbx@lasthash{%
- \printtext[title]{% magazine subtype
- \printfield[noformat]{title}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ and
+ not togl {cms@origpublished}%
+ }%
+ {\printtext[title]{% magazine subtype
+ \printfield[tnoformat]{title}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
+ \printfield[stnoformat]{subtitle}}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\clearlist{location}%
@@ -1756,6 +2002,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
@@ -1763,11 +2014,15 @@ bibliography style]
\setunit{\addspace}%
\printfield{nameaddon}%
\newunit\newblock
- \ifundef\bbx@lasthash{%
- \printtext[title]{% magazine subtype
- \printfield[noformat]{title}%
+ \ifboolexpr{%
+ test {\ifundef{\bbx@lasthash}}%
+ and
+ not togl {cms@origpublished}%
+ }%
+ {\printtext[title]{% magazine subtype
+ \printfield[tnoformat]{title}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
+ \printfield[stnoformat]{subtitle}}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\clearlist{location}%
@@ -1801,6 +2056,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1816,6 +2076,8 @@ bibliography style]
\newunit\newblock
\ifundef\bbx@lasthash{}{\usebibmacro{italtitle+stitle}}%
\newunit\newblock
+ \usebibmacro{part+editor+translator}%
+ \newunit\newblock
\ifboolexpr{%
test {\iffieldundef{crossref}}%
or
@@ -1827,6 +2089,8 @@ bibliography style]
togl {cms@bookcrossref}%
}%
{\usebibmacro{mtitle+mstitle+vol+part+title+stitle}%
+ \usebibmacro{editorpunct}%
+ \usebibmacro{byeditor+others}%
\newunit\newblock
\usebibmacro{volume+or+volumes}%
\newunit\newblock
@@ -1849,32 +2113,47 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
- \bibxrefcite{\thefield{xref}}
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}%
{\ifboolexpr{% Changed for 16th ed.
test {\ifterm}%
or
test {\ifpunctmark{*}}%
- }
+ }%
{\setunit{\addspace\bibsentence}}%
{\setunit{\addperiod\addspace}}%
\usebibmacro{bibprexref}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{bibpostxref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}}
@@ -1899,7 +2178,7 @@ bibliography style]
{\usebibmacro{edition}}%
\newcunit
\usebibmacro{bybookauthor}%
- \usebibmacro{editorpunct}
+ \usebibmacro{editorpunct}%
\usebibmacro{byeditor+others}%
\newcunit\newblock
\printfield{chapter}%
@@ -1927,6 +2206,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1967,6 +2251,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -1991,13 +2280,15 @@ bibliography style]
{\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
- \setunit{\addspace}%
+ \setunit{\ptitleaddonpunct}%
\printfield{titleaddon}%
\newcunit\newblock
\usebibmacro{music+eventdate}% 16th ed.
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
\newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock
\usebibmacro{part+editor+translator}%
\newunit\newblock%
\usebibmacro{bibreprint}%
@@ -2007,7 +2298,7 @@ bibliography style]
\usebibmacro{editorpunct}%\newunit\newblock
\printfield{note}%
\setunit*{\addcomma\addspace}\newblock%
- \iffieldequalstr{entrysubtype}{magazine}
+ \iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{mag+news+date}%
\newcunit\newblock
\usebibmacro{chap+pag}}%
@@ -2025,6 +2316,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -2041,7 +2337,7 @@ bibliography style]
\usebibmacro{italtitle+stitle}%
\newcunit\newblock
\usebibmacro{bybookauthor}%
- \clearname{bookauthor}
+ \clearname{bookauthor}%
\newunit\newblock}{}%
\usebibmacro{cmsbibsortdate}%
\newunit\newblock
@@ -2091,6 +2387,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -2125,6 +2426,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -2161,6 +2467,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}
@@ -2174,19 +2485,19 @@ bibliography style]
\ifundef\bbx@lasthash{%
\usebibmacro{video+title}% Simplifies trad style
\iffieldundef{booktitle}% Comma after italics, period after quotes
- {\newcunit}
- {\newunit}%\setunit{\addspace}\newblock%
+ {\setunit{\ctitleaddonpunct}}%
+ {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock%
\printfield{titleaddon}%\usebibmacro{title+stitle}%
\setunit{\addspace}\newblock%\bibsentence
- \usebibmacro{language+transtitle}
+ \usebibmacro{language+transtitle}%
\newunit\newblock}{}%
\usebibmacro{cmsbibsortdate}%
\newunit\newblock
\ifundef\bbx@lasthash{}{%
\usebibmacro{video+title}% Simplifies trad style
\iffieldundef{booktitle}% Comma after italics, period after quotes
- {\newcunit}
- {\newunit}%\setunit{\addspace}\newblock%
+ {\setunit{\ctitleaddonpunct}}%
+ {\setunit{\ptitleaddonpunct}}%\setunit{\addspace}\newblock%
\printfield{titleaddon}%\usebibmacro{title+stitle}%
\setunit{\addspace}\newblock%\bibsentence
\usebibmacro{language+transtitle}}%
@@ -2197,7 +2508,7 @@ bibliography style]
\setunit{\addperiod\addspace}%
\usebibmacro{chapinscore}%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{booktitle}
+ \iffieldundef{booktitle}%
{\setunit{\addperiod\addspace}}% Fix customc?
{\setunit{\addcomma\addspace}}%
\iffieldundef{edition}%
@@ -2207,27 +2518,29 @@ bibliography style]
\usebibmacro{bybookauthor}%
\usebibmacro{byeditor+others}%
\newunit% ??? Editorpunct maybe not right here?
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
- {\usebibmacro{cms-in:}%
+ {\ifthenelse{\iffieldundef{title}\AND\iffieldundef{booktitle}}%
+ {\usebibmacro{cms-in:}}%
+ {\bibstring{in}\setunit{\addspace}}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}%
\newcunit\newblock
\usebibmacro{volume+pages}%
\newunit\newblock
@@ -2255,6 +2568,11 @@ bibliography style]
\newunit\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \iftoggle{cms@related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newunit}%
+ {}%
\usebibmacro{originally+published+as}%
\usebibmacro{finentry}}%
@@ -2273,20 +2591,32 @@ bibliography style]
{\printfield{doi}%
\setunit*{\addperiod\addspace}\newblock%
\clearfield{url}}}%
- {\iftoggle{cms@doi}%
+ {\ifboolexpr{%
+ togl {cms@doi}%
+ and
+ not test {\iffieldundef{doi}}%
+ }%
{\printfield{doi}%
\setunit*{\addperiod\addspace}\newblock}%
{}}%
- \iftoggle{cms@eprint}%
+ \ifboolexpr{%
+ togl {cms@eprint}%
+ and
+ not test {\iffieldundef{eprint}}%
+ }%
{\usebibmacro{eprint}%
\setunit*{\addperiod\addspace}\newblock}%
{}%
- \iftoggle{cms@url}%
+ \ifboolexpr{%
+ togl {cms@url}%
+ and
+ not test {\iffieldundef{url}}%
+ }%
{\printfield{url}}%
{}}%
\newbibmacro*{shorthand:author}{%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{shorthand}}%
or
not togl {cms@los}%
@@ -2312,6 +2642,8 @@ bibliography style]
or
test {\ifentrytype{review}}%
or
+ test {\ifentrytype{suppperiodical}}%
+ or
test {\ifentrytype{video}}%
)
and
@@ -2325,7 +2657,7 @@ bibliography style]
\newbibmacro*{standard+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
\iffieldequalstr{labelyear}{nodate}}% or new declaration ???
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifentrytype{misc}}%
or
test {\ifentrytype{inreference}}%
@@ -2338,7 +2670,7 @@ bibliography style]
{}%
{\bibstring{nodate}}}%
{\iffieldundef{year}%
- {\iffieldundef{eventyear}
+ {\iffieldundef{eventyear}%
{\iffieldundef{origyear}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
@@ -2347,11 +2679,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{urlendyear}%
{\clearfield{urlyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{urlendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{urlyear}}%
{\iffieldundef{urlmonth}%
@@ -2366,11 +2698,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{origendyear}%
{\clearfield{origyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{origendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{origyear}}%
{\iffieldundef{origmonth}%
@@ -2385,11 +2717,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{eventendyear}%
{\clearfield{eventyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{eventendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{eventyear}}%
{\iffieldundef{eventmonth}%
@@ -2404,23 +2736,23 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{endyear}% DATE FIX
{\clearfield{year}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{endyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{year}}%
{\iffieldundef{month}%
{\clearfield{year}}%
{\iffieldsequal{year}{endyear}%
{\clearfield{year}\clearfield{endyear}}%
- {}}}}}}}
+ {}}}}}}}%
\newbibmacro*{origfirst+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
\iffieldequalstr{labelyear}{nodate}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifentrytype{misc}}%
or
test {\ifentrytype{inreference}}%
@@ -2433,7 +2765,7 @@ bibliography style]
{}%
{\bibstring{nodate}}}%
{\iffieldundef{origyear}%
- {\iffieldundef{year}
+ {\iffieldundef{year}%
{\iffieldundef{eventyear}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
@@ -2442,11 +2774,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{urlendyear}%
{\clearfield{urlyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{urlendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{urlyear}}%
{\iffieldundef{urlmonth}%
@@ -2461,11 +2793,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{eventendyear}%
{\clearfield{eventyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{eventendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{eventyear}}%
{\iffieldundef{eventmonth}%
@@ -2480,11 +2812,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{endyear}%
{\clearfield{year}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{endyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{year}}%
{\iffieldundef{month}%
@@ -2499,23 +2831,23 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{origendyear}% DATE FIX
{\clearfield{origyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{origendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{origyear}}%
{\iffieldundef{origmonth}%
{\clearfield{origyear}}%
{\iffieldsequal{origyear}{origendyear}%
{\clearfield{origyear}\clearfield{origendyear}}%
- {}}}}}}}
+ {}}}}}}}%
\newbibmacro*{av+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
\iffieldequalstr{labelyear}{nodate}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifentrytype{misc}}%
or
test {\ifentrytype{inreference}}%
@@ -2528,7 +2860,7 @@ bibliography style]
{}%
{\bibstring{nodate}}}%
{\iffieldundef{eventyear}%
- {\iffieldundef{origyear}
+ {\iffieldundef{origyear}%
{\iffieldundef{year}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
@@ -2537,11 +2869,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{urlendyear}%
{\clearfield{urlyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{urlendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{urlyear}}%
{\iffieldundef{urlmonth}%
@@ -2556,11 +2888,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{endyear}%
{\clearfield{year}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{endyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{year}}%
{\iffieldundef{month}%
@@ -2575,11 +2907,11 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{origendyear}%
{\clearfield{origyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{origendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{origyear}}%
{\iffieldundef{origmonth}%
@@ -2594,18 +2926,18 @@ bibliography style]
\printfield{extrayear}}%
\iffieldundef{eventendyear}% DATE FIX
{\clearfield{eventyear}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldequalstr{eventendyear}{}}%
and
not togl {cms@datedash}%
- }
+ }%
{\mbox{\bibdatedash}%
\clearfield{eventyear}}%
{\iffieldundef{eventmonth}%
{\clearfield{eventyear}}%
{\iffieldsequal{eventyear}{eventendyear}%
{\clearfield{eventyear}\clearfield{eventendyear}}%
- {}}}}}}}
+ {}}}}}}}%
\newbibmacro*{origyear+endyear}{%
\printfield{origyear}%
@@ -2660,7 +2992,7 @@ bibliography style]
{\usebibmacro{labelyear+extrayear}}}}%
\ifcsdef{@cms@tempdate}%
{\toggletrue{\@cms@tempdate}}%
- {}}
+ {}}%
\newbibmacro*{origyear+labelyear}{%
\ifboolexpr{ (
@@ -2668,11 +3000,13 @@ bibliography style]
or
test {\ifentrytype{review}}%
or
+ test {\ifentrytype{suppperiodical}}%
+ or
test {\ifentrytype{video}}%
)
and
togl {cms@avdate}%
- }
+ }%
{\usebibmacro{av+labelyear+extrayear}}%
{\iftoggle{cms@switchdates}%
{\usebibmacro{labelyear+extrayear}}%
@@ -2684,7 +3018,7 @@ bibliography style]
{\iftoggle{cms@ordate}%
{\usebibmacro{origfirst+labelyear+extrayear}}%
{\usebibmacro{origyear+endyear}%
- \clearfield{origyear}}}}}}
+ \clearfield{origyear}}}}}}%
\newbibmacro*{bothyear+oldstyle}{%
\ifboolexpr{ (
@@ -2692,11 +3026,13 @@ bibliography style]
or
test {\ifentrytype{review}}%
or
+ test {\ifentrytype{suppperiodical}}%
+ or
test {\ifentrytype{video}}%
)
and
togl {cms@avdate}%
- }
+ }%
{\usebibmacro{av+labelyear+extrayear}}% \clearfield local to \printtext
{\iftoggle{cms@switchdates}%
{\printtext{%
@@ -2706,7 +3042,7 @@ bibliography style]
\setunit{\addspace}\usebibmacro{origyear+endyear}}%
\clearfield{year}%
\clearfield{origyear}}%
- {\iffieldundef{origyear}
+ {\iffieldundef{origyear}%
{\iftoggle{cms@ordate}%
{}%
{\clearfield{extrayear}}%
@@ -2727,7 +3063,7 @@ bibliography style]
\clearfield{extrayear}\setunit*{\addspace}%
\usebibmacro{standard+labelyear+extrayear}}}%
\clearfield{origyear}%
- \clearfield{year}}}}}
+ \clearfield{year}}}}}%
\newbibmacro*{pubstate}{%
\iftoggle{cms@reprint}%
@@ -2736,19 +3072,19 @@ bibliography style]
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
- \printdate\addperiod}\nopunct}}
+ \printdate}}}% Need \addperiod & \nopunct ??
{\iffieldundef{origyear}%
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
- \printorigdate\addperiod}\nopunct}}}%
- {\printfield{pubstate}}}
+ \printorigdate}}}}% Need \addperiod & \nopunct ??
+ {\printfield{pubstate}}}%
\newbibmacro*{choosepubstring}{%
\ifthenelse{\ifentrytype{video}\OR%
\ifentrytype{music}}%
{\bibstring{origreleaseyear}}%
- {\bibstring{origpubyearalt}}}%
+ {\bibstring{origpubyear}}}%
\newbibmacro*{bibreprint}{%
\iftoggle{cms@reprint}%
@@ -2757,14 +3093,14 @@ bibliography style]
{\iftoggle{cms@switchdates}%
{\bibstring{reprint}\newcunit}% 16th ed.
{}}}%
- {}}
+ {}}%
\newbibmacro*{volume+pages}{% Volume fix (modified)
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{maintitle}}%
or
togl {cms@vol}%
- }
+ }%
{\global\togglefalse{cms@vol}%
\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\printfield{pages}%
@@ -2785,7 +3121,7 @@ bibliography style]
\printfield{part}%
\newcunit%
\printfield{pages}}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
togl {cms@hidevolumes}%
and
(
@@ -2809,14 +3145,14 @@ bibliography style]
{\iffieldundef{part}%
{}%
{\newcunit\printfield{part}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollvol}}%
and
test {\iffieldequalcs{volume}{cbx@incollvol}}%
}%
{\iffieldundef{part}%
{}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollpart}}%
and
test {\iffieldequalcs{part}{cbx@incollpart}}%
@@ -2830,14 +3166,14 @@ bibliography style]
{\iffieldundef{part}%
{\newcunit\printfield{pages}}%
{\newcunit\printfield{part}\newcunit\printfield{pages}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollvol}}%
and
test {\iffieldequalcs{volume}{cbx@incollvol}}%
}%
{\iffieldundef{part}%
{\newcunit\printfield{pages}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollpart}}%
and
test {\iffieldequalcs{part}{cbx@incollpart}}%
@@ -2858,12 +3194,16 @@ bibliography style]
\newcunit%
\printfield{pages}}}}}}%
{\newcunit\printfield{chapter}}%
+ \iftoggle{cms@xrefurl}%
+ {\newunit%
+ \usebibmacro{bib+doi+url}}%
+ {}%
\ifcsdef{cbx@incollpgref}% Here we print and clear the child's
{\restorelist{pageref}{\cbx@incollpgref}% backrefs
\newunit%
\usebibmacro{pageref}%
\global\let\cbx@incollpgref\undefined}%
- {}}
+ {}}%
\newbibmacro*{volume+or+volumes}{% Volume fix (modified)
\iffieldundef{maintitle}%
@@ -2871,7 +3211,7 @@ bibliography style]
{\printfield{volumes}}%
{\printfield{volume}%
\printfield{part}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
togl {cms@hidevolumes}%
and
(
@@ -2884,31 +3224,33 @@ bibliography style]
{\printfield{volumes}}}}
\newbibmacro*{mtitle+mstitle+vol+part+title+stitle}{%
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}% Test ???
- {\usebibmacro{cms-in:}% Volume-less treatment?
+ {\iffieldundef{title}%
+ {\usebibmacro{cms-in:}}%
+ {\bibstring{in}\setunit{\addspace}}% Volume-less treatment?
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}}%
\newbibmacro*{btitle+bstitle}{% InIn fix from N&B
- \iffieldundef{booktitle}
- {}
+ \iffieldundef{booktitle}%
+ {}%
{\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
\ifentrytype{video}}%
{}%
@@ -2916,44 +3258,44 @@ bibliography style]
\printtext{%
\printfield{booktitle}%
\setunit{\addcolon\addspace}%
- \printfield[booktitle]{booksubtitle}}%
- \newcunit
+ \printfield[booksubtitle]{booksubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{booktitleaddon}%
- \setunit*{\addcomma\addspace}}}
+ \setunit*{\addcomma\addspace}}}%
\newbibmacro*{mtitle+mstitle+vol+part+btitle+bstitle}{%
\usebibmacro{btitle+bstitle}%
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\(\iffieldundef{volume}\AND\iffieldundef{part}\)\OR%
\(\iffieldundef{booktitle}\AND\NOT\ifentrytype{bookinbook}\)}%
{\usebibmacro{cms-in:}% Volume-less treatment?
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}%
- \toggletrue{cms@vol}}
+ \toggletrue{cms@vol}}%
{\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext{%
\printfield{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[maintitle]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}}
+ \printfield[mainsubtitle]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}}}%
\newbibmacro*{cjournal+ser+vol+num}{% Moved to bbx
\usebibmacro{journal+sub}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\setunit*{\addspace}%
- \iffieldundef{series}
- {}
+ \iffieldundef{series}%
+ {}%
{\newcunit
\printfield[jourser]{series}%
\newcunit}%\setunit*{\addspace}?
@@ -2962,7 +3304,7 @@ bibliography style]
{\newcunit%
\printfield[journum]{number}%
\clearfield{number}%
- \setunit{\addcomma\addspace}}
+ \setunit{\addcomma\addspace}}%
{\printfield[jourvol]{volume}%
\setunit{\addcomma\addspace}}}%
{\printfield[jourvol]{volume}%
@@ -2971,78 +3313,78 @@ bibliography style]
\clearfield{number}%
\setunit{\addcomma\addspace}}% need * here?
\printfield{eid}%
- \newunit}
+ \newunit}%
\newbibmacro*{journal+issue+year+pages}{%
\iftoggle{cms@numbermonth}{}{\clearfield{month}}%
\usebibmacro{cjournal+ser+vol+num}%
\setunit{\addspace}%
- \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}
- \AND\iffieldundef{number}}%
- {\ifthenelse{\iffieldundef{bookpagination}\AND\NOT%
+ \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}%
+ \AND\iffieldundef{number}\AND\iffieldundef{year}}% Test year for
+ {\ifthenelse{\iffieldundef{bookpagination}\AND\NOT% related entries??
\iffieldundef{volume}}% Removed kludge for French colon spacing?
{\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}% This may not be universally correct.
{\printtext[parens]{% Perhaps if it's wrong use magazine subtype?
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{date}%
\printfield{number}}%
{\printfield{issue}%
\setunit{\addspace}%
\usebibmacro{cmsyear}}}%
- \setunit{\addcolon\addspace}}
- \printfield{pages}}
+ \setunit{\addcolon\addspace}}%
+ \printfield{pages}}%
\newbibmacro*{periodical+issue+year+pages}{%
\iftoggle{cms@numbermonth}{}{\clearfield{month}}%
\usebibmacro{cperiodical+ser+vol+num}%
\setunit{\addspace}%
- \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}
- \AND\iffieldundef{number}}%
+ \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}%
+ \AND\iffieldundef{number}\AND\iffieldundef{year}}% See prev. macro
{\ifthenelse{\iffieldundef{bookpagination}\AND\NOT%
\iffieldundef{volume}}% Removed kludge for French ???
{\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}%
{\printtext[parens]{%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{date}%
\printfield{number}}%
{\printfield{issue}%
\setunit{\addspace}%
\usebibmacro{cmsyear}}}%
- \setunit{\addcolon\addspace}}
- \printfield{pages}}
+ \setunit{\addcolon\addspace}}%
+ \printfield{pages}}%
\newbibmacro*{bycompiler}{%
- \ifnameundef{namec}
- {}
+ \ifnameundef{namec}%
+ {}%
{\bibstring{bycompiler}\addspace
\printnames[bycompiler]{namec}}}
\renewbibmacro*{byeditor}{%
- \ifnameundef{editor}
- {}
+ \ifnameundef{editor}%
+ {}%
{\usebibmacro{cbytypestrg}{editor}{editor}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
\usebibmacro{editorpunct}}%
- \usebibmacro{byeditorx}}
+ \usebibmacro{byeditorx}}%
\renewbibmacro*{byeditorx}{%
- \ifnameundef{editora}
- {}
+ \ifnameundef{editora}%
+ {}%
{\usebibmacro{cbytypestrg}{editora}{editor}%
\setunit{\addspace}%
\printnames[byeditora]{editora}%
\usebibmacro{editorpunct}}%
- \ifnameundef{editorb}
- {}
+ \ifnameundef{editorb}%
+ {}%
{\usebibmacro{cbytypestrg}{editorb}{editor}%
\setunit{\addspace}%
\printnames[byeditorb]{editorb}%
\usebibmacro{editorpunct}}%
- \ifnameundef{editorc}
- {}
+ \ifnameundef{editorc}%
+ {}%
{\usebibmacro{cbytypestrg}{editorc}{editor}%
\setunit{\addspace}%
\printnames[byeditorc]{editorc}%
@@ -3051,32 +3393,32 @@ bibliography style]
\renewbibmacro*{byeditor+others}{%
\ifthenelse{\NOT\ifnameundef{editor}\AND
\(\iffieldundef{editortype}\OR
- \iffieldequalstr{editortype}{editor}\)}
+ \iffieldequalstr{editortype}{editor}\)}%
{\def\@tempa{byeditor}%
- \ifnamesequal{editor}{translator}
+ \ifnamesequal{editor}{translator}%
{\edef\@tempa{\@tempa tr}%
- \clearname{translator}}
+ \clearname{translator}}%
{}%
- \ifnamesequal{editor}{namec}
+ \ifnamesequal{editor}{namec}%
{\edef\@tempa{\@tempa cp}%
- \clearname{namec}}
+ \clearname{namec}}%
{}%
- \ifnamesequal{editor}{commentator}
+ \ifnamesequal{editor}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{editor}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{editor}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{editor}{introduction}
+ \ifnamesequal{editor}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{editor}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{editor}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{editor}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{editor}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
\bibstring{\@tempa}%
\setunit{\addspace}%
@@ -3085,65 +3427,65 @@ bibliography style]
\usebibmacro{editorpunct}%
\usebibmacro{byeditorx}}%
{\usebibmacro{byeditor}}%
- \usebibmacro{bytranslator+others}}
+ \usebibmacro{bytranslator+others}}%
\renewbibmacro*{bytranslator+others}{%
- \ifnameundef{translator}
- {}
+ \ifnameundef{translator}%
+ {}%
{\def\@tempa{bytranslator}%
- \ifnamesequal{translator}{namec}
+ \ifnamesequal{translator}{namec}%
{\edef\@tempa{\@tempa cp}%
- \clearname{namec}}
+ \clearname{namec}}%
{}%
- \ifnamesequal{translator}{commentator}
+ \ifnamesequal{translator}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{translator}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{translator}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{translator}{introduction}
+ \ifnamesequal{translator}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{translator}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{translator}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{translator}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{translator}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
\bibstring{\@tempa}\space
\printnames[bytranslator]{translator}%
\clearname{translator}%
\usebibmacro{editorpunct}}%
- \usebibmacro{bycompiler+others}}
+ \usebibmacro{bycompiler+others}}%
\newbibmacro*{bycompiler+others}{%
- \ifnameundef{namec}
- {}
+ \ifnameundef{namec}%
+ {}%
{\def\@tempa{bycompiler}%
- \ifnamesequal{namec}{commentator}
+ \ifnamesequal{namec}{commentator}%
{\edef\@tempa{\@tempa co}%
- \clearname{commentator}}
- {\ifnamesequal{namec}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{namec}{annotator}%
{\edef\@tempa{\@tempa an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
- \ifnamesequal{namec}{introduction}
+ \ifnamesequal{namec}{introduction}%
{\edef\@tempa{\@tempa in}%
- \clearname{introduction}}
- {\ifnamesequal{namec}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{namec}{foreword}%
{\edef\@tempa{\@tempa fo}%
- \clearname{foreword}}
- {\ifnamesequal{namec}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{namec}{afterword}%
{\edef\@tempa{\@tempa af}%
- \clearname{afterword}}
+ \clearname{afterword}}%
{}}}%
\bibstring{\@tempa}\space
\printnames[bycompiler]{namec}%
\clearname{namec}%
\usebibmacro{editorpunct}}%
- \usebibmacro{byothers}}
+ \usebibmacro{byothers}}%
\newbibmacro*{byothers}{% Changed for 0.9
\usebibmacro{cbytranslator}%
@@ -3160,6 +3502,83 @@ bibliography style]
\usebibmacro{editorpunct}%
\usebibmacro{withforeword}%
\usebibmacro{editorpunct}%
- \usebibmacro{withafterword}}
+ \usebibmacro{withafterword}}%
+
+%%%% Related functionality from standard.bbx %%%%
+
+\newcounter{bbx:relatedcount}
+\newcounter{bbx:relatedtotal}
+
+\newbibmacro*{related:init}{%
+ \csundef{bbx:relatedloop}}
+
+\newbibmacro*{begrelated}{\ifcsdef{bbx@lasthash}%
+ {\let\cms@related@hash\bbx@lasthash}{}}%
+\newbibmacro*{endrelated}{\ifcsdef{cms@related@hash}%
+ {\global\let\bbx@lasthash\cms@related@hash%
+ \let\cms@related@hash\undefined}{}}%
+\newbibmacro*{begrelatedloop}{}
+\newbibmacro*{endrelatedloop}{}
+
+\def\ifrelatedloop{%
+ \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}%
+ or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}%
+
+\newbibmacro*{related}{%
+ \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }%
+ {}%
+ {\usebibmacro{begrelated}%
+ \def\bbx@tempa{}%
+ \setcounter{bbx:relatedtotal}{0}%
+ \def\do##1{%
+ \entrydata{##1}{%
+ \ifrelatedloop
+ {}%
+ {\stepcounter{bbx:relatedtotal}%
+ \gappto{\bbx@tempa}{##1,}}}}%
+ \docsvfield{related}%
+ \restorefield{related}{\bbx@tempa}%
+ \ifnumgreater{\value{bbx:relatedtotal}}{0}%
+ {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}%
+ \iffieldundef{clonesourcekey}%
+ {}%
+ {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}%
+ \setcounter{bbx:relatedcount}{0}%
+ \def\do{%
+ \stepcounter{bbx:relatedcount}%
+ \ifnumgreater{\value{bbx:relatedcount}}{1}%
+ {\printtext{\relateddelim}}%
+ {}}%
+ \ifbibmacroundef{related:\strfield{relatedtype}}%
+ {\appto{\do}{\usebibmacro{related:default}}}%
+ {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
+ \iffieldformatundef{related:\strfield{relatedtype}}%
+ {\def\bbx@tempa{related}}%
+ {\def\bbx@tempa{related:\strfield{relatedtype}}}%
+ \iffieldformatundef{relatedstring:\strfield{relatedtype}}%
+ {\def\bbx@tempb{relatedstring:default}}%
+ {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
+ \printtext[\bbx@tempa]{%
+ \usebibmacro{begrelatedloop}%
+ \iffieldundef{relatedstring}%
+ {\ifboolexpr{%
+ test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}%
+ and
+ test {\ifbibxstring{\thefield{relatedtype}s}}%
+ }%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}s}}}%
+ {\iffieldbibstring{relatedtype}%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}}}}%
+ {}}}%
+ {\iffieldbibstring{relatedstring}%
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedstring}}}}%
+ {\printfield[\bbx@tempb]{relatedstring}}}%
+ \docsvfield{related}%
+ \usebibmacro{endrelatedloop}}}%
+ {}%
+ \usebibmacro{endrelated}}}%
\endinput