[Tex/LaTex] How to put a full citation in the text *without* adding an entry to the bibliography

bibentrybibtexciting

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?

Best Answer

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