# Suppress author option: remove the name of an author already used in text

Sometimes, I write the name of an author in a sentence before the citation. For this reason, I'd like to suppress it in the citation. How can I do that?

Is the only solution to create a new macro, e.g. \citewoauth, similar to \cite but without author names, or am I missing something? [The MWE (non-working actually) below is with \parencite but the general idea is similar.]

\begin{filecontents}{\jobname.bib}
@article{doe_2011,
title = {A title},
author = {John Doe},
journal = {Journal},
number = {99},
pages = {483--488},
date = {2015},
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{csquotes}

\begin{document}
Some text\footnote{According to John Doe, it is \enquote{a complete nonsense} \parencite[485]{doe_2011}}

\printbibliography
\end{document}

• Does this code compile for you without error? I get lots of compilation errors - complaints about undefined control sequences and the like. – cfr Aug 20 '15 at 20:54
• No error. Pretty simple MWE. – Carg Aug 20 '15 at 22:42
• Sorry. Yes. It won't compile for me because I updated TeX Live yesterday and there's a bug which causes errors if you try to typeset French using Babel. I just didn't realise that until afterwards - yours is the first code I've tried to compile, I guess, which needs French since I updated. So don't update your installation until the bug fix hits your local repository! – cfr Aug 20 '15 at 22:53

The authoryear and authortitle styles provide \cite* and \parencite* for that exact purpose. The verbose styles do not have such a command.

You can use the \AtNextCite hook to disable the display of names in the next citation

\makeatletter
\newcommand{\int@suppauth}{%
\def\ifciteibid{\@secondoftwo}%
\renewbibmacro*{cite:name}{}%
\renewbibmacro*{cite:idem}{}%
\renewbibmacro*{author}{}%
\renewbibmacro*{editor+others}{}%
\renewbibmacro*{translator+others}{}}

\newcommand{\suppauth}{\AtNextCite{\int@suppauth}}
\makeatother


The first line in \int@suppauth turns off any "ibid." that might occur, the second and third take care of suppressing names and "idem"s inn short citations, while the last three are for the bibliography driver (long first citations). This will also work if the relevant name to suppress is the editor of a work.

Now you can just say \suppauth\cite{foo} to suppress the author/labelname in the following citation.

\makeatletter
\DeclareCiteCommand*{\parencite}[\mkbibparens]
{\int@suppauth
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}

\DeclareCiteCommand*{\cite}
{\int@suppauth
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
\makeatother


then emulates the behaviour of the authoryear and authortitle style's \cite* and \parencite*.

MWE

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{csquotes}

\makeatletter
\newcommand{\int@suppauth}{%
\def\ifciteibid{\@secondoftwo}%
\renewbibmacro*{cite:name}{}%
\renewbibmacro*{cite:idem}{}%
\renewbibmacro*{author}{}%
\renewbibmacro*{editor+others}{}%
\renewbibmacro*{translator+others}{}}

\newcommand{\suppauth}{\AtNextCite{\int@suppauth}}

\DeclareCiteCommand*{\parencite}[\mkbibparens]
{\int@suppauth
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}

\DeclareCiteCommand*{\cite}
{\int@suppauth
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
\makeatother

\begin{document}
Lorem\footnote{According to Sigfridsson, it is \enquote{a complete nonsense} \suppauth\parencite[485]{sigfridsson}}
ipsum\footcite{geer} dolor\footnote{According to Sigfridsson again, it is \enquote{a complete nonsense} \suppauth\parencite[485]{sigfridsson}}
\citereset
Lorem\footnote{According to Sigfridsson, it is \enquote{a complete nonsense} \parencite*[485]{sigfridsson}}
ipsum\footcite{geer} dolor\footnote{According to Sigfridsson again, it is \enquote{a complete nonsense} \parencite*[485]{sigfridsson}}

\printbibliography
\end{document}


• Great! Could it suppress "idem" when the previous citation has also the same author ? – Carg Aug 24 '15 at 17:36
• @Carg I have now suppressed the "idem" function as well as the "ibid" function. If you want to get the latter back it is \def\ifciteibid{\@secondoftwo} you need to get rid of. – moewe Aug 25 '15 at 4:53

A possible solution is to use the xpatch package to (locally, i.e., in a TeX group) patch the driver of the entry type (caveat, you have to know the entry type for the citation) to clear the author just before the citation.

\xpretobibdriver{article}{\clearname{author}}{}{}


So for the MWE in the OP (the command is local to the footnote)

Some text\footnote{According to John Doe, it is \enquote{a complete nonsense}
\xpretobibdriver{article}{\clearname{author}}{}{}
\parencite[485]{doe_2011}.}


• You could do something like \AtNextCitekey{\clearname{author}} then there is no need for grouping in the document (it will only work for one citation, though). – moewe Aug 21 '15 at 6:01
• Note that this solution has problems with subsequent citations that use labelname and not author (or editor). – moewe Aug 21 '15 at 10:26