Executing BibTeX via Auctex (RefTeX) in emacs (24.2.1) only creates a .bbl
file for the master file in a multifile document. Yet, if one wants bibliographies for each chapter, BibTeX has to be run on each .aux
file seperately. Is there a hidden option in Auctex (RefTeX) that activates this feature?
In the minimal example attached, only a .bbl
file for main.tex
is generated, but not for incl.tex
and incl2.tex
. Copying main.bbl
to incl.bbl
and incl2.bbl
resolves the situation and both the citations and bibliographies can be found in the document.
TeX distro version: texlive 2012
RefTeX version: 4.31
main.tex
\documentclass{book}
\usepackage[round,sort&compress]{natbib}
\usepackage[sectionbib]{chapterbib}
\begin{document}
\include{incl}
\include{incl2}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
incl.tex
\chapter{chap 1}
\input{inp}
\bibliographystyle{plainnat}
\bibliography{testbib} % BibTeX-File(s)
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
inp.tex
\section{sect1}
some text and a ref: \cite{test_01}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
incl2.tex
\chapter{chap 2}
\section{sect1}
some text in chap2 and same ref: \cite{test_01}
\bibliographystyle{plainnat}
\bibliography{testbib} % BibTeX-File(s)
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
testbib.bib
@book{test_01,
title = {Test},
publisher = {Test},
author = {Adam Smith},
year = {1982}
}
latexmk
from AUCTeX, which instead is able to runbibtex
on the relevant files. On this site there are some suggestions about how to setuplatexmk
in AUCTeX, I'm using the configuration suggested here.latex
,bibtex
, etc...) is up to AUCTeX, not RefTeX, RefTeX just scans bibliography databases files to help you inserting bibliography entries;-)
. Which link are you referring to? P.S. when you want to address someone in comments please start the message with@USERNAME
, otherwise he/she won't be notified.:-)
. If you want you can see this answer on stackoverflow, but that code is used also in this question here on TeX.SE. You don't need to ask a new question, just change the tag of the question;-)
.