5

I have read through out many post concerning the use of multiple .bib files in order to use \nocite and multiple bib files, into a CV. The goal is my cv to have a different sector per bib files.

I saw that most suggestions pointed out the moderncv.tex package, thus I used the packages suggestion to adapt their commands and into my CV.

I use two different files a journal.bib and a conf.bib (exported from Mendeley).

the MWE for the two .bib files are for the journal.bib

@article{journal,
author = {Smith, A},
journal = {A journal},
title = {{A journal}},
year = {2016}
}

for the conf.bib

@inproceedings{Conf,
author = {Smith, A},
booktitle = {Conference 1},
title = {{Conference title}},
year = {2016}
}

The .tex file is MWE is

\documentclass{article} % Use the custom resume.cls style
\usepackage[left=0.2in,top=0.3in,right=0.2in,bottom=0.5in]{geometry} 

\begin{document}

\renewcommand{\refname}{Articles}
\bibliographystyle{plain}
\nocite{journal}
\bibliography{journal} 

\renewcommand{\refname}{Conferences}
\bibliographystyle{plain}
\nocite{Conf}
\bibliography{conf} 

\end{document}

When i use only one the list in the document is fine, although when I move on and change into the second bib file the produced file does not correpond to the result I want. I get this enter image description here

Although what I want is something like that (it has been hand written it, not automated) enter image description here

I have read and tried also other option such as \multibib, \biblatex etc. but perhaps I am missing something, or not understand it correctly. Any help would be great, thank you very much

George
  • 185

2 Answers2

6

Biblatex allows you to do this in a very simple way:

\documentclass{article}

\usepackage[defernumbers=true]{biblatex}

\addbibresource{journal.bib} 
\addbibresource{conf.bib}

\begin{document}
\nocite{*}

\printbibliography[title={Journal Articles}, type=article, resetnumbers=true]

\printbibliography[title={Conference Papers}, type=inproceedings, resetnumbers=true]

\end{document}

For each bib file you want to use you have to use one \addbibresource (it does no matter what entry type they contains). Then, to print all references of type article you use the type=article of \printbibliography (similarly for the other entry types).

To create the pdf file, run (pdf)latex once, then biber and the (pdf)latex again.

Guido
  • 30,740
  • thank you very much for your answer. I am trying to compile, but it produces nothing, – George Jun 24 '16 at 09:16
  • do you compile with biber? – Guido Jun 24 '16 at 09:17
  • Yes I added through the configuration biber twice before pdflatex, but no go – George Jun 24 '16 at 09:19
  • it is pdflatex, biber, pdflatex – Guido Jun 24 '16 at 09:20
  • Yes I have assigned PDFlatex-biber-PDFLatex to build – George Jun 24 '16 at 09:21
  • what does the logs tell you? – Guido Jun 24 '16 at 09:27
  • Log says biblatex.sty "no backend" specified, that type "article" not found, type "inproceeding" not found, and that the bibliography (bbl is empty). I checked the bib files and they are as the one I posted, odd – George Jun 24 '16 at 09:31
  • 3
    Is there a way to accomplish this where separation is by source bibliography file? I'd like to separate my preprints from my other publications, but the "type" as auto-translated by zotero doesn't disambiguate the two, and I'd rather not monkey with the internal structure of the bib file, since I generally let zotero generate them for me. – Daniel Kessler Nov 17 '16 at 14:16
  • there is the "keyword" parameter for filtering as well, so you might be able to munge keywords in as filter criteria e.g. \printbibliography[title={Preprints}, keyword={preprint}, resetnumbers=true] – Neil Apr 05 '18 at 23:09
0

I use the following code for using different references from different files in Latex:

\bibliographystyle{splncs04} % your referencing style

% with two reference files of ref1.bib and ref2.bib: \bibliography{ref1.bib, ref2.bib}

RFAI
  • 101