% $Id: chicago-authordate.cbx,v 0.9.1.4 2018/01/11 09:29:25 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.cbx}[2018/01/11 v 3.10 biblatex citation style] \RequireCitationStyle{chicago-dates-common} %%%% Field Formats -- Title, Citetitle, Lostitle %%%% \DeclareFieldFormat{title}{\mkbibemph{#1}\isdot} \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,inbook,incollection,inproceedings,online,thesis,unpublished] {citetitle}{% \iffieldundef{title}% {#1\isdot}% {\mkbibquote{#1\isdot}}} \DeclareFieldFormat [article,inbook,incollection,inproceedings,online,thesis,unpublished] {lostitle}{% \iffieldundef{title}% {#1\isdot}% {\mkbibquote{#1\isdot}}} \DeclareFieldFormat[artwork,image]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{#1}\isdot}% {#1\isdot}} \DeclareFieldAlias[artwork]{citetitle}[artwork]{title} \DeclareFieldAlias[artwork]{lostitle}[artwork]{title} \DeclareFieldAlias[image]{citetitle}[artwork]{title} \DeclareFieldAlias[image]{lostitle}[artwork]{title} \DeclareFieldFormat[letter,patent]{title}{#1\isdot} \DeclareFieldFormat[letter,patent]{citetitle}{#1\isdot} \DeclareFieldFormat[letter,patent]{lostitle}{#1\isdot} \DeclareFieldFormat[suppbook,suppcollection]{title}{\mkbibemph{#1}\isdot} \DeclareFieldAlias[suppbook]{citetitle}[suppbook]{lostitle} \DeclareFieldFormat[suppbook,suppcollection]{lostitle}{% \usebibmacro{inforaft}% \addspace% \mkbibemph{#1}\isdot} \DeclareFieldAlias[suppcollection]{citetitle}[suppbook]{lostitle} \DeclareFieldFormat[misc]{title}{% \iffieldundef{entrysubtype}% {\mkbibemph{#1}\isdot}% {\ifcapital{\MakeCapital{#1\isdot}}{#1\isdot}}} \DeclareFieldAlias[misc]{citetitle}[misc]{title} \DeclareFieldAlias[misc]{lostitle}[misc]{title} \DeclareFieldFormat[report]{title}{% \iffieldequalstr{entrysubtype}{unpublished}% {\mkbibquote{#1\isdot}}% {\mkbibemph{#1}\isdot}}% \DeclareFieldFormat[report]{citetitle}{% \iffieldequalstr{entrysubtype}{unpublished}% {\mkbibquote{#1\isdot}}% {\mkbibemph{#1}\isdot}} \DeclareFieldFormat[report]{lostitle}{% \iffieldequalstr{entrysubtype}{unpublished}% {\mkbibquote{#1\isdot}}% {\mkbibemph{#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{booktitle}{\mkbibemph{#1}} \DeclareFieldFormat{maintitle}{\mkbibemph{#1}} \DeclareFieldFormat{booksubtitle}{\mkbibemph{#1}} \DeclareFieldFormat{mainsubtitle}{\mkbibemph{#1}} \DeclareFieldFormat[audio,music,video]{title}{% \iffieldundef{booktitle}% {\mkbibemph{#1}\isdot}% {\mkbibquote{#1\isdot}}} \DeclareFieldAlias[video]{citetitle}[video]{title} \DeclareFieldAlias[video]{lostitle}[video]{title} \DeclareFieldAlias[music]{citetitle}[music]{title} \DeclareFieldAlias[music]{lostitle}[music]{title} \DeclareFieldAlias[audio]{citetitle}[audio]{title} \DeclareFieldAlias[audio]{lostitle}[audio]{title} \DeclareFieldFormat{issuetitle}{\mkbibquote{#1\isdot}} %%%% Formatting macros, called both by cbx and bbx %%%% \newbibmacro*{video+title}{% Simplifies trad style. \iffieldundef{title}% {}% {\printtext[title]{% \printfield[tnoformat]{title}% \setunit{\subtitlepunct}% \printfield[stnoformat]{subtitle}}}} \newbibmacro*{italtitle+stitle}{% \printtext[title]{% \printfield[tnoformat]{title}% \setunit{\subtitlepunct}% \printfield[stnoformat]{subtitle}}% \setunit{\ptitleaddonpunct}% \printfield{titleaddon}% \setunit{\addspace}% \usebibmacro{language+transtitle}% \newunit\newblock} \newbibmacro*{mag+news+title}{% \printtext[title]{% \printfield[noformat]{title}% \setunit{\subtitlepunct}% \printfield[noformat]{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[issuetitle]{% \printfield[itnoformat]{issuetitle}% \setunit{\subtitlepunct}% \printfield[sitnoformat]{issuesubtitle}}}} %%%% Related macros that can't reside in common.cbx %%%% \newbibmacro*{related:reviewof}[1]{% \entrydata*{#1}{% \let\newunit\newcunit% FIXME?? \iffieldundef{title}% {}% {\printtext[title]{% \printfield[tnoformat]{title}% \setunit{\subtitlepunct}% \printfield[stnoformat]{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{#1}} \DeclareFieldFormat{ititle:hook}{% \begingroup \mkrelatedstring% \ifboolexpr{% togl {cms@otherlang}% and not test {\iffieldundef{langid}}% }% {\unspace}{}% \lbx@inittitlehook{#1}% \endgroup \mkbibquote{#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{sitnoformat}{#1} \DeclareFieldFormat{sjtnoformat}{#1} \DeclareFieldFormat{stnoformat}{#1} \DeclareFieldFormat{itnoformat}{#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}{title:hook}% \DeclareFieldAlias{sjtnoformat}{title}% \DeclareFieldAlias{journaltitle}{default}% \DeclareFieldAlias{shortjournal}{series}% \DeclareFieldAlias{jtsnoformat}{title:hook}}}% {\DeclareFieldAlias{maintitle}{title:hook}}}% {\DeclareFieldAlias{booktitle}{title:hook}}}% {\DeclareFieldAlias{tnoformat}{title:hook}% \DeclareFieldAlias{stnoformat}{citetitle}% \DeclareFieldAlias[video]{title}{default}% \DeclareFieldAlias[audio]{title}{default}% \DeclareFieldAlias[music]{title}{default}% \DeclareFieldAlias{title}{default}% \DeclareFieldAlias[periodical]{shorttitle}{series}}}% {\iffieldundef{issuesubtitle}% {\DeclareFieldAlias{itnoformat}{ititle:hook}% \DeclareFieldAlias{issuetitle}{default}}% {\DeclareFieldAlias{issuetitle}{ititle:hook}}}}% {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR% \ifentrytype{video}}% {\iffieldundef{title}% {\DeclareFieldAlias{chapter}{avchapter:hook}}% {\DeclareFieldAlias{tnoformat}{title:hook}% \DeclareFieldAlias{stnoformat}{citetitle}% \DeclareFieldAlias[video]{title}{default}% \DeclareFieldAlias[audio]{title}{default}% \DeclareFieldAlias[music]{title}{default}}}% {\DeclareFieldAlias{chapter}{chapter:hook}}}}% \endinput