I am trying to include references in a document of mine but I have a problem.
First of all I use Emacs+AUCTex in Ubuntu.
I have the following .tex
and .bib
files:
Document File
\documentclass[11pt]{article}
\usepackage{parskip}
\setlength{\parindent}{0cm}
\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage[greek,english]{babel}
\setmainfont
[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
Mapping=tex-text
]{GFSArtemisia}
\setsansfont[Mapping=tex-text]{GFSArtemisia.otf}
\setmathfont{latinmodern-math.otf}
\setmathfont[range=\varnothing]{Asana-Math.otf}
\setmathfont[range=\int]{latinmodern-math.otf}
\usepackage{multicol}
\usepackage{lettrine}
\usepackage{lipsum}
\title{Information Theory Project}
\author{Name}
\date{}
\begin{document}
\maketitle
\begin{abstract}
\lipsum[1]
\end{abstract}
\begin{multicols}{2}
\lipsum[1-2]
Cite this book: \cite{Cover}
\end{multicols}
\bibliographystyle{plain}
\bibliography{Bibliography}
\end{document}
Bibliography File
@BOOK{Cover,
Author = "Thomas M. Cover and Joy A. Thomas",
Title = "Elements of Information Theory",
Edition = "2",
Year = "2006",
Publisher = "John Wiley and Sons",
}
My problem is that in Sharelatex it works without issues but when I compile it with Emacs it doesn't work.
I get the following warnings:
LaTeX Warning: Citation `Cover' undefined on input line 25.
No file "Project".bbl.
[1] (./Information Theory Project.aux)
LaTeX Warning: There were undefined references.
Why is this happening and how can I fix it?
Best Answer
As a general rule, in order to produce the bibliography you have to run the bibliography engine (
bibtex
in your case) after compiling the main document.You get that warning because you didn't run
bibtex
. In AUCTeX, you canonly issue C-c C-c RET, generally AUCTeX is able to suggest the right operation to do
force running
bibtex
with: C-c C-cbibtex
RET should AUCTeX fail to detect the program to run (but this is not the case)press the book icon in the toolbar (
Run BibTeX
is its tooltip)go to the menu
Command
>BibTeX