1

Is it possible to have biblatex-chicago not print the 'hereafter cited as X' message for entries with a shorthand if the entry is only cited once in the document?

MWE:

\documentclass{article}

\begin{filecontents}{test.bib}
@book{entry,
title = {Book's title},
author = {Author, Some},
shorthand = {shorthand}
}
\end{filecontents}

\usepackage{biblatex-chicago}
\bibliography{test}

\begin{document}
Lorem ipsum.\autocite{entry}
\end{document}

Ideally, this would produce a footnote that says simply 'Some Author, Book's title' rather than including '(hereafter cited as shorthand)', as it does now.

AVB
  • 681

1 Answers1

1

If we enable the citecounter option we can test if an entry is cited more than once and make the execution of the cms:shorthandintro macro, which prints the "hereafter cited as ..." phrase, conditional on there being more than one citation of this work

\documentclass{article}

\usepackage[citecounter=context]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{cms:shorthandintro}{%
  \ifboolexpr{   test {\iffieldundef{shorthand}}
              or not test {\ifnumgreater{\value{citecounter}}{1}}}%
    {}%
    {\iffieldundef{shorthandintro}%
       {\ifthenelse{\ifentrytype{jurisdiction}\OR\ifentrytype{legal}\OR%
                    \ifentrytype{legislation}}%
         {\printtext[brackets]{%
            \bibstring{hereinafter}\addspace%
            \printfield{shorthand}}}%
         {\printtext[parens]{%
            \bibstring{citedas}\addspace%
            \printfield{shorthand}}}}%
       {%\addspace%\setunit{\addspace}% Ditto
        \printfield{shorthandintro}}}}

\begin{document}
Lorem ipsum.\autocite{kant:kpv}

Lorem ipsum.\autocite{kant:ku}

Lorem ipsum.\autocite{kant:ku}
\end{document}

Immanuel Kant, “Kritik der praktischen Vernunft,” in Kritik der praktischen Vernunft. Kritik der Urtheilskraft, vol. 5 of Kants Werke. Akademie Textausgabe (Berlin: Walter de Gruyter, 1968), 1–163.// Immanuel Kant, “Kritik der Urtheilskraft,” in Kritik der praktischen Vernunft. Kritik der Urtheilskraft, vol. 5 of Kants Werke. Akademie Textausgabe (Berlin: Walter de Gruyter, 1968), 165–485 (hereafter cited as KU).//KU

moewe
  • 175,683
  • This is great, thank you! I'm guessing you copied the macro definition from the biblatex-chicago source files; is that correct? If so, is that something to keep an eye on for maintaining this code going forward? – AVB Nov 21 '19 at 14:04
  • @AVB Yes, the code is adapted from chicago-notes.cbx. Of course future changes to that file might mean that the code diverges from the original more than intended. If you prefer you can patch the macro instead. That could be more robust. See the discussion in https://tex.stackexchange.com/q/409091/35864. – moewe Nov 21 '19 at 16:59