13

I was reading the question titled Customizing emacs to use biblatex-biber instead of bibtex. In that question, user @PLK mentions that as of auctex 11.87, auctex should automatically check if you are using biblatex and if so, switch to using biber. I have auctex 11.87 installed and running, but I am not getting this automatic switching behavior.

Say I have two files (borrowed from this question).

test.tex

\documentclass{article}
\usepackage[backend=biber]{biblatex}

\addbibresource{test.bib}
\defbibheading{bibliography}{}

\begin{document}
    \nocite{*}
    \subsection*{Journal Publications:}
    \printbibliography[type=article]

    \subsection*{Conference Publications:}
    \printbibliography[type=inproceedings]

\end{document}

and test.bib

@ARTICLE{abc,
  author = {A Author},
  title = {the article title},
  journal = {the journal},
  year = {2012},
  volume = {1},
  pages = {1--2},
  number = {1},
  month = {1},
  doi = {1234/5678}
}

@INPROCEEDINGS{def,
  author = {A Author},
  title = {the proceeding title},
  journal = {the conference},
  year = {2012},
  volume = {1},
  pages = {11--12},
  number = {1},
  month = {1},
  doi = {5678/1234}
}

If I run the following commands:

pdflatex test.tex
biber test
pdflatex test.tex

I end up with a properly processed document. In emacs, when I press C-c C-c and select the BibTeX command, emacs runs bibtex test instead of biber test. I am then greeted with errors about no \citation \bibdata or \bibstyle commands. My bibtex-dialect variable is automatically getting set to biblatex, LaTeX-biblatex-use-Biber is set to t, TeX-command-Biber is set to Biber, but for some reason TeX-command-BibTex variable is still set to BibTeX. Should this automatically get changed to Biber? Do I have to set it using a local variable? Is this a bug, or am I doing something wrong?

EDIT

According to this page in the AUCTeX 11.87 manual:

In case you use biblatex in a document, AUCTeX switches from BibTeX to Biber for bibliography processing.

So I feel like this automatic switch should already be happening.

5
  • AUCTeX 11.88 will be able to automatically decide whether using biber or bibtex looking at biblatex load options.
    – giordano
    Commented Aug 20, 2013 at 15:56
  • Do you have the lines (setq TeX-auto-save t) (setq TeX-parse-self t) (setq-default TeX-master nil) in your .emacs?
    – giordano
    Commented Aug 20, 2013 at 16:08
  • I have the first two, but not the TeX-master line. Adding it makes no difference to the behavior. I just realized that I had a small mistake in my .emacs. Fixing that, I now see that AUCTeX 11.87 has added a Biber command to the TeX-command-list. Using C-c C-c and choosing Biber instead of BibTeX will allow the document to be correctly processed. I still feel like either the 11.87 documentation is slightly misleading, or I'm still doing something wrong. Commented Aug 20, 2013 at 16:19
  • Yes, the TeX-master-file isn't really important in this case, the only fundamental option is TeX-parse-self, which enables parsing. When parsing is activated, AUCTeX 11.87 will prompt for Biber or BibTex depending on the value of LaTeX-biblatex-use-Biber, but won't be able to automatically decide which backend is to be used, you have always to adapt the value of LaTeX-biblatex-use-Biber. As I already said, next AUCTeX version will have the ability to choose the right backend.
    – giordano
    Commented Aug 20, 2013 at 16:25
  • Excellent thanks for your help! It sounds like I was just reading a bit too much into the documentation. Commented Aug 20, 2013 at 16:31

2 Answers 2

13

AUCTeX uses bibtex as default bibliography processor. If one activates parsing of LaTeX documents setting the variable TeX-parse-self to t, in source files with an explicit \usepackage{biblatex} line AUCTeX prompts for biber or bibtex processor depending on the value of the variable LaTeX-biblatex-use-Biber, which defaults to t. But until version 11.87, AUCTeX isn't able to automatically choose the bibliography processor, which is set in a LaTeX document with the backend load option of the biblatex package.

Starting from version 11.88, to be released in the next weeks or few months, AUCTeX will look at biblatex load options to automatically choose between biber and bibtex. In this version, the variable LaTeX-biblatex-use-Biber will be removed since it will be no more needed.

0
3

Note that if \usepackage{biblatex} is written in different lines as, e.g.,

\usepackage[
  backend=biber,
  style=numeric,
  sorting=none
             ]
              {biblatex}

AUCTeX will not notice it and leaves LaTeX-biblatex-use-Biber false.

You must log in to answer this question.

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