TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Emacs's org-mode to draft papers. I also use the tufte-latex package.

Currently my .emacs looks like this:

(setq org-latex-to-pdf-process
     '("xelatex -interaction nonstopmode %f"
       "xelatex -interaction nonstopmode %f")
(require 'org-latex)
(add-hook 'org-mode-hook (lambda () (org-indent-mode 1)))
(unless (boundp 'org-export-latex-classes)
(setq org-export-latex-classes nil))

(add-to-list 'org-export-latex-classes
("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\subsubsubsection{%s}" . "\\subsubsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Now I am trying to export file called tnc.org. There is a tnc.bib file in the same directory. I include it in the .org file thus:


However, when I try to export using org-mode, I get the following warning:

No file tnc.bbl.
Package natbib Warning: There were undefined citations.

The paper renders otherwise ok, except there are no sidenotes or bibliography.

What do I do?

share|improve this question
Are the entries in org-latex-to-pdf-process the commands that get run to convert your org or LaTeX file into a final PDF? If so, I don't see anything that would run BibTeX as part of the process. BibTeX's usage page uses four commands: one LaTeX run, one BibTeX run, and two more LaTeX runs. – Mike Renfro Oct 22 '11 at 15:35
Indeed, Mike, I changed the export function to this: (setq org-latex-to-pdf-process '("xelatex %f && bibtex %f && xelatex %f && xelatex %f")) and it works. Thanks. However I have a newish problem: in the bibliography, the numbers corresponding to the citations do not show up. Why is this? – cicatristeza Oct 22 '11 at 15:39
@MikeRenfro Can you turn your comment into an answer? Maybe adding that numbers before references depend on the bibliographic style used. – egreg Nov 5 '11 at 20:44
@egreg comment converted to answer. – Mike Renfro Nov 6 '11 at 21:31

Rather than hard coding a build sequence you can let latexmk take care of the build process. This will make a more flexible solution that works for other document types than the one you specified. To have Org-mode export to pdf by latexmk you can add the following line to your .emacs:

(setq org-latex-to-pdf-process (list "latexmk -pdf %f"))
share|improve this answer
to generate bbl with latexmk, '-bibtex' option is needed, which means: (setq org-latex-to-pdf-process (list "latexmk -pdf -bibtex %f")) – squid Jun 11 '15 at 8:30

Change your org-latex-to-pdf-process setting to

(setq org-latex-to-pdf-process '("xelatex %f && bibtex %f && xelatex %f && xelatex %f"))

or something similar. This sequence of commands is taken from the BibTeX usage page.

As to your bibliography numbers not appearing, this would depend on the \bibliographystyle you're using. A minimal working example in a separate question would help narrow down what's going wrong there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.