# Cite work in text but suppress it from the bibliography

I would like to be able to refer to a .bib entry in the text with commands such as \citeauthor and \citetitle without the entry appearing in the bibliography at the end. How can I do this? In the following MWE, the entry Lennon, John (1972) should be suppressed from the bibliography.

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
AUTHOR = "John Lennon",
TITLE = "Who did what in the Beatles",
YEAR = "1972"}
@book{starkey1994,
AUTHOR = "Richard Starkey",
TITLE = "I'm the drummer",
YEAR = "1994"}
\end{filecontents}

\begin{document}

\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}. You can read about it in \textcite{starkey1994}.

\printbibliography
\end{document}


(I was sure I had asked this before, but I haven't been able to find such a question on this site now)

The easiest option is to make the entry dataonly in the .bib file by adding

options = {dataonly},


This will make the entry skip the bibliography (it sets skipbib) and will make sure the entry does not interfere with extradate and other label-related matters. (If you want label-related functions for this entry, use just options = {skipbib,skipbiblist},).

\documentclass{article}
\usepackage[style=authoryear]{biblatex}

\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author  = {John Lennon},
title   = {Who did what in the Beatles},
year    = {1972},
options = {dataonly},
}
@book{starkey1994,
author = {Richard Starkey},
title  = {I'm the drummer},
year   = {1994},
}
\end{filecontents}

\begin{document}
\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}.

\printbibliography
\end{document}


That may not be the ideal option though if you want to decide dynamically from within the document whether or not the entry should be printed. In that case you can use a category to filter the entry. The label data will have been created at that point, so you can't get rid of the entries influence on extradate and other uniqueness-related features.

\documentclass{article}
\usepackage[style=authoryear]{biblatex}

\DeclareBibliographyCategory{skipbib}

\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author  = {John Lennon},
title   = {Who did what in the Beatles},
year    = {1972},
}
@book{starkey1994,
author = {Richard Starkey},
title  = {I'm the drummer},
year   = {1994},
}
\end{filecontents}

\begin{document}
\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}.

\printbibliography[notcategory=skipbib]
\end{document}


It is possible, but not completely easy to automate this. In the following MWE all entries that were cited with a \cite... command that does not turn off citetracker are shown in the bibliography. Again it is too late at that point to discard uniqueness effects.

\documentclass{article}
\usepackage[style=authoryear, citetracker]{biblatex}

\DeclareBibliographyCategory{showinbib}

\AtEveryCitekey{%
\ifbool{citetracker}
{}}

\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author  = {John Lennon},
title   = {Who did what in the Beatles},
year    = {1972},
}
@book{starkey1994,
author = {Richard Starkey},
title  = {I'm the drummer},
year   = {1994},
}
\end{filecontents}