Discussion:
[Bug-AUCTeX] 11.87; biblatex & biber: unresolved citations
George Pigman
2013-07-16 18:21:46 UTC
Permalink
Although the log file contains "Package biblatex Warning: Please (re)run
Biber on the file," AUCTeX prints the message, "LaTeX: there were
unresolved citations," and prompts with "View" instead of "Biber."
Here's a minimal working example.

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
author = {David Hume},
editor = {David Fate Norton},
title = {A Treatise of Human Nature},
publisher = {Oxford University Press},
year = 2000,
address = {Oxford},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

\textcite{hume1739}

\printbibliography[heading=bibintoc]

\end{document}

George Pigman


Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-05-15 on deerslayer.local
Package: 11.87

current state:
==============
(setq
AUCTeX-date "2012-11-30"
window-system 'ns
LaTeX-version "2e"
TeX-style-path '("/usr/local/var/auctex"
"/usr/local/share/emacs/site-lisp/auctex/style"
"/Users/gwp/.emacs.d/auctex/auto"
"/Users/gwp/.emacs.d/auctex/style" "auto" "style")
TeX-auto-save nil
TeX-parse-self t
TeX-master t
TeX-command-list '(("Skim"
"/Applications/Skim.app/Contents/SharedSupport/displayline
%n %s.pdf \"%b\"" TeX-run-discard-or-function t t
:help "Forward search with Skim")
("Make LaTeX" "latexmk -xelatex -synctex=1 %s"
TeX-run-TeX
nil t :help "Run latexmk")
("TeXShop" "/usr/bin/open -a TeXShop.app %s.pdf"
TeX-run-discard-or-function t t :help "Run
TeXShop")
("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil
(plain-tex-mode ams-tex-mode texinfo-mode) :help
"Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
(latex-mode doctex-mode) :help "Run LaTeX")
("Makeinfo" "makeinfo %t" TeX-run-compile nil
(texinfo-mode) :help "Run Makeinfo with Info
output")
("Makeinfo HTML" "makeinfo --html %t"
TeX-run-compile nil
(texinfo-mode) :help "Run Makeinfo with HTML
output")
("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil (ams-tex-mode) :help "Run
AMSTeX")
("ConTeXt" "texexec --once --texutil
%(execopts)%t"
TeX-run-TeX nil (context-mode) :help "Run ConTeXt
once")
("ConTeXt Full" "texexec %(execopts)%t"
TeX-run-TeX nil
(context-mode) :help "Run ConTeXt until
completion")
("Biber" "biber %s" TeX-run-Biber nil t :help "Run
Biber")
("View" "%V" TeX-run-discard-or-function t t :help
"Run Viewer")
("Check" "lacheck %s" TeX-run-compile nil
(latex-mode)
:help "Check LaTeX file for correctness")
("Clean" "TeX-clean" TeX-run-function nil t :help
"Delete generated intermediate files")
("Clean All" "(TeX-clean t)" TeX-run-function nil
t :help
"Delete generated intermediate and output files")
("Other" "" TeX-run-command t t :help
"Run an arbitrary command")
)
)
Mosè Giordano
2013-07-16 20:55:23 UTC
Permalink
Hi George,

AUCTeX doesn't accept `\jobname.bib' as a valid bibliography source,
backslash isn't allowed in `LaTeX-auto-regexp-list' entries for
`\addbibresource' and `\bibliography', and so
`(LaTeX-bibliography-list)' returns `nil' in `TeX-LaTeX-sentinel'.
Possible fixes: removing `(LaTeX-bibliography-list)' check from the
sentinel or changing `\addbibresource' and `\bibliography' regexes in
`LaTeX-auto-regexp-list'. Other suggestions?

Bye,
Mosè
Post by George Pigman
Although the log file contains "Package biblatex Warning: Please (re)run
Biber on the file," AUCTeX prints the message, "LaTeX: there were
unresolved citations," and prompts with "View" instead of "Biber."
Here's a minimal working example.
\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
author = {David Hume},
editor = {David Fate Norton},
title = {A Treatise of Human Nature},
publisher = {Oxford University Press},
year = 2000,
address = {Oxford},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\textcite{hume1739}
\printbibliography[heading=bibintoc]
\end{document}
George Pigman
Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-05-15 on deerslayer.local
Package: 11.87
==============
(setq
AUCTeX-date "2012-11-30"
window-system 'ns
LaTeX-version "2e"
TeX-style-path '("/usr/local/var/auctex"
"/usr/local/share/emacs/site-lisp/auctex/style"
"/Users/gwp/.emacs.d/auctex/auto"
"/Users/gwp/.emacs.d/auctex/style" "auto" "style")
TeX-auto-save nil
TeX-parse-self t
TeX-master t
TeX-command-list '(("Skim"
"/Applications/Skim.app/Contents/SharedSupport/displayline
%n %s.pdf \"%b\"" TeX-run-discard-or-function t t
:help "Forward search with Skim")
("Make LaTeX" "latexmk -xelatex -synctex=1 %s"
TeX-run-TeX
nil t :help "Run latexmk")
("TeXShop" "/usr/bin/open -a TeXShop.app %s.pdf"
TeX-run-discard-or-function t t :help "Run
TeXShop")
("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil
(plain-tex-mode ams-tex-mode texinfo-mode) :help
"Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
(latex-mode doctex-mode) :help "Run LaTeX")
("Makeinfo" "makeinfo %t" TeX-run-compile nil
(texinfo-mode) :help "Run Makeinfo with Info
output")
("Makeinfo HTML" "makeinfo --html %t"
TeX-run-compile nil
(texinfo-mode) :help "Run Makeinfo with HTML
output")
("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil (ams-tex-mode) :help "Run
AMSTeX")
("ConTeXt" "texexec --once --texutil
%(execopts)%t"
TeX-run-TeX nil (context-mode) :help "Run ConTeXt
once")
("ConTeXt Full" "texexec %(execopts)%t"
TeX-run-TeX nil
(context-mode) :help "Run ConTeXt until
completion")
("Biber" "biber %s" TeX-run-Biber nil t :help "Run
Biber")
("View" "%V" TeX-run-discard-or-function t t :help
"Run Viewer")
("Check" "lacheck %s" TeX-run-compile nil
(latex-mode)
:help "Check LaTeX file for correctness")
("Clean" "TeX-clean" TeX-run-function nil t :help
"Delete generated intermediate files")
("Clean All" "(TeX-clean t)" TeX-run-function nil
t :help
"Delete generated intermediate and output files")
("Other" "" TeX-run-command t t :help
"Run an arbitrary command")
)
)
_______________________________________________
bug-auctex mailing list
https://lists.gnu.org/mailman/listinfo/bug-auctex
George Pigman
2013-07-16 21:35:21 UTC
Permalink
Post by Mosè Giordano
AUCTeX doesn't accept `\jobname.bib' as a valid bibliography source,
backslash isn't allowed in `LaTeX-auto-regexp-list' entries for
`\addbibresource' and `\bibliography', and so
`(LaTeX-bibliography-list)' returns `nil' in `TeX-LaTeX-sentinel'.
Thanks, Mosè, but I don't think that's the problem. If I generate test.bib, change \jobname to test, and make sure that test.tex is newer than test.bib, the same thing happens.

A radical fix, which probably has bad consequences, is to change TeX-command-Show in the last line of the following from tex-buf.el to TeX-command-Biber.

((re-search-forward "^\\(?:LaTeX Warning: Citation\\|\
Package natbib Warning:.*undefined citations\\)" nil t)
(message "%s%s%s" name ": there were unresolved citations, "
(TeX-current-pages))
(setq TeX-command-next TeX-command-Show))

But presumably there's a better way.

George
Mosè Giordano
2013-07-17 00:03:04 UTC
Permalink
Hi George,
Post by George Pigman
Post by Mosè Giordano
AUCTeX doesn't accept `\jobname.bib' as a valid bibliography source,
backslash isn't allowed in `LaTeX-auto-regexp-list' entries for
`\addbibresource' and `\bibliography', and so
`(LaTeX-bibliography-list)' returns `nil' in `TeX-LaTeX-sentinel'.
Thanks, Mosè, but I don't think that's the problem. If I generate test.bib, change \jobname to test, and make sure that test.tex is newer than test.bib, the same thing happens.
After replacing `\jobname' with `test' you need to revert the buffer
to make the change effective to AUCTeX.

I've just verified that removing the `(LaTeX-bibliography-list)' check
fixes the bug, I'm just not sure it's definitely a good idea removing
it.

Bye,
Mosè
Tassilo Horn
2013-07-17 06:35:35 UTC
Permalink
Post by Mosè Giordano
After replacing `\jobname' with `test' you need to revert the buffer
to make the change effective to AUCTeX.
I've just verified that removing the `(LaTeX-bibliography-list)' check
fixes the bug, I'm just not sure it's definitely a good idea removing
it.
I wanted to reproduce the issue, but I don't have biber installed and
cannot find out where in TeXLive it lives. I have biblatex installed,
but no biber command...

Anyway, when I try to run the Biber command on the document, I get the
message

Biber finished successfully. Run LaTeX again to get citations right.

but in *.../biber output* there's:

--8<---------------cut here---------------start------------->8---
Running `Biber' on `biber' with ``biber biber''
/bin/sh: biber: command not found

TeX Output exited abnormally with code 127 at Wed Jul 17 08:32:19
--8<---------------cut here---------------end--------------->8---

So something's wrong in there. AUCTeX thinks it ran successfully even
if it has not. That might also be the problem in your case.

Bye,
Tassilo

George Pigman
2013-07-17 00:26:12 UTC
Permalink
Post by Mosè Giordano
After replacing `\jobname' with `test' you need to revert the buffer
to make the change effective to AUCTeX.
Hi Mosè,

Yes, that fixes the test case, which turns out to have raised a different issue. So much for a mwe. Now for my real problem.

The actual situation is more complicated. I have a master file for a book in a parent directory, which also includes the .bib file. The chapters are in subdirectories, are included in the master file, and end with TeX-master in the local variables section. When I run TeX-command-master either on book.tex (the master file) or on, say, ch1.tex (one of the chapters), the message is "You should run LaTeX again to get references right," and I prompted to run LaTeX again (not Biber). I cleaned out all of the intermediate files and restarted emacs to make sure there wasn't a problem with the buffer state.

Is there a way to handle this situation?

Thanks for your help,

George
Loading...