19

Even though it may sound weird: is it possible to have a \cite{key}-command that cites a bibliographic item without including that item in the bibliography?

As it were, I am looking for the opposite of \nocite{key}.

I thought about creating my own \newcommand, but this would require to use commands like \citeauthor{key} and \citetitle{key} within this \newcommand with the result that the item would appear in the bibliography...

I would like to have the following:

A source document saying something like this:

\documentclass{scrbook}
\usepackage{biblatex}
\addbibresource{my_bib.bib}
\begin{document}
Let me reference one work: \nobibcite{key-1}. And another: \cite{key-2}.
\printbibliography
\end{document}

With a bibliography in the PDF file that lists only the item key-2 (which was cited by \cite) and not the item key-1 (which was cited by the command I am looking for). Nevertheless, the bibliographical information of both items appear in the full text.

The PDF should look like this:

Let me reference one work: Author. Title. One. Publisher, 2013. And another: Author. Title. Two. Publisher, 2013.

Bibliography

Author. Title. Two. Publisher, 2013.

So how should I design the command \nobibcite{key}, or is there already a similar command that comes with biblatex or another package?

1
  • 2
    Could you say a bit more about your use-case? I can't quite picture what you mean. May 13, 2013 at 7:12

2 Answers 2

18

You could:

  1. Set the skipbib option on the particular key in your .bib file.

  2. Define a category with \DeclareBibliographyCategory{dontbib} and then \addtocategory{dontbib}{key} to put individual works into that category, followed by \printbibliography[notcategory=dontbib].

  3. Create a cite command to add to that category automatically, if you needed this often. At which point you'd have to decide whether a \cite in the ordinary way should override your exclusion from the bibliography. To do that I think' you'd need two categories, where an ordinary \cite effectively sets one flag, and your special one sets the other, and you set up a bibfilter to adjudicate between them.

If you are using a numeric sorting scheme with biblatex, the skipped citations will still be counted, so there will be gaps in the numbering in the bibliography. To circumvent this you can add the package option defernumbers=true to biblatex. this will make it such, that only citations appearing in the bibliography will receive a number. The citations in the bibliography will first appear unnumbered in the order they were cited, and then receive a number based on their position in the bibliography.

4
  • Great. I chose option 1 -- skipbib. In order to use this feature, you need to edit your bib-entry (!), and add options = skipbib=true. Henceforth, all citations of this entry will not appear in the bibliography. May 13, 2013 at 12:21
  • 1
    Can you please add some code? I like the concept, but don't know how to do it.
    – piegames
    Nov 25, 2016 at 17:57
  • 1
    With a numeric bibliography style, solutions 1 and 2 have a downside: The refs are not shown in the bibliography, but the counter is advanced for each citation. So if four references are excluded from the bibliography, then the bibliography starts at 5 (and not 1).
    – Yoda
    May 19, 2021 at 10:00
  • @Yoda To get around this problem you can add an extra option to the biblatex package \usepackage[defernumbers=true]{biblatex} now numbers will be assigned not based on both where in the text, and where in the bibliography the text appears. citations not found in the bibliography will thus be skipped in the numbering. Nov 16, 2022 at 14:55
2

A slight variation.

The use-case is: a quotation is used as a chapter epigraph, say, and a \fullcite is provided to the reader to track down the source if they want, but the bibliography should not reference the work because the epigraph, as a literary ornament, does not contribute to the document's thesis. However, if the same work happens to be cited inside the document in the usual way, then it should appear in the bibliography.

A document-level solution using biblatex, and without needing to edit the .bib file at all, would be to define a toggle in the document, and then add the work to the print-in-bibliography category when it is being cited in a non-epigraphic context.

Epigraph only:

epigraph only

Epigraph plus contribution:

epigraph and cited

MWE



\begin{filecontents*}{\jobname.bib}
@book{book1,
  title={A Title},
  author={B Auctoritas},
  year={1828},
  publisher={Holmes and Sons},
}
@book{book2,
  title={Another Title},
  author={C Author},
  year={2020},
  publisher={P Publisher},
}

@book{eco,
author={Umberto Eco},
title={Come si fa una tesi di laurea},
subtitle={Le materie umanistiche},
publisher={Bompiani},
date={2004},
origdate={1977},
edition={15},
}

\end{filecontents*}





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

\addbibresource{\jobname.bib}

\DeclareBibliographyCategory{yesinbib}
\DeclareBibliographyCategory{notinbib}

\newtoggle{putinbib}
\toggletrue{putinbib}

\newcommand\qcite[2]{%
\togglefalse{putinbib}%
\footfullcite[#2]{#1}%
\toggletrue{putinbib}%
}

\AtEveryCitekey{%
\iftoggle{putinbib}{%true
   \addtocategory{yesinbib}{\thefield{entrykey}}
}{%false
   \addtocategory{notinbib}{\thefield{entrykey}}
}%
}


%------------------
\begin{document}
x

\vfill %demo purpose only

\noindent ``Certi nomi sono citati da tutti''\qcite{eco}{110-111}\\
%\togglefalse{putinbib}%
%\noindent ``Certi nomi sono citati da tutti''\footfullcite[110-111]{eco}\\
%\toggletrue{putinbib}%
Some names are cited by everybody.
\hrule
\bigskip

This is an ordinary cite\footcite[ch 4]{book1}... 

Eco's thesis that theses are written in a metalanguage\footcite[163]{eco} ... 
And another\footcite{book2} ...

\printbibliography[category=yesinbib]

\printbibliography[category=notinbib,title={Quotation sources}]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .