5

I want to compile my document with in the end a list of all my cited sources: 'references', but also a list of 'recommended readings', so a re-print of the same bibliography that outputs ALL sources and not solely the ones I've cited.

Is this possible? I am using xetex, bibtex icm natbib

Minimum working example:

\documentclass[letterpaper, 10pt]{article}

\usepackage[authoryear]{natbib}
\usepackage{lipsum}

\begin{document}

\lipsum[1-4]
\nocite{*}

\bibliographystyle{plain}
\bibliography{articles}

\end{document} 
lockstep
  • 250,273
grrrbytes
  • 3,855

1 Answers1

5

Here's a solution that combines natbib and multibib.

Note: Unless you use a tool like latexmk, you have to compile the following MWE using

latex <mydoc>
bibtex <mydoc>
bibtex rec
latex <mydoc>
latex <mydoc>

as specified in section 2 of the multibib documentation.

\documentclass{article}

\usepackage[authoryear]{natbib}

\usepackage{multibib}

\newcites{rec}{Recommended readings}

\usepackage{filecontents}

\begin{filecontents}{mybib.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
\end{filecontents}

\begin{document}

Some text \citep{A01}.

\nociterec{*}

\bibliographystyle{plainnat}
\bibliography{mybib}

\bibliographystylerec{plainnat}
\bibliographyrec{mybib}

\end{document}

enter image description here

lockstep
  • 250,273
  • Excuses, marked this early as an answer. Problem is that It doesn't generate the 'recommended reading part'. Is this due to this error? No file rec.bbl – grrrbytes May 05 '12 at 13:00
  • @Mixhael I updated my answer. – lockstep May 05 '12 at 13:04
  • Tnx. It does work. However, now I run into this problem again: http://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations/54482#54482 and the solution proposed on that question does not work anymore. Somehow there is a conflict between those too? – grrrbytes May 05 '12 at 13:18
  • @Mixhael When deleting the auxiliary files, look out for files called rec.<whatever> and delete those also. – lockstep May 05 '12 at 13:21
  • Hm, not sure if I'm doing it correctly: 1) deleted all files, except my .tex and .bib file. Ran xelatex latexfile, then bibtex bibtexlibrary, then bibtex rec, then xelatex latexfile and finally xelatex latexfile. Resulting in the same error: Package natbib Error: Bibliography not compatible with author-year citations. (natbib) Press <return> to continue in numerical citation style.. Re-running the process (after removing all the .bbl and .aux files) results in the same – grrrbytes May 05 '12 at 13:28
  • @Mixhael The first BibTeX run should be bibtex latexfile. – lockstep May 05 '12 at 13:31
  • excuses, that's actually what I do/did – grrrbytes May 05 '12 at 13:37
  • @Mixhael Does this happen also if you compile my MWE as-is? If not, the problem might be in your .bib file. – lockstep May 05 '12 at 13:39
  • Hm, your version works perfectly... – grrrbytes May 05 '12 at 13:43
  • Would the use of latexmk solve this issue? – grrrbytes May 05 '12 at 13:45
  • 1
    @Mixhael If my example works for you, probably not. Try with parts of your .bib file -- there may be a single entry that causes the problem. – lockstep May 05 '12 at 13:47
  • Tnx alot. Did some debugging and all works fine now :) – grrrbytes May 05 '12 at 14:09