7

I have been trying to include citations in the org file which I then export to beamer and using biblatex.

It seems that slide of bibliography needs specifying environment like fragile or allowpagebreaks. So far that seems to be the reason why bibliography is not getting printed.

In the header

#+LATEX_HEADER: \usepackage{biblaltex}
#+LATEX_HEADER: \bibliography{file.bib}

Citation gets written as [[bib::author03]].

* References 

#+BEGIN_LaTeX

  \printbibliography

#+END_LaTeX

Could you help get the citations working properly in the org-mode ?

Thanks.

1
  • A simple way to add the property BEAMER_OPTS as given in the answer is to do org-set-property and select beamer_opts. It will prompt for the input and saves previous choices.
    – Anusha
    Nov 12, 2014 at 14:19

1 Answer 1

8

Additional frame options can be specified using the BEAMER_OPT property. (You can set it using org-set-property, which is bound to C-c C-x p by default.)

To get Org to produce a beamer presentation PDF with references I also had to customize the value of org-latex-pdf-process, making sure that Org runs bibtex when exporting to LaTeX. (Note the manually specified biblatex backend, too.)

Here's a minimal example.

The main beamer-test.org file:

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LATEX_HEADER: \usepackage[backend=bibtex]{biblatex}
#+LATEX_HEADER: \bibliography{file.bib}

* Frame with content
  See \cite{AbramowitzStegun}.

* Frame with references
  :PROPERTIES:
  :BEAMER_OPT: fragile,allowframebreaks,label=
  :END:      
  \printbibliography

In my tests the file.bib bibliography database contained:

@book {AbramowitzStegun,
    EDITOR = {M. Abramowitz and I. A. Stegun},
     TITLE = {Handbook of {M}athematical {F}unctions, with {F}ormulas, {G}raphs,
              and {M}athematical {T}ables},
    SERIES = {Graduate Studies in Mathematics},
 PUBLISHER = {Dover},
   ADDRESS = {New York},
      YEAR = {1965},
}

I discovered BEAMER_OPT by reading the code of org-beamer--format-frame defined in ox-beamer.el.

Tested using GNU Emacs 24.4.1 with Org-mode version 8.2.10.

8
  • 1
    Dont we need to put the \cite{} and \printbibliography in the #+BEGIN_LATEX #+END_LATEX environment ?
    – Anusha
    Nov 12, 2014 at 13:14
  • +1 Thanks for the solution. The only thing is that the file.bib must be kept in the same folder as .org file. Although I added \addbibresource{path\to\file.bib}, this doesnt work. Any way to add path to bib file ?
    – Anusha
    Nov 12, 2014 at 13:18
  • Another slight issue is that the bibliography year is showing in red color. I tried with a few themes. Is there a way to specify the color to be black only like the rest of the text ? Thanks.
    – Anusha
    Nov 12, 2014 at 13:20
  • 1
    @Anusha: #+BEGIN_LATEX and #+END_LATEX is for special code that should only be present in LaTeX export; see Quoting LaTeX in the Org Mode Manual. If this document will not be exported to other formats, #+BEGIN_LATEX and #+END_LATEX are not needed. Nov 12, 2014 at 15:48
  • @Anusha: The .bib file can be in a separate directory. (#+LATEX_HEADER: \bibliography{bib/file.bib} works for me, for example.) Note, though, that depending on the OS you need to use / (Linux, Mac OS X) or `\` (Windows) as the file separator. Nov 12, 2014 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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