0

I suspect I am missing some configuration value but can't figure out which one. When I use \newrefcontext to prefix each of my references with a given label (option labelprefix=...) I end up with my references not being listed at all (with \printbibliography). This is a simplified version of my TeX file:

\documentclass[a4paper,10pt]{article}

% Import packages: 
\usepackage[utf8]{inputenc}                                     
\usepackage[
    backend=bibtex,
    style=numeric,
    sorting=ydnt,
    defernumbers=true,
    maxbibnames=99]{biblatex}

\addbibresource{bib_source_file}  % Biblatex source.

\begin{document}
% The following line is just a test:
\cite{Araguz2018X}                % shows [0] unless \newrefcontext is commented out
\section*{Journals}
\newrefcontext[labelprefix=J]     % If commented-out, ALL references are 
                                  % listed (without prefix)
\nocite{Araguz2018Y}
\printbibliography[resetnumbers=true]

\section*{Conferences}
\newrefcontext[labelprefix=C]     % Same than above. Commenting gives the list of 
                                  % ALL non-prefixed refs.
\nocite{Araguz2018Z}
\printbibliography[resetnumbers=true]

\end{document}

1 Answers1

1

When I run your example I get the message

Package biblatex Warning: Using fall-back BibTeX(8) backend:
(biblatex)                functionality may be reduced/unavailable.

in the .log file.

And indeed refcontexts, as useful as they are, are amongst the features that are only properly supported if you use Biber as backend.

If I change backend=bibtex to backend=biber and run Biber (see Biblatex with Biber: Configuring my editor to avoid undefined citations), the example works as expected.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[
    backend=biber,
    style=numeric,
    sorting=ydnt,
    defernumbers=true,
    maxbibnames=99]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{worman}

\section*{Journals}
\newrefcontext[labelprefix=J]
\nocite{sigfridsson}
\printbibliography[resetnumbers=true]

\section*{Conferences}
\newrefcontext[labelprefix=C]
\nocite{geer}
\printbibliography[resetnumbers=true]
\end{document}

The example shows two bibliographies with the same three entries, the only difference is the prefix in the label

moewe
  • 175,683
  • Thank you, that was exactly the solution. Apparently, BiBTeX does not support refcontexts, as you suggest. https://tex.stackexchange.com/questions/317394/labelprefix-to-newrefcontext-replacing-prefixnumbers-to-printbibliography-not-wo – Carles Araguz Nov 07 '18 at 13:26