I'm using AUCTeX along with RefTeX in Emacs 25.1.1. My question is how to make AUCTeX to compile Bibliography without having to explicitly provide \bibliographystyle
and \bibliography
in every file.
For example, I have the following options enabled in .emacs
(require 'reftex)
(setq reftex-mode t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(setq reftex-default-bibliography '("/path-to/refLib.bib"))
And as expected when I perform C-c [
RefTeX is able to identify and insert citations. So here is an example of a simple LaTeX file file1.tex
one citation from the RefTeX default bib file.
\documentclass[12pt]{article}
\usepackage{hyperref}
\tolerance=1000
\usepackage[margin=1in]{geometry}
\usepackage{enumitem}
\setlist[enumerate,itemize]{noitemsep,nolistsep,leftmargin=*}
\date{}
\title{Testing Bib}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 25.1.1 (Org mode 8.2.10)}}
\begin{document}
\maketitle
\section{Testing Bib Once}
\label{sec-1}
SCHEDULED \textit{<2017-03-31 Fri 11:03>}
\subsection{Modeling Updates}
\label{sec-1-1}
\begin{itemize}
This is a bibliography test \cite{hohenberg_inhomogeneous_1964}
\end{itemize}
% Emacs 25.1.1 (Org mode 8.2.10)
\end{document}
LaTeX compiles through C-c C-c LaTeX
. However when I perform C-c C-c BibTeX
it throws me an error as follows
I found no \bibdata command---while reading file file1.aux
I found no \bibstyle command---while reading file file1.aux
When AUCTeX+RefTeX are able to find citations to insert, I'm not sure what is the issue in compiling without explicitly specifying the BiBTeX file.