# Automatically citing all entries in a class in a bib file

I usually add my publications to my CV from my bib file (using biblatex). At first, I used to manually cite each entry, but as the list grows, it's becoming a chore (especially since there are quite a few publications in between my CV updates and I can never seem to remember the chronological order). I would like to be able to tell biblatex to scan my bib file, pull out all @article entries and cite them under a heading "Journal publications", then all the @inproceedings entries and cite them under "Conference proceedings" and so on (i.e., without individually citing them).

I can manage naming/styling the sections and headings, but I'm stuck at doing the automatic citing. How can I do this? Here's a very minimal example without the frills to get started:

### The .bib file:

@article{Doe2012a,
author  = {J. Doe},
title   = {Lorem Ipsum -- Part I},
journal = {J. Dolor Sit Am.},
volume  = {1},
pages   = {1--10},
month   = {1},
year    = {2012},
}

@article{Doe2012b,
author  = {J. Doe},
title   = {Lorem Ipsum -- Part II},
journal = {J. Dolor Sit Am.},
volume  = {2},
pages   = {11--20},
month   = {2},
year    = {2012},
}

@book{Doe,
author    = {J. Doe},
title     = {Lorem Ipsum -- Complete Works},
publisher = {{Dolor S. Amet and Sons}},
year      = {2011},
}


### The .tex file:

\documentclass{article}
\usepackage{biblatex,lipsum}

\begin{document}
\section{Lorem Ipsum}
\lipsum[1]
\subsection{Publications}
%Scan the bib file and print all @article entries in descending order here!

\section{Dolor sit Amet}
\lipsum[1]
\end{document}

-

I think you want to use the type=<entrytype> option to \printbibliography (§ 3.6.2 in the manual). E.g.:

\documentclass{article}
\usepackage[backend=biber]{biblatex}

\begin{document}
\nocite{*}

\printbibliography[title=Articles, type=article]

\printbibliography[title={Conference Proceedings}, type=inproceedings]

\end{document}


Using the supplied bibliography items:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Doe2012a,
author  = {J. Doe},
title   = {Lorem Ipsum -- Part I},
journal = {J. Dolor Sit Am.},
volume  = {1},
pages   = {1--10},
month   = {1},
year    = {2012},
}

@article{Doe2012b,
author  = {J. Doe},
title   = {Lorem Ipsum -- Part II},
journal = {J. Dolor Sit Am.},
volume  = {2},
pages   = {11--20},
month   = {2},
year    = {2012},
}

@book{Doe,
author    = {J. Doe},
title     = {Lorem Ipsum -- Complete Works},
publisher = {{Dolor S. Amet and Sons}},
year      = {2011},
}
\end{filecontents}

\usepackage[backend=biber, sorting=nty, style=authoryear]{biblatex}

\begin{document}
\nocite{*}
\printbibliography[title=Articles, type=article]
\printbibliography[title={Conference Proceedings}, type=inproceedings]
\printbibliography[title={Books}, type=book]
\end{document}


I get the two articles under 'Articles' and the one book under 'Books', while the nothing is printed under 'Conference Proceedings' (including even the section title).

-
Ooh, that does looks like what I need! Thanks. However, I seem to be getting only one bib item displayed in the output (although I agree that this should work in principle). Do you have any ideas of what could've happened? –  user24497 Jan 17 '13 at 6:32
@user24497 -- If I try using your supplied bib entries (and add a line for type=book), I get the two entries under 'Articles', nothing under 'Conference Proceedings', and one entry under 'Books'. Are you using the same bib items? –  jon Jan 17 '13 at 6:50
If I run your self-contained .tex file using my MWE, I get LaTeX Warning: Empty bibliography on input line 38. (and for lines 39 and 40), which correspond to the three \printbibliography statements and no PDF file is output. –  user24497 Jan 17 '13 at 6:59
@user24497 -- Yes, but then run biber and latex again. (Or use bibtex, but then fix the options to biblatex....) –  jon Jan 17 '13 at 7:00
Haha, there was a time when I would've taken the bait, but these days, I go after the cavemen that still use notepad/gedit =) –  user24497 Jan 17 '13 at 7:13