emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] How to get BibTeX to work with Org mode LaTeX export?


From: Omid
Subject: [O] How to get BibTeX to work with Org mode LaTeX export?
Date: Sat, 18 May 2013 03:09:02 -0400

I have posted a question to tex.stackexchange.com on "How to get BibTeX to work with Org mode LaTeX export?" Here is a link to it: http://tex.stackexchange.com/questions/114864/how-to-get-bibtex-to-work-with-org-mode-latex-export. I thought this mailing list might be the best place to ask for help about it. Thanks in advance for your time.

For ease of reference, here is the question again:

I am trying to get Emacs (24.3.1), Org-mode (8.0.3, from ELPA) and BibTeX (from TeX Live 2012) to work together. I have followed the instructions under the Bibliography section in http://orgmode.org/worg/org-tutorials/org-latex-export.html but after exporting the document to LaTeX, compiling to PDF, and opening the result (with key sequence C-c C-e l o in the latest Org mode) I see a question mark instead of a citation (i.e., [?]) which means that the reference was not resolved by LaTeX. In fact, checking the Org PDF LaTeX Output buffer, I see the following warning:

LaTeX Warning: Citation `Tappert77' on page 3 undefined on input line 43.

No file org-bib-test.bbl.
[3] (.//org-bib-test.aux)

LaTeX Warning: There were undefined references.

It looked to me that probably Org-mode was looking for a .bib file with the same base name as the .org file but renaming the .bib file and updating the \bibliography line did not solve the problem.

Here are two minimal .org and .bib files that together can be used to reproduce the behavior described above:

org-bib-test.org

* Tests
** Test1 slide
   - This is test1 \cite{Tappert77}.

\bibliographystyle{plain}
\bibliography{org-bib-test-refs}

The following, using #+LATEX_HEADER, gives the same result:

org-bib-test.org

#+LATEX_HEADER: \bibliographystyle{plain}
#+LATEX_HEADER: \bibliography{org-bib-test-refs}

* Tests
** Test1 slide
   - This is test1 \cite{Tappert77}.

org-bib-test-refs.bib

@incollection {Tappert77,
AUTHOR = {Tappert, Fred D.},
TITLE = {The parabolic approximation method},
BOOKTITLE = {Wave propagation and underwater acoustics ({W}orkshop,
              {M}ystic, {C}onn., 1974)},
PAGES = {224--287. Lecture Notes in Phys., Vol. 70},
PUBLISHER = {Springer},
ADDRESS = {Berlin},
YEAR = {1977},
MRCLASS = {76.41 (86.41)},
}

Currently I am using the following ugly hack to get the references resolved: I generate the .bbl file from the .bib file (using a minimal .tex file) and then I \include the resulting .bbl file directly in my .org file. This is rather cumbersome and of course requires that I regenerate the .bbl file every time I make a change to the .bib file. Although this process can be automated in Emacs by writing a lisp function to encapsulate these actions, I'd rather solve the problem than streamline a hack.

I have checked the .tex file generated by Org mode. It does have the following necessary lines exported in it:

\bibliographystyle{plain}
\bibliography{org-bib-test-refs}

-Omid

reply via email to

[Prev in Thread] Current Thread [Next in Thread]