4

With "options = {cmsdate=on}" textcite and parencite in biblatex-chicago will print only the origdate in the text. How can I make citeyear do that? It prints only the date.

\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
  author       = {David Hume},
  editor       = {David Fate Norton},
  title        = {A Treatise of Human Nature},
  publisher    = {Oxford University Press},
  year         = 2000,
  address      = {Oxford},
  options      = {cmsdate=on},
  origdate     = {1739/1740}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

textcite: \textcite[111]{hume1739}

citeyear: \citeyear[111]{hume1739}

\printbibliography[heading=bibintoc]

\end{document}
  • Just to clarify: you are looking for a way to force \citeyear to print origdate only ? (and nothing if undefined ?) – ach May 22 '13 at 22:12
  • To print only origdate if it is defined but to print date if origdate is not defined. – George Pigman May 22 '13 at 22:38
1

\citeyear is a generic citing command provided by biblatex that is not modified by biblatex-chicago - it literally just prints the date field.

To get the behaviour you wanted, you have to modify its definition so that it knowns about origyear and the like.

In the code below, I have redefined \citeyear so that it checks if origyear exists, and prints origdate if so, otherwise it prints date.

Side note: Date fields are a bit special in biblatex (see manual 4.2.4.3 ), that's why the syntax is a bit weird. Read there if you want to know more.


\documentclass{article}
\usepackage[authordate, backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
  author       = {David Hume},
  editor       = {David Fate Norton},
  title        = {A Treatise of Human Nature},
  publisher    = {Oxford University Press},
  year         = 2000,
  address      = {Oxford},
  options      = {cmsdate=on},
  origdate     = {1739/1740}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareCiteCommand{\citeyear} %lifted from biblatex.def
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
   {% modified from here
   \iffieldundef{origyear}
       {\printfield{year}}
       {\printorigdate}
   }% to here
  {\multicitedelim}
  {\usebibmacro{postnote}}



\begin{document}

citeyear: \citeyear[111]{hume1739}

cite \cite{hume1739}
textcite: \textcite[111]{hume1739}



\printbibliography[heading=bibintoc]

\end{document}
-1

Just use \autocite*{} instead.

  • 4
    Could you provide some more detail in this regard? That way your answer would be more helpful to a wider audience. – Werner Jul 26 '13 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.