I'm trying to use biblatex
to make sectioned bibliographies like here: Section bibliographies
However it doesn't seem to work over at ShareLaTeX. This works:
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{biblio} % the ref.bib file
\begin{document}
Hi there, Stackoverflowers\cite{patashnik_88}
\printbibliography
\end{document}
But when I add the \refsection
etc it doesn't:
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{biblio} % the ref.bib file
\begin{document}
\begin{refsection}
Hi there, Stackoverflowers\cite{patashnik_88}
\printbibliography[heading=subbibliography]
\end{refsection}
\printbibliography
\end{document}
This is the biblio.bib file:
@book{knuth79,
author = "Donald E. Knuth",
title = "Tex and Metafont, New Directions in Typesetting",
year = "1979",
publisher = "American Mathematical Society and Digital Press",
address = "Stanford"
}
@book{lamport94,
author = "Leslie Lamport",
title = "Latex: A Document Preparation System",
year = "1994",
edition = "Second",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@misc{patashnik_88,
author = "Oren Patashnik",
title = "{B}ib{T}e{X}ing. Documentation for General {B}ib{T}e{X} users",
year = "1988",
howpublished = "Electronic document accompanying BibTeX
distribution"
}
@techreport{rahtz89,
author = "Sebastian Rahtz",
title = "A Survey of {T}ex and graphics",
year = "1989",
institution = "Department of Electronics and Computer Science",
address = "University of Southampton, UK",
number = "CSTR 89-7"
}
This is what I get:
Why is the underscore acting up (even without the underscore no bibliography is outputted) and is this a ShareLaTeX issue or am I doing something wrong?
P.S. The example is 'borrowed' from here: ShareLaTeX and biblatex
Best Answer
As far as I see you cannot make this work in ShareLaTeX. It is not really a service I use though, so there may be something I'm missing.
The problem is as follows:
In your first example, that works, information about which works are cited is written to a temporary file called
<filename>.aux
, where<filename>
is the name of your.tex
file. To extract the information from the bibliography file, thebibtex
program is run on that.aux
file, which picks up the\cite
commands used, and creates a bibliography that is written to a second temporary file.When
biblatex
createsrefsection
s however, it generates a separate.aux
file for eachrefsection
, called something like<filename>1-blx.aux
,<filename>2-blx.aux
, etc. One has to runbibtex
on all of these to generate the separate bibliographies, but ShareLaTeX is probably set up to runbibtex
only on the.aux
file that has the same base filename as the.tex
file. Hence, these additional.aux
files are not processed, and you don't get any output.If ShareLaTeX had included support for
biber
, which is a modern replacement of thebibtex
program, this would solve it, asbiber
handles this without the need of such additional temporary files. The developers are working on that I think (http://www.sharelatex.com/help/discussions/suggestions/40-biber-support-in-sharelatex), but I do not know what the status is.