5

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:

No bibliography is shown, and the underscore becomes some weird dot thing?

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

  • Welcome to TeX.SX. The problem is that when you use a refsection a second .aux file is created, called something like filename1-blx.aux, and you have to run bibtex on this file, not on filename.aux, which is the default. I don't know how one can tell ShareLaTeX to run BibTeX on a separate file though. – Torbjørn T. Nov 26 '13 at 13:07
3

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, the bibtex 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 creates refsections however, it generates a separate .aux file for each refsection, called something like <filename>1-blx.aux, <filename>2-blx.aux, etc. One has to run bibtex on all of these to generate the separate bibliographies, but ShareLaTeX is probably set up to run bibtex 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 the bibtex program, this would solve it, as biber 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.

  • Thanks, I guess I'll just wait until biber is available and until then either run it manually or not use sectioned bibliography. This also explains why it didn't work in Texmaker (I needed to run the bibtex on the other -aux files). – just_kimming Nov 26 '13 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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