2

I'm making my resume and I'd like to add my list of publications. However, I have a different .bib file for each kind of publication (since I am trying to add book chapters separated from international publications, separated from congress appearances, etc). Each one of the bib files has its own section for them to go to in the main CV file.

The way I have been doing this is by creating a separate small script for each bib, such as this one below (there are 4 more like this)

\documentclass[letterpaper]{article}
\usepackage[latin1]{inputenc}

\begin{document}
\bibliographystyle{ieeetr}
\nocite{*}
\bibliography{myintpubs}
\end{document}

Which generates a pdf document, but also generates a .bbl file. So I manually compile each of these little scripts (one for each kind of publication I'm trying to separate) and input the generated .bbl files in their own section at the main pdf. Like this:

\begin{rSection}{International Journal Publications}
\begingroup
\renewcommand{\section}[2]{}
\input{./makerefen2/intpub_makeref.bbl}
\endgroup
\end{rSection}

{\bf Talks and presentations}\\
\begingroup
\renewcommand{\section}[2]{}
\input{./makerefen/talk_makeref.bbl}
\endgroup

And then I compile the main pdf and everything works out. The problem is that this is very inefficient, given that for every change I make I have to do pdflatex, bibtex, pdflatex just to generate the .bbls (for each of the bib files), and only then compile the main pdf.

I'm pretty sure there's a better way to do this. Perhaps using biblatex instead of bibtex. So my question is: what's a cleaner, better way of doing this?

PS: this is related to this question (and I believe the answer to that also applies here), but I simply could not reproduce that.

TomCho
  • 221

1 Answers1

3

With biblatex and biber you don't have to go through the ordeal of using different .bib files. It is very easy to filter bibliography lists by publication type (entry type).

You could just do

\printbibliography[type=article,title={Articles in peer-review journals}]
\printbibliography[type=book,title={Books}]
\printbibliography[nottype=book,nottype=article,title={Other stuff I did}]

and would be done with it.

Note that you can not only filter bibliographies by type, you can also use keywords in your .bib file and categories on the fly from the document itself as well as other more intricate filtering with bibfilters.

You can still use this approach, if you want. Just load all .bib files with \addbibresource.

See also Sectioning bibliography by type of referred item.


But you can also use a method that relies on the separation by .bib file only. (This is especially useful if you need more fine-grained separation than just by entry types and already have the .bib files set up for this task.)

For that we assign a label to each .bib file when we load it with \addbibresource:

\addbibresource[label=books]{mybib-books.bib} 
\addbibresource[label=articles]{mybib-articles.bib} 

We then use refsections to separate the bibliographies, each refsection gets one of the .bib files identified via its label.

\begin{refsection}[books]
\nocite{*}
\printbibliography[title={Books}]
\end{refsection}

\begin{refsection}[articles]
\nocite{*}
\printbibliography[title={Articles}]
\end{refsection}

Will print two bibliographies. The first coming from mybib-books.bib (identified with the books label) and the second from mybib-articles.bib (identified with articles).

\documentclass[british]{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname-books.bib}
@book{book1,
  author = {Anne Uthor},
  title = {My First Book},
  date = {2010},
}
@book{book2,
  author = {Anne Uthor},
  title = {My Second Book},
  date = {2010},
}
\end{filecontents*}
\begin{filecontents*}{\jobname-articles.bib}
@article{article1,
  author = {Anne Uthor},
  title = {My First Article},
  journal = {Best Journal Ever},
  date = {2012},
}
@book{article2,
  author = {Anne Uthor},
  title = {My Second Article},
  journal = {Journal of Articles},
  date = {2013},
}
\end{filecontents*}

\addbibresource[label=books]{\jobname-books.bib} 
\addbibresource[label=articles]{\jobname-articles.bib} 

\begin{document}
\begin{refsection}[books]
\nocite{*}
\printbibliography[title={Books}]
\end{refsection}
\begin{refsection}[articles]
\nocite{*}
\printbibliography[title={Articles}]
\end{refsection}
\end{document}
moewe
  • 175,683