17

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?

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

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.

  • 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. – ClintEastwood May 13 '13 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 '16 at 17:57
0

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.