9

This question was basically asked before, but I think that the only answer didn't quite understand the question so I thought I'd try again. I'm writing a paper in which I need to have references show up in two places: a special list of "key references" in its own section, and a bibliography containing the rest of the references that were cited in the text. I thought that bibentry would do it, so the document looks something like:

\documentclass[11pt]{article}
\usepackage{natbib}
\usepackage{bibentry}
\nobibliography*

\begin{document}

\section{Amazing idea}

Chicken chicken chicken \citep{chicken:2010fj}. Chicken chicken, chicken \citep{turkey:2010jk}.

\section{Key References}

\begin{enumerate} \item \bibentry{lemur:2009ii} \item \bibentry{gibbon:2011jk} \end{enumerate}

\bibliographystyle{apalike} \bibliography{amazing.bib} \end{document}

Unfortunately, this doesn't quite do it, as the resulting document presents the lemur and gibbon bibentry references correctly in the "Key References" section, but also prints them in the bibliography at the end of the document. Ideally, the only entries in the bibliography would be the chicken and turkey \citep references. I'd like it to look like:

Key references

  1. Lemur, L. (2009). Lemur, 12(4):1-7.
  2. Gibbon, G. (2011). Gibbon, 135:1002-1009.

References

Chicken, C. (2010). Chicken. Chicken Press, Coop.

Turkey, T. (2010). Turkey, 7(4):E231.

What it actually looks like:

Key references

  1. Lemur, L. (2009). Lemur, 12(4):1-7.
  2. Gibbon, G. (2011). Gibbon, 135:1002-1009.

References

Chicken, C. (2010). Chicken. Chicken Press, Coop.

Gibbon, G. (2011). Gibbon, 135:1002-1009.

Lemur, L. (2009). Lemur, 12(4):1-7.

Turkey, T. (2010). Turkey, 7(4):E231.

Is there any way to achieve this with the current method, or is there some other (possibly easier!?) way to do this?

Winawer
  • 629

2 Answers2

7

As stated in the answer to the other question bibentry is not suitable for the task at hand (without modifications). If you want to give biblatex a try, it is easy to set it up for what you want to achieve.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage{csquotes} 
\usepackage[natbib,style=authoryear]{biblatex}


\begin{filecontents}{\jobname.bib} 
@article{nature, 
   author      =   {Rosa Rademakers and Manuela Neumann and Ian R. Mackenzie}, 
   title      =   {Advances in understanding the molecular basis of frontotemporal dementia - elongated title}, 
   journal      =   {Nature Reviews Neurology}, 
   volume      =   {8}, 
   year      =   {2012}, 
   pages      =   {423-434}, 
   doi         =   {10.1038/nrneurol.2012.117}} 
@article{fuente, 
   author      =   {D. de la Fuente and J.G. Castaño and M. Morcillo}, 
   title      =   {Long-term atmospheric corrosion of zinc}, 
   journal      =   {Corrosion Science}, 
   volume      =   {49}, 
   year      =   {2007}, 
   pages      =   {1420-1436},
   url = {www.elsevier.com/locate/corsci},
   } 
 @incollection{Rocca2007a,
   author = {Rocca, Emmanuel and Mirambet, Fran\c{c}ois},
   booktitle = {Corrosion of Metallic Heritage Artefacts: Investigation, Conservation and Prediction of Long Term Behaviour},
   chapter = {18},
   editor = {Philippe Dillmann and Pedro Piccardo and Gerard Beranger},
   pages = {308-334},
   title = {{Corrosion inhibitors for metallic artefacts: temporary protection}},
   year = {2007}}
\end{filecontents} 

\addbibresource{\jobname.bib}

\DeclareBibliographyCategory{keyreferences}

\defbibenvironment{keyrefs}
  {\begin{enumerate}}
  {\end{enumerate}}
  {\item}

\begin{document} 
Test \citet{nature}\addtocategory{keyreferences}{nature}

another test \cite{fuente} and \citep{Rocca2007a}

\printbibliography[env=keyrefs,category=keyreferences,title={Key References}]
\printbibliography[notcategory=keyreferences]
\end{document} 

The key issue is to create a category for the key references. After that we can use the category and notcategory options to \printbibliography command to filter the references. Also the natbib option allows us to use standard natbib commands for citations.

Since you want the key references to be printed as an enumerate list, we can use the command \defbibenviornment to use enumerate as the wrapper environment for them, and use the env=... option to specify it.

enter image description here

Guido
  • 30,740
  • Thanks, Guido! I had been meaning to try biblatex, and that was a great introduction. I managed to simplify it a bit by using \fullcite to enumerate the key references (they don't appear in the main text), but I learned a lot from your answer! – Winawer Jan 16 '13 at 03:29
  • If the key references are not cited in the main text there is an easy solution using natbib and bibentry – Guido Jan 16 '13 at 03:40
  • How? I tried with bibentry and natbib; what I got was the "actually looks like" version above. The document in my question is just a minimal version of the actual document, exactly as it would appear. – Winawer Jan 16 '13 at 03:49
  • You suggested not using bibentry, but is there a way to add an item in the same way? I mean, to use something like \bibentry{Citation:2001} without having to really use \cite{Citation:2001}? – aaragon Sep 21 '15 at 12:21
  • I'm a computer scientist and I cannot get this to work :-) Too bad they make the best typesetting software so very difficult. – Wouter Beek May 08 '16 at 07:58
4

This is an old question, however it may be useful to have a BibTeX-only solution. Using multibib and bibentry together this is relatively simple: define and show an additional bibliography (here: q) for the normal references (use \citeq, citepq, etc.) and show the key references as bibentry while suppressing the list for these references with \nobibliography. multibib is compatible with natbib. Compile sequence:

pdflatex mbib.tex
bibtex q
bibtex mbib
pdflatex mbib
pdflatex mbib

MWE:

mbib.tex

\documentclass[11pt]{article}
\usepackage{natbib}
\usepackage{multibib}
\newcites{q}{References}
\usepackage{bibentry}
\nobibliography*

\begin{document}

\section{Amazing idea}

Chicken chicken chicken \citepq{chicken:2010fj}. Chicken chicken, chicken \citepq{turkey:2010jk}.

\section*{Key references}

\begin{enumerate} \item \bibentry{lemur:2009ii}. \item \bibentry{gibbon:2011jk}. \end{enumerate}

\bibliographystyleq{apalike} \bibliographyq{mbibref.bib} \bibliographystyle{apalike} \nobibliography{mbibref.bib} \end{document}

mbibref.bib

@book{chicken:2010fj,
    author = {Chicken, C},
    title = {Chicken},
    publisher = {Chicken Press},
    year = {2010}
}
@book{turkey:2010jk,
    author = {Turkey, T},
    title = {Turkey},
    publisher = {Turkey Press},
    year = {2010}
}
@book{lemur:2009ii,
    author = {Lemur, L},
    title = {Lemur},
    publisher = {Lemur Press},
    year = {2009}
}
@book{gibbon:2011jk,
    author = {Gibbon, G},
    title = {Gibbon},
    publisher = {Gibbon Press},
    year = {2011}
}

If you don't want to change \citep to \citepq in an existing document then you can copy the definition of \citepq into \citep and keep using the original command name in the document.

However, because \citepq uses \citep internally you should first store the original definition in a helper command like \origcitep and use that in the new definition.

Relevant code snippet:

\usepackage{natbib}
\usepackage{multibib}
\newcites{q}{References}
\makeatletter
\let\origcitep\citep
\def\citep{\let \@citex \mb@@citex \let \@newciteauxhandle \@auxoutq \csname origcitep\endcsname}
\makeatother
\usepackage{bibentry}
\nobibliography*

\begin{document} \section{Amazing idea}

Chicken chicken chicken \citep{chicken:2010fj}. Chicken chicken, chicken \citep{turkey:2010jk}.

Similarly you can redefine \citet and \cite as well.

Marijn
  • 37,699
  • Clever. But in the context of an existing document, it would be nice if I would not have to change all existing citations. Is it also possible to define a \bibentryq instead? – Christoph Thiede Apr 28 '23 at 12:31
  • 1
    @ChristophThiede see edit for a method to use the original cite commands. – Marijn Apr 28 '23 at 13:36
  • Fair, but you would still have to do this for \citeauthor, \citeyear, etc., too, which is why I do not find this solution maximally elegant. Anyway, thanks! – Christoph Thiede Apr 28 '23 at 14:02