% $Id: chicago-authordate-trad.cbx,v 0.9.1.4 2018/01/11 09:55:09 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 (trad) style of the Chicago Manual of Style, 16th edition. \ProvidesFile{chicago-authordate-trad.cbx}[2018/01/11 v 3.10 biblatex citation style] \RequireCitationStyle{chicago-dates-common} %%%% Trad-only Option %%%% \DeclareBibliographyOption{headline}[true]{% \renewcommand{\MakeSentenceCase}{\@ifstar\relax\relax}} %%%% Field Formats -- Title, Citetitle, Lostitle %%%% \DeclareFieldFormat{title}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldFormat{citetitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldFormat{lostitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldFormat{subtitle}{\mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {title}{% \iffieldundef{title}% {}% {\MakeSentenceCase*{#1}}} \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {citetitle}{\MakeSentenceCase*{#1}} \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {lostitle}{\MakeSentenceCase*{#1}} \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,patent,thesis,unpublished] {subtitle}{% \iffieldundef{subtitle}% {}% {\MakeSentenceCase*{#1}}} \DeclareFieldFormat[artwork,image]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} \DeclareFieldFormat[artwork,image]{subtitle}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} \DeclareFieldAlias[artwork]{citetitle}[artwork]{title} \DeclareFieldAlias[artwork]{lostitle}[artwork]{title} \DeclareFieldFormat[periodical]{title}{\mkbibemph{#1}\isdot} \DeclareFieldFormat[periodical]{citetitle}{\mkbibemph{#1}\isdot} \DeclareFieldFormat[periodical]{lostitle}{\mkbibemph{#1}\isdot} \DeclareFieldFormat[periodical]{subtitle}{\mkbibemph{#1}\isdot} \DeclareFieldAlias[image]{citetitle}[artwork]{title} \DeclareFieldAlias[image]{lostitle}[artwork]{title} \DeclareFieldFormat[letter]{title}{#1\isdot} \DeclareFieldFormat[letter]{citetitle}{#1\isdot} \DeclareFieldFormat[letter]{lostitle}{#1\isdot} \DeclareFieldFormat[letter]{subtitle}{#1\isdot} \DeclareFieldFormat[suppbook,suppcollection]{title}{% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldAlias[suppbook]{citetitle}[suppbook]{lostitle} \DeclareFieldFormat[suppbook,suppcollection]{lostitle}{% \usebibmacro{inforaft}% \addspace% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldFormat[suppbook,suppcollection]{subtitle}{% \mkbibemph{\MakeSentenceCase*{#1}}\isdot} \DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{lostitle} \DeclareFieldFormat[misc]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}} \DeclareFieldAlias[misc]{citetitle}[misc]{title} \DeclareFieldAlias[misc]{lostitle}[misc]{title} \DeclareFieldFormat[misc]{subtitle}{% \iffieldundef{entrysubtype}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}} \DeclareFieldFormat[report]{title}{% \iffieldequalstr{entrysubtype}{unpublished}% {\MakeSentenceCase*{#1}}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}}% \DeclareFieldFormat[report]{citetitle}{% \iffieldequalstr{entrysubtype}{unpublished}% {\MakeSentenceCase*{#1}}% {\mkbibemph{\MakeSentenceCase{#1}}\isdot}} \DeclareFieldFormat[report]{lostitle}{% \iffieldequalstr{entrysubtype}{unpublished}% {\MakeSentenceCase*{#1}}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}} \DeclareFieldFormat[review,suppperiodical]{title}{% \ifcapital{\MakeCapital{#1\isdot}}% {#1\isdot}} \DeclareFieldAlias[review]{lostitle}[review]{title} \DeclareFieldAlias[review]{citetitle}[review]{title} \DeclareFieldAlias[suppperiodical]{citetitle}[review]{title} \DeclareFieldAlias[suppperiodical]{lostitle}[review]{title} \DeclareFieldFormat[review,suppperiodical]{subtitle}{% \ifcapital{\MakeCapital{#1\isdot}}% {#1\isdot}} \DeclareFieldFormat{booktitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{maintitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{booksubtitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{mainsubtitle}{\mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat[audio,music,video]{title}{% \iffieldundef{booktitle}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} \DeclareFieldAlias[video]{citetitle}[video]{title} \DeclareFieldAlias[video]{lostitle}[video]{title} \DeclareFieldAlias[music]{citetitle}[video]{title} \DeclareFieldAlias[music]{lostitle}[video]{title} \DeclareFieldAlias[audio]{citetitle}[video]{title} \DeclareFieldAlias[audio]{lostitle}[video]{title} \DeclareFieldFormat[audio,music,video]{subtitle}{% \iffieldundef{booktitle}% {\mkbibemph{\MakeSentenceCase*{#1}}\isdot}% {\MakeSentenceCase*{#1}\isdot}} \DeclareFieldFormat{issuetitle}{\MakeSentenceCase*{#1\isdot}} \DeclareFieldFormat{issuesubtitle}{\MakeSentenceCase*{#1\isdot}} %%%% Formatting macros, called both by cbx and bbx %%%% \newbibmacro*{video+title}{% \iffieldundef{title}% {}% {\printtext{% \printfield{title}% \setunit{\subtitlepunct}% \printfield[subtitle]{subtitle}}}} \newbibmacro*{italtitle+stitle}{% \printtext{% \printfield{title}% \setunit{\subtitlepunct}% \printfield[subtitle]{subtitle}}% \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% \newunit\newblock} \newbibmacro*{mag+news+title}{% \printtext{% \printfield{title}% \setunit{\subtitlepunct}% \printfield[subtitle]{subtitle}}% \setunit{\ptitleaddonpunct}%\setunit{\addcomma\addspace} \ifboolexpr{% togl {cms@related}% and test {\iffieldequalstr{relatedtype}{reviewof}}% }% {\usebibmacro{related:init}% \usebibmacro{related}}% {\printfield{titleaddon}}% }%\newcunit\newblock \newbibmacro*{issuetitle}{% \iffieldundef{issuetitle}% {}% {\ifthenelse{\ifentrytype{article}\OR% \ifentrytype{review}\OR% \ifentrytype{suppperiodical}}% This test is for {\usebibmacro{cms-in:}}% periodical entries {}% \printtext{% \printfield{issuetitle}% \setunit{\subtitlepunct}% \printfield[issuesubtitle]{issuesubtitle}}}} %%%% Related macros that can't reside in common.cbx %%%% \newbibmacro*{related:reviewof}[1]{% \entrydata*{#1}{% \let\newunit\newcunit% FIXME?? \iffieldundef{title}% {}% {\printtext{% \printfield{title}% \setunit{\subtitlepunct}% \printfield[subtitle]{subtitle}}}% \newcunit% \ifnameundef{author}% {\newcunit% \usebibmacro{byeditor+others}}% {\bibstring{by}\addspace% \printnames[byauthor]{author}% \newcunit\usebibmacro{byeditor+others}}% \setunit{\ctitleaddonpunct}% \printfield{titleaddon}}} \DeclareFieldFormat{title:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{#1}% \endgroup \mkbibemph{\MakeSentenceCase*{#1}}} \DeclareFieldFormat{ititle:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{#1}% \endgroup \MakeSentenceCase*{#1}} \DeclareFieldFormat{jtitle:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{#1}% \endgroup \mkbibemph{#1}} \DeclareFieldFormat{chapter:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{\bibstring{chapter}}% \endgroup \bibstring{chapter}~#1\addspace\bibstring{in}} \DeclareFieldFormat{avchapter:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{\bibstring{chapter}}% \endgroup \bibstring{chapter}~#1} \DeclareFieldFormat{sjtnoformat}{#1} \DeclareFieldFormat{stnoformat}{#1} \DeclareFieldFormat{jtnoformat}{#1} \DeclareFieldFormat{jtsnoformat}{#1} \DeclareFieldFormat{tnoformat}{#1} \newbibmacro*{cms:titlehook}{% Needed for the full drivers in reprintfrom \ifthenelse{\iffieldundef{chapter}\OR\NOT\(\ifentrytype{audio}\OR% \ifentrytype{inbook}\OR\ifentrytype{incollection}\OR% \ifentrytype{inproceedings}\OR\ifentrytype{letter}\OR% \ifentrytype{music}\OR\ifentrytype{video}\)}% {\iffieldundef{issuetitle}% {\iffieldundef{title}% {\iffieldundef{booktitle}% {\iffieldundef{maintitle}% {\iffieldundef{journaltitle}% {}% {\DeclareFieldAlias{jtnoformat}{jtitle:hook}% \DeclareFieldAlias{sjtnoformat}{title}% \DeclareFieldAlias{journaltitle}{default}% \DeclareFieldAlias{shortjournal}{series}% \DeclareFieldAlias{jtsnoformat}{jtitle:hook}}}% {\DeclareFieldAlias{maintitle}{title:hook}}}% {\DeclareFieldAlias{booktitle}{title:hook}}}% {\DeclareFieldAlias{tnoformat}{jtitle:hook}% \DeclareFieldAlias{stnoformat}{citetitle}% \DeclareFieldAlias[video]{title}{title:hook}% \DeclareFieldAlias[audio]{title}{title:hook}% \DeclareFieldAlias[music]{title}{title:hook}% \DeclareFieldAlias{title}{title:hook}% \DeclareFieldAlias[periodical]{shorttitle}{series}}}% {\DeclareFieldAlias{issuetitle}{ititle:hook}}}% {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% \ifentrytype{video}}% {\iffieldundef{title}% {\DeclareFieldAlias{chapter}{avchapter:hook}}% {\DeclareFieldAlias[video]{title}{title:hook}% \DeclareFieldAlias[audio]{title}{title:hook}% \DeclareFieldAlias[music]{title}{title:hook}}}% {\DeclareFieldAlias{chapter}{chapter:hook}}}}% \endinput