A year ago, @moewe devised a way to make biblatex-chicago
use only the author's last name (no title) when citing a reference whose author only appears in the bibliography as the author of that reference (i.e., only one work by that author is cited).
Since then, I realized that this solution runs into problems with \headlesscite
and, in footnotes, with \textcite
. Is there any way to make the output (see below) sensible?
MWE:
\documentclass{article}
\usepackage[%
ibidtracker=true,
notes,
singletitle,
short]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}
\renewbibmacro*{cite:short}{%
\usebibmacro{allshort+firstcite+xref}%
\ifthenelse{\ifnameundef{labelname}\OR%
\ifentrytype{inreference}\OR%
\ifentrytype{reference}\OR%
\ifentrytype{mvreference}}%
{\ifthenelse{\iffieldequalstr{entrysubtype}{magazine}\AND\NOT%
\ifentrytype{periodical}}% Simplify .bib creation
{\ifuseauthor%
{\ifboolexpr{%
not test {\iffieldundef{shortjournal}}%
and
((
test {\ifcitation}%
and
togl {cms@citejtabb}%
)
or
(
test {\ifbibliography}%
and
togl {cms@bibjtabb}%
))
}%
{\printfield[shortjournal]{shortjournal}\newcunit}%
{\printfield[journaltitle]{journaltitle}\newcunit}}%
{}}%
{\ifentrytype{manual}%
{\printlist{organization}\isdot\newcunit}%
{}}}%
{\ifboolexpr{%
test {\ifciteidem}%
and
not test {\ifbibliography}%
and
not test {\iffirstonpage}%
and
not togl {cms@noidem}%
and
not togl {cms@headlessnote}%
}%
{\bibstring[\mkibid]{idem\thefield{gender}}%
\classicpunct}%
{\iffieldequalstr{authortype}{anon}%
{\bibleftbracket\printnames{labelname}%
\bibrightbracket\classicpunct}%
{\iffieldequalstr{authortype}{anon?}%
{\bibleftbracket\printnames{labelname}?%
\bibrightbracket\classicpunct}%
{\printnames{labelname}%\usebibmacro{choose+labelname}%
\isdot\classicpunct}}}}%
\ifsingletitle
{}
{\ifboolexpr{%
togl {cms@allshort}%
or
test {\ifbibliography}%
}%
{\printtext[bibhyperref]{%
\printfield[citetitle]{labeltitle}}}%
{\printtext[cmshyperlink]{%
\printfield[citetitle]{labeltitle}}}}}%:\thefield{entrytype}?
\begin{document}
\section{headlesscite and textcite in footnotes}
Headlesscite here: \headlesscite{worman}.
\mancite
In a footnote.\footcite[1]{worman}
\mancite
With textcite.\footnote{\Textcite[1]{worman} says otherwise.}
\mancite
With textcite but no page number.\footnote{\Textcite{worman} says otherwise.}
\section{with ibid issues thrown in}
Repeated citation.\footcite[1]{worman}
Repeated citation with textcite.\footnote{\Textcite[1]{worman} says otherwise.}
Repeated citation with textcite but no page number.\footnote{\Textcite{worman} says otherwise.}
\end{document}
Current output
1 headlesscite and textcite in footnotes
Headlesscite here: .
In a footnote.1
With textcite.2
With textcite but no page number.3
2 with ibid issues thrown in
Repeated citation.4
Repeated citation with textcite.5
Repeated citation with textcite but no page number.6
where the footnotes are:
Worman, 1.
Worman (, 1) says otherwise.
Worman () says otherwise.
Ibid., 1.
Worman (, 1) says otherwise.
Worman () says otherwise.
Desired output
1 headlesscite and textcite in footnotes
Headlesscite here: Worman.
In a footnote.1
With textcite.2
With textcite but no page number.3
2 with ibid issues thrown in
Repeated citation.4
Repeated citation with textcite.5
Repeated citation with textcite but no page number.6
where the footnotes are:
Worman, 1.
Worman (1) says otherwise.
Worman says otherwise.
Ibid., 1.
Worman (1) says otherwise.
Worman says otherwise.
\ifsingletitle
and\headlesscite
is a bit tricky.\headlesscite
is a\cite
without author name, and\ifsingletitle
instructs\cite
to drop the title if there is only one work by that author. In consequence you end up with nothing being printed. Even if we decide that the desired outcome in this case is for\headlesscite
not to drop the name, I would probably recommend against using it since the citation labels become a bit inconsistent that way.\textcite
?\headlesscite
one is straight forward (you can add a test for\ifsingletitle
in the\headlesscite
command [and friends] and not clear the names if the test is true) . But from my brief look, the\textcite
issue is much more complicated.\foottextcite
calls\headlessparenshortcite
. But you can't test if the output of\headlessparenshortcite
is empty or not from outside\headlessparenshortcite
. So you always will get parentheses even if it's empty. I don't know where the spurious comma is coming from yet.\postnotewrapper
not being surrounded by\setunit{…}
. I still don't know how to fix the empty parentheses though.