Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to use biblatex to generate a list of publications on my CV.

This works fine, however it doesn't generate the output I wanted:

\documentclass{article}
\usepackage[
    sorting=ydnt,
    bibstyle=ieee
]{biblatex} %ydnt: Sort by year (descending), name, title.
\addbibresource{MyPublications.bib}

\begin{document}
\cite{FirstPaper}
\printbibliography[title={Journal Papers}]
\end{document}

Then I tried this, following the example 3.10.4 in biblatex user's guide:

\documentclass{article}
\usepackage[
    sorting=ydnt,
    bibstyle=ieee
]{biblatex} %ydnt: Sort by year (descending), name, title.
\addbibresource{MyPublications.bib}
\DeclareBibliographyCategory{primary}
\addtocategory{primary}{FirstPaper}

\begin{document}
\printbibheading
\printbibliography[category=primary,heading=subbibliography,title={Journal Papers}]
\end{document}

The code produces an empty document with only a section titled 'References'.

I'm using 64-bit MiKTeX 2.9 and TeXstudio (Windows), however I also tried TeXnicCenter and WinEdt.

BTW, in the second case the .bbl file is empty (except for the header), which might give some indication as to what's wrong.

share|improve this question
1  
Have you tried setting sorting after style=ieee. As the IEEE style has a particular sort order, it sets this in the style. That will override the style you have set if you give it before. –  Joseph Wright Jun 19 '12 at 7:54

2 Answers 2

For the first one, could you elaborate on what you want to achieve and what exactly "it doesn't generate the output [you] wanted" means? Probably you should also include either a screenshot or an example .bib file.

That the second try does not show anything is clear, because nothing was cited in the document. You could use \nocite{*} before \printbibliography to display everything in the .bib file.

I think it would be more convenient to add a keyword to your bibliography entries, which describes the category, e.g. keywords = {primary}. Then you wouldn't have to change your tex file every time you add a new bib entry. So all in all it should work like:

\documentclass{article}
\usepackage[
    sorting=ydnt,
    bibstyle=ieee
]{biblatex} %ydnt: Sort by year (descending), name, title.
\addbibresource{MyPublications.bib}

\begin{document}
    \nocite{*}
    \printbibheading
    \printbibliography[keyword=primary,heading=subbibliography,title={Journal Papers}]
    \printbibliography[keyword=secondary,heading=subbibliography,title={Books}]
\end{document}

But notice also that, if you differentiate your categories by the type of the entries, like paper, book, web link etc. you could even use \printbibliography[type=book,...]. (Mentioned also in the user guide you cited)

share|improve this answer
    
I'm trying to write a CV, which means that I'm not citing anything in the document. Basically, I would like to generate a bibliography, divided into several categories (e.g. journal papers, conference papers, etc.) using a .bib file. I would also like the papers to appear in reversed chronological order, with the numbering reset for each category. I had the impression that \addtocategory does the job of \cite. –  Gregor Jun 19 '12 at 5:31

I am adding this as an answer rather than a comment to canaaerus' answer because it would otherwise be too long.

Even if you are not actually citing anything, you need to use a citation command for Biblatex to process the entries, that's the only way. Your problem has been thought of by the developers who created a \nocite command, which does the same job as the usual \cite, except it doesn't actually print the citations (just the bibliography).

The \addtocategory command adds entries to a specific category in your bibliography (like "Books" or "Journal Papers"), but it does not replace a citation command. It merely flags the entries as belonging to one category or another, and it becomes effective only once they are cited (so you can have a main file defining categories and use it for all of your papers).

In order to sort your entries into sub-categories, the easiest option may be to use type and nottype (they refer to the entry type, e.g. "book" or "article"), or keyword and notkeyword, category and notcategory, etc. You can use several of them in order to fine-tune the sectioning.

\documentclass{article}
\usepackage[sorting=ydnt,bibstyle=ieee]{biblatex}
\addbibresource{MyPublications.bib}

\begin{document}
\nocite{*}
\printbibheading
\printbibliography[type=article,heading=subbibliography,title={Journal Papers}]
\printbibliography[type=book,heading=subbibliography,title={Books}]
\end{document}

Regarding the labelling issue, I would suggest you take a look at this answer. I don't have time to experiment right now, but it should do what you want after you play with it a bit. Note that this solution also implements reverse numbering (I am not sure you want it, but it is consistent with reverse chronological order).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.