15

I'd like to include some full citations in the text of my document, using BibTeX. The bibentry package provides this. However, I would like not to have these items also appear in the bibliography.

Here is a minimal not-working example:

\begin{filecontents}{mytestbib.bib}
@book{test1,
    author = "A. Scientist",
    title = "Science in Action",
year = "1967"
}
@book{test2,
    author = "T. Testing",
    title = "This is a test",
    year = "1234"
}
\end{filecontents}
\documentclass{article}
\usepackage{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\nobibliography*

\begin{document}

A full in-text citation: \bibentry{test1}.

A normal citation: \cite{test2}.

\bibliographystyle{plainnat}
\bibliography{mytestbib}

\end{document}

This gives me

enter image description here

What I want is for the body of the document to look as it does, but for the bibliography section to contain only "T. Testing" and not "A. Scientist." How can I achieve this?

3
  • 1
    Could you provide a rationale for wanting to provide a citation call-out in the body of the document while suppressing the corresponding entry in the References section?
    – Mico
    Dec 18, 2014 at 10:06
  • 3
    @Mico I was writing an internal report, in which I needed to list my own publications, interspersed with a few section headings and comments, in a separate section from the references. Because it was quite a short report and my publications outnumbered the ones I wanted to cite, it would have looked silly if they were all duplicated again in the references section. In the end I stayed up late working out how to do it with biblatex, but a simple bibtex solution would still be useful for future readers.
    – N. Virgo
    Dec 19, 2014 at 1:10
  • 2
    I would very much appreciate a bibtex solution, as I am facing the same problem and don't want to switch to biblatex at this stage of this particular project.
    – ThomasH
    Jun 2, 2015 at 14:29

1 Answer 1

8

You can use biblatex categories. By manually adding a category like follows you can suppress some entries in the bibliography:

\DeclareBibliographyCategory{nobibliography}
\addtocategory{nobibliography}{test1}

Try this (note I used biber instead of bibtex as the engine):

\begin{filecontents}{mytestbib.bib}
@book{test2,
    author = "T. Testing",
    title = "This is a test",
    year = "1234"
}

@book{test1,
    author = "A. Scientist",
    title = "Science in Action",
year = "1967"
}
\end{filecontents}

\documentclass{article}
\usepackage{filecontents}
\usepackage[backend=biber,defernumbers=true,style=authoryear-comp]{biblatex}
\DeclareBibliographyCategory{nobibliography}
\addtocategory{nobibliography}{test1}
\addbibresource{mytestbib.bib}

\begin{document}

A full in-text citation: \fullcite{test1}.
% \printbibliography[keyword=presentations,heading=subbibliography,type=inproceedings,title={Conference without external review process}]

A normal citation: \parencite{test2}.

\printbibliography[notcategory=nobibliography]

\end{document}

I obtain:

result

6
  • 1
    The part in the body needs to be a full citation, containing all the bibliographic data. (Also I'm really quite specifically asking for a bibtex solution, not biblatex. The reason being that biblatex is a complex package, and for someone who only knows bibtex it's quite a lot of work to learn it for such a simple thing.)
    – N. Virgo
    Dec 19, 2014 at 13:38
  • @Nathaniel Oh, change \textcite to \fullcite and you will get the full citation (EDIT: updated the code above). Biblatex is actually not hard to learn, the main commands are parencite and textcite, and my code has all the most basic commands you need. If you change backend = biber to backend = bibtex, you can retain using bibtex x.tex as the bibliography engine. Dec 19, 2014 at 14:42
  • @Nathaniel Biblatex is so much more flexible and superior. I never touch bibtex now, biblatex can do everything I need to do and more. I switched from bibtex to biblatex and it didn't take me more than half an hour by replacing the respective commands. Of course you may have a complicated document, so your mileage may vary. I read your comment and thought you could not work out how to do this in biblatex, that's why I submited an answer, my apologies if you got it to work but simply want a bibtex solution. Dec 19, 2014 at 14:50
  • 1
    @Nathaniel Ah ha, about the --- in author names, it is part of the APA style I believe, which shortens the authors when that entry has the same author(s) as the previous entry. You can turn that off by using option dashed = false as in \usepackage[style=authoryear,dashed=false]{biblatex} Dec 22, 2014 at 0:55
  • 1
    An academic here: Did you mean "nobibliography"? ;)
    – Orion
    Oct 16, 2017 at 9:07

You must log in to answer this question.

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