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.cbx485
1 files changed, 324 insertions, 161 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 4f4cc556a58..83013a2a7f3 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.95 2014/01/29 11:26:57 dfussner Exp $
+% $Id: chicago-notes.cbx,v 0.9.7.112 2014/08/15 09:27:37 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}[2014/01/29 v 2.8a biblatex citation style]
+\ProvidesFile{chicago-notes.cbx}[2014/08/15 v 2.9a biblatex citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -27,8 +27,12 @@
\providetoggle{cms@bookseries}
\providetoggle{cms@notefield}
\providetoggle{cms@addendum}
+\providetoggle{cms@comprange}
+\providetoggle{cms@modpostnote}
+\providetoggle{cms@crspace}
\providetoggle{cms@headlessnote}
+\providetoggle{cms@origcite}
\providetoggle{cms@fullnote}
\providetoggle{cms@shortnote}
\providetoggle{cms@allshort}
@@ -37,6 +41,7 @@
\providetoggle{cms@shorthandibid}
\providetoggle{cms@printshhand}
\providetoggle{cms@fullshhand}
+\providetoggle{cms@inheritshhand}
\providetoggle{cms@origpublished}
\providetoggle{cms@loccit}
\providetoggle{cms@annotation}
@@ -67,6 +72,8 @@
or
not test {\iffieldint{year}}%
or
+ not test {\iffieldint{origyear}}%
+ or
togl {cms@switchdates}%
}%
{}%
@@ -97,6 +104,34 @@
\DeclareBibliographyOption{shorthandfull}[true]{%
\settoggle{cms@fullshhand}{#1}}
+\DeclareBibliographyOption{inheritshorthand}[true]{%
+ \settoggle{cms@inheritshhand}{#1}
+ \iftoggle{cms@inheritshhand}%
+ {\DeclareDataInheritance{*}{*}{%
+ \inherit{shorthand}{shorthand}
+ \inherit{shorthandintro}{shorthandintro}
+ }}%
+ {}}
+
+\DeclareBibliographyOption{compresspages}[true]{%
+ \ifcsdef{cms@opt@crange@#1}%
+ {\csuse{cms@opt@crange@#1}}%
+ {\blx@err@invopt{compresspages=#1}{}}}%
+\def\cms@opt@crange@true{%
+ \global\toggletrue{cms@comprange}%
+ \setcounter{mincomprange}{100}%
+ \setcounter{mincompwidth}{10}%
+}%
+\def\cms@opt@crange@false{}%
+
+\DeclareBibliographyOption{postnotepunct}[true]{%
+ \ifcsdef{cms@opt@ppunct@#1}%
+ {\csuse{cms@opt@ppunct@#1}}%
+ {\blx@err@invopt{postnotepunct=#1}{}}}%
+\def\cms@opt@ppunct@true{%
+ \global\toggletrue{cms@modpostnote}}%
+\def\cms@opt@ppunct@false{}%
+
\DeclareBibliographyOption{usecompiler}[true]{%
\settoggle{cms@usecompiler}{#1}}
@@ -368,7 +403,7 @@
\ifboolexpr{%
togl {cms@allshort}%
or
- test {\ifbibliography}
+ test {\ifbibliography}%
}%
{\printtext[bibhyperref]{%
\printfield[citetitle]{labeltitle}}}%
@@ -394,16 +429,20 @@
\printfield{shorthandintro}}}}
\newbibmacro*{cite:ibid}{%
- \iftoggle{cms@noibid}
+ \ifboolexpr{%
+ togl {cms@noibid}%
+ or
+ test {\ifbibliography}% Needed for inheritshorthand option
+ }%
{\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
\usebibmacro{cite:short}%
\usebibmacro{cite:save}}%
{\iftoggle{cms@allshort}%
{\printtext[bibhyperref]{%
- \bibstring[\mkibid]{ibidem}}}
+ \bibstring[\mkibid]{ibidem}}}%
{\printtext[cmshyperlink]{%
- \bibstring[\mkibid]{ibidem}}}
+ \bibstring[\mkibid]{ibidem}}}%
\ifboolexpr{%
test {\ifloccit}%
or
@@ -411,6 +450,8 @@
test {\ifciteibid}%
and
test {\iffieldequalcs{postnote}{cms@pnsaved}}%
+ and
+ not test {\ifdefvoid{\blx@loccittracker}}% Package option=false
)
}%
{\global\toggletrue{cms@loccit}}%
@@ -497,8 +538,8 @@
{}{}{}{}%
\DeclareCiteCommand{\bibxrefcite}
- {}%\usebibmacro{clearalmostall}} (?)
- {\usebibmacro{cms-in:}%
+ {\usebibmacro{backref+check}}% So cites in biblio don't turn up
+ {\usebibmacro{cms-in:}% in backref list
\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND\NOT%
\(\ifentrytype{collection}\OR\ifentrytype{proceedings}\OR%
\ifentrytype{mvcollection}\OR\ifentrytype{mvproceedings}\)}%
@@ -508,13 +549,19 @@
{}%
\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
- \usebibmacro{cite:short}}
+ \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}
- {}%\usebibmacro{clearalmostall}} (?)
- {\iffieldequals{fullhash}{\bbx@lasthash}%
+ {\usebibmacro{backref+check}}% So cites in biblio don't turn up
+ {\iffieldequals{fullhash}{\bbx@lasthash}% in backref list
{\ifthenelse{\ifentrytype{collection}\OR%
\ifentrytype{proceedings}\OR\ifentrytype{mvcollection}\OR%
\ifentrytype{mvproceedings}}%
@@ -528,8 +575,14 @@
\toggletrue{cms@shortnote}%
\togglefalse{cms@fullnote}%
\usebibmacro{bibxref-in:}%
- \usebibmacro{cite:short}}
- {}
+ \ifboolexpr{
+ togl {cms@inheritshhand}%
+ and
+ not test {\iffieldundef{shorthand}}%
+ }
+ {\usebibmacro{cite}}%
+ {\usebibmacro{cite:short}}}%
+ {}%
{\usebibmacro{crossref:volume+postnote}}% Volume fix
\DeclareCiteCommand*{\cite}
@@ -587,21 +640,24 @@
{}
\DeclareCiteCommand{\origfullcite}
- {\ifhyperref%
+ {\usebibmacro{backref+check}%
+ \ifhyperref%
{\hypertarget{cite.\the\c@refsection @\abx@field@entrykey}{}}%
{}%
\nopunct\unspace}% Put \nopunct and \unspace here for 0.8e.
{\usedriver
{\DeclareNameAlias{sortname}{default}\clearfield{postnote}%
- \clearname{author}\clearfield{userf}\clearfield{shorthand}%
+ \usebibmacro{clearorigin}\clearfield{userf}\clearfield{shorthand}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\frenchspacing}%
- {cite:\thefield{entrytype}}}%
+ {cite:\thefield{entrytype}}%
+ \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}%
{\multicitedelim}%
{\finentry}% Helps with annotated bibliographies (?)
\DeclareCiteCommand{\origpublcite}% Similar to above, w/o title.
- {\ifhyperref%
+ {\usebibmacro{backref+check}%
+ \ifhyperref%
{\hypertarget{cite.\the\c@refsection @\abx@field@entrykey}{}}%
{}%
\nopunct\unspace}% Put \nopunct and \unspace here for 0.8e.
@@ -610,7 +666,8 @@
\usebibmacro{clearpublin}\clearfield{shorthand}%
\toggletrue{cms@fullnote}\toggletrue{cms@headlessnote}%
\toggletrue{cms@origpublished}\frenchspacing}%
- {cite:\thefield{entrytype}}}%
+ {cite:\thefield{entrytype}}%
+ \iflistundef{pageref}{}{\newunit\usebibmacro{pageref}}}%
{\multicitedelim}%
{\finentry}
@@ -664,9 +721,9 @@
{\usebibmacro{prenote}}%\usebibmacro{hlcprenote}}
{\usebibmacro{citeindex}%
\ifboolexpr{%
- test {\ifciteseen}
+ test {\ifciteseen}%
or
- togl {cms@allshort}
+ togl {cms@allshort}%
}%
{\usebibmacro{cite:short}}
{\toggletrue{cms@headlessnote}%
@@ -767,8 +824,11 @@
\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?
+ {\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?
{}}
{}}
{}
@@ -907,7 +967,6 @@
\usebibmacro{institution+organization}%
\newcunit\newblock
\printlist{location}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1042,7 +1101,6 @@
\iftoggle{cms@bookpages}%
{}%
{\clearfield{pages}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1059,14 +1117,18 @@
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
@@ -1116,7 +1178,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1131,14 +1192,18 @@
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
@@ -1158,7 +1223,6 @@
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{howpubl+loc+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1208,7 +1272,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1223,14 +1286,18 @@
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work. Only with Vol?
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
@@ -1270,7 +1337,6 @@
\usebibmacro{institution+organization}%
\newcunit\newblock
\printlist{location}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1326,7 +1392,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1341,21 +1406,15 @@
\usebibmacro{pageref}%
\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
+{\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\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}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1405,7 +1464,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1420,21 +1478,15 @@
\usebibmacro{pageref}%
\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
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\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}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1478,7 +1530,6 @@
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1493,21 +1544,15 @@
\usebibmacro{pageref}%
\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}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\iffieldundef{chapter}% New test needed to cope with
- {\addspace\bibsentence}% new chapter citing system.
- {\setunit{\addspace\bibsentence}}}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1540,7 +1585,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{inreffullpostnote}%
\newcunit\newblock%setunit{\addspace}% 16th ed
@@ -1607,7 +1651,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubletter+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -1622,21 +1665,15 @@
\usebibmacro{pageref}%
\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}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{xref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\iffieldundef{chapter}% New test needed to cope with
- {\addspace\bibsentence}% new chapter citing system.
- {\setunit{\addspace\bibsentence}}}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}{\setunit{\addspace\bibsentence}}{\newcunit}% 16th ed.
\usebibmacro{xrefprenote}% Volume fix
- \usebibmacro{chapincoll}%
+ \usebibmacro{xrefchapincoll}%
\bibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}
@@ -1661,7 +1698,6 @@
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1713,7 +1749,6 @@
{\newcunit\newblock
\usebibmacro{date}}%
{}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1889,7 +1924,6 @@
\setunit{\addcomma\addspace\bibstring{and}%
\addspace\bibstring{patentissued}\addspace}%
\usebibmacro{date}}%
- \newcunit%
\usebibmacro{caddendum}}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -1995,7 +2029,6 @@
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{org+publ+loc+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -2010,14 +2043,18 @@
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{xref}}% Removed \addspace from each.
\usebibmacro{xrefpostnote}%
\usebibmacro{finentry}}}%
- {\ifterm{\addspace\bibsentence}%
- {\addcomma\addspace}%
+ {\ifpunctmark{.}% This seems to work.
+ {\ifbibliography%
+ {\setunit{\bibsentence}}{\addspace\bibsentence}}%
+ {\ifbibliography{\unspace}{\addcomma\addspace}}% ?!?
\usebibmacro{xrefprenote}% Volume fix
\bookbibxrefcite{\thefield{crossref}}%
\usebibmacro{xrefpostnote}%
@@ -2051,7 +2088,6 @@
\usebibmacro{cnotefield}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -2086,7 +2122,6 @@
\setunit{\addspace}\newblock%
\printtext[parens]{%
\usebibmacro{inst+loc+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -2179,7 +2214,6 @@
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
\clearfield{pages}% ?? For 16th ed.
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{volfullpostnote}%
\newcunit\newblock
@@ -2214,7 +2248,6 @@
\setunit{\addspace}%
\printtext[parens]{%
\usebibmacro{type+inst+year}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -2247,7 +2280,6 @@
\printlist{location}%
\newcunit\newblock
\usebibmacro{date}}%
- \newcunit\newblock
\usebibmacro{caddendum}%
\usebibmacro{fullpostnote}%
\newcunit\newblock
@@ -2429,20 +2461,43 @@
\DeclareFieldFormat{prenote}{\ifcapital{\MakeCapital{#1}}{#1}}
-\DeclareFieldFormat{postnote}{% Removed \isdots -- required
- \iffieldundef{pagination}% elsewhere also?
- {#1}%
- {\mkpageprefix[pagination]{#1}}}
+\iftoggle{cms@comprange}% Audrey Boruvka's code from StackExchange
+{\patchcmd{\blx@comprange@check}%
+ {\blx@comprange@comp{#1}{#2}}%
+ {\blx@tempcnta=#1%
+ \divide\blx@tempcnta100%
+ \multiply\blx@tempcnta100%
+ \ifnumequal{\blx@tempcnta}{#1}%
+ {\blx@range@out@value{#1\bibrangedash#2}}%
+ {\blx@comprange@comp{#1}{#2}}}%
+ {}{}}{}%
+
+\DeclareFieldFormat{postnote}{% Changed for page compression option
+ \iftoggle{cms@comprange}%
+ {\iffieldundef{pagination}%
+ {\mkcomprange{#1}}%
+ {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}%
+ {\iffieldundef{pagination}%
+ {#1}%
+ {\mkpageprefix[pagination]{#1}}}}%
\DeclareFieldFormat[inreference]{postnote}{%
- \iffieldundef{pagination}%
- {s\adddot v\adddot\addspace\mkbibquote{#1}}
- {\mkpageprefix[pagination]{#1}}}% Removed \isdots here, also.
+ \iftoggle{cms@comprange}%
+ {\iffieldundef{pagination}%
+ {s\adddot v\adddot\addspace\mkbibquote{#1}}%
+ {\mkcomprange[{\mkpageprefix[pagination]}]{#1}}}%
+ {\iffieldundef{pagination}%
+ {s\adddot v\adddot\addspace\mkbibquote{#1}}%
+ {\mkpageprefix[pagination]{#1}}}}%
\DeclareFieldFormat{pages}{%
- \iffieldundef{bookpagination}%
- {#1\isdot}%
- {\mkpageprefix[bookpagination]{#1}}}
+ \iftoggle{cms@comprange}%
+ {\iffieldundef{bookpagination}%
+ {\mkcomprange{#1}\isdot}%
+ {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}}%
+ {\iffieldundef{bookpagination}%
+ {#1\isdot}%
+ {\mkpageprefix[bookpagination]{#1}}}}%
\DeclareFieldFormat{edlang}{%
\ifbibstring{#1}
@@ -2653,9 +2708,9 @@
\DeclareFieldFormat{journum}{% Revised for 0.9.5
\ifboolexpr{%
- test {\ifnumerals{#1}}
+ test {\ifnumerals{#1}}%
and
- not test {\ifnumeral{#1}}
+ not test {\ifnumeral{#1}}%
}%
{\bibstring{numbers}\addspace #1}%
{\bibstring{number}\addspace #1}}
@@ -2715,7 +2770,7 @@
test {\ifentrytype{inproceedings}}%
)
and
- not togl {cms@citecrossref}
+ not togl {cms@citecrossref}%
)
}%
{\bibhyperlink{\thefield{xref}}{#1}}%
@@ -2743,7 +2798,7 @@
test {\ifentrytype{inproceedings}}%
)
and
- not togl {cms@citecrossref}
+ not togl {cms@citecrossref}%
)
}%
{\bibhyperlink{\thefield{crossref}}{#1}}%
@@ -2908,8 +2963,40 @@
{\addcomma\addspace}}%
{\addcomma\addspace}}}%
+\newcommand*{\postnotewrapper}{%
+ \iftoggle{cms@modpostnote}%
+ {\ifboolexpr{%
+ test {\iffieldstart{postnote}{,}}%
+ or
+ test {\iffieldstart{postnote}{\bibrangessep}}%
+ }%
+ {\addcomma}% w/ or w/o \addspace?
+ {\ifboolexpr{%
+ test {\iffieldstart{postnote}{;}}%
+ or
+ test {\iffieldstart{postnote}{:}}%
+ or
+ test {\iffieldstart{postnote}{.}}%
+ }%
+ {}{\postnotedelim}}}%
+ {\postnotedelim}}%
+
+\newrobustcmd*{\iffieldstart}[2]{% Philipp Lehman's code, from
+ \begingroup% comp.text.tex
+ \edef\@tempa{%
+ \long\def\noexpand\iffieldstart@i####1\detokenize{#2}####2}%
+ \@tempa\@nil{\endgroup\ifblank{##1}}%
+ \savefield*{#1}{\@tempa}%
+ \expandafter\iffieldstart@i\detokenize
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\detokenize{#2}}\@nil}
+
\newcommand*{\editordelim}{%
- \iffieldequalstr{editortype}{none}%
+ \ifboolexpr{%
+ test {\iffieldequalstr{editortype}{none}}%
+ and
+ not togl {cms@fullnote}%
+ }%
{\addperiod\addspace}%
{\addcomma\addspace}}
@@ -3130,9 +3217,9 @@
{\iflistundef{organization}%
{}%
{\ifboolexpr{
- test {\iflistequals{organization}{\bbx@lasthash}}
+ test {\iflistequals{organization}{\bbx@lasthash}}%
and
- not test {\iffirstonpage}
+ not test {\iffirstonpage}%
}%
{\bibnamedash\addperiod\addspace}%
{\printlist{organization}%
@@ -3347,8 +3434,8 @@
\newbibmacro*{cms-in:}{% Fix for 0.9a compat.
\iftoggle{cms@origpublished}%
- {}
- {\bibstring{in}%
+ {}% The following is needed for userf + crossref inside bib.
+ {\iftoggle{cms@crspace}{\addspace}{}\bibstring{in}% ?!?
\setunit{\addspace}}}
\newbibmacro*{bibxref-in:}{%
@@ -3369,7 +3456,8 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}%
+ {\toggletrue{cms@crspace}\usebibmacro{cms-in:}%
+ \togglefalse{cms@crspace}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
{\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
@@ -3383,7 +3471,8 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}}%
+ {\toggletrue{cms@crspace}\usebibmacro{cms-in:}%
+ \togglefalse{cms@crspace}}}}%
{\iffieldundef{part}%
{\ifcsdef{cbx@incollpart}%
{\restorefield{part}{\cbx@incollpart}\toggletrue{cms@xrefpart}}%
@@ -3400,7 +3489,8 @@
\setunit{\addspace}%
\bibstring{ofseries}%
\setunit{\addspace}}%
- {\usebibmacro{cms-in:}}}}%
+ {\toggletrue{cms@crspace}\usebibmacro{cms-in:}%
+ \togglefalse{cms@crspace}}}}%
\newbibmacro*{chapincoll}{%
\iffieldundef{chapter}%
@@ -3408,6 +3498,12 @@
{\printfield{chapter}\addspace%
\clearfield{chapter}}}
+\newbibmacro*{xrefchapincoll}{%
+ \iffieldundef{chapter}%
+ {\printtext{\relax}}
+ {\printfield{chapter}\addspace%
+ \clearfield{chapter}}}
+
\newbibmacro*{chapinscore}{%
\iffieldundef{chapter}%
{\ifthenelse{\ifentrytype{music}% 16th ed.
@@ -3419,8 +3515,12 @@
\clearfield{chapter}}}
\newbibmacro*{caddendum}{% New macros for 16th ed. field exclusion
- \iftoggle{cms@addendum}%
- {\printfield{addendum}}%
+ \ifboolexpr{%
+ togl {cms@addendum}%
+ and
+ not test {\iffieldundef{addendum}}%
+ }%
+ {\newcunit\printfield{addendum}}%
{}}%
\newbibmacro*{cnotefield}{%
@@ -3547,9 +3647,9 @@
\newbibmacro*{publ+loc+year}{% Revised for reprint
\ifboolexpr{
- togl {cms@reprint}
+ togl {cms@reprint}%
and
- not test {\ifentrytype{video}}
+ not test {\ifentrytype{video}}%
}%
{\bibstring{reprint}%
\newcunit}%
@@ -3605,13 +3705,13 @@
\newbibmacro*{cpubl+loc+year}{% Revised for reprint
\ifboolexpr{
- test {\iflistundef{location}}
+ test {\iflistundef{location}}%
and
- test {\iflistundef{publisher}}
+ test {\iflistundef{publisher}}%
and
- test {\iffieldundef{year}}
+ test {\iffieldundef{year}}%
and
- not togl {cms@reprint}
+ not togl {cms@reprint}%
}%
{}%
{\setunit{\addspace}%
@@ -3619,9 +3719,9 @@
\usebibmacro{origpubl+loc+year}%{cmsorigdate}%\printfield{origyear}%
\setunit*{\addsemicolon\addspace}%
\ifboolexpr{
- togl {cms@reprint}
+ togl {cms@reprint}%
and
- not test{\ifentrytype{video}}
+ not test{\ifentrytype{video}}%
}%
{\bibsstring{reprint}%
\newcunit}%
@@ -3636,11 +3736,11 @@
\newbibmacro*{cpubletter+loc+year}{%
\ifboolexpr{
- test {\iflistundef{location}}
+ test {\iflistundef{location}}%
and
- test {\iflistundef{publisher}}
+ test {\iflistundef{publisher}}%
and
- test {\iffieldundef{year}}
+ test {\iffieldundef{year}}%
}%
{}%
{\setunit{\addspace}%
@@ -3703,11 +3803,11 @@
\newbibmacro*{cjournal+issue+year+pages}{%
\usebibmacro{cjournal+ser+vol+num}%
\ifboolexpr{% 16th ed.
- test {\iffieldundef{issue}}
+ test {\iffieldundef{issue}}%
and
- test {\iffieldundef{year}}
+ test {\iffieldundef{year}}%
and
- not togl {cms@switchdates}
+ not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
@@ -3715,22 +3815,30 @@
{\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}%
{\addcomma\addspace}}%
- {\setunit{\addspace}%
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
+ {\newcunit%
+ \iffieldundef{issue}
+ {\usebibmacro{number+or+month}}%
+ {\printfield{issue}%
+ \setunit{\addspace}%
+ \usebibmacro{cmsyear}}%
+ \addcomma\addspace}%
+ {\setunit{\addspace}%
\printtext[parens]{% parens is the default here
\iffieldundef{issue}
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
- \usebibmacro{cmsyear}}}}}
+ \usebibmacro{cmsyear}}}}}}
\newbibmacro*{cperiodical+issue+year+pages}{% For periodicals,
\usebibmacro{cperiodical+ser+vol+num}% subtype article
\ifboolexpr{% 16th ed.
- test {\iffieldundef{issue}}
+ test {\iffieldundef{issue}}%
and
- test {\iffieldundef{year}}
+ test {\iffieldundef{year}}%
and
- not togl {cms@switchdates}
+ not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
@@ -3738,13 +3846,21 @@
{\setunit{\postvolpunct}}%
{\setunit{\addcolon\addspace}}}%
{\addcomma\addspace}}%
- {\setunit{\addspace}%
+ {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
+ {\newcunit%
+ \iffieldundef{issue}
+ {\usebibmacro{number+or+month}}%
+ {\printfield{issue}%
+ \setunit{\addspace}%
+ \usebibmacro{cmsyear}}%
+ \addcomma\addspace}%
+ {\setunit{\addspace}%
\printtext[parens]{% parens is the default here
\iffieldundef{issue}
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\setunit{\addspace}%
- \usebibmacro{cmsyear}}}}}
+ \usebibmacro{cmsyear}}}}}}
\newbibmacro*{letter+date}{% New for 0.9
\iflistundef{origlocation}%
@@ -3828,7 +3944,7 @@
or
test {\iffieldundef{xref}}%
or
- test {\iffieldundef{maintitle}}
+ test {\iffieldundef{maintitle}}%
or
((
test {\iffieldundef{year}}%
@@ -3867,14 +3983,14 @@
\newcommand*{\cms@datelong}{% Modified for 0.9
\iffieldundef{origmonth}%
{\printfield{origyear}}%
- {\printfield[letterday]{origday}\setunit{\nobreakspace}%
+ {\printfield[letterday]{origday}\setunit*{\nobreakspace}% Bug fix
\mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}%
\printfield{origyear}}}%
\newcommand*{\cms@datelongalt}{% Modified for 0.9
\iffieldundef{month}%
{\printfield{year}}%
- {\printfield[letterday]{day}\setunit{\nobreakspace}%
+ {\printfield[letterday]{day}\setunit*{\nobreakspace}%
\mkbibmonth{\thefield{month}}\setunit{\nobreakspace}%
\printfield{year}}}%
@@ -3884,14 +4000,14 @@
{}%
{\iffieldundef{month}%
{\printfield{year}}%
- {\printfield[letterday]{day}\setunit{\nobreakspace}%
+ {\printfield[letterday]{day}\setunit*{\nobreakspace}%
\mkbibmonth{\thefield{month}}\setunit{\nobreakspace}%
\printfield{year}}}}%
{\iffieldundef{origyear}%
{}%
{\iffieldundef{origmonth}%
{\printfield{origyear}}%
- {\printfield[letterday]{origday}\setunit{\nobreakspace}%
+ {\printfield[letterday]{origday}\setunit*{\nobreakspace}%
\mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}%
\printfield{origyear}}}}}%
@@ -4061,6 +4177,11 @@
\newcunit
\printfield{maintitleaddon}}}}
+\newbibmacro*{backref+check}{%
+ \ifbibliography%
+ {\backtrackerfalse}%
+ {}}
+
\newbibmacro*{cite:postnote}{%
\iftoggle{cms@loccit}%
{}%
@@ -4087,12 +4208,12 @@
\global\togglefalse{cms@shortnote}%
\global\togglefalse{cms@fullnote}}}
{\iffieldundef{shorthand}
- {\postnotedelim%
+ {\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
\global\togglefalse{cms@printshhand}%
\global\togglefalse{cms@shortnote}%
\global\togglefalse{cms@fullnote}}
- {\postnotedelim%
+ {\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
\usebibmacro{cms:shorthandintro}%
\global\togglefalse{cms@printshhand}%
@@ -4101,7 +4222,7 @@
{\iffieldundef{postnote}%
{\global\togglefalse{cms@shortnote}%
\global\togglefalse{cms@fullnote}}
- {\postnotedelim%
+ {\postnotewrapper%delim%
\usebibmacro{semel:postnote}%
\global\togglefalse{cms@shortnote}%
\global\togglefalse{cms@fullnote}}}}}%
@@ -4115,7 +4236,7 @@
\printfield{pages}}}%
{\postnotedelim%
\printfield{chapter}}}%
- {\postnotedelim% Don't need \ifbibliography test w/ following
+ {\postnotewrapper%delim% Don't need \ifbibliography test w/ following
\usebibmacro{semel:postnote}}}
\newbibmacro*{volfullpostnote}{%
@@ -4348,7 +4469,7 @@
\printfield{pages}}}%
{\postnotedelim%
\printfield{chapter}}}%
- {\postnotedelim%
+ {\postnotewrapper%delim%
\usebibmacro{semel:postnote}}}
\newbibmacro*{xrefprenote}{%
@@ -4357,9 +4478,16 @@
\iffieldundef{part}{}{\savefield{part}{\cbx@incollpart}}%
\iffieldundef{pagination}{}{\savefield{pagination}{\cbx@incollpgn}}%
\iffieldundef{bookpagination}{}{\savefield{bookpagination}%
- {\cbx@incollbkpgn}}}
+ {\cbx@incollbkpgn}}% The next line saves the child's backrefs
+ \iflistundef{pageref}{}{\savelist{pageref}{\cbx@incollpgref}}}
\newbibmacro*{xrefpostnote}{%
+ \ifcsdef{cbx@incollpgref}% Here we print and clear the child's
+ {\restorelist{pageref}{\cbx@incollpgref}% backrefs
+ \newunit%
+ \usebibmacro{pageref}%
+ \global\let\cbx@incollpgref\undefined}%
+ {}%
\togglefalse{cms@xrefvol}%
\togglefalse{cms@xrefpart}%
\global\togglefalse{cms@usedvol}%
@@ -4380,9 +4508,9 @@
{\bibsentence}% Needed for Ibid to be capitalized.
{\printfield{prenote}%
\ifboolexpr{%
- test {\ifciteseen}
+ test {\ifciteseen}%
or
- togl {cms@allshort}
+ togl {cms@allshort}%
}%
{\addspace}%
{\nopunct}}}% Do we need \unspace here?
@@ -4411,9 +4539,9 @@
{\printnames{labelname}\newcunit%
\usebibmacro{transstrg}}%
{\ifboolexpr{%
- not test {\ifnameundef{namec}}
+ not test {\ifnameundef{namec}}%
and
- togl {cms@usecompiler}
+ togl {cms@usecompiler}%
}%
{\printnames[labelname]{namec}\newcunit%
\usebibmacro{compilestrg}}%
@@ -4431,9 +4559,9 @@
{\ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}%
{\printnames{labelname}}%
{\ifboolexpr{%
- not test {\ifnameundef{namec}}
+ not test {\ifnameundef{namec}}%
and
- togl {cms@usecompiler}
+ togl {cms@usecompiler}%
}%
{\printnames[labelname]{namec}}%
{}}}}}}}%
@@ -4470,6 +4598,16 @@
\noinherit{indexsorttitle}
}
+\DeclareDataInheritance{book}{incollection}{%
+ \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}
@@ -4661,8 +4799,33 @@
{\bibstring{editor}}}}}%
\clearname{namea}}
+\newbibmacro*{clearorigin}{%
+ \toggletrue{cms@origcite}%
+ \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
+ {\ifnameundef{bookauthor}%
+ {\savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}%
+ {\ifnamesequal{author}{bookauthor}%
+ {\clearname{bookauthor}%
+ \savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}%
+ {\savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}}}%
+ {\clearname{author}}}%
+
\newbibmacro*{clearpublin}{%
- \clearname{author}%
+ \toggletrue{cms@origcite}%
+ \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}%
+ {\ifnameundef{bookauthor}%
+ {\savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}%
+ {\ifnamesequal{author}{bookauthor}%
+ {\clearname{bookauthor}%
+ \savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}%
+ {\savefield{fullhash}{\bbx@lasthash}%
+ \clearname{author}}}}%
+ {\clearname{author}}%
\clearname{namea}%
\clearname{nameb}%
\clearfield{nameaddon}%