4

I have what follows:

\documentclass{article}
\begin{filecontents*}{mybib.bib}
@ARTICLE{refconf,
    author = {author},
    title = {title},
    keywords = {conference}}
@ARTICLE{refjour,
    author = {author},
    title = {title},
    keywords = {journal}}
@ARTICLE{ref,
    author = {author},
    title = {title}}
\end{filecontents*}
\usepackage[style=numeric-comp,backend=biber]{biblatex}
\bibliography{mybib}
\defbibheading{bibempty}{}

\begin{document}
\cite{refjour}, \cite{refconf}, \cite{ref}
\subsection{Personal Conference references}
\printbibliography[keyword=conference,heading=bibempty]
\subsection{Personal Journal references}
\printbibliography[keyword=journal,heading=bibempty]
\subsection{Other references}
\printbibliography[heading=bibempty]
\end{document}

which is not too bad but I need to customize the labels such that \cite{refjour} yields [j.1] (j. for journal) in the main text as well as in the list of references, and that \cite{refconf} yields [c.1], and finally \cite{ref} yields [1].

1 Answer 1

10

A similar question to this one was recently posted. Prefixes to labelnumber can be easily added using the prefixnumbers option of \printbibliography. This option needs defernumbers enabled globally. For the last reference list, you'll probably want to filter out the previous keywords. The notkeyword filter can be used more than once. All this is demonstrated using your MWE below.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp,defernumbers=true]{biblatex}

\begin{filecontents*}{\jobname.bib}
@ARTICLE{refconf,
    author = {author},
    title = {title},
    keywords = {conference}}
@ARTICLE{refjour,
    author = {author},
    title = {title},
    keywords = {journal}}
@ARTICLE{ref,
    author = {author},
    title = {title}}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\cite{refjour}, \cite{refconf}, \cite{ref}
\printbibheading
\printbibliography[keyword=conference,prefixnumbers={c.},
  heading=subbibliography,title={Personal Conference references}]
\printbibliography[keyword=journal,prefixnumbers={j.},
  heading=subbibliography,title={Personal Journal references}]
\printbibliography[notkeyword=journal,notkeyword=conference,prefixnumbers={},
  heading=subbibliography,title={Other references}]
\end{document}
5
  • Thanks! I had not seen the similar question. It seems that you do not like the \subsection{Personal conference references} together with \printbibliography[heading=empty] structure: is there a reason for this?
    – pluton
    Oct 17, 2011 at 4:47
  • @pluton No - I just wanted to demonstrate another way to generate the section titles.
    – Audrey
    Oct 17, 2011 at 4:56
  • one problem: if I use \printbibliography[notkeyword=journal,notkeyword=conference] before the two other ones, the numbering will be correct, ie I'll get [1], [c.1], and [j.1]. But if I use it afterwards, I'll get [c.1], [j.1], and [2]. It looks like option defernumbers=true has no effect in the second case?
    – pluton
    Oct 25, 2011 at 18:31
  • 1
    @pluton Sorry - I should have tested your example. Looks like prefixes are all-or-nothing with multiple bibliographies. I'll edit the answer.
    – Audrey
    Oct 26, 2011 at 2:57
  • A more correct way may be to use resetnumbers instead of prefixnumbers= {} in the last one
    – Juhl
    Jun 22, 2015 at 12:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .