summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx144
1 files changed, 101 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx
index c0b4b338168..d9a9eca34e2 100644
--- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-dates-common.cbx
@@ -1,4 +1,5 @@
-% $Id: chicago-dates-common.cbx,v 0.9.1.21 2016/06/07 09:00:02 dfussner Exp $
+% $Id: chicago-dates-common.cbx,v 0.9.1.31 2017/03/25 14:35:52 dfussner Exp $
+
% This is a biblatex citation style file, adapted from Lehman's
% authoryear-comp.cbx. It is heavily modified, and contains the
% common code for providing inline citations (and a reference list)
@@ -29,6 +30,7 @@ citation style]
\providetoggle{cms@authorparens}
\providetoggle{cms@datedash}
\providetoggle{cms@modpostnote}
+\providetoggle{cms@ukord}
\providetoggle{cms@url}% These are for the field-exclusion options
\providetoggle{cms@doi}
@@ -78,8 +80,8 @@ citation style]
\def\cms@opt@avdate@true{%
\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5
{\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff.
- {\DeclareLabeldate[music,review,suppperiodical,video]{\field{eventyear}%
- \field{origyear} \field{year} \field{urlyear}}}%
+ {\DeclareLabeldate[music,review,suppperiodical,video]{\field{eventdate}%
+ \field{origdate} \field{date} \field{urldate}}}%
{\DeclareLabelyear[music,review,suppperiodical,video]{\field{eventyear}%
\field{origyear} \field{year} \field{urlyear}}}}%
{\DeclareLabelyear[music,review,suppperiodical,video]%
@@ -114,10 +116,10 @@ citation style]
\def\cms@opt@origdate@true{%
\@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5
{\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff.
- {\DeclareLabeldate{\field{origyear} \field{year}%
- \field{eventyear} \field{urlyear}}%
- \DeclareLabeldate[patent]{\field{year} \field{eventyear}%
- \field{origyear} \field{urlyear}}}%
+ {\DeclareLabeldate{\field{origdate} \field{date}%
+ \field{eventdate} \field{urldate}}%
+ \DeclareLabeldate[patent]{\field{date} \field{eventdate}%
+ \field{origdate} \field{urldate}}}%
{\DeclareLabelyear{\field{origyear} \field{year}%
\field{eventyear} \field{urlyear}}%
\DeclareLabelyear[patent]{\field{year} \field{eventyear}%
@@ -286,6 +288,9 @@ citation style]
\DeclareEntryOption[boolean]{related}[true]{%
\settoggle{cms@related}{#1}}%
+\DeclareBibliographyOption[boolean]{ordinalgb}[true]{%
+ \settoggle{cms@ukord}{#1}}%
+
% Controlling punctuation before titleaddon fields %
\DeclareBibliographyOption[string]{ptitleaddon}[period]{%
@@ -406,13 +411,17 @@ citation style]
\ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref,related,%
ctitleaddon,ptitleaddon,journalabbrev=notes}%
-\@ifpackagelater{biblatex}{2013/03/30}% For biblatex 2.6 ff.
-{\ExecuteBibliographyOptions{labeldate=true}}%
-{\ExecuteBibliographyOptions{labelyear=true}}%
+\@ifpackagelater{biblatex}{2016/09/01}% For biblatex 2.6 ff.
+{\ExecuteBibliographyOptions{labeldateparts=true}}%
+{\@ifpackagelater{biblatex}{2013/03/30}
+ {\ExecuteBibliographyOptions{labeldate=true}}
+ {\ExecuteBibliographyOptions{labelyear=true}}}%
-\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff.
-{\global\toggletrue{cms@datedash}}%
-{\global\togglefalse{cms@datedash}}%
+\@ifpackagelater{biblatex}{2016/09/01}% For biblatex 3.5 ff.
+{\global\togglefalse{cms@datedash}}
+{\@ifpackagelater{biblatex}{2014/02/20}% For biblatex 2.9 ff.
+ {\global\toggletrue{cms@datedash}}%
+ {\global\togglefalse{cms@datedash}}}%
\DeclareDataInheritance{collection}{suppcollection}{%
\inherit{title}{title}
@@ -491,7 +500,7 @@ citation style]
% More authordate options %
-\DeclareSortingScheme{cms}{
+\DeclareSortingScheme{cms}{% Updated to >2.0 format
\sort{
\field{presort}
}
@@ -499,16 +508,16 @@ citation style]
\field{sortkey}
}
\sort{
- \name{sortname}
- \name{author}
- \name{namea}
- \name{editor}
- \name{nameb}
- \name{translator}
- \name{namec}
+ \field{sortname}
+ \field{author}
+ \field{namea}
+ \field{editor}
+ \field{nameb}
+ \field{translator}
+ \field{namec}
\field{sorttitle}
\field{journaltitle}
- \list{organization}
+ \field{organization}
\field{title}
}
\sort{
@@ -739,7 +748,7 @@ citation style]
togl {cms@gencite}%
and
(
- test {\iflastcitekey}%
+ test {\iffinalcitedelim}%
or
togl {cms@genallnames}%
)
@@ -758,7 +767,7 @@ citation style]
togl {cms@gencite}%
and
(
- test {\iflastcitekey}%
+ test {\iffinalcitedelim}%
or
togl {cms@genallnames}%
)
@@ -780,7 +789,7 @@ citation style]
togl {cms@gencite}%
and
(
- test {\iflastcitekey}%
+ test {\iffinalcitedelim}%
or
togl {cms@genallnames}%
)
@@ -843,7 +852,11 @@ citation style]
\ifboolexpr{%
togl {cms@gencite}%
and
- test {\iflastcitekey}%
+ (
+ test {\iffinalcitedelim}%
+ or
+ togl {cms@genallnames}%
+ )
}%
{\thegen}%
{}%
@@ -860,7 +873,11 @@ citation style]
\ifboolexpr{%
togl {cms@gencite}%
and
- test {\iflastcitekey}%
+ (
+ test {\iffinalcitedelim}%
+ or
+ togl {cms@genallnames}%
+ )
}%
{\thegen}%
{}%
@@ -1007,7 +1024,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}%
+ {\usebibmacro{cms@test@labelend}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1021,7 +1038,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1035,7 +1052,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1049,7 +1066,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}}}%
\newbibmacro*{cite:origfirst+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
@@ -1084,7 +1101,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}%
+ {\usebibmacro{cms@test@labelend}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1098,7 +1115,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1112,7 +1129,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1126,7 +1143,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}}}%
\newbibmacro*{cite:av+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
@@ -1161,7 +1178,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}%
+ {\usebibmacro{cms@test@labelend}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1175,7 +1192,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1189,7 +1206,7 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}%
{\printfield{labelyear}%
\iffieldundef{extrayear}%
{}%
@@ -1203,7 +1220,15 @@ citation style]
not togl {cms@datedash}%
}%
{\mbox{\bibdatedash}}%
- {}}}}}}%
+ {\usebibmacro{cms@test@labelend}}}}}}}%
+
+\newbibmacro*{cms@test@labelend}{% For printing year ranges in 3.5 ff.
+ \iffieldundef{labelendyear}%
+ {}%
+ {\ifthenelse{\iffieldequalstr{labelendyear}{}\OR%
+ \iffieldsequal{labelyear}{labelendyear}}%
+ {}%
+ {\bibdatedash\printfield{labelendyear}}}}%
\newbibmacro*{cmscitesortdate}{% Attempt to solve date-related problems
\ifboolexpr{%
@@ -1887,10 +1912,43 @@ citation style]
\newcommand{\parttrans}{%
{\bibstring{bytranslator}\space}}%
-\newcommand{\partedit}{%
- \iftoggle{cms@postposit}% Kludge to make it work in French.
- {\bibstring{byeditoralt}\addspace}%
- {\bibstring{byeditor}\addspace}}%
+% \newcommand{\partedit}{%
+% \iftoggle{cms@postposit}% Kludge to make it work in French.
+% {\bibstring{byeditoralt}\addspace}%
+% {\bibstring{byeditor}\addspace}}%
+
+\protected\def\partedit#1{%
+ \ifcat\noexpand~\noexpand#1%
+ \ifundef{\cms@tempb}{}{\appto{\cms@tempb}{#1}}%
+ \def\cms@tempa{\futurelet\cms@tempa\partedit}%
+ \else%
+ \ifx\addnbspace#1%
+ \ifundef{\cms@tempb}{}{\appto{\cms@tempb}{#1}}%
+ \def\cms@tempa{\futurelet\cms@tempa\partedit}%
+ \else%
+ \ifx\addspace#1%
+ \ifundef{\cms@tempb}{}{\appto{\cms@tempb}{#1}}%
+ \def\cms@tempa{\futurelet\cms@tempa\partedit}%
+ \else%
+ \if#1H%
+ \appto{\cms@tempb}{#1}%
+ \def\cms@tempa{\futurelet\cms@tempa\partedit}%
+ \else%
+ \if#1h%
+ \appto{\cms@tempb}{#1}%
+ \def\cms@tempa{\futurelet\cms@tempa\partedit}%
+ \else%
+ \def\cms@tempa{\part@edit@i\lbx@initnamehook{#1}%
+ \csuse{cms@tempb}#1\csundef{cms@tempb}}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \cms@tempa%
+}%
+
+\newcommand{\part@edit@i}{\bibstring{byeditor}\addspace}%
\newcommand{\partcomp}{%
{\bibstring{bycompiler}\space}}%