diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-03 23:41:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-03 23:41:22 +0000 |
commit | 6d78dd05c8df1af50da359daef0e5b0206716fa5 (patch) | |
tree | 2ca1f3e17b7191b14d049f8c7627b0257d0e13d0 /Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx | |
parent | 2e0f0a6481179c2675b3f48041daf9dbffbc6ff5 (diff) |
biblatex-chicago
git-svn-id: svn://tug.org/texlive/trunk@32046 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx | 729 |
1 files changed, 434 insertions, 295 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx index c1db18e73e8..34c817312f4 100644 --- a/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-chicago/chicago-authordate-trad.cbx @@ -1,10 +1,10 @@ -% $Id: chicago-authordate-trad.cbx,v 0.8.1.32 2013/03/12 12:40:45 dfussner Exp $ +% $Id: chicago-authordate-trad.cbx,v 0.8.1.42 2013/10/29 14:03:58 dfussner Exp $ % This is a biblatex citation style file, adapted from Lehman's % authoryear-comp.cbx. It is heavily modified, with the intention of % providing inline citations (and a reference list) for the % author-date style of the Chicago Manual of Style, 16th edition. -\ProvidesFile{chicago-authordate-trad.cbx}[2013/03/12 v 2.5 biblatex +\ProvidesFile{chicago-authordate-trad.cbx}[2013/10/29 v 2.8 biblatex citation style] %%%% Biblatex initialization + Chicago options + Toggles %%%% @@ -23,6 +23,7 @@ citation style] \providetoggle{cms@los} %\providetoggle{cms@oneyear} \providetoggle{cms@avdate} +\providetoggle{cms@ordate} \providetoggle{cms@nodates} \providetoggle{cms@authorparens} @@ -33,6 +34,7 @@ citation style] \providetoggle{cms@isbn} \providetoggle{cms@numbermonth} \providetoggle{cms@bookpages} +\providetoggle{cms@hidevolumes}% Modify Volume fix \providetoggle{cms@jrcomma}% Comma after Jr./Sr. @@ -42,7 +44,10 @@ citation style] \providetoggle{cms@origpublished}% Keep \providetoggle{cms@annotation}% Keep \providetoggle{cms@postposit}% Keep -\providetoggle{cms@fullshhand} +\providetoggle{cms@fullshhand}% +\providetoggle{cms@vol}% +\providetoggle{cms@crossref}% +\providetoggle{cms@bookcrossref} \AtEveryCitekey{% \iffieldundef{userc}% @@ -57,18 +62,55 @@ citation style] {\csuse{cms@opt@avdate@#1}} {\blx@err@invopt{avdate=#1}{}}} \def\cms@opt@avdate@true{% - \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4 - {\DeclareLabelyear[music,review,video]{\field{eventyear}% - \field{origyear} \field{year} \field{urlyear}}}% + \@ifpackagelater{biblatex}{2012/11/20}% for biblatex 2.4/2.5 + {\@ifpackagelater{biblatex}{2013/03/30}% for biblatex 2.6 ff. + {\DeclareLabeldate[music,review,video]{\field{eventyear}% + \field{origyear} \field{year} \field{urlyear}}}% + {\DeclareLabelyear[music,review,video]{\field{eventyear}% + \field{origyear} \field{year} \field{urlyear}}}}% {\DeclareLabelyear[music,review,video]{eventyear,origyear,year,urlyear}}% \toggletrue{cms@avdate}}% \def\cms@opt@avdate@false{% \togglefalse{cms@avdate}} -\DeclareBibliographyOption{cmsdate}{% Trying to implement origyear as - \ifcsdef{cms@opt@cmsdate@#1}% labelyear. Sorting will be an issue. - {\csuse{cms@opt@cmsdate@#1}} +\DeclareBibliographyOption{cmsdate}[off]{% Trying to implement origyear as + \ifcsdef{cms@global@cmsdate@#1}% labelyear. Sorting will be an issue. + {\csuse{cms@global@cmsdate@#1}} {\blx@err@invopt{cmsdate=#1}{}}} +\def\cms@global@cmsdate@on{% + \toggletrue{cms@origlabel}% + \ExecuteBibliographyOptions{cmsorigdate=true}} +\def\cms@global@cmsdate@new{% + \toggletrue{cms@bothlabelnew}% + \ExecuteBibliographyOptions{cmsorigdate=true}} +\def\cms@global@cmsdate@old{% + \toggletrue{cms@bothlabelold}% + \ExecuteBibliographyOptions{cmsorigdate=true}} +\def\cms@global@cmsdate@both{% + \toggletrue{cms@bothlabelold}% + \ExecuteBibliographyOptions{cmsorigdate=true}} +\def\cms@global@cmsdate@full{}% +\def\cms@global@cmsdate@off{} + +\DeclareBibliographyOption{cmsorigdate}[true]{% ??? Also need new macros + \ifcsdef{cms@opt@origdate@#1}% for printing dates. Worth it ??? + {\csuse{cms@opt@origdate@#1}}% + {\blx@err@invopt{cmsorigdate=#1}{}}} +\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}}}% + {\DeclareLabelyear{\field{origyear} \field{year}% + \field{eventyear} \field{urlyear}}% + \DeclareLabelyear[patent]{\field{year} \field{eventyear}% + \field{origyear} \field{urlyear}}}}% + {\DeclareLabelyear{origyear,year,eventyear,urlyear}% + \DeclareLabelyear[patent]{year,eventyear,origyear,urlyear}}% + \global\toggletrue{cms@ordate}}% +\def\cms@opt@origdate@false{\togglefalse{cms@ordate}}% \DeclareEntryOption{cmsdate}[off]{% Trying to implement origyear as \ifcsdef{cms@opt@cmsdate@#1}% labelyear. Sorting will be an issue. @@ -126,6 +168,45 @@ citation style] \DeclareBibliographyOption{headline}[true]{% \renewcommand{\MakeSentenceCase}{\@ifstar\relax\relax}} +\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@crossref}% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@lxref@true{% + \toggletrue{cms@crossref}}% +\def\cms@opt@lxref@false{% + \togglefalse{cms@crossref}}% +\def\cms@opt@lxref@notes{% + \togglefalse{cms@crossref}}% +\def\cms@opt@lxref@bib{% + \toggletrue{cms@crossref}}% + +\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@bookcrossref}}% +\def\cms@opt@bklxref@false{% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@bklxref@notes{% + \togglefalse{cms@bookcrossref}}% +\def\cms@opt@bklxref@bib{% + \toggletrue{cms@bookcrossref}}% + +\DeclareEntryOption{booklongxref}[true]{% + \ifcsdef{cms@opt@bklxref@#1}% + {\csuse{cms@opt@bklxref@#1}} + {\blx@err@invopt{booklongxref=#1}{}}}% + % The field-exclusion options % \DeclareBibliographyOption{isbn}[true]{% @@ -155,6 +236,8 @@ citation style] \settoggle{cms@eprint}{#1}% \settoggle{cms@numbermonth}{#1}% \settoggle{cms@bookpages}{#1}} +\DeclareBibliographyOption{hidevolumes}[true]{% + \settoggle{cms@hidevolumes}{#1}} \DeclareEntryOption{isbn}[true]{% \settoggle{cms@isbn}{#1}} @@ -176,8 +259,71 @@ citation style] \settoggle{cms@numbermonth}{#1}} \DeclareEntryOption{bookpages}[true]{% \settoggle{cms@bookpages}{#1}} +\DeclareEntryOption{hidevolumes}[true]{% + \settoggle{cms@hidevolumes}{#1}} + +\ExecuteBibliographyOptions{includeall,hidevolumes,booklongxref}% + +\@ifpackagelater{biblatex}{2013/03/30}% For biblatex 2.6 ff. +{\ExecuteBibliographyOptions{labeldate=true}}% +{\ExecuteBibliographyOptions{labelyear=true}}% + +\DeclareDataInheritance{collection}{suppcollection}{% + \inherit{title}{title} + \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} +} -\ExecuteBibliographyOptions{includeall}% +\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}} % More authordate options % @@ -203,7 +349,9 @@ citation style] } \sort{ \field{sortyear} + \field{labelyear} \field{year} + \field{origyear} } \sort{ \field{sorttitle} @@ -298,8 +446,9 @@ citation style] {\iffieldequalstr{entrysubtype}{classical}% Similar to notes+bib {\iffieldundef{shorthand}% {\ifthenelse{\ifnameundef{labelname}\OR - \iffieldequalstr{entrytype}{inreference}\OR - \iffieldequalstr{entrytype}{reference}}% Simplified for CMS + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% Simplified for CMS {\usebibmacro{cite:label}% \setunit{\addspace}% \usebibmacro{cite:reinit}} @@ -311,7 +460,7 @@ citation style] {\iffieldequals{namehash}{\cbx@lastyear}% {}% {\usebibmacro{cmsbracketname}% For names in [] - \iffieldequalstr{entrytype}{customc}% + \ifentrytype{customc}% {\newcunit}% {\setunit{\addspace}}}% \usebibmacro{cite:label}% @@ -321,8 +470,9 @@ citation style] {\usebibmacro{cite:shorthand+title}}} {\iffieldundef{shorthand}% {\ifthenelse{\ifnameundef{labelname}\OR - \iffieldequalstr{entrytype}{inreference}\OR - \iffieldequalstr{entrytype}{reference}}% Simplified for CMS + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% Simplified for CMS {\usebibmacro{cite:label}% \setunit{\addspace}% \usebibmacro{cmscitesortdate}% @@ -405,8 +555,9 @@ citation style] {\usebibmacro{cmscitesortdate}}}% {\iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR - \iffieldequalstr{entrytype}{inreference}\OR - \iffieldequalstr{entrytype}{reference}}% + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% {\iffieldequalstr{entrysubtype}{classical}% {\setunit{% \global\booltrue{cbx:parens}% @@ -444,12 +595,13 @@ citation style] \iffieldequalstr{entrysubtype}{classical}% {\usebibmacro{cite:label}} {\usebibmacro{cmscitesortdate}}% - \savefield{namehash}{\cbx@lasthash}}}% + \savefield{namehash}{\cbx@lasthash}}% + \stepcounter{textcitecount}}% Added ??? \setunit{% \ifbool{cbx:parens}% {\bibcloseparen\global\boolfalse{cbx:parens}}% {}% - \multicitedelim}} + \textcitedelim}}% Not \multicitedelim ??? \newbibmacro*{textcite:citeshort}{% \iffieldequals{namehash}{\cbx@lasthash} @@ -472,8 +624,9 @@ citation style] \printtext[bibhyperref]{% \printfield{shorthand}}}}% {\ifthenelse{\ifnameundef{labelname}\OR - \iffieldequalstr{entrytype}{inreference}\OR - \iffieldequalstr{entrytype}{reference}}% + \ifentrytype{inreference}\OR + \ifentrytype{reference}\OR + \ifentrytype{mvreference}}% {\iffieldundef{shorthand} {\iffieldequalstr{entrysubtype}{classical}% {\setunit{% @@ -506,12 +659,13 @@ citation style] {\usebibmacro{cmscitesortdate}}}% {\printtext[bibhyperref]{% \printfield{shorthand}}}% - \savefield{namehash}{\cbx@lasthash}}}% + \savefield{namehash}{\cbx@lasthash}}% + \stepcounter{textcitecount}}% Added ??? \setunit{% \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} + {\bibcloseparen\global\boolfalse{cbx:parens}}% {}% - \multicitedelim}} + \textcitedelim}}% Not \multicitedelim ??? \newbibmacro*{textcite:postnote}{% \iffieldundef{postnote}% @@ -523,13 +677,13 @@ citation style] {\setunit{}% \printtext{% \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} + {\bibcloseparen\global\boolfalse{cbx:parens}}% {}}}% {\setunit{% \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} + {\bibcloseparen\global\boolfalse{cbx:parens}}% {}% - \multicitedelim}}} + \textcitedelim}}}% Not \multicitedelim ??? \newbibmacro*{cite:shorthand}{% \iftoggle{cms@los}% @@ -562,35 +716,40 @@ citation style] \newbibmacro*{cite:label}{% Test this \iffieldundef{label}% {\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT% - \iffieldequalstr{entrytype}{periodical}}% Simplifies .bib creation + \ifentrytype{periodical}}% Simplifies .bib creation {\printtext[bibhyperref]{\printfield[journaltitle]{journaltitle}}}% - {\iffieldequalstr{entrytype}{manual}% + {\ifentrytype{manual}% {\printtext[bibhyperref]{\printlist{organization}}}% {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}}}% {\printtext[bibhyperref]{\printfield{label}}}} \newbibmacro*{cite:labelyear+extrayear}{% \ifboolexpr{ ( - test {\iffieldequalstr{entrytype}{music}}% + test {\ifentrytype{music}}% or - test {\iffieldequalstr{entrytype}{review}}% + test {\ifentrytype{review}}% or - test {\iffieldequalstr{entrytype}{video}}% + test {\ifentrytype{video}}% ) and - togl {cms@avdate} + togl {cms@avdate}% }% {\usebibmacro{cite:av+labelyear+extrayear}}% - {\usebibmacro{cite:standard+labelyear+extrayear}}} + {\iftoggle{cms@ordate}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\usebibmacro{cite:standard+labelyear+extrayear}}}} \newbibmacro*{cite:standard+labelyear+extrayear}{% - \iffieldundef{labelyear} + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% {\ifboolexpr{ - test {\iffieldequalstr{entrytype}{misc}} + test {\ifentrytype{misc}} + or + test {\ifentrytype{inreference}} or - test {\iffieldequalstr{entrytype}{inreference}} + test {\ifentrytype{reference}} or - test {\iffieldequalstr{entrytype}{reference}} + test {\ifentrytype{mvreference}} or not togl {cms@nodates} }% @@ -641,14 +800,78 @@ citation style] {\mbox{\bibdatedash}}% {}}}}}} +\newbibmacro*{cite:origfirst+labelyear+extrayear}{% + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% + {\ifboolexpr{ + test {\ifentrytype{misc}} + or + test {\ifentrytype{inreference}} + or + test {\ifentrytype{reference}} + or + test {\ifentrytype{mvreference}} + or + not togl {cms@nodates} + }% + {}% + {\printtext[bibhyperref]{\bibstring{nodate}}}}% For CMS? + {\printtext[bibhyperref]{% + \iffieldundef{origyear}% + {\iffieldundef{year} + {\iffieldundef{eventyear}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{urlendyear}% + {}% + {\iffieldequalstr{urlendyear}{}% + {\mbox{\bibdatedash}}% + {}}}% + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{eventendyear}% + {}% + {\iffieldequalstr{eventendyear}{}% + {\mbox{\bibdatedash}}% + {}}}} + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{endyear}% + {}% + {\iffieldequalstr{endyear}{}% + {\mbox{\bibdatedash}}% + {}}}} + {\printfield{labelyear}% + \iffieldundef{extrayear}% + {}% + {\setunit*{}% + \printfield{extrayear}}% + \iffieldundef{origendyear}% DATE FIX + {}% + {\iffieldequalstr{origendyear}{}% + {\mbox{\bibdatedash}}% + {}}}}}} + \newbibmacro*{cite:av+labelyear+extrayear}{% - \iffieldundef{labelyear} + \ifthenelse{\iffieldundef{labelyear}\OR% + \iffieldequalstr{labelyear}{nodate}}% {\ifboolexpr{ - test {\iffieldequalstr{entrytype}{misc}} + test {\ifentrytype{misc}} + or + test {\ifentrytype{inreference}} or - test {\iffieldequalstr{entrytype}{inreference}} + test {\ifentrytype{reference}} or - test {\iffieldequalstr{entrytype}{reference}} + test {\ifentrytype{mvreference}} or not togl {cms@nodates} }% @@ -737,28 +960,67 @@ citation style] {}} \newbibmacro*{cite:origyear+labelyear}{% - \iftoggle{cms@switchdates}% - {\usebibmacro{cite:labelyear+extrayear}} - {\iffieldundef{origyear}% - {\clearfield{extrayear}\usebibmacro{cite:labelyear+extrayear}}% - {\printtext[bibhyperref]{% - \usebibmacro{origyear+endyear}}}}} + \ifboolexpr{ ( + test {\ifentrytype{music}}% + or + test {\ifentrytype{review}}% + or + test {\ifentrytype{video}}% + ) + and + togl {cms@avdate}% + } + {\usebibmacro{cite:av+labelyear+extrayear}}% + {\iftoggle{cms@switchdates}% + {\usebibmacro{cite:labelyear+extrayear}} + {\iffieldundef{origyear}% + {\iftoggle{cms@ordate}% ??? + {}% + {\clearfield{extrayear}}% + \usebibmacro{cite:standard+labelyear+extrayear}}% + {\iftoggle{cms@ordate}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\printtext[bibhyperref]{% + \usebibmacro{origyear+endyear}}}}}}} \newbibmacro*{cite:bothyear+oldstyle}{% - \iftoggle{cms@switchdates}% - {\printtext[bibhyperref]{% - \bibopenparen% - \usebibmacro{cite:labelyear+extrayear}% - \bibcloseparen% - \addspace\usebibmacro{origyear+endyear}}}% - {\iffieldundef{origyear}% - {\clearfield{extrayear}\usebibmacro{cite:labelyear+extrayear}}% + \ifboolexpr{ ( + test {\ifentrytype{music}}% + or + test {\ifentrytype{review}}% + or + test {\ifentrytype{video}}% + ) + and + togl {cms@avdate}% + } + {\usebibmacro{cite:av+labelyear+extrayear}}% + {\iftoggle{cms@switchdates}% {\printtext[bibhyperref]{% \bibopenparen% - \usebibmacro{origyear+endyear}% + \usebibmacro{cite:labelyear+extrayear}% \bibcloseparen% - \clearfield{extrayear}\addspace% - \usebibmacro{cite:labelyear+extrayear}}}}} + \addspace\usebibmacro{origyear+endyear}}}% + {\iffieldundef{origyear}% ??? + {\iftoggle{cms@ordate}% + {}% + {\clearfield{extrayear}}% + \usebibmacro{cite:standard+labelyear+extrayear}}% + {\iftoggle{cms@ordate}% Added test for year field ??? + {\iffieldundef{year}% + {\usebibmacro{cite:origfirst+labelyear+extrayear}}% + {\printtext[bibhyperref]{% + \bibopenparen% + \usebibmacro{cite:origfirst+labelyear+extrayear}% + \bibcloseparen% + \setunit{\addspace}%\addspace% ??? + \usebibmacro{year+endyear}}}}% + {\printtext[bibhyperref]{% + \bibopenparen% + \usebibmacro{origyear+endyear}% + \bibcloseparen% + \clearfield{extrayear}\addspace% + \usebibmacro{cite:standard+labelyear+extrayear}}}}}}} \newbibmacro*{cite:save}{% \savefield{entrykey}{\cbx@lastkey}} @@ -825,13 +1087,45 @@ citation style] {} {\usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} +%%% Textcite commands taken verbatim from authoryear-comp.cbx %%% + +\DeclareCiteCommand{\cbx@textcite} {\usebibmacro{cite:init}} {\usebibmacro{citeindex}% - \usebibmacro{textcite}} + \usebibmacro{textcite}} {} {\usebibmacro{textcite:postnote}} +\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite] + {\gdef\cbx@savedkeys{}% + \citetrackerfalse% + \pagetrackerfalse% + \DeferNextCitekeyHook% + \usebibmacro{cite:init}} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} + {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% + \global\clearfield{multipostnote}} + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash} + {} + {\stepcounter{textcitetotal}% + \savefield{namehash}{\cbx@lasthash}}} + {} + {\protected@xappto\cbx@savedcites{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} + +\newrobustcmd{\cbx@textcite@init}[2]{% + \setcounter{textcitetotal}{0}% + \setcounter{textcitecount}{0}% + \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} + +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{} + +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{} + \DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}% @@ -843,11 +1137,9 @@ citation style] \DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]% {\footcitetext}{\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} - \DeclareCiteCommand{\bibxrefcite} {\usebibmacro{cite:init}}%\usebibmacro{clearalmostall}} (?) - {\usebibmacro{cms-in:}% + {\usebibmacro{xref-in:}% \blx@ibidreset% For authordate style \usebibmacro{cite}} {} @@ -927,16 +1219,28 @@ citation style] %%%% Field Formats -- Title, Citetitle, Lostitle %%%% -\DeclareFieldFormat[article]{title}{% +\DeclareFieldFormat{title}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} + +\DeclareFieldFormat{citetitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} + +\DeclareFieldFormat{lostitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} + +\DeclareFieldFormat +[article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] +{title}{% \iffieldundef{title}% {}% {\MakeSentenceCase*{#1}}} -\DeclareFieldAlias[article]{citetitle}[article]{lostitle} +\DeclareFieldFormat +[article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] +{citetitle}{\MakeSentenceCase*{#1}} -\DeclareFieldFormat[article]{lostitle}{\MakeSentenceCase*{#1}} +\DeclareFieldFormat +[article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] +{lostitle}{\MakeSentenceCase*{#1}} -\DeclareFieldFormat[artwork]{title}{% +\DeclareFieldFormat[artwork,image]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} @@ -945,54 +1249,15 @@ citation style] \DeclareFieldAlias[artwork]{lostitle}[artwork]{title} -\DeclareFieldFormat[book]{title}{% - \mkbibemph{\MakeSentenceCase*{#1}}\isdot} - -\DeclareFieldAlias[book]{citetitle}[book]{title} - -\DeclareFieldAlias[book]{lostitle}[book]{title} - -\DeclareFieldAlias[bookinbook]{title}[book]{title} - -\DeclareFieldAlias[bookinbook]{citetitle}[book]{title} - -\DeclareFieldAlias[bookinbook]{lostitle}[book]{title} - -\DeclareFieldAlias[collection]{title}[book]{title} - -\DeclareFieldAlias[collection]{citetitle}[book]{title} - -\DeclareFieldAlias[collection]{lostitle}[book]{lostitle} - \DeclareFieldFormat[periodical]{title}{\mkbibemph{#1}\isdot} \DeclareFieldFormat[periodical]{citetitle}{\mkbibemph{#1}\isdot} \DeclareFieldFormat[periodical]{lostitle}{\mkbibemph{#1}\isdot} -\DeclareFieldAlias[image]{title}[artwork]{title} - \DeclareFieldAlias[image]{citetitle}[artwork]{title} -\DeclareFieldAlias[image]{lostitle}[artwork]{lostitle} - -\DeclareFieldAlias[incollection]{title}[article]{title}% Change article? - -\DeclareFieldAlias[incollection]{citetitle}[article]{title} - -\DeclareFieldAlias[incollection]{lostitle}[article]{lostitle} - -\DeclareFieldAlias[inreference]{title}[book]{title} - -\DeclareFieldAlias[inreference]{citetitle}[book]{title} - -\DeclareFieldAlias[inreference]{lostitle}[book]{lostitle} - -\DeclareFieldAlias[reference]{title}[book]{title} - -\DeclareFieldAlias[reference]{citetitle}[book]{title} - -\DeclareFieldAlias[reference]{lostitle}[book]{lostitle} +\DeclareFieldAlias[image]{lostitle}[artwork]{title} \DeclareFieldFormat[letter]{title}{#1\isdot} @@ -1000,29 +1265,7 @@ citation style] \DeclareFieldFormat[letter]{lostitle}{#1\isdot} -\DeclareFieldAlias[inproceedings]{title}[article]{title}% As above - -\DeclareFieldAlias[inproceedings]{citetitle}[article]{title} - -\DeclareFieldAlias[inproceedings]{lostitle}[article]{lostitle} - -\DeclareFieldAlias[thesis]{title}[article]{title} - -\DeclareFieldAlias[thesis]{citetitle}[article]{title} - -\DeclareFieldAlias[thesis]{lostitle}[article]{lostitle} - -\DeclareFieldAlias[patent]{title}[article]{lostitle}% 16th ed. - -\DeclareFieldAlias[patent]{citetitle}[article]{title} - -\DeclareFieldAlias[patent]{lostitle}[article]{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? @@ -1048,18 +1291,12 @@ citation style] {\bibstring{ed#1}} {\ifcapital{\MakeCapital{#1}}{#1}}}} -\DeclareFieldAlias[inbook]{title}[article]{title} - -\DeclareFieldAlias[inbook]{citetitle}[article]{title} - -\DeclareFieldAlias[inbook]{lostitle}[article]{lostitle} - -\DeclareFieldFormat[suppbook]{title}{% +\DeclareFieldFormat[suppbook,suppcollection]{title}{% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldAlias[suppbook]{citetitle}[suppbook]{lostitle} -\DeclareFieldFormat[suppbook]{lostitle}{% +\DeclareFieldFormat[suppbook,suppcollection]{lostitle}{% \usebibmacro{inforaft}% \addspace% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} @@ -1080,30 +1317,8 @@ citation style] #1}% {\printfield{nameaddon}\addspace #1}}} -\DeclareFieldAlias[suppcollection]{title}[suppbook]{title} - \DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{lostitle} -\DeclareFieldAlias[suppcollection]{lostitle}[suppbook]{lostitle} - -\DeclareFieldAlias[booklet]{title}[book]{title} - -\DeclareFieldAlias[booklet]{citetitle}[book]{citetitle} - -\DeclareFieldAlias[booklet]{lostitle}[book]{lostitle} - -\DeclareFieldAlias[manual]{title}[book]{title} - -\DeclareFieldAlias[manual]{citetitle}[book]{citetitle} - -\DeclareFieldAlias[manual]{lostitle}[book]{lostitle} - -\DeclareFieldAlias[report]{title}[book]{title} - -\DeclareFieldAlias[report]{citetitle}[book]{citetitle} - -\DeclareFieldAlias[report]{lostitle}[book]{lostitle} - \DeclareFieldFormat[misc]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% @@ -1113,7 +1328,7 @@ citation style] \DeclareFieldAlias[misc]{lostitle}[misc]{title} -\DeclareFieldFormat[review]{title}{% +\DeclareFieldFormat[review,suppperiodical]{title}{% \ifcapital{\MakeCapital{#1\isdot}}% {#1\isdot}} @@ -1121,23 +1336,15 @@ citation style] \DeclareFieldAlias[review]{citetitle}[review]{title} -\DeclareFieldAlias[suppperiodical]{title}[review]{title} - \DeclareFieldAlias[suppperiodical]{citetitle}[review]{title} \DeclareFieldAlias[suppperiodical]{lostitle}[review]{title} -\DeclareFieldAlias[online]{title}[article]{title} - -\DeclareFieldAlias[online]{citetitle}[article]{title} - -\DeclareFieldAlias[online]{lostitle}[article]{lostitle} - \DeclareFieldFormat{booktitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{maintitle}{\mkbibemph{\MakeSentenceCase*{#1}}} -\DeclareFieldFormat[video]{title}{% +\DeclareFieldFormat[audio,music,video]{title}{% \iffieldundef{booktitle}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} @@ -1146,14 +1353,10 @@ citation style] \DeclareFieldAlias[video]{lostitle}[video]{title} -\DeclareFieldAlias[music]{title}[video]{title} - \DeclareFieldAlias[music]{citetitle}[video]{title} \DeclareFieldAlias[music]{lostitle}[video]{title} -\DeclareFieldAlias[audio]{title}[video]{title} - \DeclareFieldAlias[audio]{citetitle}[video]{title} \DeclareFieldAlias[audio]{lostitle}[video]{title} @@ -1167,36 +1370,20 @@ citation style] \DeclareFieldFormat{note}{% \ifcapital{\MakeCapital{#1}}{#1}}% -\DeclareFieldFormat[suppbook]{type}{% +\DeclareFieldFormat +[audio,manual,music,patent,report,suppbook,suppcollection,video] +{type}{% \ifbibstring{#1}% {\bibstring{#1}}% {\ifcapital% {\MakeCapital{#1}}% {#1}}} -\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}{% @@ -1205,6 +1392,26 @@ citation style] {\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}% + \OR\NOT\iffieldundef{urlmonth}\OR\NOT\iffieldundef{eventmonth}% + \OR\NOT\iffieldundef{origmonth}}% + {#1}% + {\printfield{userd}\addspace #1}} + +\DeclareFieldFormat[video]{date}{% Generalize userd ??? + \ifthenelse{\iffieldundef{userd}\OR\NOT\iffieldundef{urlyear}% + \OR\NOT\iffieldundef{eventyear}\OR\NOT\iffieldundef{urlmonth}% + \OR\NOT\iffieldundef{eventmonth}}% + {#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}% @@ -1251,7 +1458,7 @@ citation style] \DeclareFieldFormat{edition}{% New in 0.8 \ifinteger{#1} - {\mkbibordinal{#1}~\bibstring{edition}}% + {\mkbibordedition{#1}~\bibstring{edition}}% {\ifcapital {\MakeCapital{#1\isdot}}% {#1\isdot}}} @@ -1269,7 +1476,7 @@ citation style] \DeclareFieldFormat{jourser}{% \ifinteger{#1}% - {\mkbibordinal{#1}% + {\mkbibordseries{#1}% \addnbspace% \bibstring{jourser}}% {\ifbibstring{#1}{\bibstring{#1}}{#1}}} @@ -1296,7 +1503,10 @@ citation style] \DeclareFieldFormat{annotation}{\par\nobreak \vskip \bibitemsep #1} -\DeclareFieldFormat{part}{\addcomma\bibstring{partvolume}~#1} +\DeclareFieldFormat{part}{% + \ifnumerals{#1}% + {\addcomma\addspace\bibstring{partvolume}~#1}% + {\addcomma\addspace\ifcapital{\MakeCapital{#1}}{#1}}} \DeclareFieldAlias[review]{volume}[article]{volume} @@ -1311,6 +1521,9 @@ citation style] \renewcommand*{\multicitedelim}{\addsemicolon\space} +\renewcommand*{\iffinalcitedelim}{% + \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} + \renewcommand*{\nameyeardelim}{% \iffieldundef{origyear}% Is this test correct? {\iffieldundef{year}% @@ -1326,10 +1539,12 @@ citation style] \newcommand{\classicpunct}{% \ifthenelse{\iffieldequalstr{entrysubtype}{classical}\OR% - \iffieldequalstr{entrytype}{letter}}% + \ifentrytype{letter}}% {\setunit*{\addspace}}% {\setunit*{\addcomma\addspace}}} +\newcommand{\postvolpunct}{\addcolon}% + \newcommand{\parttrans}{% {\bibstring{bytranslator}\space}}% @@ -1375,7 +1590,10 @@ citation style] \renewcommand*{\postnotedelim}{% \iftoggle{cms@inlineibid}% - {\togglefalse{cms@inlineibid}}% + {\togglefalse{cms@inlineibid}% + \iffieldundef{prenote}% Bug fix + {}% + {\addspace}}% {\iffieldequalstr{entrysubtype}{classical}% For Notes+Bib, too? {\NumCheckSetup{\DeclareNumChars*{abcdeABCDE}}% \iffieldpages{postnote}% @@ -1480,7 +1698,7 @@ citation style] \iffieldundef{maintitle}\AND\iffieldundef{issuetitle}\)% \OR\iffieldsequal{booktitle}{title}% Changed these for crossrefed \OR\iffieldsequal{maintitle}{title}}% entries. Create problems? - {\iffieldequalstr{entrytype}{video}% + {\ifentrytype{video}% {\newcunit\newblock}% {\newunit\newblock}}% {\newcunit\newblock}} @@ -1769,11 +1987,10 @@ citation style] {\bibstring{in}% \setunit{\addspace}}} -\newbibmacro*{alt-in:}{% - \iffieldundef{booktitle}% - {} - {\bibstring{in}% - \setunit{\addspace}}} +\newbibmacro*{xref-in:}{% + \iffieldundef{volume}{}{\savefield{volume}{\cbx@incollvol}}% + \iffieldundef{part}{}{\savefield{part}{\cbx@incollpart}}% + \usebibmacro{cms-in:}} \newbibmacro*{chapincoll}{% \iffieldundef{chapter}% @@ -1782,7 +1999,7 @@ citation style] \newbibmacro*{chapinscore}{% \iffieldundef{chapter}% - {\ifthenelse{\iffieldequalstr{entrytype}{music}% + {\ifthenelse{\ifentrytype{music}% \AND\NOT\iffieldundef{booktitle}}% {\bibstring{on}\setunit{\addspace}}% {}}% @@ -1860,9 +2077,9 @@ citation style] \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{% @@ -1870,16 +2087,6 @@ citation style] \setunit{\addcolon\addspace}% \printfield[issuetitle]{issuesubtitle}}}} -\newbibmacro*{btitle+bstitle}{% - \iffieldundef{booktitle} - {} - {\printtext{% - \printfield{booktitle}% - \setunit{\addcolon\addspace}% - \printfield[booktitle]{booksubtitle}}% - \newcunit - \printfield{booktitleaddon}}} - \newbibmacro*{publ+loc+year}{% \printlist{location}% \iflistundef{publisher}% @@ -2041,32 +2248,6 @@ citation style] \mkbibmonth{\thefield{origmonth}}\setunit{\nobreakspace}% \printfield{origyear}}}}}% -\newbibmacro*{cjournal+ser+vol+num}{% - \usebibmacro{journal+sub}% - \setunit*{\addspace}% - \printlist[periodplace]{location}% - \setunit*{\addspace}% - \iffieldundef{series} - {} - {\newcunit - \printfield[jourser]{series}% - \newcunit}%\setunit*{\addspace}? - \ifthenelse{\iffieldundef{year}\AND\iffieldundef{month}}% - {\iffieldundef{volume}% - {\newcunit% - \printfield[journum]{number}% - \clearfield{number}% - \setunit{\addcomma\addspace}} - {\printfield[jourvol]{volume}% - \setunit{\addcomma\addspace}}}% - {\printfield[jourvol]{volume}% - \newcunit% - \printfield[journum]{number}% - \clearfield{number}% - \setunit{\addcomma\addspace}}% need * here? - \printfield{eid}% - \newunit} - \newbibmacro*{cperiodical+ser+vol+num}{% For periodical entries, \printtext{% article subtype \printfield{title}% @@ -2153,52 +2334,6 @@ citation style] \newcunit\newblock \usebibmacro{date+issue}} -\newbibmacro*{cmtitle+mstitle+vol+part+title+stitle}{% - \iffieldundef{maintitle} - {} - {\iffieldundef{volume} - {\printtext{% - \printfield{maintitle}% - \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} - {\printfield{volume}% - \printfield{part}% - \setunit{\addspace} - \bibstring{ofseries}% - \setunit{\addspace} - \printtext{% - \printfield{maintitle}% - \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}}} - -\newbibmacro*{cmtitle+mstitle+vol+part+btitle+bstitle}{% - \usebibmacro{btitle+bstitle}% - \newcunit - \iffieldundef{maintitle} - {} - {\iffieldundef{volume} - {\printtext{% - \printfield{maintitle}% - \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}} - {\printfield{volume}% - \printfield{part}% - \setunit{\addspace} - \bibstring{ofseries}% - \setunit{\addspace} - \printtext{% - \printfield{maintitle}% - \setunit{\addcolon\addspace}% - \printfield[maintitle]{mainsubtitle}}% - \newcunit - \printfield{maintitleaddon}}}} - \renewbibmacro*{postnote}{% \iffieldundef{postnote}% {}% @@ -2318,9 +2453,13 @@ citation style] \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}% |