23

Is there a way to exclude a citation specified in the text by \fullcite{Doe2013} from the bibliography? (I'm using biblatex+biber.)

1
  • \newrefsection might be what you're looking for.
    – user31993
    Commented Jun 10, 2013 at 5:51

3 Answers 3

29

There are a number of ways you might exclude particular entries from the printed bibliography:

  1. Set skipbib=true as an option in that entry in your .bib file.

  2. Set a keyword for such entries, and print a bibliography excluding them with a notkeyword filter.

  3. Add such entries to a category using \DeclareBibliographyCategory, \addtocategory and the notcategory filter.

If you are dealing with one or two specific entries, then (1) or (2) is probably easiest. If you want a general mechanism, then the third will probably be the best. Something like

\documentclass{article}
\usepackage{biblatex}

\DeclareBibliographyCategory{fullcited}
\newcommand{\mybibexclude}[1]{\addtocategory{fullcited}{#1}}

\addbibresource{biblatex-examples.bib}

\begin{document}

Chemists deserve numbers: \cite{cotton}. But historians get a full citation in the text
and are excluded from the bibliography: \fullcite{reese}.\mybibexclude{reese}

\printbibliography[notcategory=fullcited]


\end{document}

enter image description here

You could, if you needed this a lot, construct a new citation command that did this automatically. But it's probably overkill.

3
  • Great solutions! I tried the first and the third. The citation disappears from the bibliography, but there will be one missing number in the bibliography list (e.g. \cite{cotton} after \mybibexclude{reese} and the list starts with [2]). Any idea on how to prevent that?
    – Wox
    Commented Apr 29, 2013 at 15:50
  • Ok, I had to run latex-biber-latex-latex to fix the numbering. Thanks!
    – Wox
    Commented Apr 29, 2013 at 16:30
  • 1
    It's important to have the option 'defernumbers=true' set for biblatex.
    – tgkolda
    Commented Sep 1, 2017 at 10:33
9

I know this is an old thread, but it somehow crossed my path today, and I think the question may benefit from another twist. The OP asks for the exclusion of a citation if it is done with \fullcite. Paul Stanley's answer gets the job done, of course. However, the three of his proposed solutions will exclude the entry, irrespective of whatever happens in the rest of the document. Even if the entry is later cited with \cite or another citation command. This answer proposes a way to exclude \fullcites from the bibliography, but without hampering that the affected entry get to the bibliography if cited some other way. Of course, this may well be overkill for a number of needs, but may perhaps be useful for specific requirements.

\documentclass{article}
\usepackage{biblatex}

\DeclareBibliographyCategory{inbib}

\makeatletter
\AtEveryCitekey{%
  \ifcsstring{blx@delimcontext}{fullcite}
    {}
    {\addtocategory{inbib}{\thefield{entrykey}}}}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}

Chemists deserve numbers: \cite{cotton}. But historians get a full citation in the text and are excluded from the bibliography: \fullcite{reese}.
%But may reach the bibliography if cited with a standard cite command: \cite{reese}.

\printbibliography[category=inbib]

\end{document}
10
  • I think you could even drop the fullcite toggle if you tested for the delim context: \AtEveryCitekey{% \ifcsstring{blx@delimcontext}{fullcite} {} {\addtocategory{inbib}{\thefield{entrykey}}}}
    – moewe
    Commented Mar 17, 2018 at 6:18
  • @moewe I hadn't thought of that. And actually, I didn't really know there was a delim context for fullcite. In any case, this is a large improvement, because, thus dropping the toggle, I can also drop the redefinition of \fullcite. Thanks!
    – gusbrs
    Commented Mar 17, 2018 at 11:15
  • @moewe, I tried to make this work for refsections too, but the addtocategory has global effects. Is there any such "marker" which would only be set for the current refsection?
    – gusbrs
    Commented Mar 17, 2018 at 11:54
  • 1
    Yes, categories are always global. And they have to be defined in the preamble, so they can't be provided on the fly in the document body. You can work around the fact that categories are global by defining one for each refsection, but that requires dynamic definition in the document. See gist.github.com/moewew/48eed49cbd1596d73ef8ebc720fc29c3
    – moewe
    Commented Mar 17, 2018 at 13:27
  • @moewe That's very nice indeed! I feared that a category per refsection was the way around it, but didn't suppose a definition on the fly was possible. I don't know if you think such revival of an old question is granted, but if I were to see that as an answer here, it'd certainly receive my upvote. :)
    – gusbrs
    Commented Mar 17, 2018 at 14:28
8

Another solution is to wrap the fullcite citation in a refsection environment to make it "local" to the position in the text where the citation occurs. Here is an example:

\documentclass{article}
\usepackage{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}

Chemists deserve numbers: \cite{cotton}. But historians get a full
citation in the text and are excluded from the bibliography:

\begin{refsection}
\fullcite{reese}
\end{refsection}

\printbibliography

\end{document}

biblatex fullcite example 1

Then, if you want to cite this same reference later in the document in the usual way and have it included in the bibliography, you can:

\documentclass{article}
\usepackage{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}

Chemists deserve numbers: \cite{cotton}. But historians get a full
citation in the text and are excluded from the bibliography:

\begin{refsection}
\fullcite{reese}
\end{refsection}

If you cite a physicist~\cite{glashow}, and then cite the historian 
later~\cite{reese}, everything works as expected.

\printbibliography

\end{document}

biblatex fullcite example 2

You must log in to answer this question.

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