summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx2452
1 files changed, 1740 insertions, 712 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx
index 32e03299a05..140f6cb6310 100644
--- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-notes.cbx
@@ -1,10 +1,10 @@
-% $Id: chicago-notes.cbx,v 0.9.7.115 2016/03/18 17:16:53 dfussner Exp $
+% $Id: chicago-notes.cbx,v 0.9.8.36 2016/06/07 08:17:10 dfussner Exp $
% This is a biblatex citation style file, adapted from Lehman's
% authortitle-cverb.cbx. It is heavily modified, with the intention
% of providing footnote citations and a bibliography formatted
% according to the specifications of the Chicago Manual of Style.
-\ProvidesFile{chicago-notes.cbx}[2016/03/18 v 2.9a biblatex citation style]
+\ProvidesFile{chicago-notes.cbx}[2016/06/07 v 3.4 biblatex citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -36,6 +36,7 @@
\providetoggle{cms@shortnote}
\providetoggle{cms@allshort}
\providetoggle{cms@noibid}
+\providetoggle{cms@noidem}
\providetoggle{cms@usecompiler}
\providetoggle{cms@shorthandibid}
\providetoggle{cms@printshhand}
@@ -55,6 +56,11 @@
\providetoggle{cms@xrefvol}
\providetoggle{cms@xrefpart}
\providetoggle{cms@omitxrefdate}
+\providetoggle{cms@xrefurl}
+\providetoggle{cms@related}
+\providetoggle{cms@citerel}
+\providetoggle{cms@gencite}
+\providetoggle{cms@genallnames}
\AtEveryCitekey{%
\iffieldundef{userc}%
@@ -88,6 +94,18 @@
{\toggletrue{cms@switchdates}}%
{}}}}%
+\protected\def\cms@warning@noline#1{%
+ \begingroup
+ \blx@safe@actives
+ \PackageWarningNoLine{biblatex-chicago}{#1}%
+ \endgroup}
+
+\DeclareBibliographyOption[boolean]{genallnames}[true]{%
+ \settoggle{cms@genallnames}{#1}}
+
+\DeclareEntryOption[boolean]{genallnames}[true]{%
+ \settoggle{cms@genallnames}{#1}}
+
\DeclareBibliographyOption{annotation}[true]{%
\global\toggletrue{cms@annotation}}
@@ -110,7 +128,7 @@
\inherit{shorthand}{shorthand}
\inherit{shorthandintro}{shorthandintro}
}}%
- {}}
+ {}}%
\DeclareBibliographyOption{compresspages}[true]{%
\ifcsdef{cms@opt@crange@#1}%
@@ -131,11 +149,11 @@
\global\toggletrue{cms@modpostnote}}%
\def\cms@opt@ppunct@false{}%
-\DeclareBibliographyOption{usecompiler}[true]{%
- \settoggle{cms@usecompiler}{#1}}
+\DeclareBibliographyOption[boolean]{usecompiler}[true]{%
+ \settoggle{blx@usenamec}{#1}}
-\DeclareEntryOption{usecompiler}[true]{%
- \settoggle{cms@usecompiler}{#1}}
+\DeclareEntryOption[boolean]{usecompiler}[true]{%
+ \settoggle{blx@usenamec}{#1}}
\DeclareBibliographyOption{juniorcomma}[true]{%
\settoggle{cms@jrcomma}{#1}}
@@ -151,13 +169,13 @@
\DeclareBibliographyOption{longcrossref}[false]{%
\ifcsdef{cms@opt@lxref@#1}%
- {\csuse{cms@opt@lxref@#1}}
- {\blx@err@invopt{longcrossref=#1}{}}}
+ {\csuse{cms@opt@lxref@#1}}%
+ {\blx@err@invopt{longcrossref=#1}{}}}%
\def\cms@opt@lxref@none{%
\togglefalse{cms@citecrossref}%
\togglefalse{cms@bibcrossref}%
\togglefalse{cms@bookcitexref}%
- \togglefalse{cms@bookbibxref}}
+ \togglefalse{cms@bookbibxref}}%
\def\cms@opt@lxref@true{%
\toggletrue{cms@citecrossref}%
\toggletrue{cms@bibcrossref}}%
@@ -173,12 +191,12 @@
\DeclareEntryOption{longcrossref}[false]{%
\ifcsdef{cms@opt@lxref@#1}%
- {\csuse{cms@opt@lxref@#1}}
- {\blx@err@invopt{longcrossref=#1}{}}}
+ {\csuse{cms@opt@lxref@#1}}%
+ {\blx@err@invopt{longcrossref=#1}{}}}%
\DeclareBibliographyOption{booklongxref}[true]{%
\ifcsdef{cms@opt@bklxref@#1}%
- {\csuse{cms@opt@bklxref@#1}}
+ {\csuse{cms@opt@bklxref@#1}}%
{\blx@err@invopt{booklongxref=#1}{}}}%
\def\cms@opt@bklxref@true{%
\toggletrue{cms@bookcitexref}%
@@ -195,62 +213,98 @@
\DeclareEntryOption{booklongxref}[true]{%
\ifcsdef{cms@opt@bklxref@#1}%
- {\csuse{cms@opt@bklxref@#1}}
+ {\csuse{cms@opt@bklxref@#1}}%
{\blx@err@invopt{booklongxref=#1}{}}}%
\DeclareBibliographyOption{omitxrefdate}[true]{%
- \settoggle{cms@omitxrefdate}{#1}}
+ \settoggle{cms@omitxrefdate}{#1}}%
\DeclareEntryOption{omitxrefdate}[true]{%
- \settoggle{cms@omitxrefdate}{#1}}
+ \settoggle{cms@omitxrefdate}{#1}}%
+
+\DeclareBibliographyOption[boolean]{xrefurl}[true]{%
+ \settoggle{cms@xrefurl}{#1}}%
+
+\DeclareEntryOption[boolean]{xrefurl}[true]{%
+ \settoggle{cms@xrefurl}{#1}}%
+
+\DeclareBibliographyOption[string]{journalabbrev}[false]{%
+ \ifcsdef{cms@opt@jtabb@#1}%
+ {\csuse{cms@opt@jtabb@#1}}%
+ {\csuse{cms@opt@jtabb@false}\cms@warning@noline%
+ {'journalabbrev=#1' isn't a valid option.\MessageBreak
+ The default - 'false' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@jtabb@true{%
+ \toggletrue{cms@citejtabb}%
+ \toggletrue{cms@bibjtabb}}%
+\def\cms@opt@jtabb@false{%
+ \togglefalse{cms@citejtabb}%
+ \togglefalse{cms@bibjtabb}}%
+\def\cms@opt@jtabb@notes{%
+ \toggletrue{cms@citejtabb}%
+ \togglefalse{cms@bibjtabb}}%
+\def\cms@opt@jtabb@bib{%
+ \togglefalse{cms@citejtabb}%
+ \toggletrue{cms@bibjtabb}}%
+
+\DeclareEntryOption[string]{journalabbrev}[false]{%
+ \ifcsdef{cms@opt@jtabb@#1}%
+ {\csuse{cms@opt@jtabb@#1}}%
+ {\csuse{cms@opt@jtabb@false}\cms@warning@noline%
+ {'journalabbrev=#1' isn't a valid option.\MessageBreak
+ The default - 'false' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
% The field-exclusion options %
\DeclareBibliographyOption{isbn}[true]{%
- \settoggle{cms@isbn}{#1}}
+ \settoggle{cms@isbn}{#1}}%
\DeclareBibliographyOption{url}[true]{%
- \settoggle{cms@url}{#1}}
+ \settoggle{cms@url}{#1}}%
\DeclareBibliographyOption{doi}[true]{%
\ifcsdef{cms@opt@doi@#1}%
- {\csuse{cms@opt@doi@#1}}
- {\blx@err@invopt{doi=#1}{}}}
+ {\csuse{cms@opt@doi@#1}}%
+ {\blx@err@invopt{doi=#1}{}}}%
\def\cms@opt@doi@true{%
- \toggletrue{cms@doi}}
+ \toggletrue{cms@doi}}%
\def\cms@opt@doi@false{%
- \togglefalse{cms@doi}}
+ \togglefalse{cms@doi}}%
\def\cms@opt@doi@only{%
- \toggletrue{cms@doionly}}
+ \toggletrue{cms@doionly}}%
\DeclareBibliographyOption{eprint}[true]{%
- \settoggle{cms@eprint}{#1}}
+ \settoggle{cms@eprint}{#1}}%
\DeclareBibliographyOption{numbermonth}[true]{%
- \settoggle{cms@numbermonth}{#1}}
+ \settoggle{cms@numbermonth}{#1}}%
\DeclareBibliographyOption{bookpages}[true]{%
- \settoggle{cms@bookpages}{#1}}
+ \settoggle{cms@bookpages}{#1}}%
\DeclareBibliographyOption{includeall}[true]{%
\settoggle{cms@isbn}{#1}%
\settoggle{cms@url}{#1}%
\settoggle{cms@doi}{#1}%
\settoggle{cms@eprint}{#1}%
\settoggle{cms@numbermonth}{#1}%
- \settoggle{cms@bookpages}{#1}}
+ \settoggle{cms@bookpages}{#1}}%
\DeclareBibliographyOption{hidevolumes}[true]{%
- \settoggle{cms@hidevolumes}{#1}}
+ \settoggle{cms@hidevolumes}{#1}}%
\DeclareBibliographyOption{addendum}[true]{%
- \settoggle{cms@addendum}{#1}}
+ \settoggle{cms@addendum}{#1}}%
\DeclareBibliographyOption{bookseries}[true]{%
- \settoggle{cms@bookseries}{#1}}
+ \settoggle{cms@bookseries}{#1}}%
\DeclareBibliographyOption{notefield}[true]{%
- \settoggle{cms@notefield}{#1}}
+ \settoggle{cms@notefield}{#1}}%
\DeclareBibliographyOption{completenotes}[true]{%
\settoggle{cms@addendum}{#1}%
\settoggle{cms@bookseries}{#1}%
\settoggle{cms@notefield}{#1}}%
\DeclareEntryOption{isbn}[true]{%
- \settoggle{cms@isbn}{#1}}
+ \settoggle{cms@isbn}{#1}}%
\DeclareEntryOption{url}[true]{%
- \settoggle{cms@url}{#1}}
+ \settoggle{cms@url}{#1}}%
\DeclareEntryOption{doi}[true]{%
\ifcsdef{cms@opt@doi@#1}%
{\iftoggle{cms@doi}%
@@ -259,30 +313,159 @@
{\togglefalse{cms@doionly}}% !!
{}}%
{\toggletrue{cms@doi}}% !!
- \csuse{cms@opt@doi@#1}}
- {\blx@err@invopt{doi=#1}{}}}
+ \csuse{cms@opt@doi@#1}}%
+ {\blx@err@invopt{doi=#1}{}}}%
\DeclareEntryOption{eprint}[true]{%
- \settoggle{cms@eprint}{#1}}
+ \settoggle{cms@eprint}{#1}}%
\DeclareEntryOption{numbermonth}[true]{%
- \settoggle{cms@numbermonth}{#1}}
+ \settoggle{cms@numbermonth}{#1}}%
\DeclareEntryOption{bookpages}[true]{%
- \settoggle{cms@bookpages}{#1}}
+ \settoggle{cms@bookpages}{#1}}%
\DeclareEntryOption{hidevolumes}[true]{%
- \settoggle{cms@hidevolumes}{#1}}
+ \settoggle{cms@hidevolumes}{#1}}%
\DeclareEntryOption{addendum}[true]{%
- \settoggle{cms@addendum}{#1}}
+ \settoggle{cms@addendum}{#1}}%
\DeclareEntryOption{bookseries}[true]{%
- \settoggle{cms@bookseries}{#1}}
+ \settoggle{cms@bookseries}{#1}}%
\DeclareEntryOption{notefield}[true]{%
- \settoggle{cms@notefield}{#1}}
+ \settoggle{cms@notefield}{#1}}%
-\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,booklongxref}
+\DeclareBibliographyOption[string]{related}[bib]{%
+ \ifcsdef{cms@opt@rel@#1}%
+ {\csuse{cms@opt@rel@#1}}%
+ {\csuse{cms@opt@rel@bib}\cms@warning@noline%
+ {'related=#1' is not a valid option.\MessageBreak
+ The default - 'bib' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@rel@true{%
+ \settoggle{cms@citerel}{true}%
+ \settoggle{cms@related}{true}}%
+\def\cms@opt@rel@false{%
+ \settoggle{cms@citerel}{false}%
+ \settoggle{cms@related}{false}}%
+\def\cms@opt@rel@bib{%
+ \settoggle{cms@citerel}{false}%
+ \settoggle{cms@related}{true}}%
+\def\cms@opt@rel@notes{%
+ \settoggle{cms@citerel}{true}%
+ \settoggle{cms@related}{false}}%
+
+\DeclareEntryOption[string]{related}[bib]{%
+ \ifcsdef{cms@opt@rel@#1}%
+ {\csuse{cms@opt@rel@#1}}%
+ {\csuse{cms@opt@rel@bib}\cms@warning@noline%
+ {'related=#1' is not a valid option.\MessageBreak
+ The default - 'bib' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+
+% Controlling punctuation before titleaddon fields %
+
+\DeclareBibliographyOption[string]{ptitleaddon}[period]{%
+ \ifcsdef{cms@opt@ptao@#1}%
+ {\csuse{cms@opt@ptao@#1}}%
+ {\csuse{cms@opt@ptao@period}\cms@warning@noline%
+ {'ptitleaddon=#1' is not a valid option.\MessageBreak
+ The default - 'period' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@ptao@none{%
+ \let\ptitleaddonpunct\@empty}%
+\def\cms@opt@ptao@comma{%
+ \def\ptitleaddonpunct{\addcomma\addspace}}%
+\def\cms@opt@ptao@colon{%
+ \def\ptitleaddonpunct{\addcolon\addspace}}%
+\def\cms@opt@ptao@space{%
+ \def\ptitleaddonpunct{\addspace}}%
+\def\cms@opt@ptao@semicolon{%
+ \def\ptitleaddonpunct{\addsemicolon\addspace}}%
+\def\cms@opt@ptao@period{%
+ \def\ptitleaddonpunct{\addperiod\addspace}}%
+
+\DeclareEntryOption[string]{ptitleaddon}[period]{%
+ \ifcsdef{cms@opt@ptao@#1}%
+ {\csuse{cms@opt@ptao@#1}}%
+ {\csuse{cms@opt@ptao@period}\cms@warning@noline%
+ {'ptitleaddon=#1' is not a valid option.\MessageBreak
+ The default - 'period' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+
+\DeclareBibliographyOption[string]{ctitleaddon}[comma]{%
+ \ifcsdef{cms@opt@ctao@#1}%
+ {\csuse{cms@opt@ctao@#1}}%
+ {\csuse{cms@opt@ctao@comma}\cms@warning@noline%
+ {'ctitleaddon=#1' is not a valid option.\MessageBreak
+ The default - 'comma' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@ctao@none{%
+ \let\ctitleaddonpunct\@empty}%
+\def\cms@opt@ctao@comma{%
+ \def\ctitleaddonpunct{\addcomma\addspace}}%
+\def\cms@opt@ctao@colon{%
+ \def\ctitleaddonpunct{\addcolon\addspace}}%
+\def\cms@opt@ctao@space{%
+ \def\ctitleaddonpunct{\addspace}}%
+\def\cms@opt@ctao@semicolon{%
+ \def\ctitleaddonpunct{\addsemicolon\addspace}}%
+\def\cms@opt@ctao@period{%
+ \def\ctitleaddonpunct{\addperiod\addspace}}%
+
+\DeclareEntryOption[string]{ctitleaddon}[comma]{%
+ \ifcsdef{cms@opt@ctao@#1}%
+ {\csuse{cms@opt@ctao@#1}}%
+ {\csuse{cms@opt@ctao@comma}\cms@warning@noline%
+ {'ctitleaddon=#1' is not a valid option.\MessageBreak
+ The default - 'comma' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+
+% Controlling punctuation before shorthand in notes %
+
+\DeclareBibliographyOption[string]{shorthandpunct}[space]{%
+ \ifcsdef{cms@opt@shp@#1}%
+ {\csuse{cms@opt@shp@#1}}%
+ {\csuse{cms@opt@shp@space}\cms@warning@noline%
+ {'shorthandpunct=#1' isn't a valid option.\MessageBreak
+ The default - 'space' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+\def\cms@opt@shp@none{%
+ \let\shorthandpunct\@empty}%
+\def\cms@opt@shp@comma{%
+ \def\shorthandpunct{\addcomma\addspace}}%
+\def\cms@opt@shp@colon{%
+ \def\shorthandpunct{\addcolon\addspace}}%
+\def\cms@opt@shp@space{%
+ \def\shorthandpunct{\addspace}}%
+\def\cms@opt@shp@semicolon{%
+ \def\shorthandpunct{\addsemicolon\addspace}}%
+\def\cms@opt@shp@period{%
+ \def\shorthandpunct{\addperiod\addspace}}%
+\def\cms@opt@shp@emdash{%
+ \def\shorthandpunct{\addthinspace\textemdash\addthinspace}}%
+\def\cms@opt@shp@endash{%
+ \def\shorthandpunct{\addspace\textendash\addspace}}%
+
+\DeclareEntryOption[string]{shorthandpunct}[space]{%
+ \ifcsdef{cms@opt@shp@#1}%
+ {\csuse{cms@opt@shp@#1}}%
+ {\csuse{cms@opt@shp@space}\cms@warning@noline%
+ {'shorthandpunct=#1' isn't a valid option.\MessageBreak
+ The default - 'space' - has been set.\MessageBreak
+ Please see biblatex-chicago.pdf for valid\MessageBreak
+ option keys}}}%
+
+\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,%
+ related,booklongxref,ptitleaddon,ctitleaddon,shorthandpunct}
% For author-date compatibility %
\DeclareEntryOption{switchdates}[true]{%
- \settoggle{cms@switchdates}{#1}}
+ \settoggle{cms@switchdates}{#1}}%
\DeclareEntryOption{cmsdate}{}%
@@ -312,13 +495,13 @@
\appto\blx@blxinit{%
\let\newcunit\blx@newcunit}
-\newcommand*{\newcunitpunct}{\addcomma\space}
+\newcommand*{\newcunitpunct}{\addcomma\addspace}
\def\mkbibcurdinal#1{%
\@tempcnta0#1 \the\@tempcnta}%
\@ifpackagelater{biblatex}{2010/08/28}
-{}
+{}%
{\PackageError{biblatex}
{Outdated 'biblatex' package}
{The Chicago style requires biblatex v0.9 or later.\MessageBreak
@@ -344,11 +527,15 @@
\global\let\cbx@lastkey\undefined}
\newbibmacro*{cite:save}{%
- \savefield{entrykey}{\cbx@lastkey}}
+ \savefield{entrykey}{\cbx@lastkey}%
+ \ifthenelse{\ifentrytype{inreference}\OR\ifentrytype{reference}\OR%
+ \ifentrytype{mvreference}}%
+ {\global\toggletrue{cms@noidem}}%
+ {\global\togglefalse{cms@noidem}}}%
\newbibmacro*{cite}{%
\ifciteseen%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iffieldundef{shorthand}}%
or
(
@@ -358,20 +545,24 @@
and
not test {\iffieldundef{crossref}}%
)
- }
+ }%
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
- {\usebibmacro{cite:ibid}}%
+ {\usebibmacro{cite:ibid}%
+ \usebibmacro{cite:save}}%
{\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
\usebibmacro{cite:short}%
\usebibmacro{cite:save}}}%
{\iftoggle{cms@shorthandibid}%
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
- {\usebibmacro{cite:ibid}}%
+ {\usebibmacro{cite:ibid}%
+ \usebibmacro{cite:save}}%
{\usebibmacro{cite:shorthand}%
- \usebibmacro{cite:save}}}%
+ \usebibmacro{cite:save}%
+ \global\toggletrue{cms@noidem}}}%
{\usebibmacro{cite:shorthand}%
- \usebibmacro{cite:save}}}}%
+ \usebibmacro{cite:save}%
+ \global\toggletrue{cms@noidem}}}}%
{\iftoggle{cms@allshort}%
{\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
@@ -386,29 +577,60 @@
\newbibmacro*{cite:full}{%
\printtext[bibhypertarget]{%
\usedriver
- {\DeclareNameAlias{sortname}{default}\frenchspacing}
+ {\DeclareNameAlias{sortname}{default}\frenchspacing}%
{cite:\thefield{entrytype}}}}%
\newbibmacro*{cite:short}{%
+ \usebibmacro{allshort+firstcite+xref}%
\ifthenelse{\ifnameundef{labelname}\OR%
\ifentrytype{inreference}\OR%
\ifentrytype{reference}\OR%
\ifentrytype{mvreference}}%
- {\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation
+ {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT%
+ \ifentrytype{periodical}}% Simplify .bib creation
{\ifuseauthor%
- {\printfield[journaltitle]{journaltitle}\isdot\newcunit}%
+ {\ifboolexpr{%
+ not test {\iffieldundef{shortjournal}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
+ {\printfield[shortjournal]{shortjournal}\newcunit}%
+ {\printfield[journaltitle]{journaltitle}\newcunit}}%
{}}%
{\ifentrytype{manual}%
{\printlist{organization}\isdot\newcunit}%
{}}}%
- {\iffieldequalstr{authortype}{anon}%
- {\bibleftbracket\printnames{labelname}%
- \bibrightbracket\classicpunct}%
- {\iffieldequalstr{authortype}{anon?}%
- {\bibleftbracket\printnames{labelname}?%
+ {\ifboolexpr{%
+ test {\ifciteidem}%
+ and
+ not test {\ifbibliography}%
+ and
+ not test {\iffirstonpage}%
+ and
+ not togl {cms@noidem}%
+ and
+ not togl {cms@headlessnote}%
+ }%
+ {\bibstring[\mkibid]{idem\thefield{gender}}%
+ \classicpunct}%
+ {\iffieldequalstr{authortype}{anon}%
+ {\bibleftbracket\printnames{labelname}%
\bibrightbracket\classicpunct}%
- {\usebibmacro{choose+labelname}%\printnames{labelname}%
- \isdot\classicpunct}}}%
+ {\iffieldequalstr{authortype}{anon?}%
+ {\bibleftbracket\printnames{labelname}?%
+ \bibrightbracket\classicpunct}%
+ {\printnames{labelname}%\usebibmacro{choose+labelname}%
+ \isdot\classicpunct}}}}%
\ifboolexpr{%
togl {cms@allshort}%
or
@@ -420,9 +642,10 @@
\printfield[citetitle]{labeltitle}}}}%:\thefield{entrytype}?
\newbibmacro*{cite:shorthand}{%
+ \usebibmacro{allshort+firstcite+xref}%
\iftoggle{cms@allshort}%
{\printtext[bibhyperref]{%
- \printfield{shorthand}}}
+ \printfield{shorthand}}}%
{\printtext[cmshyperlink]{%
\printfield{shorthand}}}}
@@ -432,7 +655,7 @@
{\iffieldundef{shorthandintro}%
{%\addspace%\setunit{\addspace}% Fix for after postnote field
\printtext[parens]{%
- \bibstring{citedas}\space%
+ \bibstring{citedas}\addspace%
\printfield{shorthand}}}%
{%\addspace%\setunit{\addspace}% Ditto
\printfield{shorthandintro}}}}
@@ -464,15 +687,31 @@
)
}%
{\global\toggletrue{cms@loccit}}%
- {}}}
+ {}}}%
\newbibmacro*{cite:journal}{%
\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
{\iffieldundef{prenote}%
{\bibsentence\usebibmacro{cite:ibid}}%
- {\usebibmacro{cite:ibid}}}%
+ {\usebibmacro{cite:ibid}}%
+ \usebibmacro{cite:save}}%
{\iffieldundef{journaltitle}%
- {\usebibmacro{cite:short}}%
+ {\usebibmacro{cite:short}%
+ \usebibmacro{cite:save}}%
+ {\ifboolexpr{%
+ test {\ifciteidem}%
+ and
+ not test {\ifbibliography}%
+ and
+ not test {\iffirstonpage}%
+ and
+ not togl {cms@noidem}%
+ }%
+ {\iffieldundef{prenote}%
+ {\bibsentence\bibstring[\mkibid]{idem\thefield{gender}}%
+ \newcunit}%
+ {\bibstring[\mkibid]{idem\thefield{gender}}%
+ \newcunit}}%
{\iffieldequalstr{authortype}{anon}%
{\bibleftbracket\printnames{labelname}%
\bibrightbracket\newcunit}%
@@ -480,59 +719,104 @@
{\bibleftbracket\printnames{labelname}?%
\bibrightbracket\newcunit}%
{\printnames{labelname}%
- \isdot\newcunit}}%
- \iftoggle{cms@allshort}%
+ \isdot\newcunit}}}%
+ \iftoggle{cms@allshort}%
+ {\ifboolexpr{%
+ not test {\iffieldundef{shortjournal}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
+ {\printtext[bibhyperref]{%
+ \printfield[shortjournal]{shortjournal}}}%
{\printtext[bibhyperref]{%
- \printfield[journaltitle]{journaltitle}}}%
+ \printfield[journaltitle]{journaltitle}}}}%
+ {\ifboolexpr{%
+ not test {\iffieldundef{shortjournal}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
{\printtext[bibhyperlink]{%
- \printfield[journaltitle]{journaltitle}}}%
- \iffieldundef{volume}%
- {\iffieldundef{number}%
- {\iffieldundef{issue}
- {\newcunit%
- \usebibmacro{number+or+month}}%
- {\newcunit%
- \printfield{issue}%
- \setunit{\addspace}%
- \usebibmacro{cmsyear}}}%
+ \printfield[shortjournal]{shortjournal}}}%
+ {\printtext[bibhyperlink]{%
+ \printfield[journaltitle]{journaltitle}}}}%
+ \iffieldundef{volume}%
+ {\iffieldundef{number}%
+ {\iffieldundef{issue}%
{\newcunit%
- \printfield[journum]{number}}}%
- {\toggletrue{cms@fullnote}%
- \togglefalse{cms@shortnote}%
- \setunit{\addspace}%
- \printfield[jourvol]{volume}%
- \ifthenelse{\iffieldundef{pagination}\AND%
- \iffieldundef{bookpagination}}%
- {\setunit{\postvolpunct}}%
- {\setunit{\addcolon\addspace}}}}}}
+ \usebibmacro{number+or+month}}%
+ {\newcunit%
+ \printfield{issue}%
+ \setunit{\addspace}%
+ \usebibmacro{cmsyear}}}%
+ {\newcunit%
+ \printfield[journum]{number}}}%
+ {\toggletrue{cms@fullnote}%
+ \togglefalse{cms@shortnote}%
+ \setunit{\addspace}%
+ \printfield[jourvol]{volume}%
+ \ifthenelse{\iffieldundef{pagination}\AND%
+ \iffieldundef{bookpagination}}%
+ {\setunit{\postvolpunct}}%
+ {\setunit{\addcolon\addspace}}}}}}%
%% Macros from verbose.cbx %%
\newbibmacro*{textcite}{%
- \ifnameundef{labelname}
- {\printfield[citetitle]{labeltitle}}
- {\printnames{labelname}}}
+ \ifnameundef{labelname}%
+ {\printfield[citetitle]{labeltitle}}%
+ {\printnames{labelname}}%
+ \ifboolexpr{%
+ togl {cms@gencite}%
+ and
+ (
+ test {\iflastcitekey}%
+ or
+ togl {cms@genallnames}%
+ )
+ }%
+ {\thegen}%
+ {}}%
\newbibmacro*{textcite:init}{%
\citetrackerfalse%
\pagetrackerfalse%
\iffirstcitekey
- {\global\undef\cbx@lasthash}
- {}}
+ {\global\undef\cbx@lasthash}%
+ {}}%
\newbibmacro*{textcite:count}{%
\stepcounter{textcitetotal}%
- \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
- {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
- {\setcounter{textcitemaxnames}{\value{uniquelist}}}
- {}}
- {\ifnumless{\value{labelname}}{\value{maxnames}}
- {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
- {\setcounter{textcitemaxnames}{\value{labelname}}}
- {}}
- {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
- {\setcounter{textcitemaxnames}{\value{maxnames}}}
- {}}}}
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}%
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}%
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}%
+ {}}%
+ {\ifnumless{\value{labelname}}{\value{maxnames}}%
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}%
+ {\setcounter{textcitemaxnames}{\value{labelname}}}%
+ {}}%
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}%
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}%
+ {}}}}%
%%%% Citation Commands, internal and external %%%%
@@ -558,14 +842,14 @@
{}%
\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
- \ifboolexpr{
+ \ifboolexpr{%
togl {cms@inheritshhand}%
and
not test {\iffieldundef{shorthand}}%
- }
+ }%
{\usebibmacro{cite}}%
{\usebibmacro{cite:short}}}% Would {cite} be better?
- {}
+ {}%
{\usebibmacro{crossref:volume+postnote}}% Volume fix
\DeclareCiteCommand{\bookbibxrefcite}
@@ -669,10 +953,17 @@
\ifhyperref%
{\hypertarget{cite.\the\c@refsection @\abx@field@entrykey}{}}%
{}%
- \nopunct\unspace}% Put \nopunct and \unspace here for 0.8e.
+ \nopunct%
+ \ifboolexpr{%
+ togl {cms@otherlang}%
+ and
+ not test {\iffieldundef{langid}}%
+ }%
+ {\addspace}{\unspace}}%\unspace Put \nopunct and \unspace here for 0.8e.
{\usedriver
{\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
\usebibmacro{clearpublin}\clearfield{shorthand}%
+ \usebibmacro{cms:titlehook}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\toggletrue{cms@origpublished}\frenchspacing}%
{cite:\thefield{entrytype}}%
@@ -684,9 +975,9 @@
{\usebibmacro{hlprenote}}%
{\printtext[bibhypertarget]{%
\usedriver
- {\DeclareNameAlias{sortname}{default}\clearname{author}%
+ {\DeclareNameAlias{sortname}{default}\usebibmacro{cite:save}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
- \usebibmacro{cite:save}}%
+ \usebibmacro{clear+labelname}\global\toggletrue{cms@noidem}}%
{cite:\thefield{entrytype}}}}%
{\multicitedelim}%
{}%\usebibmacro{finentry}}
@@ -695,10 +986,10 @@
{\usebibmacro{hlcprenote}}
{\usebibmacro{citeindex}%
\toggletrue{cms@headlessnote}%
- \clearname{author}%
- \clearname{shortauthor}%
+ \usebibmacro{clear+labelname}%
\clearname{labelname}%
- \usebibmacro{cite}}
+ \usebibmacro{cite}%
+ \global\toggletrue{cms@noidem}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
@@ -706,10 +997,10 @@
{\usebibmacro{hlcprenote}}
{\usebibmacro{citeindex}%
\toggletrue{cms@headlessnote}%
- \clearname{author}%
- \clearname{shortauthor}%
+ \usebibmacro{clear+labelname}%
\clearname{labelname}%
- \usebibmacro{cite}}
+ \usebibmacro{cite}%
+ \global\toggletrue{cms@noidem}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
@@ -719,10 +1010,9 @@
\toggletrue{cms@headlessnote}%
\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
- \clearname{author}%
- \clearname{shortauthor}%
\clearname{labelname}%
- \usebibmacro{cite:short}}
+ \usebibmacro{cite:short}%
+ \global\toggletrue{cms@noidem}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
@@ -735,8 +1025,9 @@
togl {cms@allshort}%
}%
{\usebibmacro{cite:short}}
- {\toggletrue{cms@headlessnote}%
- \usebibmacro{choose+surname}%
+ {\renewbibmacro*{author/editor}{\usebibmacro{choose+surname}}%
+ \renewbibmacro*{editor}{\usebibmacro{choose+surname}}%
+ \renewbibmacro*{author}{\usebibmacro{choose+surname}}%
\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
@@ -748,7 +1039,8 @@
{\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
\usebibmacro{citeindex}%
- \usebibmacro{cite:short}}
+ \usebibmacro{cite:short}%
+ \usebibmacro{cite:save}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -757,11 +1049,14 @@
{\usebibmacro{citeindex}%
\iftoggle{cms@shorthandibid}%
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
- {\usebibmacro{cite:ibid}}%
+ {\usebibmacro{cite:ibid}%
+ \usebibmacro{cite:save}}%
{\usebibmacro{cite:shorthand}%
- \usebibmacro{cite:save}}}%
+ \usebibmacro{cite:save}%
+ \global\toggletrue{cms@noidem}}}%
{\usebibmacro{cite:shorthand}%
- \usebibmacro{cite:save}}}
+ \usebibmacro{cite:save}%
+ \global\toggletrue{cms@noidem}}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -771,7 +1066,8 @@
\togglefalse{cms@fullnote}%
\clearfield{pages}%
\usebibmacro{citeindex}%
- \usebibmacro{cite:journal}}
+ \usebibmacro{cite:journal}%
+ \usebibmacro{cite:save}}
{\multicitedelim}
{\iftoggle{cms@loccit}%
{}%
@@ -805,9 +1101,9 @@
\DeclareCiteCommand{\cbx@textcite}
{\usebibmacro{textcite:init}}
{\iffieldequals{namehash}{\cbx@lasthash}
- {}
+ {}%
{\iffirstcitekey
- {}
+ {}%
{\textcitedelim}%
\stepcounter{textcitecount}%
\usebibmacro{textcite}%
@@ -819,16 +1115,16 @@
{\usebibmacro{textcite:init}%
\gdef\cbx@savedkeys{}%
\DeferNextCitekeyHook}
- {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}%
{\protected@xappto\cbx@footcite@args{%
- (\thefield{multiprenote})(\thefield{multipostnote})}}
+ (\thefield{multiprenote})(\thefield{multipostnote})}}%
{}%
\xappto\cbx@savedkeys{\thefield{entrykey},}%
- \iffieldequals{namehash}{\cbx@lasthash}
- {}
+ \iffieldequals{namehash}{\cbx@lasthash}%
+ {}%
{\usebibmacro{textcite:count}%
\savefield{namehash}{\cbx@lasthash}}%
- \ifnumequal{\value{citecount}}{\value{citetotal}}
+ \ifnumequal{\value{citecount}}{\value{citetotal}}%
{\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
\protected@xappto\cbx@footcite@args{%
[\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
@@ -862,13 +1158,13 @@
\renewbibmacro{multipostnote}{}}}{}{}
\renewcommand*{\textcitedelim}{%
- \iffinalcitedelim
- {\ifnumgreater{\value{textcitetotal}}{2}
+ \iffinalcitedelim%
+ {\ifnumgreater{\value{textcitetotal}}{2}%
{\addcomma}%
{}%
- \addspace\bibstring{and}}
+ \addspace\bibstring{and}}%
{\addcomma}%
- \space}
+ \addspace}%
\newrobustcmd{\cms@textcite@i}{%
\iffootnote{\foottextcite}{\footcite}}
@@ -880,6 +1176,97 @@
\newcommand{\foottextcites}{\addspace\headlessparenshortcites}
+%%% The \gentextcite commands - \textcite in the genitive case %%%
+
+\DeclareCiteCommand{\cms@gentextcite@i}
+ {\usebibmacro{textcite:init}%
+ \toggletrue{cms@gencite}}%
+ {\iffieldequals{namehash}{\cbx@lasthash}%
+ {}%
+ {\iffirstcitekey
+ {}%
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\togglefalse{cms@gencite}}%
+
+\DeclareCiteCommand{\cms@gentextcite}[\cbx@textcite@init\cms@gentextcite@i\cms@textcite@i]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}%
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}%
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}%
+ {}%
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}%
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\iffootnote
+ {\protected@xappto\cbx@textcite@args{\nopunct}%
+ \protected@xappto\cbx@footcite@args{\thefield{postpunct}}}%
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% Switch
+ \protected@xappto\cbx@footcite@args{\nopunct}}}% these two?
+ {}}
+ {}}
+ {}
+ {}
+
+\DeclareMultiCiteCommand{\cms@gentextcite@is}{\cms@gentextcite@i}{}
+\DeclareMultiCiteCommand{\cms@gentextcites}
+ [\cbx@textcites@init\cms@gentextcite@is\cms@textcites@i]{\cms@gentextcite}{}
+
+\newrobustcmd*{\gentextcite}[1][]{%
+ \@ifnextchar[%]
+ {\gencite@i[#1]}%
+ {\gencite@i[][#1]}}%
+
+\def\gencite@i[#1][#2]{%
+ \@ifnextchar[%]
+ {\gencite@ii[#1][#2]}%
+ {\gencite@ii[][#1][#2]}}%
+
+\def\gencite@ii[#1][#2][#3]#4{%
+ \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}%
+ \gencite@iii[#2][#3]{#4}}%
+
+\def\gencite@iii#1{\cms@gentextcite#1}
+
+\newrobustcmd*{\gentextcites}[1][]{%
+ \@ifnextchar(%)
+ {\gencites@iv[#1]}%
+ {\@ifnextchar[%]
+ {\gencites@i[#1]}%
+ {\gencites@i[][#1]}}}%
+
+\def\gencites@i[#1][#2]{%
+ \@ifnextchar[%]
+ {\gencites@ii[#1][#2]}%
+ {\gencites@ii[][#1][#2]}}%
+
+\def\gencites@ii[#1][#2][#3]#4{%
+ \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}%
+ \gencites@iii[#2][#3]{#4}}%
+
+\def\gencites@iii#1{\cms@gentextcites#1}%
+
+\def\gencites@iv[#1]#2{%
+ \ifblank{#1}{\def\thegen{'s}}{\def\thegen{#1}}%
+ \cms@gentextcites#2}%
+
+\newrobustcmd*{\Gentextcite}{\bibsentence\gentextcite}
+\newrobustcmd*{\Gentextcites}{\bibsentence\gentextcites}
+
+%%% End code for \gentextcite %%%
+
%%%% Drivers for the Long Note Format %%%%
\DeclareBibliographyDriver{cite:article}{%
@@ -911,10 +1298,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
{\usebibmacro{bibindex}%
\usebibmacro{author/editor}%
@@ -945,10 +1338,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:artwork}{%
@@ -980,10 +1379,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:audio}{%
@@ -1009,15 +1414,17 @@
\newcunit
\usebibmacro{bybookauthor}%
\usebibmacro{cbyeditor+others}%
- \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[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\toggletrue{cms@usedvol}%
\printfield{volume}%
@@ -1026,10 +1433,10 @@
\bibstring{ofseries}%
\setunit{\addspace}
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}
\printfield{maintitleaddon}}}
\newcunit
\usebibmacro{volume+or+volumes}%
@@ -1052,10 +1459,16 @@
{}%
\newcunit\newblock%
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:book}{%
@@ -1078,20 +1491,20 @@
\newcunit
\usebibmacro{cpart+editor+translator}%
\newcunit
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@bookcitexref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@bookcitexref}%
- }
+ }%
{\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
\newcunit\newblock
\iffieldundef{edition}%
@@ -1120,10 +1533,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
{\ifpunctmark{.}% This seems to work.
@@ -1157,20 +1576,20 @@
\newcunit
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@bookcitexref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@bookcitexref}%
- }
+ }%
{\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1195,10 +1614,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
{\ifpunctmark{.}% This seems to work.
@@ -1236,10 +1661,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:collection}{%
@@ -1252,27 +1683,29 @@
\setunit{\addspace}
\usebibmacro{cite:xref+date}%
\newcunit
- \ifboolexpr{
+ \usebibmacro{cpart+editor+translator}%
+ \newcunit
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@bookcitexref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@bookcitexref}%
- }
+ }%
{\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
\newcunit\newblock
\iffieldundef{edition}%
{}%
{\usebibmacro{edition}}%
\newcunit
- \usebibmacro{cbytranslator+others}%
+ \usebibmacro{cbyeditor+others}%
\newcunit\newblock
\usebibmacro{volume+or+volumes}%
\newcunit\newblock
@@ -1289,10 +1722,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
{\ifpunctmark{.}% This seems to work.
@@ -1350,10 +1789,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:inbook}{%
@@ -1370,20 +1815,20 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@citecrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@citecrossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
@@ -1409,10 +1854,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{cite:xref+finentry}}%
{\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
@@ -1442,20 +1893,20 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@citecrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@citecrossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
@@ -1481,10 +1932,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{cite:xref+finentry}}%
{\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
@@ -1514,23 +1971,25 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@citecrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@citecrossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit\newblock
+ \usebibmacro{cbyeditor+others}%
+ \newcunit\newblock
\usebibmacro{volume+or+volumes}%
\newcunit\newblock
\usebibmacro{cser+num}%
@@ -1547,10 +2006,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{cite:xref+finentry}}%
{\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
@@ -1609,10 +2074,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:letter}{%
@@ -1620,7 +2091,7 @@
\savefield{fullhash}{\bbx@lasthash}%
\printtext[title]{%
\printfield[noformat]{title}}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit*{\addcomma\addspace}%
\usebibmacro{letter+date}%
@@ -1629,20 +2100,20 @@
\newcunit\newblock%
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@citecrossref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@citecrossref}%
- }
+ }%
{\usebibmacro{chapincoll}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
@@ -1668,10 +2139,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{cite:xref+finentry}}%
{\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
@@ -1715,10 +2192,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:misc}{%
@@ -1732,11 +2215,11 @@
{\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}%
- \newcunit\newblock%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
- \newcunit\newblock
+ \newcunit%
\usebibmacro{unpubl+letter+date}}%
\newcunit
\usebibmacro{byauthor}%
@@ -1762,10 +2245,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:music}{%
@@ -1791,15 +2280,17 @@
\newcunit
\usebibmacro{bybookauthor}%
\usebibmacro{cbyeditor+others}%
- \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[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\toggletrue{cms@usedvol}%
\printfield{volume}%
@@ -1808,10 +2299,10 @@
\bibstring{ofseries}%
\setunit{\addspace}
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit
\usebibmacro{volume+or+volumes}%
@@ -1846,10 +2337,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyAlias{cite:mvbook}{cite:book}
@@ -1895,10 +2392,16 @@
\printfield{url}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:patent}{%
@@ -1915,8 +2418,8 @@
\printfield{type}%
\setunit*{\addspace}%
\printfield{number}%
- \iflistundef{location}
- {}
+ \iflistundef{location}%
+ {}%
{\setunit*{\addspace}%
\printtext[parens]{%
\printlist[][-\value{listtotal}]{location}}}%
@@ -1937,10 +2440,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:periodical}{%
@@ -1968,10 +2477,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}%
{\usebibmacro{bibindex}%
\usebibmacro{editor}%
@@ -1998,10 +2513,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:proceedings}{%
@@ -2014,21 +2535,25 @@
\setunit{\addspace}
\usebibmacro{cite:xref+date}%
\newcunit
- \ifboolexpr{
+ \usebibmacro{cpart+editor+translator}%
+ \newcunit
+ \ifboolexpr{%
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
or
togl {cms@bookcitexref}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
test {\iffieldundef{xref}}%
or
not test {\ifentryseen{\thefield{xref}}}%
or
togl {cms@bookcitexref}%
- }
+ }%
{\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
+ \newcunit
+ \usebibmacro{cbyeditor+others}%
\newcunit\newblock
\usebibmacro{volume+or+volumes}%
\newcunit\newblock
@@ -2046,10 +2571,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
{\ifpunctmark{.}% This seems to work.
@@ -2105,10 +2636,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:report}{%
@@ -2139,15 +2676,21 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:review}{%
\usebibmacro{bibindex}%
- \iffieldequalstr{entrysubtype}{magazine}
+ \iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{cmag+news+author}}%
{\usebibmacro{author/editor}}%
\newcunit\newblock
@@ -2158,7 +2701,7 @@
\printfield{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}%
- \newcunit\newblock
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -2171,7 +2714,7 @@
\setunit{\addcomma\addspace}%
\printfield{note}%
\setunit{\addcomma\addspace}%
- \iffieldequalstr{entrysubtype}{magazine}
+ \iffieldequalstr{entrysubtype}{magazine}%
{\usebibmacro{mag+news+date}}%
{\usebibmacro{cjournal+issue+year+pages}}%
\usebibmacro{fullpostnote}%
@@ -2183,10 +2726,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:suppbook}{%
@@ -2231,10 +2780,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyAlias{cite:suppcollection}{cite:suppbook}
@@ -2261,10 +2816,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:unpublished}{%
@@ -2293,10 +2854,16 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{cite:video}{%
@@ -2322,15 +2889,17 @@
\newcunit
\usebibmacro{bybookauthor}%
\usebibmacro{cbyeditor+others}%
- \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[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}
{\toggletrue{cms@usedvol}%
\printfield{volume}%
@@ -2339,10 +2908,10 @@
\bibstring{ofseries}%
\setunit{\addspace}
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}
\newcunit
\usebibmacro{volume+or+volumes}%
@@ -2365,10 +2934,16 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
- \setunit{\addspace}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
+ \newcunit\newblock
+ \iftoggle{cms@citerel}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \newcunit}%
+ {}%
\usebibmacro{finentry}}
%%%% List Formats %%%%
@@ -2376,27 +2951,27 @@
\DeclareListFormat{language}{%
\ifthenelse{\value{listcount}=1}%
{\bibleftbracket\bibstring{inlang}%\addspace - for inflected langs.
- \ifbibstring{#1}
- {\bibstring{#1}}
- {\ifbibstring{lang#1}
- {\bibstring{lang#1}}
+ \ifbibstring{#1}%
+ {\bibstring{#1}}%
+ {\ifbibstring{lang#1}%
+ {\bibstring{lang#1}}%
{#1}}%
\ifthenelse{\value{listtotal}=1}%
{\bibrightbracket}%
{}}%
{\ifthenelse{\value{listcount}=\value{listtotal}}%
{\multilangdelim%
- \ifbibstring{#1}
- {\bibstring{#1}}
- {\ifbibstring{lang#1}
- {\bibstring{lang#1}}
+ \ifbibstring{#1}%
+ {\bibstring{#1}}%
+ {\ifbibstring{lang#1}%
+ {\bibstring{lang#1}}%
{#1}}%
\bibrightbracket}%
{\multilangdelim%
- \ifbibstring{#1}
- {\bibstring{#1}}
- {\ifbibstring{lang#1}
- {\bibstring{lang#1}}
+ \ifbibstring{#1}%
+ {\bibstring{#1}}%
+ {\ifbibstring{lang#1}%
+ {\bibstring{lang#1}}%
{#1}}}}%
\usebibmacro{langlist:andothers}}
@@ -2410,7 +2985,7 @@
\DeclareListFormat{periodplace}{\mkbibparens{#1}}
\DeclareListFormat{lista}{%
- \ifthenelse{\value{listtotal}<2}
+ \ifthenelse{\value{listtotal}<2}%
{s\adddot v\adddot\addspace\mkbibquote{#1\isdot}}%
{\ifthenelse{\value{listcount}=1}%
{s\adddot vv\adddot\addspace \mkbibquote{#1\isdot}\addcomma}%
@@ -2509,10 +3084,10 @@
{\mkpageprefix[bookpagination]{#1}}}}%
\DeclareFieldFormat{edlang}{%
- \ifbibstring{#1}
- {\bibstring{#1}}
- {\ifbibstring{ed#1}
- {\bibstring{ed#1}}
+ \ifbibstring{#1}%
+ {\bibstring{#1}}%
+ {\ifbibstring{ed#1}%
+ {\bibstring{ed#1}}%
{\ifcapital{\MakeCapital{#1}}{#1}}}}
\DeclareFieldFormat[suppbook,suppcollection]{title}{\mkbibemph{#1}\isdot}
@@ -2630,42 +3205,42 @@
\DeclareFieldFormat{urldate}{% 16th ed.
\iffieldundef{userd}%
- {\bibstring{urlseen}\space #1}%
+ {\bibstring{urlseen}\addspace #1}%
{\printfield{userd}\addspace #1}}
\DeclareFieldFormat[video]{urldate}{% 16th ed.
\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}%
- {\bibstring{urlseen}\space #1}%
+ {\bibstring{urlseen}\addspace #1}%
{\printfield{userd}\addspace #1}}
\DeclareFieldFormat[music]{urldate}{% 16th ed.
\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}%
\OR\NOT\iffieldundef{origyear}}%
- {\bibstring{urlseen}\space #1}%
+ {\bibstring{urlseen}\addspace #1}%
{\printfield{userd}\addspace #1}}
\DeclareFieldFormat[music]{origdate}{% 16th ed.
\iftoggle{cms@reprint}% Date fix
{#1}%
{\ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{eventyear}}%
- {\bibstring{recorded}\space #1}%
+ {\bibstring{recorded}\addspace #1}%
{\printfield{userd}\addspace #1}}}
\DeclareFieldFormat[music]{eventdate}{% 16th ed.
\iffieldundef{userd}%
- {\bibstring{recorded}\space #1}%
+ {\bibstring{recorded}\addspace #1}%
{\printfield{userd}\addspace #1}}
\DeclareFieldFormat[video]{eventdate}{% 16th ed.
\iffieldundef{userd}%
- {\bibstring{broadcast}\space #1}%
+ {\bibstring{broadcast}\addspace #1}%
{\printfield{userd}\addspace #1}}
\DeclareFieldAlias{userd}{titleaddon}% 16th ed.
\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1\bibsentence}}% ?!
-\DeclareFieldFormat[review]{nameaddon}{#1\bibsentence}
+\DeclareFieldFormat[review,suppperiodical]{nameaddon}{#1\bibsentence}
\DeclareFieldFormat[customc]{nameaddon}{% For cross-refs
\ifbibstring{#1}%
@@ -2706,14 +3281,20 @@
\DeclareFieldAlias{maintitleaddon}{titleaddon}
+\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot}
+
\DeclareFieldFormat{issuetitle}{\mkbibquote{#1\isdot}}
+\DeclareFieldFormat{shortjournal}{\mkbibemph{#1}\isdot}
+
+\DeclareFieldFormat[periodical]{shorttitle}{\mkbibemph{#1}\isdot}
+
\DeclareFieldFormat{jourser}{%
\ifinteger{#1}%
{\mkbibordseries{#1}%
\addnbspace%
\bibstring{jourser}}%
- {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
+ {\ifbibstring{#1}{\bibstring{#1}}{#1}}}%
\DeclareFieldFormat{journum}{% Revised for 0.9.5
\ifboolexpr{%
@@ -2722,7 +3303,9 @@
not test {\ifnumeral{#1}}%
}%
{\bibstring{numbers}\addspace #1}%
- {\bibstring{number}\addspace #1}}
+ {\bibstring{number}\addspace #1}}%
+
+\DeclareFieldFormat{jourvol}{#1}
\DeclareFieldFormat{sernum}{%
\ifnumeral{#1}%
@@ -2817,14 +3400,44 @@
\DeclareFieldAlias[suppperiodical]{volume}[article]{volume}
+%%%% Related field formats from biblatex.def %%%%
+
+\DeclareFieldFormat{related:origpubas}{#1}% This and next remove parens
+
+\DeclareFieldFormat{related:origpubin}{#1}
+
+\DeclareFieldFormat{relatedstring:default}{% For notes + bib
+ \ifboolexpr{%
+ test {\iffieldundef{relatedstring}}%
+ or
+ test {\iffieldbibstring{relatedstring}}%
+ }%
+ {#1}%
+ {\ifcapital%
+ {\MakeCapital{#1}}%
+ {#1}}%
+ \printunit{\relatedpunct}}%
+
+\DeclareFieldFormat{relatedstring:reprintfrom}{% For notes + bib
+ \ifboolexpr{%
+ test {\iffieldundef{relatedstring}}%
+ or
+ test {\iffieldbibstring{relatedstring}}%
+ }%
+ {#1}%
+ {\ifcapital%
+ {\MakeCapital{#1}}%
+ {#1}}%
+ \addspace}%
+
%%%% Commands, for users and internal %%%%
\newcommand*{\cbytypeeditor}{%
- \iffieldundef{editortype}
- {\bibstring{cbytypeeditor}}
- {\bibstring{cbytype\thefield{editortype}}}}
+ \iffieldundef{editortype}%
+ {\bibstring{cbytypeeditor}}%
+ {\bibstring{cbytype\thefield{editortype}}}}%
-\renewcommand*{\multicitedelim}{\addsemicolon\space}
+\renewcommand*{\multicitedelim}{\addsemicolon\addspace}
\renewcommand*{\iffinalcitedelim}{%
\ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
@@ -2832,12 +3445,12 @@
\newcommand{\custpunct}{%
\iftoggle{cms@fullnote}%
{\iffieldequalstr{type}{plain}%
- {}
+ {}%
{\addcomma}}%
- {\iftoggle{cms@shortnote}
+ {\iftoggle{cms@shortnote}%
{\iffieldundef{postnote}%
{\ifthenelse{\value{multicitecount} < \value{multicitetotal}}%
- {}
+ {}%
{\addperiod}}%
{\addcomma}}%
{\addperiod}}}
@@ -2845,12 +3458,12 @@
\newcommand{\custpunctb}{%
\iftoggle{cms@fullnote}%
{\iffieldequalstr{userb}{plain}%
- {}
+ {}%
{\addcomma}}%
- {\iftoggle{cms@shortnote}
+ {\iftoggle{cms@shortnote}%
{\iffieldundef{postnote}%
{\ifthenelse{\value{multicitecount} < \value{multicitetotal}}%
- {}
+ {}%
{\addperiod}}%
{\addcomma}}%
{\addperiod}}}
@@ -2888,14 +3501,14 @@
{\addperiod}%
{\ifnameundef{author}%
{\addperiod}%
- {}}}}
+ {}}}}%
\newcommand{\postvolpunct}{\addcolon}% For vol:page customization
\newcommand{\parttrans}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbytranslator}\space}%
- {\bibstring{bytranslator}\space}}
+ {\bibstring{cbytranslator}\addspace}%
+ {\bibstring{bytranslator}\addspace}}%
\newcommand{\partedit}{%
\iftoggle{cms@postposit}% Kludge to make it work in French.
@@ -2904,37 +3517,37 @@
{\bibstring{byeditoralt}\addspace}}%
{\iftoggle{cms@fullnote}%
{\bibstring{cbyeditor}\addspace}%
- {\bibstring{byeditor}\addspace}}}
+ {\bibstring{byeditor}\addspace}}}%
\newcommand{\partcomp}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbycompiler}\space}%
- {\bibstring{bycompiler}\space}}
+ {\bibstring{cbycompiler}\addspace}%
+ {\bibstring{bycompiler}\addspace}}%
\newcommand{\parteditandcomp}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbyeditorcp}\space}%
- {\bibstring{byeditorcp}\space}}
+ {\bibstring{cbyeditorcp}\addspace}%
+ {\bibstring{byeditorcp}\addspace}}%
\newcommand{\parttransandcomp}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbytranslatorcp}\space}%
- {\bibstring{bytranslatorcp}\space}}
+ {\bibstring{cbytranslatorcp}\addspace}%
+ {\bibstring{bytranslatorcp}\addspace}}%
\newcommand{\partedittransandcomp}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbyeditortrcp}\space}%
- {\bibstring{byeditortrcp}\space}}
+ {\bibstring{cbyeditortrcp}\addspace}%
+ {\bibstring{byeditortrcp}\addspace}}%
\newcommand{\parteditandtrans}{%
\iftoggle{cms@fullnote}%
- {\bibstring{cbyeditortr}\space}%
- {\bibstring{byeditortr}\space}}
+ {\bibstring{cbyeditortr}\addspace}%
+ {\bibstring{byeditortr}\addspace}}%
\newcommand{\reprint}{%
\iftoggle{cms@fullnote}%
{\bibsstring{reprint}}%
- {\bibstring{reprint}}}
+ {\bibstring{reprint}}}%
\newcommand*{\multipubsdelim}{\addnbspace/\addspace}
@@ -2945,14 +3558,14 @@
{\ifthenelse{\value{liststop}>2}%
{\addcomma\addspace\bibstring{and}\addspace}%
{\addspace\bibstring{and}\addspace}}}%
- {}}
+ {}}%
\newcommand*{\multilangdelim}{%
\ifthenelse{\value{listtotal}<3}%
{\addspace\bibstring{and}\addspace}%
{\ifthenelse{\value{listcount}<\value{listtotal}}%
{\addcomma\addspace}%
- {\addcomma\addspace\bibstring{and}\addspace}}}
+ {\addcomma\addspace\bibstring{and}\addspace}}}%
\renewcommand*{\postnotedelim}{%
\iftoggle{cms@shortnote}%
@@ -3009,45 +3622,54 @@
{\addperiod\addspace}%
{\addcomma\addspace}}
+\newcommand*{\nameadelim}{%
+ \ifboolexpr{%
+ test {\iffieldequalstr{nameatype}{none}}%
+ and
+ not togl {cms@fullnote}%
+ }%
+ {\addperiod\addspace}%
+ {\addcomma\addspace}}
+
\newcommand*{\lbx@cfromlang}{% Needed to eliminate "by" after "trans."
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\bibstring{cfrom\thefield{origlanguage}}}}%
- {\unspace}}
+ {\unspace}}%
\@ifpackagelater{biblatex}{2011/11/12}
{\renewcommand*{\lbx@fromlang}{%
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\bibstring{from\thefield{origlanguage}}}}%
- {\unspace}}}
+ {\unspace}}}%
{\@ifpackagelater{biblatex}{2011/07/28}
{\newcommand*{\lbx@fromlang}{%
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\bibstring{from\thefield{origlanguage}}}}%
{\unspace}}}%
{\renewcommand*{\lbx@fromlang}{%
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\bibstring{from\thefield{origlanguage}}}}%
{\unspace}}}}
\renewcommand*{\lbx@lfromlang}{%
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\biblstring{from\thefield{origlanguage}}}}%
{\unspace}}
\renewcommand*{\lbx@sfromlang}{%
- \iffieldundef{userf}
- {\iffieldundef{origlanguage}
- {\unspace}
+ \iffieldundef{userf}%
+ {\iffieldundef{origlanguage}%
+ {\unspace}%
{\bibsstring{from\thefield{origlanguage}}}}%
{\unspace}}
@@ -3056,86 +3678,93 @@
\newbibmacro*{finentry}{%{\finentry} To make annotated bibliography
\togglefalse{cms@switchdates}%
\ifbibliography
- {\usebibmacro{entrytail}}
+ {\usebibmacro{entrytail}}%
{}%
\finentry}
-\newbibmacro*{book:xref+finentry}{%
- \iffieldundef{crossref}%
- {\iffieldundef{xref}%
+\newbibmacro*{book:xref+finentry}{% FIXME
+ \ifthenelse{\iffieldundef{crossref}\OR\ifbibliography}%
+ {\ifthenelse{\iffieldundef{xref}\OR\ifbibliography}%
{}%
{\iftoggle{cms@bookcitexref}%
- {\cmsnoopcite{\thefield{xref}}}%
- {\ifboolexpr{
- test {\ifpunct}%
- or
- test {\ifpunctmark{*}}%
- }%
- {\bibhypertarget{\thefield{xref}}%
- {\cmsnoopcite{\thefield{xref}}}\nopunct}%
- {\bibhypertarget{\thefield{xref}}%
- {\cmsnoopcite{\thefield{xref}}}}}}}%
+ {\cms@citetracker@xref}%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cms@citetracker@xref}}}}%
{\iftoggle{cms@bookcitexref}%
- {\cmsnoopcite{\thefield{crossref}}}%
- {\ifboolexpr{
- test {\ifpunct}%
- or
- test {\ifpunctmark{*}}%
- }%
- {\bibhypertarget{\thefield{crossref}}%
- {\cmsnoopcite{\thefield{crossref}}}\nopunct}%
- {\bibhypertarget{\thefield{crossref}}%
- {\cmsnoopcite{\thefield{crossref}}}}}}}
+ {\cms@citetracker@crossref}%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cms@citetracker@crossref}}}}%
-\newbibmacro*{cite:xref+finentry}{%
- \iffieldundef{crossref}%
- {\iffieldundef{xref}%
+\newbibmacro*{cite:xref+finentry}{% FIXME
+ \ifthenelse{\iffieldundef{crossref}\OR\ifbibliography}%
+ {\ifthenelse{\iffieldundef{xref}\OR\ifbibliography}%
{}%
{\iftoggle{cms@citecrossref}%
- {\cmsnoopcite{\thefield{xref}}}%
- {\ifboolexpr{
- test {\ifpunct}%
- or
- test {\ifpunctmark{*}}%
- }%
- {\bibhypertarget{\thefield{xref}}%
- {\cmsnoopcite{\thefield{xref}}}\nopunct}%
- {\bibhypertarget{\thefield{xref}}%
- {\cmsnoopcite{\thefield{xref}}}}}}}%
+ {\cms@citetracker@xref}%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cms@citetracker@xref}}}}%
{\iftoggle{cms@citecrossref}%
- {\cmsnoopcite{\thefield{crossref}}}%
- {\ifboolexpr{
- test {\ifpunct}%
- or
- test {\ifpunctmark{*}}%
- }%
- {\bibhypertarget{\thefield{crossref}}%
- {\cmsnoopcite{\thefield{crossref}}}\nopunct}%
- {\bibhypertarget{\thefield{crossref}}%
- {\cmsnoopcite{\thefield{crossref}}}}}}}
+ {\cms@citetracker@crossref}%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cms@citetracker@crossref}}}}%
+
+\newbibmacro*{allshort+firstcite+xref}{%
+ \ifboolexpr{%
+ (
+ togl {cms@citecrossref}%
+ and
+ togl {cms@bookcitexref}%
+ )
+ or
+ not togl {cms@allshort}%
+ }%
+ {}%
+ {\ifciteseen%
+ {}%
+ {\iffieldundef{crossref}%
+ {\iffieldundef{xref}%
+ {}%
+ {\cms@citetracker@xref}}%
+ {\cms@citetracker@crossref}}}}%
+
+
+\def\cms@citetracker@crossref{% cf. \blx@citetracker@global
+ \ifbool{citetracker}%
+ {\xifinlistcs\abx@field@crossref{blx@bsee@\the\c@refsection}%
+ {}%
+ {\listcsxadd{blx@bsee@\the\c@refsection}\abx@field@crossref}}%
+ {}}%
+
+\def\cms@citetracker@xref{% cf. \blx@citetracker@global
+ \ifbool{citetracker}%
+ {\xifinlistcs\abx@field@xref{blx@bsee@\the\c@refsection}%
+ {}%
+ {\listcsxadd{blx@bsee@\the\c@refsection}\abx@field@xref}}%
+ {}}%
+
\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography
\newunit\newblock
\iftoggle{cms@annotation}%
{\usebibmacro{annotation}%
- \newunit\newblock}
+ \newunit\newblock}%
{}}%
\newbibmacro*{author+holder}{%
- \ifnameundef{author}
- {}
+ \ifnameundef{author}%
+ {}%
{\printnames{author}%
- \ifthenelse{\ifnameundef{holder}\OR
- \ifnamesequal{author}{holder}}
- {}
+ \ifthenelse{\ifnameundef{holder}\OR%
+ \ifnamesequal{author}{holder}}%
+ {}%
{\setunit{\addspace}%
\printtext[parens]{\printnames{holder}}}}}
\renewbibmacro*{byauthor}{%
- \ifthenelse{\ifuseauthor\OR
- \ifnameundef{author}}
- {}
- {\bibstring{by}\addspace
+ \ifthenelse{\ifuseauthor\OR%
+ \ifnameundef{author}}%
+ {}%
+ {\bibstring{by}\addspace%
\printnames[byauthor]{author}}}
\newbibmacro*{byauthorpunct}{%
@@ -3144,10 +3773,10 @@
{\newcunit}}
\renewbibmacro*{bybookauthor}{%
- \ifnameundef{bookauthor}
- {}
- {\ifnamesequal{author}{bookauthor}
- {}
+ \ifnameundef{bookauthor}%
+ {}%
+ {\ifnamesequal{author}{bookauthor}%
+ {}%
{\bibstring{by}\addspace\printnames[default]{bookauthor}%
\newcunit\newblock}}}
@@ -3178,11 +3807,11 @@
\clearname{introduction}}}
\newbibmacro*{langlist:andothers}{%
- \ifthenelse{\value{listcount}=\value{liststop}\AND
- \ifmoreitems}
- {\ifnum\value{liststop}>1 \finalandcomma\fi
- \andmoredelim\bibstring{andmore}\bibrightbracket}
- {}}
+ \ifthenelse{\value{listcount}=\value{liststop}\AND%
+ \ifmoreitems}%
+ {\ifnum\value{liststop}>1 \finalandcomma\fi%
+ \andmoredelim\bibstring{andmore}\bibrightbracket}%
+ {}}%
\newbibmacro*{mag+news+author}{%
\ifnameundef{author}%
@@ -3195,20 +3824,20 @@
\savefield{journaltitle}{\bbx@lasthash}}}%
{\ifuseauthor%
{\usebibmacro{author}}%
- {}}}
+ {}}}%
\newbibmacro*{cmag+news+author}{%
\ifnameundef{author}%
{}% 16th ed.
{\ifuseauthor%
{\usebibmacro{author}}%
- {}}}
+ {}}}%
\newbibmacro*{type+inst+year}{%
- \printfield{type}
+ \printfield{type}%
\newcunit
\printlist{institution}%
- \setunit*{\addcomma\space}%
+ \setunit*{\addcomma\addspace}%
\usebibmacro{cmsyear}}
\newbibmacro*{institution+organization}{%
@@ -3225,7 +3854,7 @@
{\ifnameundef{editor}%
{\iflistundef{organization}%
{}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\iflistequals{organization}{\bbx@lasthash}}%
and
not test {\iffirstonpage}%
@@ -3246,13 +3875,13 @@
{\usebibmacro{author/editor}}}
\newbibmacro*{cbytypestrg}[2]{%
- \iffieldundef{#1type}
- {\bibstring{cby#2}}
- {\bibstring{cby\thefield{#1type}}}}
+ \iffieldundef{#1type}%
+ {\bibstring{cby#2}}%
+ {\bibstring{cby\thefield{#1type}}}}%
\newbibmacro*{cbyeditor}{%
- \ifnameundef{editor}
- {}
+ \ifnameundef{editor}%
+ {}%
{\usebibmacro{cbytypestrg}{editor}{editor}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
@@ -3260,105 +3889,105 @@
\usebibmacro{cbyeditorx}}
\newbibmacro*{cbyeditorx}{%
- \ifnameundef{editora}
- {}
+ \ifnameundef{editora}%
+ {}%
{\usebibmacro{cbytypestrg}{editora}{editor}%
\setunit{\addspace}%
\printnames[byeditora]{editora}%
\newcunit}%
- \ifnameundef{editorb}
- {}
+ \ifnameundef{editorb}%
+ {}%
{\usebibmacro{cbytypestrg}{editorb}{editor}%
\setunit{\addspace}%
\printnames[byeditorb]{editorb}%
\newcunit}%
- \ifnameundef{editorc}
- {}
+ \ifnameundef{editorc}%
+ {}%
{\usebibmacro{cbytypestrg}{editorc}{editor}%
\setunit{\addspace}%
\printnames[byeditorc]{editorc}%
\newcunit}}
\newbibmacro*{cbytranslator}{%
- \ifnameundef{translator}
- {}
+ \ifnameundef{translator}%
+ {}%
{\bibstring{cbytranslator}%
- \addspace
+ \addspace%
\printnames[bytranslator]{translator}}}
\newbibmacro*{cbycompiler}{%
- \ifnameundef{namec}
- {}
- {\bibstring{cbycompiler}\addspace
+ \ifnameundef{namec}%
+ {}%
+ {\bibstring{cbycompiler}\addspace%
\printnames[bycompiler]{namec}}}
\newbibmacro*{cbyredactor}{%
- \ifnameundef{redactor}
- {}
- {\bibstring{cbyredactor}\addspace
+ \ifnameundef{redactor}%
+ {}%
+ {\bibstring{cbyredactor}\addspace%
\printnames[byredactor]{redactor}}}
\newbibmacro*{cwithcommentator}{%
- \ifnameundef{commentator}
- {}
- {\bibsstring{withcommentator}\addspace
+ \ifnameundef{commentator}%
+ {}%
+ {\bibsstring{withcommentator}\addspace%
\printnames[withcommentator]{commentator}}}
\newbibmacro*{cwithannotator}{%
- \ifnameundef{annotator}
- {}
- {\bibsstring{withannotator}\addspace
+ \ifnameundef{annotator}%
+ {}%
+ {\bibsstring{withannotator}\addspace%
\printnames[withannotator]{annotator}}}
\newbibmacro*{cwithintroduction}{%
- \ifnameundef{introduction}
- {}
- {\bibstring{withintroduction}\addspace
+ \ifnameundef{introduction}%
+ {}%
+ {\bibstring{withintroduction}\addspace%
\printnames[withintroduction]{introduction}}}
\newbibmacro*{cwithforeword}{%
- \ifnameundef{foreword}
- {}
- {\bibstring{withforeword}\addspace
+ \ifnameundef{foreword}%
+ {}%
+ {\bibstring{withforeword}\addspace%
\printnames[withforeword]{foreword}}}
\newbibmacro*{cwithafterword}{%
- \ifnameundef{afterword}
- {}
- {\bibstring{withafterword}\addspace
+ \ifnameundef{afterword}%
+ {}%
+ {\bibstring{withafterword}\addspace%
\printnames[withafterword]{afterword}}}
\newbibmacro*{cbyeditor+others}{%
- \ifthenelse{\NOT\ifnameundef{editor}\AND
- \(\iffieldundef{editortype}\OR
- \iffieldequalstr{editortype}{editor}\)}
+ \ifthenelse{\NOT\ifnameundef{editor}\AND%
+ \(\iffieldundef{editortype}\OR%
+ \iffieldequalstr{editortype}{editor}\)}%
{\def\@tempa{cbyeditor}%
- \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}\space
+ \bibstring{\@tempa}\addspace%
\printnames[byeditor]{editor}%
\clearname{editor}%
\newcunit%
@@ -3367,58 +3996,58 @@
\usebibmacro{cbytranslator+others}}
\newbibmacro*{cbytranslator+others}{%
- \ifnameundef{translator}
- {}
+ \ifnameundef{translator}%
+ {}%
{\def\@tempa{cbytranslator}%
- \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}%
\newcunit}%
\usebibmacro{cbycompiler+others}}
\newbibmacro*{cbycompiler+others}{%
- \ifnameundef{namec}
- {}
+ \ifnameundef{namec}%
+ {}%
{\def\@tempa{cbycompiler}%
- \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}%
\newcunit}%
@@ -3441,6 +4070,60 @@
\setunit*{\addcomma\addspace}%
\usebibmacro{cwithafterword}}
+\newbibmacro*{part+editor+translator}{%
+ \ifnameundef{namea}%
+ {\ifnameundef{nameb}%
+ {}%
+ {\bibstring{bytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}%
+ {\ifthenelse{\iffieldundef{nameatype}\OR%
+ \iffieldequalstr{nameatype}{editor}}%
+ {\ifnamesequal{namea}{nameb}%
+ {\bibstring{byeditortr}\addspace%
+ \printnames[byeditor]{namea}}%
+ {\bibstring{byeditor}\addspace%
+ \printnames[byeditor]{namea}%
+ \ifnameundef{nameb}%
+ {}%
+ {\newunit%
+ \bibstring{bytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}}%
+ {\usebibmacro{bytypestrg}{namea}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditor]{namea}%
+ \ifnameundef{nameb}%
+ {}%
+ {\newunit%
+ \bibstring{bytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}}}
+
+\newbibmacro*{cpart+editor+translator}{%
+ \ifnameundef{namea}%
+ {\ifnameundef{nameb}%
+ {}%
+ {\bibstring{cbytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}%
+ {\ifthenelse{\iffieldundef{nameatype}\OR%
+ \iffieldequalstr{nameatype}{editor}}%
+ {\ifnamesequal{namea}{nameb}%
+ {\bibstring{cbyeditortr}\addspace%
+ \printnames[byeditor]{namea}}%
+ {\bibstring{cbyeditor}\addspace% Need this \space here?
+ \printnames[byeditor]{namea}%
+ \ifnameundef{nameb}%
+ {}%
+ {\newcunit%
+ \bibstring{cbytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}}%
+ {\usebibmacro{cbytypestrg}{namea}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditor]{namea}%
+ \ifnameundef{nameb}%
+ {}%
+ {\newunit%
+ \bibstring{cbytranslator}\addspace%
+ \printnames[bytranslator]{nameb}}}}}
+
\newbibmacro*{cms-in:}{% Fix for 0.9a compat.
\iftoggle{cms@origpublished}%
{}% Removed the cms@crspace test -- fixed a bug I had introduced
@@ -3465,7 +4148,7 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}%
+ {\bibstring{in}\setunit{\addspace}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
{\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
@@ -3479,7 +4162,7 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}}%
+ {\bibstring{in}\setunit{\addspace}}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
{\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
@@ -3496,29 +4179,35 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}}%
+ {\bibstring{in}\setunit{\addspace}}}}%
\newbibmacro*{chapincoll}{%
\iffieldundef{chapter}%
- {}
+ {}%
{\printfield{chapter}\addspace%
- \clearfield{chapter}}}
+ \clearfield{chapter}}}%
\newbibmacro*{xrefchapincoll}{%
\iffieldundef{chapter}%
- {\printtext{\relax}}
+ {\printtext{\relax}}%
{\printfield{chapter}\addspace%
- \clearfield{chapter}}}
+ \clearfield{chapter}}}%
\newbibmacro*{chapinscore}{%
\iffieldundef{chapter}%
- {\ifthenelse{\ifentrytype{music}% 16th ed.
- \AND\NOT\iffieldundef{booktitle}}%
+ {\ifboolexpr{%
+ test {\ifentrytype{music}}% 16th ed.
+ and
+ not test {\iffieldundef{booktitle}}%
+ and
+ not togl {cms@origpublished}%
+ }%
{\bibstring{on}\setunit{\addspace}}%
- {}}
- {\printfield{chapter}%
- \addspace\bibstring{of}\setunit{\addspace}%
- \clearfield{chapter}}}
+ {}}%
+ {\printfield{chapter}\clearfield{chapter}%
+ \iffieldundef{booktitle}%
+ {}%
+ {\addspace\bibstring{of}\setunit{\addspace}}}}%
\newbibmacro*{caddendum}{% New macros for 16th ed. field exclusion
\ifboolexpr{%
@@ -3556,23 +4245,27 @@
{}%
{\printeventdate}}% Date fix
-\newbibmacro*{ctitle+stitle}{%
- \printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work)
- \printfield[noformat]{title}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
- \setunit{\addcomma\addspace}\newblock%
+\newbibmacro*{ctitle+stitle}{% New test here for related entries.
+ \iffieldundef{title}%
+ {}%
+ {\printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work)
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}}%
% \setunit{\addspace}}%
% \usebibmacro{language+transtitle}%
% \setunit*{\addcomma}\newblock}
-\newbibmacro*{citaltitle+stitle}{%
- \printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work)
- \printfield[noformat]{title}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
- \newcunit\newblock%
+\newbibmacro*{citaltitle+stitle}{% New test, as above.
+ \iffieldundef{title}%
+ {}%
+ {\printtext[title]{%:\thefield{entrytype}]{%(Changed for 0.7 to work)
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -3583,7 +4276,7 @@
\printfield[noformat]{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
- \newunit%\setunit{\addspace}\newblock%
+ \setunit{\ptitleaddonpunct}%
\printfield{titleaddon}}%
% \setunit{\addspace}}%
% \usebibmacro{language+transtitle}%
@@ -3594,7 +4287,7 @@
\printfield[noformat]{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
- \newunit\newblock%
+ \setunit{\ptitleaddonpunct}%
\printfield{titleaddon}%
\setunit{\addspace}%
\usebibmacro{language+transtitle}%
@@ -3605,7 +4298,7 @@
\printfield[noformat]{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
- \newunit%\setunit{\addcomma\addspace}
+ \setunit{\ptitleaddonpunct}%
\printfield{titleaddon}%
}%\newcunit\newblock}
@@ -3614,7 +4307,7 @@
\printfield[noformat]{title}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{subtitle}}%
- \setunit{\addcomma\addspace}%
+ \setunit{\ctitleaddonpunct}%
\printfield{titleaddon}%
}%\newcunit\newblock}
@@ -3625,34 +4318,34 @@
\newbibmacro*{issuetitle}{%
\iffieldundef{issuetitle}%
- {}
+ {}%
{\ifthenelse{\ifentrytype{article}\OR%
\ifentrytype{review}\OR%
\ifentrytype{suppperiodical}}% This test is for
{\usebibmacro{cms-in:}}% periodical entries
{}%
\printtext[issuetitle]{%
- \printfield[noformat]{issuetitle}%
+ \printfield[itnoformat]{issuetitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{issuesubtitle}}}}
+ \printfield[sitnoformat]{issuesubtitle}}}}
\newbibmacro*{btitle+bstitle}{%
- \iffieldundef{booktitle}
- {}
+ \iffieldundef{booktitle}%
+ {}%
{\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
\ifentrytype{video}}%
{}%
{\usebibmacro{cms-in:}}%
\printtext[booktitle]{%
- \printfield[noformat]{booktitle}%
+ \printfield[btnoformat]{booktitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{booksubtitle}}%
- \newcunit
+ \printfield[sbtnoformat]{booksubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{booktitleaddon}%
\setunit*{\addcomma\addspace}}}
\newbibmacro*{publ+loc+year}{% Revised for reprint
- \ifboolexpr{
+ \ifboolexpr{%
togl {cms@reprint}%
and
not test {\ifentrytype{video}}%
@@ -3687,10 +4380,10 @@
{}%
\printlist{location}%
\iffieldundef{howpublished}%
- {\setunit*{\addcomma\space}}%
- {\setunit*{\addcolon\space}}%
+ {\setunit*{\addcomma\addspace}}%
+ {\setunit*{\addcolon\addspace}}%
\printfield{howpublished}%
- \setunit*{\addcomma\space}%
+ \setunit*{\addcomma\addspace}%
\usebibmacro{date}%
}
@@ -3702,15 +4395,15 @@
{}%
\printlist{location}%
\iflistundef{institution}%
- {\setunit*{\addcomma\space}}%
- {\setunit*{\addcolon\space}}%
+ {\setunit*{\addcomma\addspace}}%
+ {\setunit*{\addcolon\addspace}}%
\printlist{institution}%
- \setunit*{\addcomma\space}%
+ \setunit*{\addcomma\addspace}%
\usebibmacro{date}%
}%
\newbibmacro*{cpubl+loc+year}{% Revised for reprint
- \ifboolexpr{
+ \ifboolexpr{%
test {\iflistundef{location}}%
and
test {\iflistundef{publisher}}%
@@ -3724,7 +4417,7 @@
\printtext[parens]{%
\usebibmacro{origpubl+loc+year}%{cmsorigdate}%\printfield{origyear}%
\setunit*{\addsemicolon\addspace}%
- \ifboolexpr{
+ \ifboolexpr{%
togl {cms@reprint}%
and
not test{\ifentrytype{video}}%
@@ -3733,15 +4426,15 @@
\newcunit}%
{}%
\printlist{location}%
- \iflistundef{publisher}
- {\setunit*{\addspace}}
- {\setunit*{\addcolon\space}}%
+ \iflistundef{publisher}%
+ {\setunit*{\addspace}}%
+ {\setunit*{\addcolon\addspace}}%
\printlist{publisher}%
- \setunit{\addcomma\space}%
+ \setunit{\addcomma\addspace}%
\usebibmacro{date}}}}%
\newbibmacro*{cpubletter+loc+year}{%
- \ifboolexpr{
+ \ifboolexpr{%
test {\iflistundef{location}}%
and
test {\iflistundef{publisher}}%
@@ -3752,23 +4445,27 @@
{\setunit{\addspace}%
\printtext[parens]{%
\printlist{location}%
- \iflistundef{publisher}
- {\setunit*{\addspace}}
- {\setunit*{\addcolon\space}}%
+ \iflistundef{publisher}%
+ {\setunit*{\addspace}}%
+ {\setunit*{\addcolon\addspace}}%
\printlist{publisher}%
- \setunit{\addcomma\space}%
+ \setunit{\addcomma\addspace}%
\usebibmacro{date}}}}% Changed for 0.9
\newbibmacro*{originally+published+as}{% Punctuation fix now in
\iffieldundef{userf}% \origfullcite for 0.8e.
{\iffieldundef{reprinttitle}%
- {}
- {\bibstring{origpublin}%
+ {}%
+ {\usebibmacro{begrelated}%
+ \bibstring{reprintfrom}% ?
\origpublcite{\thefield{reprinttitle}}%
- \newunit}}
- {\iffieldundef{origlanguage}%
+ \usebibmacro{endrelated}%
+ \newunit}}%
+ {\usebibmacro{begrelated}%
+ \iffieldundef{origlanguage}%
{\bibstring{origpub}%
- \origfullcite{\thefield{userf}}
+ \origfullcite{\thefield{userf}}%
+ \usebibmacro{endrelated}%
\newunit}%
{\iftoggle{cms@postposit}%
{\bibstring{origedition}%
@@ -3776,11 +4473,13 @@
\printfield[edlang]{origlanguage}%
\addcolon%
\origfullcite{\thefield{userf}}%
+ \usebibmacro{endrelated}%
\newunit}%
{\printfield[edlang]{origlanguage}%
\setunit{\addspace}%
\bibstring{origedition}%
- \origfullcite{\thefield{userf}}
+ \origfullcite{\thefield{userf}}%
+ \usebibmacro{endrelated}%
\newunit}}}}
\newbibmacro*{org+publ+loc+year}{% What was wrong with \ifthenelse here?
@@ -3796,7 +4495,7 @@
{\setunit*{\addcolon\addspace}}}%
{\setunit*{\addcolon\addspace}}%
\printlist{organization}%
- \setunit*{\addcomma\space}%
+ \setunit*{\addcomma\addspace}%
\printlist{publisher}%
\setunit*{\addcomma\addspace}%
\usebibmacro{date}}
@@ -3823,7 +4522,7 @@
{\addcomma\addspace}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -3831,7 +4530,7 @@
\addcomma\addspace}%
{\setunit{\addspace}%
\printtext[parens]{% parens is the default here
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -3854,7 +4553,7 @@
{\addcomma\addspace}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -3862,7 +4561,7 @@
\addcomma\addspace}%
{\setunit{\addspace}%
\printtext[parens]{% parens is the default here
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
@@ -3903,7 +4602,7 @@
\usebibmacro{choosepubstring}%
\printdate}}}%
{\iffieldundef{origyear}%
- {}
+ {}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
\printorigdate}}}}%
@@ -3921,7 +4620,7 @@
{\printdate}}
\newbibmacro{cite:xref+date}{%
- \ifboolexpr{
+ \ifboolexpr{%
togl {cms@omitxrefdate}%
or
togl {cms@bookcitexref}%
@@ -3942,8 +4641,8 @@
))
or
not test {\ifentryseen{\thefield{crossref}}}%
- }
- {\ifboolexpr{
+ }%
+ {\ifboolexpr{%
togl {cms@omitxrefdate}%
or
togl {cms@bookcitexref}%
@@ -3964,7 +4663,7 @@
))
or
not test {\ifentryseen{\thefield{xref}}}%
- }
+ }%
{}%
{\printtext[parens]{\usebibmacro{date}}}}%
{\printtext[parens]{\usebibmacro{date}}}}
@@ -4022,9 +4721,9 @@
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\setunit*{\addspace}%
- \iffieldundef{series}
- {}
- {\newcunit
+ \iffieldundef{series}%
+ {}%
+ {\newcunit%
\printfield[jourser]{series}%
\newcunit}%\setunit*{\addspace}?
\printfield[jourvol]{volume}%
@@ -4032,19 +4731,36 @@
\printfield[journum]{number}%
\setunit{\addcomma\addspace}%
\printfield{eid}%
- \newunit}
+ \newunit}%
\newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries,
- \printtext[title]{% article subtype
- \printfield[noformat]{title}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
+ \ifboolexpr{% article subtype
+ not test {\iffieldundef{shorttitle}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
+ {\clearlist{location}\printtext[shorttitle]{%
+ \printfield[tnoformat]{shorttitle}}}%
+ {\printtext[title]{%
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\setunit*{\addspace}%
- \iffieldundef{series}
- {}
- {\newcunit
+ \iffieldundef{series}%
+ {}%
+ {\newcunit%
\printfield[jourser]{series}%
\newcunit}%\setunit*{\addspace}?
\printfield[jourvol]{volume}%
@@ -4055,16 +4771,33 @@
\newunit}
\newbibmacro*{journal+sub}{%
- \iffieldundef{journaltitle}
- {}
- {\printtext[journaltitle]{%
- \printfield[noformat]{journaltitle}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{journalsubtitle}}}}
+ \iffieldundef{journaltitle}%
+ {}%
+ {\ifboolexpr{%
+ not test {\iffieldundef{shortjournal}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
+ {\clearlist{location}\printtext[shortjournal]{%
+ \printfield[jtsnoformat]{shortjournal}}}%
+ {\printtext[journaltitle]{%
+ \printfield[jtnoformat]{journaltitle}%
+ \setunit{\addcolon\addspace}%
+ \printfield[sjtnoformat]{journalsubtitle}}}}}%
\newbibmacro*{cite+doi+url}{% 16th ed.
- \iffieldundef{urlyear}
- {}
+ \iffieldundef{urlyear}%
+ {}%
{\printurldate}% Date fix
\newcunit\newblock
\iftoggle{cms@doionly}%
@@ -4072,21 +4805,33 @@
{}%
{\printfield{doi}%
\clearfield{url}}}%
- {\iftoggle{cms@doi}%
+ {\ifboolexpr{%
+ togl {cms@doi}%
+ and
+ not test {\iffieldundef{doi}}%
+ }%
{\printfield{doi}}%
{}}%
\newcunit\newblock
- \iftoggle{cms@eprint}%
+ \ifboolexpr{%
+ togl {cms@eprint}%
+ and
+ not test {\iffieldundef{eprint}}%
+ }%
{\usebibmacro{eprint}}%
{}%
\newcunit\newblock
- \iftoggle{cms@url}%
+ \ifboolexpr{%
+ togl {cms@url}%
+ and
+ not test {\iffieldundef{url}}%
+ }%
{\printfield{url}}%
{}}%
\newbibmacro*{chap+pag}{%
\printfield{chapter}%
- \setunit*{\addcomma\space}%
+ \setunit*{\addcomma\addspace}%
\printfield{pages}}
\newbibmacro*{mag+news+date}{% 16th ed.
@@ -4097,7 +4842,7 @@
{\usebibmacro{mag+date+issue}}}}
\newbibmacro*{date+issue}{%
- \iffieldundef{issue}
+ \iffieldundef{issue}%
{\iffieldundef{number}%
{\usebibmacro{date}}%
{\iftoggle{cms@numbermonth}% For exclusion of month
@@ -4119,10 +4864,27 @@
\usebibmacro{date+issue}}
\newbibmacro*{periodical+date+issue}{% For periodical type &
- \printtext[title]{% magazine subtype
- \printfield[noformat]{title}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{subtitle}}%
+ \ifboolexpr{% magazine subtype
+ not test {\iffieldundef{shorttitle}}%
+ and
+ ((
+ test {\ifcitation}%
+ and
+ togl {cms@citejtabb}%
+ )
+ or
+ (
+ test {\ifbibliography}%
+ and
+ togl {cms@bibjtabb}%
+ ))
+ }%
+ {\clearlist{location}\printtext[shorttitle]{%
+ \printfield[tnoformat]{shorttitle}}}%
+ {\printtext[title]{%
+ \printfield[tnoformat]{title}%
+ \setunit{\addcolon\addspace}%
+ \printfield[stnoformat]{subtitle}}}%
\setunit*{\addspace}%
\printlist[periodplace]{location}%
\newcunit\newblock
@@ -4131,56 +4893,58 @@
\usebibmacro{date+issue}}
\newbibmacro*{cmtitle+mstitle+vol+part+title+stitle}{%
- \iffieldundef{maintitle}
- {}
+ \iffieldundef{maintitle}%
+ {}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
- {\usebibmacro{cms-in:}%
+ {\iffieldundef{title}%
+ {\usebibmacro{cms-in:}}%
+ {\bibstring{in}\setunit{\addspace}}%
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
+ \printfield{maintitleaddon}}%
{\toggletrue{cms@usedvol}%
\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
\newbibmacro*{cmtitle+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}\)}%
{\iffieldundef{booktitle}% Fix for origpublin ???
{\usebibmacro{cms-in:}}%
{\bibstring{in}\setunit{\addspace}}%
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}%
\toggletrue{cms@vol}}% InIn fix
{\toggletrue{cms@usedvol}%
\printfield{volume}%
\printfield{part}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\bibstring{ofseries}%
- \setunit{\addspace}
+ \setunit{\addspace}%
\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
+ \printfield[mtnoformat]{maintitle}%
\setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
+ \printfield[smtnoformat]{mainsubtitle}}%
+ \setunit{\ctitleaddonpunct}%
\printfield{maintitleaddon}}}}
\newbibmacro*{backref+check}{%
@@ -4202,32 +4966,34 @@
\renewbibmacro*{postnote}{%
\iftoggle{cms@fullnote}%
{\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}
- {\iftoggle{cms@printshhand}
+ \global\togglefalse{cms@fullnote}}%
+ {\iftoggle{cms@printshhand}%
{\iffieldundef{postnote}%
- {\iffieldundef{shorthand}
+ {\iffieldundef{shorthand}%
{\global\togglefalse{cms@printshhand}%
\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}
- {\usebibmacro{cms:shorthandintro}%
+ \global\togglefalse{cms@fullnote}}%
+ {\setunit{\shorthandpunct}%
+ \usebibmacro{cms:shorthandintro}%
\global\togglefalse{cms@printshhand}%
\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}}
- {\iffieldundef{shorthand}
+ \global\togglefalse{cms@fullnote}}}%
+ {\iffieldundef{shorthand}%
{\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
\global\togglefalse{cms@printshhand}%
\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}
+ \global\togglefalse{cms@fullnote}}%
{\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
+ \setunit{\shorthandpunct}%
\usebibmacro{cms:shorthandintro}%
\global\togglefalse{cms@printshhand}%
\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}}}
+ \global\togglefalse{cms@fullnote}}}}%
{\iffieldundef{postnote}%
{\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}}
+ \global\togglefalse{cms@fullnote}}%
{\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
\global\togglefalse{cms@shortnote}%
@@ -4310,7 +5076,7 @@
{\printfield{volumes}}%
{\printfield{volume}%
\printfield{part}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
togl {cms@hidevolumes}%
and
(
@@ -4381,7 +5147,7 @@
{\newcunit\printfield{volume}\printfield{part}}%
{\usebibmacro{pages+cref+print}}}}%
{\usebibmacro{postnote+cref+print}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollvol}}%
and
(
@@ -4393,7 +5159,7 @@
{\restorefield{volume}{\cbx@incollvol}%
\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}{\restorefield{part}{\cbx@incollpart}}{}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollpart}}%
and
(
@@ -4412,7 +5178,7 @@
{\newcunit\printfield{volume}\printfield{part}}%
{\usebibmacro{pages+cref+print}}}}%
{\usebibmacro{postnote+cref+print}}}%
- {\ifboolexpr{
+ {\ifboolexpr{%
test {\ifcsdef{cbx@incollpart}}%
and
(
@@ -4420,7 +5186,7 @@
or
togl {cms@xrefpart}%
)
- }
+ }%
{\iffieldundef{postnote}%
{\ifcsdef{cbx@incollpages}%
{\restorefield{pages}{\cbx@incollpages}%
@@ -4488,6 +5254,11 @@
\iflistundef{pageref}{}{\savelist{pageref}{\cbx@incollpgref}}}%
\newbibmacro*{xrefpostnote}{%
+ \iftoggle{cms@xrefurl}%
+ {\ifbibliography%
+ {\usebibmacro{bib+doi+url}}%
+ {\usebibmacro{cite+doi+url}}}%
+ {}%
\ifcsdef{cbx@incollpgref}% Here we print and clear the child's
{\restorelist{pageref}{\cbx@incollpgref}% backrefs
\newunit%
@@ -4501,11 +5272,11 @@
\global\let\cbx@incollpages\undefined%
\global\let\cbx@incollpart\undefined%
\global\let\cbx@incollpgn\undefined%
- \global\let\cbx@incollbkpgn\undefined}
+ \global\let\cbx@incollbkpgn\undefined}%
\newbibmacro*{hlprenote}{% Removes spurious comma after prenote in
\iffieldundef{prenote}% \headlessfullnote citations.
- {}
+ {}%
{\printfield{prenote}%
\nopunct}}% Do we need \unspace here?
@@ -4528,54 +5299,40 @@
\newbibmacro*{choose+surname}{%
\ifciteseen%
- {}
- {\ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
- {\printnames{labelname}%
- \clearname{author}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}%
- {\printnames[labelname]{namea}\newcunit%
- \usebibmacro{parteditstrg}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}%
- {\printnames{labelname}\newcunit%
- \usebibmacro{editstrg}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}%
- {\printnames[labelname]{nameb}\newcunit%
- \usebibmacro{parttransstrg}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}%
- {\printnames{labelname}\newcunit%
- \usebibmacro{transstrg}}%
- {\ifboolexpr{%
- not test {\ifnameundef{namec}}%
- and
- togl {cms@usecompiler}%
- }%
- {\printnames[labelname]{namec}\newcunit%
- \usebibmacro{compilestrg}}%
- {}}}}}}}}%
-
-\newbibmacro*{choose+labelname}{%
- \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
- {\printnames{labelname}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{namea}}%
- {\printnames[labelname]{namea}}%
- {\ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}%
- {\printnames{labelname}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{nameb}}%
- {\printnames[labelname]{nameb}}%
- {\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}%
- {\printnames{labelname}}%
- {\ifboolexpr{%
- not test {\ifnameundef{namec}}%
- and
- togl {cms@usecompiler}%
- }%
- {\printnames[labelname]{namec}}%
- {}}}}}}}%
+ {}%
+ {\printnames{labelname}\savefield{fullhash}{\bbx@lasthash}%
+ \ifthenelse{\iffieldequalstr{labelnamesource}{shortauthor}\OR%
+ \iffieldequalstr{labelnamesource}{author}}%
+ {\clearname{author}}%
+ {\iffieldequalstr{labelnamesource}{shorteditor}%
+ {\ifnameundef{namea}%
+ {\newcunit\usebibmacro{editstrg}}%
+ {\newcunit\usebibmacro{parteditstrg}}}%%
+ {\iffieldequalstr{labelnamesource}{editor}%
+ {\newcunit\usebibmacro{editstrg}}%
+ {\iffieldequalstr{labelnamesource}{translator}%
+ {\newcunit\usebibmacro{transstrg}}%
+ {\iffieldequalstr{labelnamesource}{namea}%
+ {\newcunit\usebibmacro{parteditstrg}}%
+ {\iffieldequalstr{labelnamesource}{nameb}%
+ {\newcunit\usebibmacro{parttransstrg}}%
+ {\iffieldequalstr{labelnamesource}{namec}%
+ {\newcunit\usebibmacro{compilestrg}}%
+ {}}}}}}}}}%
+
+\newbibmacro*{clear+labelname}{%
+ \iffieldequalstr{labelnamesource}{shortauthor}%
+ {\clearname{author}\clearname{shortauthor}}%
+ {\iffieldequalstr{labelnamesource}{shorteditor}%
+ {\ifnameundef{namea}%
+ {\clearname{editor}\clearname{shorteditor}}%
+ {\clearname{namea}\clearname{shorteditor}}}%
+ {\clearname{\thefield{labelnamesource}}}}}
\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4
{\DeclareLabelname{\field{shortauthor} \field{author}%
\field{shorteditor} \field{namea} \field{editor}%
- \field{nameb} \field{translator} \field{namec}}}
+ \field{nameb} \field{translator} \field{namec}}}%
{\DeclareLabelname{shortauthor,author,shorteditor,namea,%
editor,nameb,translator,namec}}
@@ -4627,9 +5384,17 @@
\DeclareDataInheritance{*}{*}{%
\noinherit{namea}
\noinherit{nameb}
+ \noinherit{nameatype}
\noinherit{sortyear}
\noinherit{sortname}
- \noinherit{sorttitle}}
+ \noinherit{sorttitle}
+ \noinherit{urlyear}
+ \noinherit{urlmonth}
+ \noinherit{urlday}
+ \noinherit{doi}
+ \noinherit{eprint}
+ \noinherit{eprinttype}
+ \noinherit{url}}
\DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}%
{*}{% ???
@@ -4680,48 +5445,20 @@
}
}
-\newbibmacro*{part+editor+translator}{%
- \ifnameundef{namea}%
- {\ifnameundef{nameb}%
- {}
- {\bibstring{bytranslator}\space%
- \printnames[bytranslator]{nameb}}}%
-{\ifnamesequal{namea}{nameb}%
- {\bibstring{byeditortr}\space%
- \printnames[byeditor]{namea}}%
- {\bibstring{byeditor}\space%
- \printnames[byeditor]{namea}%
- \ifnameundef{nameb}%
- {}
- {\newunit
- \bibstring{bytranslator}\space%
- \printnames[bytranslator]{nameb}}}}}
-
-\newbibmacro*{cpart+editor+translator}{%
- \ifnameundef{namea}%
- {\ifnameundef{nameb}%
- {}
- {\bibstring{cbytranslator}\space%
- \printnames[bytranslator]{nameb}}}%
-{\ifnamesequal{namea}{nameb}%
- {\bibstring{cbyeditortr}\space%
- \printnames[byeditor]{namea}}%
- {\bibstring{cbyeditor}\space% Need this \space here?
- \printnames[byeditor]{namea}%
- \ifnameundef{nameb}%
- {}
- {\newcunit
- \bibstring{cbytranslator}\space%
- \printnames[bytranslator]{nameb}}}}}
+\DeclareSortingScheme{shortjournal}{%
+ \sort{
+ \field{shortjournal}
+ }
+}
\newbibmacro*{compilestrg}{%
- \ifthenelse{\value{namec}>1\OR\ifandothers{namec}}
- {\bibstring{compilers}}
- {\bibstring{compiler}}
- \clearname{namec}}
+ \ifthenelse{\value{namec}>1\OR\ifandothers{namec}}%
+ {\bibstring{compilers}}%
+ {\bibstring{compiler}}%
+ \clearname{namec}}%
\newbibmacro*{transstrg}{%
- \ifthenelse{\value{translator}>1\OR\ifandothers{translator}}
+ \ifthenelse{\value{translator}>1\OR\ifandothers{translator}}%
{\ifnamesequal{translator}{namec}%
{\bibstring{transcompilers}%
\clearname{namec}}%
@@ -4729,11 +5466,11 @@
{\ifnamesequal{translator}{namec}%
{\bibstring{transcompiler}%
\clearname{namec}}%
- {\bibstring{translator}}}
- \clearname{translator}}
+ {\bibstring{translator}}}%
+ \clearname{translator}}%
\newbibmacro*{parttransstrg}{%
- \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}}
+ \ifthenelse{\value{nameb}>1\OR\ifandothers{nameb}}%
{\ifnamesequal{nameb}{namec}%
{\bibstring{transcompilers}%
\clearname{namec}}%
@@ -4741,15 +5478,15 @@
{\ifnamesequal{nameb}{namec}%
{\bibstring{transcompiler}%
\clearname{namec}}%
- {\bibstring{translator}}}
- \clearname{nameb}}
+ {\bibstring{translator}}}%
+ \clearname{nameb}}%
\newbibmacro*{editstrg}{% Test added for 0.9
- \ifthenelse{\iffieldundef{editortype}\OR
- \iffieldequalstr{editortype}{editor}}
- {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}
- {\ifthenelse{\ifnamesequal{editor}{translator}\AND
- \ifnamesequal{editor}{namec}}
+ \ifthenelse{\iffieldundef{editortype}\OR%
+ \iffieldequalstr{editortype}{editor}}%
+ {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}%
+ {\ifthenelse{\ifnamesequal{editor}{translator}\AND%
+ \ifnamesequal{editor}{namec}}%
{\bibstring{editortranscompilers}%
\clearname{translator}%
\clearname{namec}}%
@@ -4760,8 +5497,8 @@
{\bibstring{editortranslators}%
\clearname{translator}}%
{\bibstring{editors}}}}}%
- {\ifthenelse{\ifnamesequal{editor}{translator}\AND
- \ifnamesequal{editor}{namec}}
+ {\ifthenelse{\ifnamesequal{editor}{translator}\AND%
+ \ifnamesequal{editor}{namec}}%
{\bibstring{editortranscompiler}%
\clearname{translator}%
\clearname{namec}}%
@@ -4772,15 +5509,17 @@
{\bibstring{editortranslator}%
\clearname{translator}}%
{\bibstring{editor}}}}}}%
- {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}
- {\bibstring{\thefield{editortype}s}}
- {\bibstring{\thefield{editortype}}}}
- \clearname{editor}}
+ {\ifthenelse{\value{editor}>1\OR\ifandothers{editor}}%
+ {\bibstring{\thefield{editortype}s}}%
+ {\bibstring{\thefield{editortype}}}}%
+ \clearname{editor}}%
\newbibmacro*{parteditstrg}{%
- \ifthenelse{\value{namea}>1\OR\ifandothers{namea}}
- {\ifthenelse{\ifnamesequal{namea}{nameb}\AND
- \ifnamesequal{namea}{namec}}
+ \ifthenelse{\iffieldundef{nameatype}\OR%
+ \iffieldequalstr{nameatype}{editor}}%
+ {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}%
+ {\ifthenelse{\ifnamesequal{namea}{nameb}\AND%
+ \ifnamesequal{namea}{namec}}%
{\bibstring{editortranscompilers}%
\clearname{nameb}%
\clearname{namec}}%
@@ -4791,8 +5530,8 @@
{\bibstring{editortranslators}%
\clearname{nameb}}%
{\bibstring{editors}}}}}%
- {\ifthenelse{\ifnamesequal{namea}{nameb}\AND
- \ifnamesequal{namea}{namec}}
+ {\ifthenelse{\ifnamesequal{namea}{nameb}\AND%
+ \ifnamesequal{namea}{namec}}%
{\bibstring{editortranscompiler}%
\clearname{nameb}%
\clearname{namec}}%
@@ -4802,8 +5541,11 @@
{\ifnamesequal{namea}{nameb}%
{\bibstring{editortranslator}%
\clearname{nameb}}%
- {\bibstring{editor}}}}}%
- \clearname{namea}}
+ {\bibstring{editor}}}}}}%
+ {\ifthenelse{\value{namea}>1\OR\ifandothers{namea}}%
+ {\bibstring{\thefield{nameatype}s}}%
+ {\bibstring{\thefield{nameatype}}}}%
+ \clearname{namea}}%
\newbibmacro*{clearorigin}{%
\toggletrue{cms@origcite}%
@@ -4832,19 +5574,305 @@
{\savefield{fullhash}{\bbx@lasthash}%
\clearname{author}}}}%
{\clearname{author}}%
- \clearname{namea}%
- \clearname{nameb}%
+ \ifthenelse{\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR%
+ \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}}%
+ {}%
+ {\clearname{namea}%
+ \clearname{nameb}}%
\clearfield{nameaddon}%
- \ifthenelse{\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR%
+ \ifthenelse{\(\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR%
\ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR%
- \ifentrytype{mvreference}}%
+ \ifentrytype{mvreference}\OR\ifentrytype{collection}\OR%
+ \ifentrytype{proceedings}\OR\ifentrytype{reference}\OR%
+ \ifentrytype{suppbook}\OR\ifentrytype{suppcollection}\)\OR%
+ \(\(\ifentrytype{audio}\OR\ifentrytype{music}\OR%
+ \ifentrytype{video}\)\AND\iffieldundef{booktitle}\)}%
{}%
{\clearfield{title}%
\clearfield{subtitle}%
- \clearfield{titleaddon}}%
+ \clearfield{titleaddon}%
+ \clearfield{usere}%
+ \clearlist{language}}%
+ \ifentrytype{letter}%
+ {\iftoggle{cms@switchdates}%
+ {\clearfield{year}\clearfield{month}}%
+ {\clearfield{origyear}\clearfield{origmonth}}%
+ \clearfield{origlocation}}%
+ {}%
\clearfield{reprinttitle}%
- \clearfield{usere}%
- \clearlist{language}%
}
+%%%% Related macros from biblatex.def %%%%
+
+\renewbibmacro*{related:origpubas}[1]{%
+ \entrydata*{#1}{%
+ \usebibmacro{at+every+item}%
+ \usebibmacro{cite:origfull}}}%
+
+\renewbibmacro*{related:reprintfrom}[1]{%
+ \entrydata*{#1}{%
+ \usebibmacro{at+every+item}%
+ \nopunct% ???
+ \usebibmacro{cite:origpubl}}}%
+
+\renewbibmacro*{related:bytranslator}[1]{%
+ \entrydata{#1}{%
+ \usebibmacro{at+every+item}%
+ \renewbibmacro*{name:hook}[1]{%
+ \ifnumequal{\value{listcount}}{1}%
+ {\begingroup
+ \mkrelatedstring%
+ \lbx@initnamehook{#1}%
+ \endgroup}
+ {}}%
+ \printnames[bytranslator]{translator}%
+ \setunit*{\addspace\bibstring[\mkrelatedstring]{astitle}\addspace}%
+ \clearname{translator}%
+ \usebibmacro{cite:origfull}}}%
+
+\renewbibmacro*{related:default}[1]{%
+ \entrydata*{#1}{%
+ \usedriver
+ {\ifnameundef{savedauthor}%
+ {\ifnameundef{savededitor}%
+ {}%
+ {\ifnamesequal{editor}{savededitor}%
+ {\clearname{editor}}%
+ {}}}%
+ {\ifnamesequal{author}{savedauthor}%
+ {\clearname{author}}%
+ {}}%
+ \usebibmacro{at+every+item}%
+ \renewbibmacro*{related:init}{}%
+ \DeclareNameAlias{sortname}{default}%
+ \renewbibmacro*{pageref}{}%
+ \toggletrue{cms@fullnote}%
+ \togglefalse{cms@shortnote}}%
+ {cite:\thefield{entrytype}}}}
+
+\renewbibmacro*{related:multivolume}[1]{%
+ \entrydata*{#1}{%
+ \usebibmacro{at+every+item}%
+ \ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
+ {}%
+ {\printtext{%
+ \printfield{volume}%
+ \printfield{part}}%
+ \setunit{\addcolon\addspace}}%
+ \usebibmacro{ctitle+stitle}%
+ \ifboolexpr{%
+ test {\ifnamesequal{author}{savedauthor}}%
+ or
+ test {\ifnameundef{author}}%
+ }%
+ {}%
+ {\usebibmacro{bytypestrg}{author}{author}%
+ \setunit{\addspace}%
+ \printnames[byauthor]{author}%
+ \newcunit\newblock}%
+ \ifboolexpr{%
+ test {\ifnamesequal{namea}{savednamea}}%
+ or
+ test {\ifnameundef{namea}}%
+ }%
+ {\ifboolexpr{%
+ test {\ifnamesequal{editor}{savededitor}}%
+ or
+ test {\ifnameundef{editor}}%
+ }%
+ {\ifboolexpr{%
+ test {\ifnamesequal{nameb}{savednameb}}%
+ or
+ test {\ifnameundef{nameb}}%
+ }%
+ {}%
+ {\bibstring{cbytranslator}\addspace%
+ \printnames[bytranslator]{nameb}\newcunit}}%
+ {\usebibmacro{cbyeditor+others}%
+ \newcunit}}%
+ {\usebibmacro{cpart+editor+translator}%
+ \newcunit}%
+ \usebibmacro{date}}}%
+
+\renewbibmacro*{related:origpubin}[1]{%
+ \entrydata*{#1}{%
+ \usebibmacro{at+every+item}%
+ \usebibmacro{cmsyear}%
+ \ifboolexpr{%
+ test {\iflistsequal{publisher}{savedpublisher}}%
+ or
+ test {\iflistundef{publisher}}%
+ }%
+ {}%
+ {\midsentence% Why is this kludge necessary?
+ \setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}%
+ \printlist{publisher}%
+ \setunit{\addcomma\space}%
+ \iflistsequal{location}{savedlocation}%
+ {}%
+ {\printlist{location}}}}}
+
+\DeclareFieldFormat{title:hook}{%
+ \begingroup
+ \mkrelatedstring%
+ \ifboolexpr{%
+ togl {cms@otherlang}%
+ and
+ not test {\iffieldundef{langid}}%
+ }%
+ {\unspace}{}%
+ \lbx@inittitlehook{#1}%
+ \endgroup
+ \mkbibemph{#1}}
+
+\DeclareFieldFormat{ititle:hook}{%
+ \begingroup
+ \mkrelatedstring%
+ \ifboolexpr{%
+ togl {cms@otherlang}%
+ and
+ not test {\iffieldundef{langid}}%
+ }%
+ {\unspace}{}%
+ \lbx@inittitlehook{#1}%
+ \endgroup
+ \mkbibquote{#1}}
+
+\DeclareFieldFormat{chapter:hook}{%
+ \begingroup
+ \mkrelatedstring%
+ \ifboolexpr{%
+ togl {cms@otherlang}%
+ and
+ not test {\iffieldundef{langid}}%
+ }%
+ {\unspace}{}%
+ \lbx@inittitlehook{\bibstring{chapter}}%
+ \endgroup
+ \bibstring{chapter}~#1\addspace\bibstring{in}}%
+
+\DeclareFieldFormat{avchapter:hook}{%
+ \begingroup
+ \mkrelatedstring%
+ \ifboolexpr{%
+ togl {cms@otherlang}%
+ and
+ not test {\iffieldundef{langid}}%
+ }%
+ {\unspace}{}%
+ \lbx@inittitlehook{\bibstring{chapter}}%
+ \endgroup
+ \bibstring{chapter}~#1}%
+
+\DeclareFieldFormat{sitnoformat}{#1}
+\DeclareFieldFormat{sjtnoformat}{#1}
+\DeclareFieldFormat{stnoformat}{#1}
+\DeclareFieldFormat{sbtnoformat}{#1}
+\DeclareFieldFormat{smtnoformat}{#1}
+\DeclareFieldFormat{itnoformat}{#1}
+\DeclareFieldFormat{jtnoformat}{#1}
+\DeclareFieldFormat{jtsnoformat}{#1}
+\DeclareFieldFormat{tnoformat}{#1}
+\DeclareFieldFormat{btnoformat}{#1}
+\DeclareFieldFormat{mtnoformat}{#1}
+
+\providetoggle{cms@otherlang}
+
+\apptocmd\blx@opt@autolang@other%
+{\toggletrue{cms@otherlang}}%
+{\blx@info@noline{Patching 'autolang=other' option}}
+{\PackageWarningNoLine{biblatex-chicago}%
+ {Upgrading biblatex to >v2.7a recommended,\MessageBreak
+ especially if you are using the "related"\MessageBreak
+ functionality}}
+
+\newbibmacro*{cms:titlehook}{% Needed for full drivers in reprintfrom
+ \ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR%
+ \ifentrytype{inbook}\OR\ifentrytype{incollection}\OR%
+ \ifentrytype{inproceedings}\OR\ifentrytype{letter}\OR%
+ \ifentrytype{music}\OR\ifentrytype{video}\)}%
+ {\iffieldundef{issuetitle}%
+ {\iffieldundef{title}%
+ {\iffieldundef{booktitle}%
+ {\iffieldundef{maintitle}%
+ {\iffieldundef{journaltitle}%
+ {}%
+ {\DeclareFieldAlias{jtnoformat}{title:hook}%
+ \DeclareFieldAlias{sjtnoformat}{title}%
+ \DeclareFieldAlias{journaltitle}{default}%
+ \DeclareFieldAlias{shortjournal}{series}%
+ \DeclareFieldAlias{jtsnoformat}{title:hook}}}%
+ {\DeclareFieldAlias{mtnoformat}{title:hook}%
+ \DeclareFieldAlias{smtnoformat}{title}%
+ \DeclareFieldAlias{maintitle}{default}}}%
+ {\DeclareFieldAlias{btnoformat}{title:hook}%
+ \DeclareFieldAlias{sbtnoformat}{title}%
+ \DeclareFieldAlias{booktitle}{default}}}%
+ {\DeclareFieldAlias{tnoformat}{title:hook}%
+ \DeclareFieldAlias{stnoformat}{citetitle}%
+ \DeclareFieldAlias[video]{title}{default}%
+ \DeclareFieldAlias[audio]{title}{default}%
+ \DeclareFieldAlias[music]{title}{default}%
+ \DeclareFieldAlias{title}{default}%
+ \DeclareFieldAlias[periodical]{shorttitle}{series}}}%
+ {\iffieldundef{issuesubtitle}%
+ {\DeclareFieldAlias{itnoformat}{ititle:hook}%
+ \DeclareFieldAlias{issuetitle}{default}}%
+ {\DeclareFieldAlias{issuetitle}{ititle:hook}}}}%
+ {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
+ \ifentrytype{video}}%
+ {\iffieldundef{title}%
+ {\DeclareFieldAlias{chapter}{avchapter:hook}}%
+ {\DeclareFieldAlias{tnoformat}{title:hook}%
+ \DeclareFieldAlias{stnoformat}{citetitle}%
+ \DeclareFieldAlias[video]{title}{default}%
+ \DeclareFieldAlias[audio]{title}{default}%
+ \DeclareFieldAlias[music]{title}{default}}}%
+ {\DeclareFieldAlias{chapter}{chapter:hook}}}}%
+
+\newbibmacro*{cite:origfull}{%
+ \printtext[cmshypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
+ \clearname{author}\clearfield{userf}\clearfield{shorthand}%
+ \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
+ \frenchspacing}%
+ {cite:\thefield{entrytype}}}}
+
+\newbibmacro*{cite:origpubl}{%
+ \printtext[cmshypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
+ \usebibmacro{clearpublin}\clearfield{shorthand}%
+ \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
+ \toggletrue{cms@origpublished}\frenchspacing%
+ \usebibmacro{cms:titlehook}}%
+ {cite:\thefield{entrytype}}}}
+
+\newbibmacro*{at+every+item}{%
+ \iffieldequalstr{pubstate}{reprint}%
+ {\toggletrue{cms@reprint}}%
+ {\togglefalse{cms@reprint}}%
+ \ifboolexpr{%
+ test {\iffieldundef{origyear}}%
+ or
+ test {\iffieldundef{year}}%
+ or
+ not test {\iffieldint{year}}%
+ or
+ togl {cms@switchdates}%
+ }%
+ {}%
+ {\ifboolexpr{% Needed for open-ended ranges
+ test {\iffieldundef{endyear}}%
+ or
+ not test {\iffieldnum{endyear}}%
+ }%
+ {\ifthenelse{\thefield{origyear}>\thefield{year}}%
+ {\toggletrue{cms@switchdates}}%
+ {}}%
+ {\ifthenelse{\thefield{origyear}>\thefield{endyear}}%
+ {\toggletrue{cms@switchdates}}%
+ {}}}}%
+
\endinput