Next: , Previous: ASCII/Latin-1/UTF-8 export, Up: Exporting

12.5 Beamer export

The LaTeX class Beamer allows production of high quality presentations using LaTeX and pdf processing. Org mode has special support for turning an Org mode file or tree into a Beamer presentation.

Beamer export commands

C-c C-e l b     (org-beamer-export-to-latex)
Export as a LaTeX file. For an Org file, the LaTeX file will be myfile.tex. The file will be overwritten without warning.
C-c C-e l B     (org-beamer-export-as-latex)
Export to a temporary buffer. Do not create a file.
C-c C-e l P     (org-beamer-export-to-pdf)
Export as LaTeX and then process to PDF.
C-c C-e l O
Export as LaTeX and then process to PDF, then open the resulting PDF file.

Sectioning, Frames and Blocks

Any tree with not-too-deep level nesting should in principle be exportable as a Beamer presentation. Headlines fall into three categories: sectioning elements, frames and blocks.

Headlines also support BEAMER_ACT and BEAMER_OPT properties. The former is translated as an overlay/action specification, or a default overlay specification when enclosed within square brackets. The latter specifies options2 for the current frame or block. The export back-end will automatically wrap properties within angular or square brackets when appropriate.

Moreover, headlines handle the BEAMER_COL property. Its value should be a decimal number representing the width of the column as a fraction of the total text width. If the headline has no specific environment, its title will be ignored and its contents will fill the column created. Otherwise, the block will fill the whole column and the title will be preserved. Two contiguous headlines with a non-nil BEAMER_COL value share the same columns LaTeX environment. It will end before the next headline without such a property. This environment is generated automatically. Although, it can also be explicitly created, with a special columns value for BEAMER_ENV property (if it needs to be set up with some specific options, for example).

Beamer specific syntax

Beamer back-end is an extension of LaTeX back-end. As such, all LaTeX specific syntax (e.g., ‘#+LATEX:’ or ‘#+ATTR_LATEX:’) is recognized. See LaTeX and PDF export for more information.

Beamer export introduces a number of keywords to insert code in the document's header. Four control appearance of the presentation: #+BEAMER_THEME, #+BEAMER_COLOR_THEME, #+BEAMER_FONT_THEME, #+BEAMER_INNER_THEME and #+BEAMER_OUTER_THEME. All of them accept optional arguments within square brackets. The last one, #+BEAMER_HEADER, is more generic and allows you to append any line of code in the header.

     #+BEAMER_THEME: Rochester [height=20pt]
     #+BEAMER_COLOR_THEME: spruce

Table of contents generated from toc:t OPTION keyword are wrapped within a frame environment. Those generated from a TOC keyword (see Table of contents) are not. In that case, it is also possible to specify options, enclosed within square brackets.

     #+TOC: headlines [currentsection]

Beamer specific code can be inserted with the following constructs:

     #+BEAMER: \pause
     All lines in this block will appear only when using this back-end.
     Text @@beamer:some code@@ within a paragraph.

In particular, this last example can be used to add overlay specifications to objects whose type is among bold, item, link, radio-target and target, when the value is enclosed within angular brackets and put at the beginning the object.

     A *@@beamer:<2->@@useful* feature

Eventually, every plain list has support for :environment, :overlay and :options attributes through ATTR_BEAMER affiliated keyword. The first one allows the use of a different environment, the second sets overlay specifications and the last one inserts optional arguments in current list environment.

     #+ATTR_BEAMER: :overlay +-
     - item 1
     - item 2

Editing support

You can turn on a special minor mode org-beamer-mode for faster editing with:

     #+STARTUP: beamer
C-c C-b     (org-beamer-select-environment)
In org-beamer-mode, this key offers fast selection of a Beamer environment or the BEAMER_COL property.

Also, a template for useful in-buffer settings or properties can be inserted into the buffer with M-x org-beamer-insert-options-template. Among other things, this will install a column view format which is very handy for editing special properties used by Beamer.

An example

Here is a simple example Org document that is intended for Beamer export.

     #+TITLE: Example Presentation
     #+AUTHOR: Carsten Dominik
     #+OPTIONS: H:2
     #+LATEX_CLASS: beamer
     #+LATEX_CLASS_OPTIONS: [presentation]
     #+BEAMER_THEME: Madrid
     * This is the first structural section
     ** Frame 1
     *** Thanks to Eric Fraga                                           :B_block:BMCOL:
         :BEAMER_COL: 0.48
         :BEAMER_ENV: block
         for the first viable Beamer setup in Org
     *** Thanks to everyone else                                        :B_block:BMCOL:
         :BEAMER_COL: 0.48
         :BEAMER_ACT: <2->
         :BEAMER_ENV: block
         for contributing to the discussion
     **** This will be formatted as a beamer note                              :B_note:
          :BEAMER_env: note
     ** Frame 2 (where we will not use columns)
     *** Request
         Please test this stuff!


[1] If this property is set, the entry will also get a :B_environment: tag to make this visible. This tag has no semantic meaning, it is only a visual aid.

[2] The fragile option is added automatically if it contains code that requires a verbatim environment, though.