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.cbx1668
1 files changed, 1177 insertions, 491 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 a1095a10057..9b41305c2eb 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.55 2013/03/12 12:07:30 dfussner Exp $
+% $Id: chicago-notes.cbx,v 0.9.7.87 2013/10/29 12:32:14 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}[2013/03/12 v 2.5 biblatex citation style]
+\ProvidesFile{chicago-notes.cbx}[2013/10/29 v 2.8 biblatex citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -23,6 +23,7 @@
\providetoggle{cms@isbn}
\providetoggle{cms@numbermonth}
\providetoggle{cms@bookpages}
+\providetoggle{cms@hidevolumes}% Modify volume fix
\providetoggle{cms@bookseries}
\providetoggle{cms@notefield}
\providetoggle{cms@addendum}
@@ -40,6 +41,16 @@
\providetoggle{cms@loccit}
\providetoggle{cms@annotation}
\providetoggle{cms@postposit}
+\providetoggle{cms@vol}
+\providetoggle{cms@postvol}
+\providetoggle{cms@usedvol}
+\providetoggle{cms@citecrossref}
+\providetoggle{cms@bibcrossref}
+\providetoggle{cms@bookcitexref}
+\providetoggle{cms@bookbibxref}
+\providetoggle{cms@xrefvol}
+\providetoggle{cms@xrefpart}
+\providetoggle{cms@omitxrefdate}
\AtEveryCitekey{%
\iffieldundef{userc}%
@@ -59,7 +70,11 @@
togl {cms@switchdates}
}%
{}%
- {\iffieldundef{endyear}%
+ {\ifboolexpr{% Needed for open-ended ranges
+ test {\iffieldundef{endyear}}%
+ or
+ not test {\iffieldnum{endyear}}%
+ }%
{\ifthenelse{\thefield{origyear}>\thefield{year}}%
{\toggletrue{cms@switchdates}}%
{}}%
@@ -94,6 +109,67 @@
\DeclareEntryOption{juniorcomma}[true]{%
\settoggle{cms@jrcomma}{#1}}
+\DeclareBibliographyOption{delayvolume}[true]{%
+ \settoggle{cms@postvol}{#1}}
+
+\DeclareEntryOption{delayvolume}[true]{%
+ \settoggle{cms@postvol}{#1}}
+
+\DeclareBibliographyOption{longcrossref}[false]{%
+ \ifcsdef{cms@opt@lxref@#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}}
+\def\cms@opt@lxref@true{%
+ \toggletrue{cms@citecrossref}%
+ \toggletrue{cms@bibcrossref}}%
+\def\cms@opt@lxref@false{%
+ \togglefalse{cms@citecrossref}%
+ \togglefalse{cms@bibcrossref}}%
+\def\cms@opt@lxref@notes{%
+ \toggletrue{cms@citecrossref}%
+ \togglefalse{cms@bibcrossref}}%
+\def\cms@opt@lxref@bib{%
+ \togglefalse{cms@citecrossref}%
+ \toggletrue{cms@bibcrossref}}%
+
+\DeclareEntryOption{longcrossref}[false]{%
+ \ifcsdef{cms@opt@doi@#1}%
+ {\csuse{cms@opt@doi@#1}}
+ {\blx@err@invopt{doi=#1}{}}}
+
+\DeclareBibliographyOption{booklongxref}[true]{%
+ \ifcsdef{cms@opt@bklxref@#1}%
+ {\csuse{cms@opt@bklxref@#1}}
+ {\blx@err@invopt{booklongxref=#1}{}}}%
+\def\cms@opt@bklxref@true{%
+ \toggletrue{cms@bookcitexref}%
+ \toggletrue{cms@bookbibxref}}%
+\def\cms@opt@bklxref@false{%
+ \togglefalse{cms@bookcitexref}%
+ \togglefalse{cms@bookbibxref}}%
+\def\cms@opt@bklxref@notes{%
+ \toggletrue{cms@bookcitexref}%
+ \togglefalse{cms@bookbibxref}}%
+\def\cms@opt@bklxref@bib{%
+ \togglefalse{cms@bookcitexref}%
+ \toggletrue{cms@bookbibxref}}%
+
+\DeclareEntryOption{booklongxref}[true]{%
+ \ifcsdef{cms@opt@bklxref@#1}%
+ {\csuse{cms@opt@bklxref@#1}}
+ {\blx@err@invopt{booklongxref=#1}{}}}%
+
+\DeclareBibliographyOption{omitxrefdate}[true]{%
+ \settoggle{cms@omitxrefdate}{#1}}
+
+\DeclareEntryOption{omitxrefdate}[true]{%
+ \settoggle{cms@omitxrefdate}{#1}}
+
% The field-exclusion options %
\DeclareBibliographyOption{isbn}[true]{%
@@ -123,6 +199,8 @@
\settoggle{cms@eprint}{#1}%
\settoggle{cms@numbermonth}{#1}%
\settoggle{cms@bookpages}{#1}}
+\DeclareBibliographyOption{hidevolumes}[true]{%
+ \settoggle{cms@hidevolumes}{#1}}
\DeclareBibliographyOption{addendum}[true]{%
\settoggle{cms@addendum}{#1}}
@@ -155,6 +233,8 @@
\settoggle{cms@numbermonth}{#1}}
\DeclareEntryOption{bookpages}[true]{%
\settoggle{cms@bookpages}{#1}}
+\DeclareEntryOption{hidevolumes}[true]{%
+ \settoggle{cms@hidevolumes}{#1}}
\DeclareEntryOption{addendum}[true]{%
\settoggle{cms@addendum}{#1}}
@@ -163,7 +243,7 @@
\DeclareEntryOption{notefield}[true]{%
\settoggle{cms@notefield}{#1}}
-\ExecuteBibliographyOptions{includeall,completenotes}
+\ExecuteBibliographyOptions{includeall,completenotes,hidevolumes,booklongxref}
% For author-date compatibility %
@@ -172,6 +252,8 @@
\DeclareEntryOption{cmsdate}{}%
+\DeclareBibliographyOption{cmsdate}{}%
+
\DeclareBibliographyOption{strict}[true]{%
\let\splitfootnoterule\footnoterule
\renewcommand\footnoterule{}%
@@ -213,7 +295,6 @@
% American-specific punctuation change for 16th edition %
\DefineBibliographyExtras{american}{%
-% \DeclareCapitalPunctuation{.}%
\DeclarePunctuationPairs{comma}{*!?}}
%%%% Initialize and define bibstrings %%%%
@@ -258,57 +339,22 @@
\usebibmacro{cite:full}%
\usebibmacro{cite:save}}}}%
-\newbibmacro*{crosscite}{%
- \ifciteseen
- {\iffieldundef{shorthand}
- {\ifthenelse{\iffieldequals{entrykey}{\cbx@lastkey}\AND
- \NOT\iffirstonpage}
- {\usebibmacro{cite:ibid}}%
- {\global\toggletrue{cms@shortnote}%
- \global\toggletrue{cms@fullnote}%
- \usebibmacro{cite:short}%
- \usebibmacro{crossref:volume+postnote}%
- \usebibmacro{cite:save}}}%
- {\global\togglefalse{cms@shortnote}%
- \global\togglefalse{cms@fullnote}%
- \usebibmacro{cite:shorthand}%
- \usebibmacro{cite:init}}}%
- {\iftoggle{cms@allshort}%
- {\global\toggletrue{cms@shortnote}%
- \usebibmacro{cite:short}%
- \usebibmacro{crossref:volume+postnote}%
- \usebibmacro{cite:save}}%
- {\global\toggletrue{cms@fullnote}%
- \usebibmacro{cite:crossfull}%
- \usebibmacro{cite:save}}}}%
-
\newbibmacro*{cite:full}{%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}\frenchspacing}
- {cite:\thefield{entrytype}}%
- \iffieldundef{shorthand}
- {}%
- {\usebibmacro{cms:shorthandintro}}}}
-
-\newbibmacro*{cite:crossfull}{%
- \printtext[bibhypertarget]{%
- \usedriver
- {\DeclareNameAlias{sortname}{default}\frenchspacing}
- {cite:crossfull}%
- \iffieldundef{shorthand}
- {}
- {\usebibmacro{cms:shorthandintro}}}}
+ {cite:\thefield{entrytype}}}}%
\newbibmacro*{cite:short}{%
\ifthenelse{\ifnameundef{labelname}\OR%
- \iffieldequalstr{entrytype}{inreference}\OR%
- \iffieldequalstr{entrytype}{reference}}%
+ \ifentrytype{inreference}\OR%
+ \ifentrytype{reference}\OR%
+ \ifentrytype{mvreference}}%
{\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation
{\ifuseauthor%
{\printfield[journaltitle]{journaltitle}\isdot\newcunit}%
{}}%
- {\iffieldequalstr{entrytype}{manual}%
+ {\ifentrytype{manual}%
{\printlist{organization}\isdot\newcunit}%
{}}}%
{\iffieldequalstr{authortype}{anon}%
@@ -326,24 +372,26 @@
}%
{\printtext[bibhyperref]{%
\printfield[citetitle]{labeltitle}}}%
- {\printtext[bibhyperlink]{%
+ {\printtext[cmshyperlink]{%
\printfield[citetitle]{labeltitle}}}}%:\thefield{entrytype}?
\newbibmacro*{cite:shorthand}{%
\iftoggle{cms@allshort}%
{\printtext[bibhyperref]{%
\printfield{shorthand}}}
- {\printtext[bibhyperlink]{%
+ {\printtext[cmshyperlink]{%
\printfield{shorthand}}}}
\newbibmacro*{cms:shorthandintro}{% For changing the citedas phrase
- \iffieldundef{shorthandintro}%
- {\addspace%\setunit{\addspace}% Fix for after postnote field
- \printtext[parens]{%
- \bibstring{citedas}\space%
- \printfield{shorthand}}}%
- {\addspace%\setunit{\addspace}% Ditto
- \printfield{shorthandintro}}}
+ \iffieldundef{shorthand}%
+ {}%
+ {\iffieldundef{shorthandintro}%
+ {%\addspace%\setunit{\addspace}% Fix for after postnote field
+ \printtext[parens]{%
+ \bibstring{citedas}\space%
+ \printfield{shorthand}}}%
+ {%\addspace%\setunit{\addspace}% Ditto
+ \printfield{shorthandintro}}}}
\newbibmacro*{cite:ibid}{%
\iftoggle{cms@noibid}
@@ -354,7 +402,7 @@
{\iftoggle{cms@allshort}%
{\printtext[bibhyperref]{%
\bibstring[\mkibid]{ibidem}}}
- {\printtext[bibhyperlink]{%
+ {\printtext[cmshyperlink]{%
\bibstring[\mkibid]{ibidem}}}
\ifloccit
{\global\toggletrue{cms@loccit}}%
@@ -397,9 +445,37 @@
\printfield[jourvol]{volume}%
\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
- {\setunit{\addcolon}}%
+ {\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}}}}
+%% Macros from verbose.cbx %%
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\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}}}
+ {}}}}
+
%%%% Citation Commands, internal and external %%%%
\DeclareCiteCommand{\cite}
@@ -409,33 +485,41 @@
{\multicitedelim}
{\usebibmacro{cite:postnote}}
-\DeclareCiteCommand{\xrefcite}
+\DeclareCiteCommand{\cmsnoopcite}%
+{}{}{}{}%
+
+\DeclareCiteCommand{\bibxrefcite}
{}%\usebibmacro{clearalmostall}} (?)
- {\usebibmacro{citeindex}%
- \usebibmacro{cms-in:}%
+ {\usebibmacro{cms-in:}%
\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
- \(\iffieldequalstr{entrytype}{collection}\OR%
- \iffieldequalstr{entrytype}{proceedings}\)}%
+ \(\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR%
+ \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\)}%
{\clearname{author}%
\clearname{shortauthor}%
\clearname{labelname}}%
{}%
- \usebibmacro{crosscite}}
+ \toggletrue{cms@shortnote}%
+ \togglefalse{cms@fullnote}%
+ \usebibmacro{cite:short}}
{}
- {}%\usebibmacro{xrefpostnote}}
+ {\usebibmacro{crossref:volume+postnote}}% Volume fix
-\DeclareCiteCommand{\bibxrefcite}
+\DeclareCiteCommand{\bookbibxrefcite}
{}%\usebibmacro{clearalmostall}} (?)
- {\usebibmacro{cms-in:}%
- \ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
- \(\iffieldequalstr{entrytype}{collection}\OR%
- \iffieldequalstr{entrytype}{proceedings}\)}%
- {\clearname{author}%
- \clearname{shortauthor}%
- \clearname{labelname}}%
+ {\iffieldequals{fullhash}{\bbx@lasthash}%
+ {\ifthenelse{\ifentrytype{collection}\OR%
+ \ifentrytype{proceedings}\OR\ifentrytype{mvcollection}\OR%
+ \ifentrytype{mvproceedings}}%
+ {\clearname{editor}%
+ \clearname{shorteditor}%
+ \clearname{labelname}}%
+ {\clearname{author}%
+ \clearname{shortauthor}%
+ \clearname{labelname}}}%
{}%
\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
+ \usebibmacro{bibxref-in:}%
\usebibmacro{cite:short}}
{}
{\usebibmacro{crossref:volume+postnote}}% Volume fix
@@ -500,9 +584,10 @@
{}%
\nopunct\unspace}% Put \nopunct and \unspace here for 0.8e.
{\usedriver
- {\DeclareNameAlias{sortname}{default}\clearfield{postnote}
- \clearname{author}\clearfield{userf}\toggletrue{cms@fullnote}%
- \toggletrue{cms@headlessnote}\frenchspacing}%
+ {\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
+ \clearname{author}\clearfield{userf}\clearfield{shorthand}%
+ \toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
+ \frenchspacing}%
{cite:\thefield{entrytype}}}%
{\multicitedelim}%
{\finentry}% Helps with annotated bibliographies (?)
@@ -514,7 +599,7 @@
\nopunct\unspace}% Put \nopunct and \unspace here for 0.8e.
{\usedriver
{\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
- \usebibmacro{clearpublin}%
+ \usebibmacro{clearpublin}\clearfield{shorthand}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\toggletrue{cms@origpublished}\frenchspacing}%
{cite:\thefield{entrytype}}}%
@@ -543,6 +628,30 @@
{\multicitedelim}
{\usebibmacro{cite:postnote}}
+\DeclareCiteCommand{\headlessparencite}[\mkbibparens]
+ {\usebibmacro{hlcprenote}}
+ {\usebibmacro{citeindex}%
+ \toggletrue{cms@headlessnote}%
+ \clearname{author}%
+ \clearname{shortauthor}%
+ \clearname{labelname}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\headlessparenshortcite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \toggletrue{cms@headlessnote}%
+ \toggletrue{cms@shortnote}%
+ \togglefalse{cms@fullnote}%
+ \clearname{author}%
+ \clearname{shortauthor}%
+ \clearname{labelname}%
+ \usebibmacro{cite:short}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
\DeclareCiteCommand{\surnamecite}
{\usebibmacro{prenote}}%\usebibmacro{hlcprenote}}
{\usebibmacro{citeindex}%
@@ -609,23 +718,90 @@
\DeclareMultiCiteCommand{\citetitles}{citetitle}{\multicitedelim}
-\DeclareCiteCommand{\textcite}[\cbx@textcite\cbx@textcite@i]
- {\boolfalse{citetracker}%
- \gdef\cbx@savedkeys{}}
- {\printnames{labelname}%
- \xappto\cbx@savedkeys{\thefield{entrykey},}}
- {\multinamedelim}
- {\protected@xappto\cbx@savedcites{%
- [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
-
-\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\cbx@textcites@i]
- {\textcite}{\multinamedelim}
-
-\newrobustcmd{\cbx@textcite}[2]{\def\cbx@savedcites{#1}#2\cbx@savedcites}
-\newrobustcmd{\cbx@textcite@i}{%
- \iffootnote{\newcunit\bibstring{in}\addspace\headlesscite}{\footcite}}
-\newrobustcmd{\cbx@textcites@i}{%
- \iffootnote{\newcunit\bibstring{in}\addspace\cites}{\footcites}}
+\DeclareMultiCiteCommand{\headlesscites}{headlesscite}{\multicitedelim}
+
+\DeclareMultiCiteCommand{\headlessparencites}[\mkbibparens]%
+{headlessparencite}{\multicitedelim}
+
+\DeclareMultiCiteCommand{\headlessparenshortcites}[\mkbibparens]%
+{headlessparenshortcite}{\multicitedelim}
+
+%% Textcite commands adapted from verbose.cbx %%
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\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
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% Switch
+ \protected@xappto\cbx@footcite@args{\nopunct}}% these two?
+ {}}
+ {}}
+ {}
+ {}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\cms@textcites@i]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\renewcommand*{\textcitedelim}{%
+ \iffinalcitedelim
+ {\ifnumgreater{\value{textcitetotal}}{2}
+ {\addcomma}%
+ {}%
+ \addspace\bibstring{and}}
+ {\addcomma}%
+ \space}
+
+\newrobustcmd{\cms@textcite@i}{%
+ \iffootnote{\foottextcite}{\footcite}}
+
+\newrobustcmd{\cms@textcites@i}{%
+ \iffootnote{\foottextcites}{\footcites}}
+
+\newcommand{\foottextcite}{\addspace\headlessparenshortcite}
+
+\newcommand{\foottextcites}{\addspace\headlessparenshortcites}
%%%% Drivers for the Long Note Format %%%%
@@ -658,6 +834,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -690,6 +868,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}}
@@ -724,6 +904,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -753,7 +935,7 @@
\usebibmacro{cbyeditor+others}%
\iffieldundef{maintitle}
{}
- {\iffieldundef{volume}
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
@@ -761,7 +943,8 @@
\printfield[noformat]{mainsubtitle}}%
\newcunit
\printfield{maintitleaddon}}
- {\printfield{volume}%
+ {\toggletrue{cms@usedvol}%
+ \printfield{volume}%
\printfield{part}%
\setunit{\addspace}
\bibstring{ofseries}%
@@ -782,7 +965,7 @@
\usebibmacro{cpubl+loc+year}%
\newcunit
\printfield{type}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{caddendum}%
\newcunit\newblock
@@ -793,6 +976,8 @@
{}%
\newcunit\newblock%
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -804,6 +989,8 @@
\printfield{nameaddon}%
\newcunit\newblock
\usebibmacro{citaltitle+stitle}%
+ \setunit{\addspace}%
+ \usebibmacro{cite:xref+date}%
\newcunit
\iffieldundef{maintitle}%
{\iffieldundef{edition}%
@@ -815,7 +1002,21 @@
\newcunit
\usebibmacro{cpart+editor+translator}%
\newcunit
- \usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\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}%
{}%
@@ -835,7 +1036,7 @@
{\clearfield{pages}}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\printlist[][-\value{listtotal}]{lista}%
\newcunit\newblock
@@ -844,9 +1045,24 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{book:xref+finentry}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{crossref}}%
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:bookinbook}{%
\usebibmacro{bibindex}%
@@ -855,13 +1071,28 @@
\printfield{nameaddon}%
\newcunit\newblock
\usebibmacro{citaltitle+stitle}%
+ \setunit{\addspace}%
+ \usebibmacro{cite:xref+date}%
\newcunit\newblock
\usebibmacro{byauthor}%
\newcunit
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \usebibmacro{cms-in:}%
- \usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
{}%
@@ -879,16 +1110,31 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{book:xref+finentry}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{crossref}}%
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:booklet}{%
\usebibmacro{bibindex}%
@@ -909,6 +1155,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -920,8 +1168,24 @@
\printfield{nameaddon}%
\setunit{\addcomma\addspace}\newblock
\usebibmacro{citaltitle+stitle}%
+ \setunit{\addspace}
+ \usebibmacro{cite:xref+date}%
\newcunit
- \usebibmacro{mtitle+mstitle+vol+part+title+stitle}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\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}%
{}%
@@ -938,60 +1202,31 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
-
-\DeclareBibliographyDriver{cite:crossfull}{%
- \ifcsdef{cbx@incollvol}%
- {\restorefield{volume}{\cbx@incollvol}}%
- {}%
- \ifcsdef{cbx@incollpages}%
- {\restorefield{pages}{\cbx@incollpages}}%
- {}%
- \ifcsdef{cbx@incollpgn}%
- {\restorefield{pagination}{\cbx@incollpgn}}%
- {}%
- \ifcsdef{cbx@incollbkpgn}%
- {\restorefield{bookpagination}{\cbx@incollbkpgn}}%
- {}%
- \ifcsdef{cbx@incollpart}%
- {\restorefield{part}{\cbx@incollpart}}%
- {}%
- \usebibmacro{crefmtitle+mstitle+vol+part+title+stitle}%
- \newcunit
- \iffieldundef{edition}%
- {}%
- {\usebibmacro{edition}}%
- \newcunit
- \usebibmacro{bybookauthor}%
- \usebibmacro{cbyeditor+others}%
- \newcunit\newblock
- \usebibmacro{volume+or+volumes}%
- \newcunit\newblock
- \usebibmacro{cser+num}%
- \newcunit\newblock
- \usebibmacro{cnotefield}%
- \newcunit\newblock
- \usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
- \usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
- \newcunit\newblock
- \iftoggle{cms@isbn}%
- {\printfield{isbn}}%
- {}%
- \newcunit\newblock
- \usebibmacro{cite+doi+url}%
- \newcunit\newblock
- \usebibmacro{pageref}}%
+ \usebibmacro{finentry}%
+ \usebibmacro{book:xref+finentry}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{crossref}}%
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:customc}{%
\usebibmacro{bibindex}%
@@ -1032,6 +1267,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1050,8 +1287,21 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \usebibmacro{chapincoll}%
- \usebibmacro{cms-in:}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
+ {\usebibmacro{chapincoll}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1070,16 +1320,37 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{cite:xref+finentry}}%
+{\ifterm{\iffieldundef{chapter}% New test needed to cope with
+ {\addspace\bibsentence}% new chapter citing system.
+ {\setunit{\addspace\bibsentence}}}% All altered for 0.9c.
+ {\addcomma\addspace}% Perhaps need to alter it back
+ \usebibmacro{xrefprenote}% Volume fix
+ \usebibmacro{chapincoll}%
+ \bibxrefcite{\thefield{xref}}% Removed \addspace from each.
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}%
+ {\ifterm{\iffieldundef{chapter}% New test needed to cope with
+ {\addspace\bibsentence}% new chapter citing system.
+ {\setunit{\addspace\bibsentence}}}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \usebibmacro{chapincoll}%
+ \bibxrefcite{\thefield{crossref}}%
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:incollection}{%
\usebibmacro{bibindex}%
@@ -1095,10 +1366,21 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \iffieldundef{crossref}%
- {\iffieldundef{xref}
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
{\usebibmacro{chapincoll}%
- \usebibmacro{cms-in:}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1117,23 +1399,26 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{cite:xref+finentry}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
{\addspace\bibsentence}% new chapter citing system.
{\setunit{\addspace\bibsentence}}}% All altered for 0.9c.
{\addcomma\addspace}% Perhaps need to alter it back
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{xref}}% Removed \addspace from each.
+ \bibxrefcite{\thefield{xref}}% Removed \addspace from each.
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
@@ -1142,7 +1427,7 @@
{\addcomma\addspace}%
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{crossref}}%
+ \bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1160,10 +1445,21 @@
\setunit{\addcomma\addspace}%
\usebibmacro{cpart+editor+translator}%
\setunit{\addcomma\addspace}%
- \iffieldundef{crossref}%
- {\iffieldundef{xref}
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
{\usebibmacro{chapincoll}%
- \usebibmacro{cms-in:}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit\newblock
\usebibmacro{volume+or+volumes}%
@@ -1176,23 +1472,26 @@
\usebibmacro{org+publ+loc+year}}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{cite:xref+finentry}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
{\addspace\bibsentence}% new chapter citing system.
{\setunit{\addspace\bibsentence}}}% See incollection
{\addcomma\addspace}%
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{xref}}%
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
@@ -1201,7 +1500,7 @@
{\addcomma\addspace}%
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{crossref}}%
+ \bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1217,7 +1516,6 @@
\newcunit
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \usebibmacro{alt-in:}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1250,6 +1548,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1268,10 +1568,21 @@
\newcunit\newblock%
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \iffieldundef{crossref}%
- {\iffieldundef{xref}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@citecrossref}%
+ }
{\usebibmacro{chapincoll}%
- \usebibmacro{cms-in:}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1290,23 +1601,26 @@
\usebibmacro{cpubletter+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}%
+ \usebibmacro{cite:xref+finentry}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
{\addspace\bibsentence}% new chapter citing system.
{\setunit{\addspace\bibsentence}}}%
{\addcomma\addspace}%
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{xref}}%
+ \bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
{\ifterm{\iffieldundef{chapter}% New test needed to cope with
@@ -1315,7 +1629,7 @@
{\addcomma\addspace}%
\usebibmacro{xrefprenote}% Volume fix
\usebibmacro{chapincoll}%
- \xrefcite{\thefield{crossref}}%
+ \bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1348,6 +1662,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1394,6 +1710,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1423,7 +1741,7 @@
\usebibmacro{cbyeditor+others}%
\iffieldundef{maintitle}
{}
- {\iffieldundef{volume}
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
@@ -1431,7 +1749,8 @@
\printfield[noformat]{mainsubtitle}}%
\newcunit
\printfield{maintitleaddon}}
- {\printfield{volume}%
+ {\toggletrue{cms@usedvol}%
+ \printfield{volume}%
\printfield{part}%
\setunit{\addspace}
\bibstring{ofseries}%
@@ -1475,10 +1794,20 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
+\DeclareBibliographyAlias{cite:mvbook}{cite:book}
+
+\DeclareBibliographyAlias{cite:mvcollection}{cite:collection}
+
+\DeclareBibliographyAlias{cite:mvproceedings}{cite:proceedings}
+
+\DeclareBibliographyAlias{cite:mvreference}{cite:reference}
+
\DeclareBibliographyDriver{cite:online}{%
\usebibmacro{bibindex}%
\usebibmacro{author/editor}%
@@ -1514,6 +1843,8 @@
\printfield{url}%
\newcunit\newblock
\usebibmacro{caddendum}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1555,6 +1886,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1584,6 +1917,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}%
@@ -1612,6 +1947,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}}
@@ -1623,8 +1960,24 @@
\printfield{nameaddon}%
\setunit{\addcomma\addspace}\newblock%
\usebibmacro{citaltitle+stitle}%
+ \setunit{\addspace}
+ \usebibmacro{cite:xref+date}%
\newcunit
- \usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
+ \ifboolexpr{
+ test {\iffieldundef{crossref}}%
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\ifboolexpr{
+ test {\iffieldundef{xref}}%
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ or
+ togl {cms@bookcitexref}%
+ }
+ {\usebibmacro{cmtitle+mstitle+vol+part+title+stitle}%
\newcunit\newblock
\usebibmacro{volume+or+volumes}%
\newcunit\newblock
@@ -1636,16 +1989,31 @@
\usebibmacro{org+publ+loc+year}}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}%
+ \usebibmacro{book:xref+finentry}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}%
+ {\ifterm{\addspace\bibsentence}%
+ {\addcomma\addspace}%
+ \usebibmacro{xrefprenote}% Volume fix
+ \bookbibxrefcite{\thefield{crossref}}%
+ \usebibmacro{xrefpostnote}%
+ \usebibmacro{finentry}}}
\DeclareBibliographyDriver{cite:reference}{%
\usebibmacro{bibindex}%
@@ -1659,7 +2027,6 @@
\newcunit
\usebibmacro{cpart+editor+translator}%
\setunit*{\addcomma\addspace}%
- \usebibmacro{alt-in:}%
\usebibmacro{cmtitle+mstitle+vol+part+btitle+bstitle}%
\newcunit
\iffieldundef{edition}%
@@ -1678,13 +2045,15 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1718,6 +2087,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1760,6 +2131,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1800,13 +2173,15 @@
\clearfield{pages}% ?? For 16th ed.
\newcunit\newblock
\usebibmacro{caddendum}%
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\iftoggle{cms@isbn}%
{\printfield{isbn}}%
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1836,6 +2211,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1851,6 +2228,8 @@
\usebibmacro{language+transtitle}%
\setunit{\addcomma\addspace}%
\usebibmacro{byauthor}%
+ \newcunit\newblock%
+ \usebibmacro{cbyeditor+others}%
\setunit{\addspace}\newblock%
\printtext[parens]{%
\printfield{howpublished}%
@@ -1865,6 +2244,8 @@
\usebibmacro{fullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1894,7 +2275,7 @@
\usebibmacro{cbyeditor+others}%
\iffieldundef{maintitle}
{}
- {\iffieldundef{volume}
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
@@ -1902,7 +2283,8 @@
\printfield[noformat]{mainsubtitle}}%
\newcunit
\printfield{maintitleaddon}}
- {\printfield{volume}%
+ {\toggletrue{cms@usedvol}%
+ \printfield{volume}%
\printfield{part}%
\setunit{\addspace}
\bibstring{ofseries}%
@@ -1925,7 +2307,7 @@
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\printfield{type}% Order of this and next?
- \usebibmacro{fullpostnote}%
+ \usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{caddendum}%
\newcunit\newblock
@@ -1934,6 +2316,8 @@
{}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
+ \setunit{\addspace}%
+ \usebibmacro{cms:shorthandintro}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
@@ -1987,90 +2371,55 @@
%%%% Field Formats -- Title, Citetitle, Lostitle %%%%
+\DeclareFieldFormat{title}{\mkbibemph{#1}\isdot}
-\DeclareFieldFormat[article]{title}{%
+\DeclareFieldFormat{citetitle}{\mkbibemph{#1}\isdot}
+
+\DeclareFieldFormat{lostitle}{\mkbibemph{#1}\isdot}
+
+\DeclareFieldFormat
+[article,inbook,incollection,inproceedings,online,thesis,unpublished]
+{title}{%
\iffieldundef{title}%
{}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldFormat[article]{citetitle}{%
+\DeclareFieldFormat
+[article,inbook,incollection,inproceedings,online,thesis,unpublished]
+{citetitle}{%
\iffieldundef{title}%
{#1\isdot}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldFormat[article]{lostitle}{%
+\DeclareFieldFormat
+[article,inbook,incollection,inproceedings,online,thesis,unpublished]
+{lostitle}{%
\iffieldundef{title}%
{#1\isdot}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldFormat[artwork]{title}{%
+\DeclareFieldFormat[artwork,image]{title}{%
\iffieldundef{entrysubtype}%
{\mkbibemph{#1}\isdot}%
{#1\isdot}}
-\DeclareFieldFormat[artwork]{citetitle}{%
+\DeclareFieldFormat[artwork,image]{citetitle}{%
\iffieldundef{entrysubtype}%
{\mkbibemph{#1}\isdot}%
{#1\isdot}}
-\DeclareFieldFormat[artwork]{lostitle}{%
+\DeclareFieldFormat[artwork,image]{lostitle}{%
\iffieldundef{entrysubtype}%
{\mkbibemph{#1}\isdot}%
{#1\isdot}}
-\DeclareFieldFormat[book]{title}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[book]{citetitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[book]{lostitle}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat[letter,patent]{title}{#1\isdot}
-\DeclareFieldFormat[periodical]{title}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat[letter,patent]{citetitle}{#1\isdot}
-\DeclareFieldFormat[periodical]{citetitle}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat[letter,patent]{lostitle}{#1\isdot}
-\DeclareFieldFormat[periodical]{lostitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldAlias[image]{title}[artwork]{title}
-
-\DeclareFieldAlias[image]{citetitle}[artwork]{citetitle}
-
-\DeclareFieldAlias[image]{lostitle}[artwork]{lostitle}
-
-\DeclareFieldAlias[incollection]{title}[article]{title}
-
-\DeclareFieldAlias[incollection]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[incollection]{lostitle}[article]{lostitle}
-
-\DeclareFieldFormat[letter]{title}{#1\isdot}
-
-\DeclareFieldFormat[letter]{citetitle}{#1\isdot}
-
-\DeclareFieldFormat[letter]{lostitle}{#1\isdot}
-
-\DeclareFieldAlias[inproceedings]{title}[article]{title}
-
-\DeclareFieldAlias[inproceedings]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[inproceedings]{lostitle}[article]{lostitle}
-
-\DeclareFieldAlias[thesis]{title}[article]{title}
-
-\DeclareFieldAlias[thesis]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[thesis]{lostitle}[article]{lostitle}
-
-\DeclareFieldAlias[patent]{title}[letter]{title}
-
-\DeclareFieldAlias[patent]{citetitle}[letter]{citetitle}
-
-\DeclareFieldAlias[patent]{lostitle}[letter]{lostitle}
-
-\DeclareFieldAlias[unpublished]{title}[article]{title}
-
-\DeclareFieldAlias[unpublished]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[unpublished]{lostitle}[article]{lostitle}
+\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}}
\DeclareFieldFormat{postnote}{% Removed \isdots -- required
\iffieldundef{pagination}% elsewhere also?
@@ -2094,20 +2443,14 @@
{\bibstring{ed#1}}
{\ifcapital{\MakeCapital{#1}}{#1}}}}
-\DeclareFieldAlias[inbook]{title}[article]{title}
-
-\DeclareFieldAlias[inbook]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[inbook]{lostitle}[article]{lostitle}
+\DeclareFieldFormat[suppbook,suppcollection]{title}{\mkbibemph{#1}\isdot}
-\DeclareFieldFormat[suppbook]{title}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[suppbook]{citetitle}{%
+\DeclareFieldFormat[suppbook,suppcollection]{citetitle}{%
\usebibmacro{inforaft}%
\addspace%
\mkbibemph{#1}\isdot}
-\DeclareFieldFormat[suppbook]{lostitle}{%
+\DeclareFieldFormat[suppbook,suppcollection]{lostitle}{%
\usebibmacro{inforaft}%
\addspace%
\mkbibemph{#1}\isdot}
@@ -2126,30 +2469,6 @@
#1}%
{\printfield{nameaddon}\addspace #1}}
-\DeclareFieldAlias[suppcollection]{title}[suppbook]{title}
-
-\DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{citetitle}
-
-\DeclareFieldAlias[suppcollection]{lostitle}[suppbook]{lostitle}
-
-\DeclareFieldFormat[booklet]{title}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[booklet]{citetitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[booklet]{lostitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[manual]{title}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[manual]{citetitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[manual]{lostitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[report]{title}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[report]{citetitle}{\mkbibemph{#1}\isdot}
-
-\DeclareFieldFormat[report]{lostitle}{\mkbibemph{#1}\isdot}
-
\DeclareFieldFormat[misc]{title}{%
\iffieldundef{entrysubtype}%
{\mkbibemph{#1}\isdot}%
@@ -2165,54 +2484,30 @@
{\mkbibemph{#1}\isdot}%
{\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}}
-\DeclareFieldFormat[review]{title}{%
+\DeclareFieldFormat[review,suppperiodical]{title}{%
\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}
-\DeclareFieldFormat[review]{citetitle}{%
+\DeclareFieldFormat[review,suppperiodical]{citetitle}{%
\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}
-\DeclareFieldFormat[review]{lostitle}{%
+\DeclareFieldFormat[review,suppperiodical]{lostitle}{%
\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}
-\DeclareFieldAlias[suppperiodical]{title}[review]{title}
-
-\DeclareFieldAlias[suppperiodical]{citetitle}[review]{citetitle}
-
-\DeclareFieldAlias[suppperiodical]{lostitle}[review]{lostitle}
-
-\DeclareFieldAlias[online]{title}[article]{title}
-
-\DeclareFieldAlias[online]{citetitle}[article]{citetitle}
-
-\DeclareFieldAlias[online]{lostitle}[article]{lostitle}
-
-\DeclareFieldFormat[video]{title}{%
+\DeclareFieldFormat[audio,music,video]{title}{%
\iffieldundef{booktitle}%
{\mkbibemph{#1}\isdot}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldFormat[video]{citetitle}{%
+\DeclareFieldFormat[audio,music,video]{citetitle}{%
\iffieldundef{booktitle}%
{\mkbibemph{#1}\isdot}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldFormat[video]{lostitle}{%
+\DeclareFieldFormat[audio,music,video]{lostitle}{%
\iffieldundef{booktitle}%
{\mkbibemph{#1}\isdot}%
{\mkbibquote{#1\isdot}}}
-\DeclareFieldAlias[music]{title}[video]{title}
-
-\DeclareFieldAlias[music]{citetitle}[video]{citetitle}
-
-\DeclareFieldAlias[music]{lostitle}[video]{lostitle}
-
-\DeclareFieldAlias[audio]{title}[video]{title}
-
-\DeclareFieldAlias[audio]{citetitle}[video]{citetitle}
-
-\DeclareFieldAlias[audio]{lostitle}[video]{lostitle}
-
%%%% Other Field Formats %%%%
\DeclareNumChars*{:}% For proper ibidem with multi-volume works.
@@ -2222,36 +2517,20 @@
\DeclareFieldFormat{note}{%
\ifcapital{\MakeCapital{#1}}{#1}}%
-\DeclareFieldFormat[suppbook]{type}{%
+\DeclareFieldFormat
+[audio,manual,music,patent,report,suppbook,suppcollection,thesis,video]
+{type}{%
\ifbibstring{#1}%
{\bibstring{#1}}%
{\ifcapital%
{\MakeCapital{#1\isdot}}%
{#1\isdot}}}
-\DeclareFieldFormat[artwork]{type}{%
+\DeclareFieldFormat[artwork,image]{type}{%
\ifcapital%
{\MakeCapital{#1}}%
{#1}}
-\DeclareFieldAlias[patent]{type}[suppbook]{type}
-
-\DeclareFieldAlias[manual]{type}[suppbook]{type}
-
-\DeclareFieldAlias[thesis]{type}[suppbook]{type}
-
-\DeclareFieldAlias[report]{type}[suppbook]{type}
-
-\DeclareFieldAlias[image]{type}[artwork]{type}
-
-\DeclareFieldAlias[suppcollection]{type}[suppbook]{type}
-
-\DeclareFieldAlias[video]{type}[suppbook]{type}
-
-\DeclareFieldAlias[music]{type}[suppbook]{type}
-
-\DeclareFieldAlias[audio]{type}[suppbook]{type}
-
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{doi}{%
@@ -2260,6 +2539,23 @@
{\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
+\DeclareFieldFormat[music]{date}{% Generalize userd ???
+ \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}%
+ \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{origyear}}%
+ {#1}%
+ {\printfield{userd}\addspace #1}}
+
+\DeclareFieldFormat[video]{date}{% Generalize userd ???
+ \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}%
+ \OR\NOT\iffieldundef{eventyear}}%
+ {#1}%
+ {\printfield{userd}\addspace #1}}
+
+\DeclareFieldFormat{date}{% Generalize userd ???
+ \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}}%
+ {#1}%
+ {\printfield{userd}\addspace #1}}
+
\DeclareFieldFormat{urldate}{% 16th ed.
\iffieldundef{userd}%
{\bibstring{urlseen}\space #1}%
@@ -2306,7 +2602,7 @@
\DeclareFieldFormat{edition}{% New in 0.8
\ifinteger{#1}
- {\mkbibordinal{#1}~\bibstring{edition}}%
+ {\mkbibordedition{#1}~\bibstring{edition}}%
{\ifcapital
{\MakeCapital{#1\isdot}}%
{#1\isdot}}}
@@ -2342,7 +2638,7 @@
\DeclareFieldFormat{jourser}{%
\ifinteger{#1}%
- {\mkbibordinal{#1}%
+ {\mkbibordseries{#1}%
\addnbspace%
\bibstring{jourser}}%
{\ifbibstring{#1}{\bibstring{#1}}{#1}}}
@@ -2371,7 +2667,79 @@
\DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1}
-\DeclareFieldFormat{part}{\addcomma\bibstring{partvolume}~#1}
+\DeclareFieldFormat{part}{% xref revision ???
+ \ifnumerals{#1}%
+ {\addcomma\addspace\bibstring{partvolume}~#1}%
+ {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}}
+
+\DeclareFieldFormat{xrefpart}{% xref revision ???
+ \ifnumerals{#1}%
+ {\bibstring{partvolume}~#1}%
+ {\ifcapital{\MakeCapital{#1}}{#1}}}
+
+%% This tries to get hyperlinks from shortened cross-ref'd notes to %%
+%% long notes working properly. Used in short and shorthand cites. %%
+
+\DeclareFieldFormat{cmshyperlink}{%
+ \iffieldundef{crossref}%
+ {\iffieldundef{xref}%
+ {\bibhyperlink{\thefield{entrykey}}{#1}}%
+ {\ifboolexpr{((
+ test {\ifentrytype{book}}%
+ or
+ test {\ifentrytype{bookinbook}}%
+ or
+ test {\ifentrytype{collection}}%
+ or
+ test {\ifentrytype{proceedings}}%
+ )
+ and
+ not togl {cms@bookcitexref}%
+ )
+ or
+ ((
+ test {\ifentrytype{inbook}}%
+ or
+ test {\ifentrytype{letter}}%
+ or
+ test {\ifentrytype{incollection}}%
+ or
+ test {\ifentrytype{inproceedings}}%
+ )
+ and
+ not togl {cms@citecrossref}
+ )
+ }%
+ {\bibhyperlink{\thefield{xref}}{#1}}%
+ {\bibhyperlink{\thefield{entrykey}}{#1}}}}%
+ {\ifboolexpr{((
+ test {\ifentrytype{book}}%
+ or
+ test {\ifentrytype{bookinbook}}%
+ or
+ test {\ifentrytype{collection}}%
+ or
+ test {\ifentrytype{proceedings}}%
+ )
+ and
+ not togl {cms@bookcitexref}%
+ )
+ or
+ ((
+ test {\ifentrytype{inbook}}%
+ or
+ test {\ifentrytype{letter}}%
+ or
+ test {\ifentrytype{incollection}}%
+ or
+ test {\ifentrytype{inproceedings}}%
+ )
+ and
+ not togl {cms@citecrossref}
+ )
+ }%
+ {\bibhyperlink{\thefield{crossref}}{#1}}%
+ {\bibhyperlink{\thefield{entrykey}}{#1}}}}
\DeclareFieldAlias[review]{volume}[article]{volume}
@@ -2386,6 +2754,9 @@
\renewcommand*{\multicitedelim}{\addsemicolon\space}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
\newcommand{\custpunct}{%
\iftoggle{cms@fullnote}%
{\iffieldequalstr{type}{plain}%
@@ -2415,7 +2786,7 @@
\newcommand{\classicpunct}{% 16th ed.
\ifthenelse{\(\iffieldequalstr{entrysubtype}{classical}\AND%
\iffieldundef{labeltitle}\)\OR
- \iffieldequalstr{entrytype}{letter}}%
+ \ifentrytype{letter}}%
{\setunit*{\addspace}}%
{\setunit*{\addcomma\addspace}}}
@@ -2426,7 +2797,7 @@
\newcommand{\encypunct}{% for named entries in an encyclopedia
\iftoggle{cms@fullnote}%
- {\iffieldequalstr{entrytype}{book}%
+ {\ifentrytype{book}%
{\ifthenelse{\iffieldundef{addendum}\AND\iffieldundef{doi}\AND
\iffieldundef{isbn}\AND\iffieldundef{url}}%
{\ifthenelse{\value{multicitecount} < \value{multicitetotal}}%
@@ -2441,12 +2812,14 @@
{\addperiod}}%
{\addcomma}}%
{}}}%
- {\iffieldequalstr{entrytype}{book}%
+ {\ifentrytype{book}%
{\addperiod}%
{\ifnameundef{author}%
{\addperiod}%
{}}}}
+\newcommand{\postvolpunct}{\addcolon}% For vol:page customization
+
\newcommand{\parttrans}{%
\iftoggle{cms@fullnote}%
{\bibstring{cbytranslator}\space}%
@@ -2518,10 +2891,10 @@
{\addcomma\addspace}}%
{\addcomma\addspace}}% 16th ed -- no more volumes test.
{\iftoggle{cms@fullnote}%
- {\ifthenelse{\(\iffieldequalstr{entrytype}{article}\OR
- \iffieldequalstr{entrytype}{review}\OR
- \iffieldequalstr{entrytype}{periodical}\OR
- \iffieldequalstr{entrytype}{suppperiodical}\)\AND\NOT
+ {\ifthenelse{\(\ifentrytype{article}\OR
+ \ifentrytype{review}\OR
+ \ifentrytype{periodical}\OR
+ \ifentrytype{suppperiodical}\)\AND\NOT
\iffieldequalstr{entrysubtype}{magazine}}%
{\addcolon\addspace}%
{\addcomma\addspace}}%
@@ -2583,6 +2956,60 @@
{}%
\finentry}
+\newbibmacro*{book:xref+finentry}{%
+ \iffieldundef{crossref}%
+ {\iffieldundef{xref}%
+ {}%
+ {\iftoggle{cms@bookcitexref}%
+ {}%
+ {\ifboolexpr{
+ test {\ifpunct}%
+ or
+ test {\ifpunctmark{*}}%
+ }%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cmsnoopcite{\thefield{xref}}}\nopunct}%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cmsnoopcite{\thefield{xref}}}}}}}%
+ {\iftoggle{cms@bookcitexref}%
+ {}%
+ {\ifboolexpr{
+ test {\ifpunct}%
+ or
+ test {\ifpunctmark{*}}%
+ }%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cmsnoopcite{\thefield{crossref}}}\nopunct}%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cmsnoopcite{\thefield{crossref}}}}}}}
+
+\newbibmacro*{cite:xref+finentry}{%
+ \iffieldundef{crossref}%
+ {\iffieldundef{xref}%
+ {}%
+ {\iftoggle{cms@citecrossref}%
+ {}%
+ {\ifboolexpr{
+ test {\ifpunct}%
+ or
+ test {\ifpunctmark{*}}%
+ }%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cmsnoopcite{\thefield{xref}}}\nopunct}%
+ {\bibhypertarget{\thefield{xref}}%
+ {\cmsnoopcite{\thefield{xref}}}}}}}%
+ {\iftoggle{cms@citecrossref}%
+ {}%
+ {\ifboolexpr{
+ test {\ifpunct}%
+ or
+ test {\ifpunctmark{*}}%
+ }%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cmsnoopcite{\thefield{crossref}}}\nopunct}%
+ {\bibhypertarget{\thefield{crossref}}%
+ {\cmsnoopcite{\thefield{crossref}}}}}}}
+
\newbibmacro*{entrytail}{% From reading.bbx, for annotated bibliography
\newunit\newblock
\iftoggle{cms@annotation}%
@@ -2625,7 +3052,7 @@
\iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)%
\OR\iffieldsequal{booktitle}{title}% Changed these for crossrefed
\OR\iffieldsequal{maintitle}{title}}% entries. Create problems?
- {\iffieldequalstr{entrytype}{video}% Change for Video type? Appears
+ {\ifentrytype{video}% Change for Video type? Appears
{\newcunit\newblock}% to treat italicized title as booktitle in
{\newunit\newblock}}% available examples. Added issuetitle 0.9.9c.
{\newcunit\newblock}}
@@ -2913,15 +3340,60 @@
\newbibmacro*{cms-in:}{% Fix for 0.9a compat.
\iftoggle{cms@origpublished}%
{}
- {\bibstring{in}
- \setunit{\addspace}}}
-
-\newbibmacro*{alt-in:}{%
- \iffieldundef{booktitle}%
- {}
{\bibstring{in}%
\setunit{\addspace}}}
+\newbibmacro*{bibxref-in:}{%
+ \iffieldundef{volume}%
+ {\ifcsdef{cbx@incollvol}%
+ {\restorefield{volume}{\cbx@incollvol}\toggletrue{cms@xrefvol}%
+ \ifcsdef{cbx@incollpart}%
+ {\restorefield{part}{\cbx@incollpart}}%
+ {}%
+ \ifthenelse{\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR%
+ \ifentrytype{mvproceedings}\OR\ifentrytype{mvreference}}%
+ {\printfield{volume}%
+ \clearfield{volume}%
+ \global\let\cbx@incollvol\undefined% Volume fix
+ \printfield{part}%
+ \clearfield{part}%
+ \global\let\cbx@incollpart\undefined% Volume fix
+ \setunit{\addspace}%
+ \bibstring{ofseries}%
+ \setunit{\addspace}}%
+ {\usebibmacro{cms-in:}}}%
+ {\iffieldundef{part}%
+ {\ifcsdef{cbx@incollpart}%
+ {\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
+ {}}%
+ {}%
+ \ifthenelse{\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR%
+ \ifentrytype{mvproceedings}\OR\ifentrytype{mvreference}}%
+ {\printfield[xrefpart]{part}%
+ \clearfield{part}%
+ \global\let\cbx@incollpart\undefined% Volume fix
+ \setunit{\addspace}%
+ \bibstring{ofseries}%
+ \setunit{\addspace}}%
+ {\usebibmacro{cms-in:}}}}%
+ {\iffieldundef{part}%
+ {\ifcsdef{cbx@incollpart}%
+ {\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
+ {}}%
+ {}%
+ \ifthenelse{\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR%
+ \ifentrytype{mvproceedings}\OR\ifentrytype{mvreference}}%
+ {\printfield{volume}%
+ \clearfield{volume}%
+ \global\let\cbx@incollvol\undefined% Volume fix
+ \printfield{part}%
+ \clearfield{part}%
+ \global\let\cbx@incollpart\undefined% Volume fix
+ \setunit{\addspace}%
+ \bibstring{ofseries}%
+ \setunit{\addspace}}%
+ {\usebibmacro{cms-in:}}}}%
+
\newbibmacro*{chapincoll}{%
\iffieldundef{chapter}%
{}
@@ -2930,7 +3402,7 @@
\newbibmacro*{chapinscore}{%
\iffieldundef{chapter}%
- {\ifthenelse{\iffieldequalstr{entrytype}{music}% 16th ed.
+ {\ifthenelse{\ifentrytype{music}% 16th ed.
\AND\NOT\iffieldundef{booktitle}}%
{\bibstring{on}\setunit{\addspace}}%
{}}
@@ -3040,9 +3512,9 @@
\newbibmacro*{issuetitle}{%
\iffieldundef{issuetitle}%
{}
- {\ifthenelse{\iffieldequalstr{entrytype}{article}\OR%
- \iffieldequalstr{entrytype}{review}\OR%
- \iffieldequalstr{entrytype}{suppperiodical}}% This test is for
+ {\ifthenelse{\ifentrytype{article}\OR%
+ \ifentrytype{review}\OR%
+ \ifentrytype{suppperiodical}}% This test is for
{\usebibmacro{cms-in:}}% periodical entries
{}%
\printtext[issuetitle]{%
@@ -3052,19 +3524,24 @@
\newbibmacro*{btitle+bstitle}{%
\iffieldundef{booktitle}
- {}
- {\printtext[booktitle]{%
- \printfield[noformat]{booktitle}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{booksubtitle}}%
- \newcunit
- \printfield{booktitleaddon}}}
+ {}
+ {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
+ \ifentrytype{video}}%
+ {}%
+ {\usebibmacro{cms-in:}}%
+ \printtext[booktitle]{%
+ \printfield[noformat]{booktitle}%
+ \setunit{\addcolon\addspace}%
+ \printfield[noformat]{booksubtitle}}%
+ \newcunit
+ \printfield{booktitleaddon}%
+ \setunit*{\addcomma\addspace}}}
\newbibmacro*{publ+loc+year}{% Revised for reprint
\ifboolexpr{
- togl{cms@reprint}
+ togl {cms@reprint}
and
- not test {\iffieldequalstr{entrytype}{video}}
+ not test {\ifentrytype{video}}
}%
{\bibstring{reprint}%
\newcunit}%
@@ -3136,7 +3613,7 @@
\ifboolexpr{
togl {cms@reprint}
and
- not test{\iffieldequalstr{entrytype}{video}}
+ not test{\ifentrytype{video}}
}%
{\bibsstring{reprint}%
\newcunit}%
@@ -3150,15 +3627,23 @@
\usebibmacro{date}}}}%
\newbibmacro*{cpubletter+loc+year}{%
- \setunit{\addspace}%
+ \ifboolexpr{
+ test {\iflistundef{location}}
+ and
+ test {\iflistundef{publisher}}
+ and
+ test {\iffieldundef{year}}
+ }%
+ {}%
+ {\setunit{\addspace}%
\printtext[parens]{%
- \printlist{location}%
- \iflistundef{publisher}
- {\setunit*{\addspace}}
- {\setunit*{\addcolon\space}}%
- \printlist{publisher}%
- \setunit{\addcomma\space}%
- \usebibmacro{date}}}% Changed for 0.9
+ \printlist{location}%
+ \iflistundef{publisher}
+ {\setunit*{\addspace}}
+ {\setunit*{\addcolon\space}}%
+ \printlist{publisher}%
+ \setunit{\addcomma\space}%
+ \usebibmacro{date}}}}% Changed for 0.9
\newbibmacro*{originally+published+as}{% Punctuation fix now in
\iffieldundef{userf}% \origfullcite for 0.8e.
@@ -3219,7 +3704,7 @@
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
- {\setunit{\addcolon}}%
+ {\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}%
{\addcomma\addspace}}%
{\setunit{\addspace}%
@@ -3242,7 +3727,7 @@
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
- {\setunit{\addcolon}}%
+ {\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}%
{\addcomma\addspace}}%
{\setunit{\addspace}%
@@ -3295,8 +3780,8 @@
{}}%
\newbibmacro*{choosepubstring}{%
- \ifthenelse{\iffieldequalstr{entrytype}{video}\OR%
- \iffieldequalstr{entrytype}{music}}%
+ \ifthenelse{\ifentrytype{video}\OR%
+ \ifentrytype{music}}%
{\bibstring{origreleaseyear}}%
{\bibstring{origpubyearalt}}}%
@@ -3305,6 +3790,55 @@
{\printorigdate}%
{\printdate}}
+\newbibmacro{cite:xref+date}{%
+ \ifboolexpr{
+ togl {cms@omitxrefdate}%
+ or
+ togl {cms@bookcitexref}%
+ or
+ test {\iffieldundef{crossref}}%
+ or
+ test {\iffieldundef{maintitle}}%
+ or
+ ((
+ test {\iffieldundef{year}}%
+ or
+ togl {cms@switchdates}%
+ )
+ and
+ (test {\iffieldundef{origyear}}%
+ or
+ not togl {cms@switchdates}%
+ ))
+ or
+ not test {\ifentryseen{\thefield{crossref}}}%
+ }
+ {\ifboolexpr{
+ togl {cms@omitxrefdate}%
+ or
+ togl {cms@bookcitexref}%
+ or
+ test {\iffieldundef{xref}}%
+ or
+ test {\iffieldundef{maintitle}}
+ or
+ ((
+ test {\iffieldundef{year}}%
+ or
+ togl {cms@switchdates}%
+ )
+ and
+ (test {\iffieldundef{origyear}}%
+ or
+ not togl {cms@switchdates}%
+ ))
+ or
+ not test {\ifentryseen{\thefield{xref}}}%
+ }
+ {}%
+ {\printtext[parens]{\usebibmacro{date}}}}%
+ {\printtext[parens]{\usebibmacro{date}}}}
+
\newbibmacro*{cmsorigdate}{% New for 0.9
\iftoggle{cms@switchdates}%
{\printdate}%
@@ -3469,7 +4003,7 @@
\newbibmacro*{cmtitle+mstitle+vol+part+title+stitle}{%
\iffieldundef{maintitle}
{}
- {\iffieldundef{volume}
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
{\usebibmacro{cms-in:}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
@@ -3477,33 +4011,8 @@
\printfield[noformat]{mainsubtitle}}%
\newcunit
\printfield{maintitleaddon}}
- {\printfield{volume}%
- \printfield{part}%
- \setunit{\addspace}
- \bibstring{ofseries}%
- \setunit{\addspace}
- \printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}}}
-
-\newbibmacro*{crefmtitle+mstitle+vol+part+title+stitle}{%
- \iffieldundef{booktitle}
- {\usebibmacro{citaltitle+stitle}}%
- {\usebibmacro{btitle+bstitle}}%
- \newcunit% need this?
- \iffieldundef{maintitle}
- {}%
- {\iffieldundef{volume}
- {\printtext[maintitle]{%
- \printfield[noformat]{maintitle}%
- \setunit{\addcolon\addspace}%
- \printfield[noformat]{mainsubtitle}}%
- \newcunit
- \printfield{maintitleaddon}}
- {\printfield{volume}%
+ {\toggletrue{cms@usedvol}%
+ \printfield{volume}%
\printfield{part}%
\setunit{\addspace}
\bibstring{ofseries}%
@@ -3517,18 +4026,22 @@
\newbibmacro*{cmtitle+mstitle+vol+part+btitle+bstitle}{%
\usebibmacro{btitle+bstitle}%
- \newcunit
\iffieldundef{maintitle}
{}
- {\iffieldundef{volume}
- {\usebibmacro{cms-in:}%
+ {\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}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
\newcunit
- \printfield{maintitleaddon}}
- {\printfield{volume}%
+ \printfield{maintitleaddon}%
+ \toggletrue{cms@vol}}% InIn fix
+ {\toggletrue{cms@usedvol}%
+ \printfield{volume}%
\printfield{part}%
\setunit{\addspace}
\bibstring{ofseries}%
@@ -3595,48 +4108,27 @@
{\postnotedelim% Don't need \ifbibliography test w/ following
\usebibmacro{semel:postnote}}}
-\newbibmacro*{volume+or+volumes}{% Volume fix
- \iffieldundef{maintitle}%
- {\iffieldundef{volume}%
- {\printfield{volumes}}%
- {\printfield{volume}%
- \printfield{part}}}%
- {\printfield{volumes}}}
-
-\newbibmacro*{crossref:volume+postnote}{%
- \ifcsdef{cbx@incollpgn}%
- {\restorefield{pagination}{\cbx@incollpgn}}%
- {}%
- \ifcsdef{cbx@incollbkpgn}%
- {\restorefield{bookpagination}{\cbx@incollbkpgn}}%
- {}%
- \iffieldundef{volume}% Volume fix (unfinished)
- {\ifcsdef{cbx@incollvol}%
- {\restorefield{volume}{\cbx@incollvol}%
- \ifcsdef{cbx@incollpart}{\restorefield{part}{\cbx@incollpart}}{}%
- \iffieldundef{postnote}%
- {\ifcsdef{cbx@incollpages}%
- {\restorefield{pages}{\cbx@incollpages}%
- \iffieldundef{part}%
- {\ifthenelse{\iffieldnums{pages}\AND%
- \iffieldundef{bookpagination}}%
- {\newcunit\printfield[default]{volume}%
- \addcolon%
- \printfield{pages}}%
- {\newcunit\printfield{volume}%
- \addcomma\addspace%
- \printfield{pages}}}%
- {\newcunit\printfield{volume}%
- \printfield{part}%
- \addcomma\addspace%
- \printfield{pages}}}%
+\newbibmacro*{volfullpostnote}{%
+ \iftoggle{cms@postvol}%
+ {\ifboolexpr{(
+ test {\iffieldundef{volume}}%
+ and
+ test {\iffieldundef{part}}%
+ )
+ or
+ togl {cms@usedvol}%
+ }%
+ {\usebibmacro{fullpostnote}}%
+ {\iffieldundef{postnote}%
+ {\iffieldundef{chapter}%
{\iffieldundef{pages}%
- {\newcunit\printfield{volume}\printfield{part}}%
+ {\newcunit\printfield{volume}%
+ \printfield{part}}%
{\iffieldundef{part}%
{\ifthenelse{\iffieldnums{pages}\AND%
- \iffieldundef{bookpagination}}%
+ \iffieldundef{bookpagination}\AND\iffieldnums{volume}}%
{\newcunit\printfield[default]{volume}%
- \addcolon%
+ \postvolpunct%
\printfield{pages}}%
{\newcunit\printfield{volume}%
\addcomma\addspace%
@@ -3644,12 +4136,16 @@
{\newcunit\printfield{volume}%
\printfield{part}%
\addcomma\addspace%
- \printfield{pages}}}}}%
+ \printfield{pages}}}}%
+ {\newcunit\printfield{volume}%
+ \printfield{part}%
+ \newcunit
+ \printfield{chapter}}}%
{\iffieldundef{part}%
{\ifthenelse{\iffieldnums{postnote}\AND%
- \iffieldundef{pagination}}%
+ \iffieldundef{pagination}\AND\iffieldnums{volume}}%
{\newcunit\printfield[default]{volume}%
- \addcolon%
+ \postvolpunct%
\usebibmacro{semel:postnote}}%
{\newcunit\printfield{volume}%
\addcomma\addspace%
@@ -3657,57 +4153,182 @@
{\newcunit\printfield{volume}%
\printfield{part}%
\addcomma\addspace%
- \usebibmacro{semel:postnote}}}}%
- {\ifcsdef{cbx@incollpages}%
- {\restorefield{pages}{\cbx@incollpages}%
- \usebibmacro{fullpostnote}}%
- {\usebibmacro{fullpostnote}}}}%
- {\iffieldundef{postnote}%
+ \usebibmacro{semel:postnote}}}}}%
+ {\usebibmacro{fullpostnote}}%
+ \global\togglefalse{cms@usedvol}}%
+
+\newbibmacro*{volume+or+volumes}{% Volume fix (modified)
+ \ifboolexpr{ (
+ test {\iffieldundef{maintitle}}%
+ or
+ togl {cms@vol}%
+ )
+ and
+ not togl {cms@postvol}%
+ and
+ not togl {cms@usedvol}%
+ }%
+ {\global\togglefalse{cms@vol}%
+ \ifthenelse{\iffieldundef{volume}\AND\iffieldundef{part}}%
+ {\printfield{volumes}}%
+ {\printfield{volume}%
+ \printfield{part}}}%
+ {\ifboolexpr{
+ togl {cms@hidevolumes}%
+ and
+ (
+ not test {\iffieldundef{volume}}%
+ or
+ not test {\iffieldundef{part}}%
+ or
+ togl {cms@usedvol}%
+ )
+ }%
+ {\global\togglefalse{cms@vol}}%
+ {\global\togglefalse{cms@vol}%
+ \printfield{volumes}}}}
+
+\newbibmacro*{crossref:volume+postnote}{%
+ \ifcsdef{cbx@incollpgn}%
+ {\restorefield{pagination}{\cbx@incollpgn}}%
+ {}%
+ \ifcsdef{cbx@incollbkpgn}%
+ {\restorefield{bookpagination}{\cbx@incollbkpgn}}%
+ {}%
+ \iffieldundef{volume}% Volume fix (unfinished)
+ {\ifcsdef{cbx@incollvol}%
+ {\restorefield{volume}{\cbx@incollvol}%
+ \ifcsdef{cbx@incollpart}{\restorefield{part}{\cbx@incollpart}}{}%
+ \iffieldundef{postnote}%
{\ifcsdef{cbx@incollpages}%
{\restorefield{pages}{\cbx@incollpages}%
- \iffieldundef{part}%
- {\ifthenelse{\iffieldnums{pages}\AND%
- \iffieldundef{bookpagination}}%
- {\newcunit\printfield[default]{volume}%
- \addcolon%
- \printfield{pages}}%
- {\newcunit\printfield{volume}%
- \addcomma\addspace%
- \printfield{pages}}}%
- {\newcunit\printfield{volume}%
- \printfield{part}%
- \addcomma\addspace%
- \printfield{pages}}}%
+ \usebibmacro{pages+cref+print}}%
{\iffieldundef{pages}%
{\newcunit\printfield{volume}\printfield{part}}%
- {\iffieldundef{part}%
- {\ifthenelse{\iffieldnums{pages}\AND%
- \iffieldundef{bookpagination}}%
- {\newcunit\printfield[default]{volume}%
- \addcolon%
- \printfield{pages}}%
- {\newcunit\printfield{volume}%
- \addcomma\addspace%
- \printfield{pages}}}%
- {\newcunit\printfield{volume}%
- \printfield{part}%
- \addcomma\addspace%
- \printfield{pages}}}}}%
- {\iffieldundef{part}%
- {\ifthenelse{\iffieldnums{postnote}\AND%
- \iffieldundef{pagination}}%
- {\newcunit\printfield[default]{volume}%
- \addcolon%
- \usebibmacro{semel:postnote}}%
- {\newcunit\printfield{volume}%
- \addcomma\addspace%
- \usebibmacro{semel:postnote}}}%
- {\newcunit\printfield{volume}%
- \printfield{part}%
- \addcomma\addspace%
- \usebibmacro{semel:postnote}}}}}%
+ {\usebibmacro{pages+cref+print}}}}%
+ {\usebibmacro{postnote+cref+print}}}%
+ {\iffieldundef{part}%
+ {\ifcsdef{cbx@incollpart}%
+ {\restorefield{part}{\cbx@incollpart}%
+ \iffieldundef{postnote}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{pages+cref+print}}%
+ {\iffieldundef{pages}%
+ {\newcunit\printfield{volume}\printfield{part}}%
+ {\usebibmacro{pages+cref+print}}}}%
+ {\usebibmacro{postnote+cref+print}}}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{fullpostnote}}%
+ {\usebibmacro{fullpostnote}}}}%
+ {\iffieldundef{postnote}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{pages+cref+print}}%
+ {\iffieldundef{pages}%
+ {\newcunit\printfield{volume}\printfield{part}}%
+ {\usebibmacro{pages+cref+print}}}}%
+ {\usebibmacro{postnote+cref+print}}}}}%
+ {\iffieldundef{part}%
+ {\ifcsdef{cbx@incollpart}%
+ {\restorefield{part}{\cbx@incollpart}}%
+ {}}%
+ {}%
+ \iffieldundef{maintitle}% More elaborate test ???
+ {\iffieldundef{postnote}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{pages+cref+print}}%
+ {\iffieldundef{pages}%
+ {\newcunit\printfield{volume}\printfield{part}}%
+ {\usebibmacro{pages+cref+print}}}}%
+ {\usebibmacro{postnote+cref+print}}}%
+ {\ifboolexpr{
+ test {\ifcsdef{cbx@incollvol}}%
+ and
+ (
+ not test {\iffieldequalcs{volume}{cbx@incollvol}}%
+ or
+ togl {cms@xrefvol}% Necessary ???
+ )
+ }%
+ {\restorefield{volume}{\cbx@incollvol}%
+ \iffieldundef{part}%
+ {\ifcsdef{cbx@incollpart}{\restorefield{part}{\cbx@incollpart}}{}}%
+ {\ifboolexpr{
+ test {\ifcsdef{cbx@incollpart}}%
+ and
+ (
+ not test {\iffieldequalcs{part}{cbx@incollpart}}%
+ or
+ togl {cms@xrefpart}%
+ )
+ }%
+ {\clearfield{part}\restorefield{part}{\cbx@incollpart}}%
+ {\clearfield{part}}}%
+ \iffieldundef{postnote}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{pages+cref+print}}%
+ {\iffieldundef{pages}%
+ {\newcunit\printfield{volume}\printfield{part}}%
+ {\usebibmacro{pages+cref+print}}}}%
+ {\usebibmacro{postnote+cref+print}}}%
+ {\ifboolexpr{
+ test {\ifcsdef{cbx@incollpart}}%
+ and
+ (
+ not test {\iffieldequalcs{part}{cbx@incollpart}}%
+ or
+ togl {cms@xrefpart}%
+ )
+ }
+ {\iffieldundef{postnote}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \printfield{part}\newcunit\printfield{pages}}%
+ {\iffieldundef{pages}%
+ {\printfield{part}}%
+ {\printfield{part}\newcunit\printfield{pages}}}}%
+ {\printfield{part}\newcunit\usebibmacro{semel:postnote}}}%
+ {\ifcsdef{cbx@incollpages}%
+ {\restorefield{pages}{\cbx@incollpages}%
+ \usebibmacro{fullpostnote}}%
+ {\usebibmacro{fullpostnote}}}}}}}%
+
+\newbibmacro*{pages+cref+print}{% Reusable chunk for above
+ \iffieldundef{part}%
+ {\ifthenelse{\iffieldnums{pages}\AND%
+ \iffieldundef{bookpagination}\AND\iffieldnums{volume}}%
+ {\newcunit\printfield[default]{volume}%
+ \postvolpunct%
+ \printfield{pages}}%
+ {\newcunit\printfield{volume}%
+ \addcomma\addspace%
+ \printfield{pages}}}%
+ {\newcunit\printfield{volume}%
+ \printfield{part}%
+ \addcomma\addspace%
+ \printfield{pages}}}
+
+\newbibmacro*{postnote+cref+print}{% Reusable chunk for above
+ \iffieldundef{part}%
+ {\ifthenelse{\iffieldnums{postnote}\AND%
+ \iffieldundef{pagination}\AND\iffieldnums{volume}}%
+ {\newcunit\printfield[default]{volume}%
+ \postvolpunct%
+ \usebibmacro{semel:postnote}}%
+ {\newcunit\printfield{volume}%
+ \addcomma\addspace%
+ \usebibmacro{semel:postnote}}}%
+ {\newcunit\printfield{volume}%
+ \printfield{part}%
+ \addcomma\addspace%
+ \usebibmacro{semel:postnote}}}
\newbibmacro*{inreffullpostnote}{%
+ \global\togglefalse{cms@usedvol}%
\iffieldundef{postnote}%
{\iffieldundef{chapter}%
{\iffieldundef{pages}%
@@ -3729,6 +4350,9 @@
{\cbx@incollbkpgn}}}
\newbibmacro*{xrefpostnote}{%
+ \togglefalse{cms@xrefvol}%
+ \togglefalse{cms@xrefpart}%
+ \global\togglefalse{cms@usedvol}%
\global\let\cbx@incollvol\undefined% Volume fix
\global\let\cbx@incollpages\undefined%
\global\let\cbx@incollpart\undefined%
@@ -3745,7 +4369,13 @@
\iffieldundef{prenote}% command, rather than \headlessfullcite.
{\bibsentence}% Needed for Ibid to be capitalized.
{\printfield{prenote}%
- \ifciteseen{\addspace}{\nopunct}}}% Do we need \unspace here?
+ \ifboolexpr{%
+ test {\ifciteseen}
+ or
+ togl {cms@allshort}
+ }%
+ {\addspace}%
+ {\nopunct}}}% Do we need \unspace here?
\newbibmacro*{journalprenote}{%
\iffieldundef{prenote}%
@@ -3810,6 +4440,58 @@
\inherit{subtitle}{subtitle}
\inherit{titleaddon}{titleaddon}}
+\DeclareDataInheritance{mvbook}{incollection}{%
+ \inherit{title}{maintitle}
+ \inherit{subtitle}{mainsubtitle}
+ \inherit{titleaddon}{maintitleaddon}
+ \noinherit{shorttitle}
+ \noinherit{sorttitle}
+ \noinherit{indextitle}
+ \noinherit{indexsorttitle}
+}
+
+\DeclareDataInheritance{book,collection}{letter}{%
+ \inherit{title}{booktitle}
+ \inherit{subtitle}{booksubtitle}
+ \inherit{titleaddon}{booktitleaddon}
+ \noinherit{shorttitle}
+ \noinherit{sorttitle}
+ \noinherit{indextitle}
+ \noinherit{indexsorttitle}
+}
+
+\DeclareDataInheritance{mvbook,mvcollection}{letter}{%
+ \inherit{title}{maintitle}
+ \inherit{subtitle}{mainsubtitle}
+ \inherit{titleaddon}{maintitleaddon}
+ \noinherit{shorttitle}
+ \noinherit{sorttitle}
+ \noinherit{indextitle}
+ \noinherit{indexsorttitle}
+}
+
+\DeclareDataInheritance{*}{*}{%
+ \noinherit{namea}
+ \noinherit{nameb}
+ \noinherit{sortyear}
+ \noinherit{sortname}
+ \noinherit{sorttitle}}
+
+\DeclareDataInheritance{mvbook,mvcollection,mvproceedings,mvreference}%
+{*}{% ???
+ \noinherit{year}
+ \noinherit{month}
+ \noinherit{day}
+ \noinherit{endyear}
+ \noinherit{endmonth}
+ \noinherit{endday}
+ \noinherit{origyear}
+ \noinherit{origmonth}
+ \noinherit{origday}
+ \noinherit{origendyear}
+ \noinherit{origendmonth}
+ \noinherit{origendday}}
+
\DeclareSortingScheme{cms}{
\sort{
\field{presort}
@@ -3974,9 +4656,13 @@
\clearname{namea}%
\clearname{nameb}%
\clearfield{nameaddon}%
- \clearfield{title}%
- \clearfield{subtitle}%
- \clearfield{titleaddon}%
+ \ifthenelse{\ifentrytype{periodical}\OR\ifentrytype{mvbook}\OR%
+ \ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\OR%
+ \ifentrytype{mvreference}}%
+ {}%
+ {\clearfield{title}%
+ \clearfield{subtitle}%
+ \clearfield{titleaddon}}%
\clearfield{reprinttitle}%
\clearfield{usere}%
\clearlist{language}%