Skip to content

fniessen/refcard-org-beamer

Repository files navigation

Org Beamer reference card

ADVERT: Elevate your Emacs skills in Paris, Rotterdam, Leuven or Valencia!

Unlock the power of Emacs in Valencia! Join my next exclusive “Emacs Boost” course on April 11th to 12th, 2024!

Ready to supercharge your productivity and become an Emacs ninja? Look no further!

What you’ll learn:

  • Master Emacs from the basics to advanced tricks.
  • Boost your editing efficiency and streamline your workflow.
  • Customize Emacs to fit your unique needs.
  • And much more!

Upcoming course details:

  • Date: April 11th to 12th (Thu + Fri)
  • Location: Valencia, Spain
  • Audience: Open to anyone interested in Emacs, from beginners to advanced users.

Why choose my course?

  • Expert instructor with 24 years of Emacs experience.
  • Hands-on exercises to reinforce your learning.
  • Networking opportunities with like-minded Emacs enthusiasts.
  • Personalized attention.

Don’t miss this opportunity to take your Emacs skills to the next level!
Seats are limited, so reserve yours today.

Visit https://emacsboost.com/en/ for more information, other dates and other locations, and to reserve your seat.

See you in Valencia! #EmacsBoostValencia

Overview

Description

Welcome to Org Beamer reference card. It contains the reference documentation that describes how to write presentations based on:

Those free tools allow you to easily produce high quality PDF files which are going to be displayed on every computer exactly the way they looked on your computer.

Features

Since they are like any other Org mode document, authoring presentations with Org Beamer is very easy, thanks to its straightforward syntax.

The obvious advantages of this approach are that:

  • you don’t have to know LaTeX in order to create Beamer presentations.
  • you are more productive when editing presentations:
    • you can expand and collapse slides,
    • you can switch quickly between slides by using navigation (speed) commands,
    • you can incorporate code blocks (in R or in many other languages) for illustration, and evaluate them to actually render output (including plots).

Requirements

  • A working LaTeX installation is required for exporting to PDF. If it is not yet installed on your system, install TeX Live (for example).
  • You must define a beamer class in org-latex-export-classes:
    (eval-after-load "ox-latex"
    
      ;; update the list of LaTeX classes and associated header (encoding, etc.)
      ;; and structure
      '(add-to-list 'org-latex-classes
                    `("beamer"
                      ,(concat "\\documentclass[presentation]{beamer}\n"
                               "[DEFAULT-PACKAGES]"
                               "[PACKAGES]"
                               "[EXTRA]\n")
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
        
  • For nice code blocks, use Listings instead of Verbatim:
    (setq org-latex-src-block-backend 'listings)
        

Authoring presentations

Creating a title page

The very first slide (called frame in a Beamer presentation) is the title page. By default, it will automatically be displayed with the following elements:

  • the document title
    #+TITLE: Document title
        

    (file name, if none specified – could be removed in the future)

  • the author(s)’s name
    #+AUTHOR: John Doe
        

    (Emacs Lisp variable user-full-name, if none specified)

  • a date
    #+DATE: 2017-01-01
        

    (LaTeX macro \today, if none specified)

The insertion of \author can be turned off with:

#+OPTIONS: author:nil

The author’s email can be included with:

#+AUTHOR:    \href{mailto:email@example.com}{John Doe}
#+AUTHOR:    \texorpdfstring{John Doe\newline\url{email@example.com}}{John Doe} % DOES NOT WORK XXX -> BEAMER_HEADER???
#+BEAMER_HEADER: \author{\texorpdfstring{John Doe\newline\url{email@example.com}}{John Doe}} % BAD ORDER XXX

Other elements:

  • the document subtitle,
  • their affiliation (institute), and
  • a title graphic

can be included with the following commands:

#+BEAMER_HEADER: \subtitle{Document subtitle}
#+BEAMER_HEADER: \institute[INST]{Institute\\\url{http://www.institute.edu}}
#+BEAMER_HEADER: \titlegraphic{\includegraphics[height=1.5cm]{InstLogo}}

XXX Why do I have to use :eval no (in Org blocks)?

The inner theme dictates how the title page is rendered.

#+BEAMER_HEADER: \logo{\includegraphics[height=.9cm]{InstLogo}}

Adding an image on the title slide

Insert an image in the title slide that fills the whole width of the slide but limits to half height.

#+BEAMER_HEADER:
  \titlegraphic{
    \includegraphics[width=\textwidth,height=.5\textheight]{someimage}
  }

(on one line.)

Structure basics

Org mode presentations contain headings at different levels.

By default,

  • Headings at the first outline level will become titles of the different frames.
  • Deeper levels will be used as structural environments.
  • The table of contents frame is created but is blank (you’ll understand why later).

    You can remove it by setting the toc option (default: t) from the #+OPTIONS: keyword to nil:

#+OPTIONS: toc:nil

* Frame 1

Some content.

** Block

This is a block.

Creating a simple frame

To create a frame with bullets, you simply use standard Org mode bullets:

* A title
  #+Beamer: \framesubtitle{A subtitle}

- Bullet 1
- Bullet 2
- Bullet 3

Content within frames is formatted using standard Org mode syntax.

The optional subtitle does not have an Org syntax because it’s specific to the Beamer back-end only.

Using graphics

How to center pictures horizontally?

A Little Diagram

\usetikzlibrary{shapes,arrows}
\begin{tikzpicture}[->, auto, node distance=3cm]
  \node [draw] (A) {A};
  \node [ellipse, draw, right of=A] (B) {B};
  \path (A) edge node {message} (B);
\end{tikzpicture}

The problem was three-fold:

  • My `org-latex-pdf-process` was a call to latexmk that did not set

`-outdir`. This was fine for exporting a document as LaTeX as all the work happened in the one directory, but evaluating a LaTeX src block involves a temporary directory.

  • The value substituted for the `%o` placeholder in `org-latex-pdf-process`

included a trailing slash which prevented it from working due to a double slash appearing in constructed paths (looking at my notes, I seem to have removed this parameter because of this problem). I now set `-outdir` to the output of a sub-shell that pipes `%o` through sed to remove the trailing slash.

  • I still encountered an error when evaluating the src block even though the PDF

was being produced. The error was during cleanup of temporary files, specifically a .log file. The failure to delete a nonexistent file was stopping the Org machinery that would next insert the result in my document. I addressed this by changing the second parameter of the call to `directory-files` in the `org-latex-compile` function from `nil` to `t` so that it would return absolute paths.

Since making those three changes, I am able to evaluate LaTeX src blocks and have the resulting figures appear in my Org document.

Using graphics and text

Look at wrapfig or parinc

Frame with code

Here is a simple R code block…

#+begin_src R :exports both
summary(cars)
#+end_src

… that will display the code and show its output in the frame:

summary(cars)
Min. : 4.0Min. : 2.00
1st Qu.:12.01st Qu.: 26.00
Median :15.0Median : 36.00
Mean :15.4Mean : 42.98
3rd Qu.:19.03rd Qu.: 56.00
Max. :25.0Max. :120.00

XXX Is this needed?

#+LATEX_HEADER: \lstdefinelanguage{R}{}

Frame with code only

To display a code block without evaluating it, you specify the :eval no option:

#+begin_src R :eval no
summary(cars)
#+end_src

It only renders the code:

summary(cars)

Frame with output only

To display the output of a code block without echoing the underlying code, you specify the :exports results option:

#+begin_src R :exports results
summary(cars)
#+end_src

It only renders the results:

Min. : 4.0Min. : 2.00
1st Qu.:12.01st Qu.: 26.00
Median :15.0Median : 36.00
Mean :15.4Mean : 42.98
3rd Qu.:19.03rd Qu.: 56.00
Max. :25.0Max. :120.00

Frame with plot

Code blocks can also be used to include plots within presentations.

To display a plot while omitting the code used to generate it, you can include a code block like this:

#+begin_src R :exports results :results graphics :file qplot.png
plot(cars)
#+end_src

qplot.png

Creating a table of contents

If you set the H option from the #+OPTIONS: keyword (or the org-beamer-frame-level variable) to 2:

#+OPTIONS: H:2 toc:t

then:

  • First-level headings become sections listed in the table of contents[fn:: The items in the TOC are clickable and take you to specific frames in the presentation.], and
  • Second-level headings become the frames.

XXX Misplaced footnote!

If you set the H value to 3 in the OPTIONS line:

#+OPTIONS: H:3 toc:t

then:

  • First- and second-level headings become sections and subsections listed in the table of contents, and
  • Third-level headings become the frames.

In many themes, sections (and subsections, when H:3) appear in the sidebar or heading.

Present a bibliography

Editing presentations

Exporting to PDF

Type:

M-x load-library RET ox-beamer RET

to load the Beamer back-end library, and to obtain extra commands in the LaTeX export menu:

C-c C-e l B
Export as LaTeX buffer (Beamer).
C-c C-e l b
Export as LaTeX file (Beamer).
C-c C-e l P
Export as PDF file (Beamer).
C-c C-e l O
Export as PDF file and open (Beamer).

Support editing

Type:

M-x org-beamer-mode RET

to load the minor mode org-beamer-mode easing the edition of the document structure (through the key binding C-c C-b, which offers fast selection of a Beamer environment).

You can also turn it on with:

#+STARTUP: beamer

in your document.

Label!!!

Label to theorem.

Distributing presentations

Create a handout

You can distribute your presentation in the form of handouts.

Presentations exported in this manner are entirely animation-free: overlays are removed and just the last “slide” of each frame is printed.

#+LATEX_CLASS_OPTIONS: [handout]

#+LATEX_HEADER: \usepackage{pgfpages}
#+LATEX_HEADER: \mode<handout>
#+LATEX_HEADER: {
#+LATEX_HEADER:   ... see below ...
#+LATEX_HEADER: }
  • with one frame per A4 page (extending page size)
    #+LATEX_HEADER:   \pgfpagesuselayout{resize to}[a4paper,landscape]
        
  • with two frames per A4 page
    #+LATEX_HEADER:   \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
        
  • with four frames per A4 page
    #+LATEX_HEADER:   \pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm,%
    #+LATEX_HEADER:                              landscape]
        

Draw a border around the frames

Add a rectangle around each frame in the handout:

#+LATEX_HEADER: \setbeamertemplate{background canvas}{
#+LATEX_HEADER:   \tikz \draw (current page.north west) rectangle
#+LATEX_HEADER:               (current page.south east);
#+LATEX_HEADER: }

Show speaker notes

Show reminders about what to say during each part of your presentation.

Your laptop monitor and your projector should have the same resolution.

http://freakazoid.teamblind.de/2011/03/30/latex-presentations-with-notes-on-windows-7/

Print handout with speaker notes

See http://tex.stackexchange.com/questions/38084/displaying-slides-with-beamer-and-article-class/38146#38146

See Guido Diepen’s handoutWithNotes.sty for PowerPoint like handout.

#+LATEX_HEADER: \usepackage{handoutWithNotes}
#+LATEX_HEADER: \pgfpagesuselayout{3 on 1 with notes}[a4paper,border shrink=5mm]

Print as article

Using beamerarticle.

Customizing presentations

LaTeX class (XXX not necessary, does work???)

#+LATEX_CLASS_OPTIONS:

Common options:

  • 8pt, 9pt, 10pt, 11pt (default), 12pt, 14pt, 17pt, 20pt
  • draft: no graphics, footlines,…
  • handout: no overlays
#+LaTeX_CLASS_options: [bigger,allowframebreaks]

Beamer now supports the 16:9 aspect ratio with the aspectratio option:

#+LaTeX_CLASS_options: [aspectratio=169]

LaTeX preamble

Append any line of code in the LaTeX preamble with keywords specific to the LaTeX and Beamer back-ends:

#+LATEX_HEADER:       \usepackage{...}
#+LATEX_HEADER_EXTRA: \usepackage{...}
#+BEAMER_HEADER:      \institute[short name]{Institute}

It will go (in that order) in the [EXTRA] placeholder of the header associated to the beamer LaTeX class (see ~org-latex-classes~).

Inline LaTeX

You can include raw LaTeX in your Org presentations and it will get kept as LaTeX when it’s exported.

Left

#+begin_export LaTeX
\begin{minipage}{4cm}
...
\end{minipage}
#+end_export
#+LaTeX: \parbox{4cm}{...}

Such LaTeX code will only be present in the exports to LaTeX and Beamer.

Right

#+begin_export Beamer
\begin{minipage}{4cm}
...
\end{minipage}
#+end_export
#+Beamer: \parbox{4cm}{...}

Such LaTeX code will only be present in the export to Beamer.

Back to one column

It is especially useful for more advanced stuff like images or tables where you need more control of the LaTeX options than Org mode actually gives you.

For example, to insert a table with colspan or rowspan support:

#+begin_export LaTeX
\begin{tabular}{|l|l|l|}
  \hline
  Text1 & Text2 & Text3 \\
  \hline
  \multicolumn{3}{|c|}{Merged text here} \\
  \hline
\end{tabular}
#+end_export

\begin{tabular}{|l|l|l|} \hline Text1 & Text2 & Text3
\hline \multicolumn{3}{|c|}{Merged text here} \ \hline \end{tabular}

Affiliated keywords

The Beamer back-end reads both

  • #+ATTR_LATEX: and
  • #+ATTR_BEAMER:

affiliated keywords.

XXX Code with figure or table

Using a custom theme

You can specify a Beamer theme using the #+BEAMER_THEME keyword.

For example:

#+BEAMER_THEME: Boadilla

which is equivalent (for Boadilla) to:

#+BEAMER_COLOR_THEME: dolphin
#+BEAMER_FONT_THEME:  default
#+BEAMER_INNER_THEME: [shadow]rounded
#+BEAMER_OUTER_THEME: infolines

Changing the frame font

Fonts must be present on the system you’re presenting on – or it will go back to a fallback font.

Font Risque.

#+LATEX_HEADER: \usepackage[frenchstyle]{kpfonts}

Changing font size for example environment

Something along these lines will work:

#+LaTeX: {\footnotesize
... Org stuff here ...
#+LaTeX: }

Choose the font size you want.

You can also shrink individual frames in Beamer by adding a BEAMER option property to the frame’s headline. You can also specify a percentage, as in shrink=10:

* The frame title
:PROPERTIES:
:BEAMER_opt: shrink=10
:END:

Column view

For a column view of options and configurations for the individual frames

#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt)
#+COLUMNS: %20ITEM %13BEAMER_env(Env) %6BEAMER_envargs(Args) %4BEAMER_col(Col) %7BEAMER_extra(Extra)

Environments

Environment specification: BEAMER_env

XXX Put = or ~ around BEAMER_env in title…

  • This becomes visible through the B_frame tag (visual aid only).

Frames

frame

If a heading in the current tree has a BEAMER_env property set to either frame or fullframe, its level overrides the H value, giving you some flexibility in deciding what is and what isn’t a frame.

#+OPTIONS: H:2 toc:t

* Section 1

** Frame

* Section 2

** Subsection 2.1

*** Frame                                                           :B_frame:
:PROPERTIES:
:BEAMER_env: frame
:END:

This becomes a frame, instead of a block!

This works in both “directions”: to add or to remove sectioning levels above the current heading (which becomes a frame)!

fullframe

If a heading in the current tree has a BEAMER_env property set to fullframe, the frame will not display its title (frametitle is being set to the empty string).

*** Frame                                                         :B_fullframe:
:PROPERTIES:
:BEAMER_env: fullframe
:END:

This becomes a frame, with its title ignored!

block environment

Insert a default block (syntax assumes H:2).

*** A block

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

A block

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

End of block

Comments:

  • Use the BEAMER_env property to specify a different block type for the current “block” environment.
  • Use ignoreheading to terminate a block environment

alertblock environment

Insert a block whose title is highlighted.

*** An alert block                                               :B_alertblock:
:PROPERTIES:
:BEAMER_env: alertblock
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

An alert block

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

exampleblock environment

Insert a block that is supposed to be an example.

*** An example block                                           :B_exampleblock:
:PROPERTIES:
:BEAMER_env: exampleblock
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

An example block

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

beamercolorbox environment

Create colored boxes whose “beamer color” to use (= a pair of colors: bg + fg) is defined by the heading text, for example title in head/foot or myblockcolor.

#+LaTeX: \setbeamercolor{myblockcolor}{bg=magenta,fg=white}

*** myblockcolor                                             :B_beamercolorbox:
:PROPERTIES:
:BEAMER_env: beamercolorbox
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

myblockcolor

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

beamercolorbox environment

*** myblockcolor                                             :B_beamercolorbox:
:PROPERTIES:
:BEAMER_env: beamercolorbox
:BEAMER_opt: wd=6cm
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

myblockcolor

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

beamercolorbox environment

*** myblockcolor                                             :B_beamercolorbox:
:PROPERTIES:
:BEAMER_env: beamercolorbox
:BEAMER_opt: shadow=false,rounded=true
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

myblockcolor

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

beamercolorbox environment

*** myblockcolor                                             :B_beamercolorbox:
:PROPERTIES:
:BEAMER_env: beamercolorbox
:BEAMER_opt: shadow=true,rounded=true
:END:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

myblockcolor

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

structureenv environment

  • For highlighting text.
  • To help the audience see the structure of your presentation.

structureenv

Paragraph Heading. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Theorem & Definitions

definition environment

  • Behaves like the theorem environment, except that the theorem style definition is used.
  • In this style, the body of a theorem is typeset in an upright font.
*** Prime number                                                 :B_definition:
:PROPERTIES:
:BEAMER_env: definition
:END:

A prime number is a natural number greater than 1 that has no positive divisors
other than 1 and itself.

Prime number

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

example environment

  • Behave like the theorem environment, except that the theorem style example is used.
  • A side-effect of using this theorem style is that the contents is put in an exampleblock instead of a block.
*** Number 5                                                        :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:

5 can only be divided evenly by 1 or 5, so it is a prime number.

Number 5

5 can only be divided evenly by 1 or 5, so it is a prime number.

theorem environment

  • Insert a theorem.
  • Italicized body.
*** Niessen, 2010                                                   :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:

Statement of theorem (proposition): \\
Org mode + Beamer = productivity^{2}

Niessen, 2010

Statement of theorem (proposition):
Org mode + Beamer = productivity2

proof environment

  • Typeset a proof.
  • Period (full-stop) added at the end of the title.
  • Control sequence \qed (quod erat demonstrandum, for the traditional “tombstone”) added at the end of the proof.
*** Proof                                                             :B_proof:
:PROPERTIES:
:BEAMER_env: proof
:END:

Description of proof.

Proof

Description of proof.

Quoting text

quote environment

Use quote to typeset short quoted text (or a series of small quotes, separated by blank lines): it hasn’t paragraph indentation.

#+begin_quote
"Don't give up on your dreams, keep on sleeping." --- Albert Einstein
#+end_quote

“Don’t give up on your dreams, keep on sleeping.” — Albert Einstein

If you want to place the source or the author’s name at the right, after the quote, you can use these commands:

#+LaTeX: \begin{raggedleft}
(Albert Einstein)
#+LaTeX: \par\end{raggedleft}

(Albert Einstein)

quotation environment

Use quotation to typeset longer quoted text (one or more paragraphs) because it indents the first line of each paragraph.

#+begin_quotation
"Two things are infinite, the universe and human stupidity, and I am not yet
completely sure about the universe."
--- Albert Einstein
#+end_quotation

verse environment

Use verse for quotations where line breaks are important, such as poetry.

#+begin_verse
"Sit next to a pretty girl for an hour,
it seems like a minute.
Sit on a red-hot stove for a minute,
it seems like an hour.
That's relativity!"
--- Albert Einstein
#+end_verse

Alternative

Alternative environment syntax (without option)

  • More readable, more portable, more natural mapping when environments exist (LaTeX + other backends): you can use special Org blocks. For example:
#+begin_theorem
There is no largest prime number.
#+end_theorem

You could use subsections for columns or nested structure and blocks for simple “boxes” in your frame.

  • More powerful: you can’t nest blocks of the same type with this syntax, and more portable when environments only exist in Beamer (then, they will appear as subheadings when exported to other backends)
  • Use an empty heading with a non-breaking space (or \phantom{dummy}) for an empty block title.
***                                                                 :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:

There is no largest prime number.

If there is nothing after the block, no need to insert a heading for demarcating the end.

!Exception! The example environment can’t be written in the short notation, as that one exists in Org and is translated to a verbatim LaTeX environment by default.

Alternative environment syntax (with option)

#+attr_latex: :options [Lagrange]
#+begin_theorem
Let $G$ be a finite group, and let $H$ be a subgroup of $G$.  Then the order of
$H$ divides the order of $G$.
#+end_theorem
*** Lagrange                                                        :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:

Let $G$ be a finite group, and let $H$ be a subgroup of $G$.  Then the order of
$H$ divides the order of $G$.

*** End of block                                               :B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:

Alternative environment syntax (with option)

#+attr_latex: :options [Prime number]
#+begin_definition
A prime number is...
#+end_definition
*** Prime number                                                 :B_definition:
:PROPERTIES:
:BEAMER_env: definition
:END:

A prime number is...

*** End of block                                               :B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:

Add extra environments

For simple environments, use:

I think we should changes some environment placeholders:

  • Introduce %r which would stand for the raw heading (without any processing)
  • %H and %U would use the raw heading text instead.

The previous definition would become:

WDYT?

It never would have occurred to me on my own to use the heading text for LaTeX code. That’s a conceptual leap that passed me by.

  • Environment options may be given using the BEAMER_opt property. They will be enclosed in square brackets and inserted where %o appears in the environment definition. (with an example, but I can’t think of one now)
  • Additional arguments may be written into the environment’s heading, and inserted into the LaTeX string using %r (raw heading text, no processing).

Columns

Column specification: BEAMER_COL

Splitting a frame into multiple columns

To get multiple columns in a frame:

  1. Press C-c C-b | (BMCOL) on the headings (inside the frame) which will become columns.

    The heading of column environments won’t be outputted in the PDF file.

  2. Specify the column width as a percentage of \textwidth.

Instead of block, those structural environments will become column (with the width parameter as a factor of \textwidth).

Consecutive column environments will be put in a columns environment.

First column

First column

Two \ lines.

The arithmetic mean is equal to the summation of n numbers divided by n.

Second column

Second column

One line (but aligned).

$\frac{1}{n} ∑i=1n xi$

Splitting a frame into multiple columns

If you want to float an image to the left or right, simply include it within a 2-column layout.

Image

images/square.png

Text

This text will appear \ to the right.

column

You can change the percent space of each column.

If you want like one column to take 70% and the other to take 30%, you can change that as follows:

XXX

columns

Column 1

Colonne 1.

Column 2

Colonne 2.

How to specify the best width?

Visualise the width by transforming the columns into blocks…

Result of an evaluation on two columns

Balancing text in columns.

  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  • Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  • Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  • Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Special cases

appendix

You can add an appendix (frames that you do not intend to show during your talk, but which might be useful to answer a question) by inserting such a level 1 heading after the last regular slide of your actual presentation:

* Appendix material follows                                        :B_appendix:
:PROPERTIES:
:BEAMER_env: appendix
:END:

# Backup slides

Ignoring page number in backup slides can be achieved by setting the option noframenumbering on all “backup” slides.

note

To keep your presentation notes (reminders about what to say), add a heading below the frame, and select the note environment with C-c C-b.

#+LATEX_HEADER: \setbeameroption{show notes}

*** Some note                                                          :B_note:
:PROPERTIES:
:BEAMER_env: note
:END:

This is a note.

- Stress this first.
- Then this.

noteNH

Note with its title ignored.

againframe

You can “continue” frames that you previously started somewhere (but where certain details have been suppressed) at a much later point (for example only in the appendix) to show additional slides there.

For convenience (since those are mandatory), when asking for an againframe, Org Beamer always asks for:

  • BEAMER_ref property to refer, using link syntax, to (the label of) the frame being resumed, and
  • BEAMER_act property to set the overlay specification.

An advantage is that you don’t need to know the label of the frame being resumed: :BEAMER_ref: *My frame title.

\againframe<BEAMER_act>{BEAMER_ref's name}

Contents are ignored.

XXX How to label a frame? Via :BEAMER_opt: label=id or via other means?

ignoreheading

Need to *”close” a block environment*, if followed by something else than a block.

*** End of block                                              :B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:
  • A heading with an ignoreheading environment will have only its contents inserted in the output.
    • Contents is not inserted in any frame environment…
  • This special value is useful to have data between frames, or to properly close a ~column~ environment.

Animations

Overlay specification: BEAMER_act

Set overlay / action specifications in current frame or block to create dynamic effects (multiple slides, called overlays, for a single frame) = old BEAMER_envargs property.

Overlay specifications are given inside angular brackets.

XXX <> seem to be added when they aren’t present. Copied as is if present.

Headings support the BEAMER_act property:

** Heading
:PROPERTIES:
:BEAMER_act: [<+->]
:END:

- Item
- Item

It is translated as:

  • an overlay/action specification, or
  • a default overlay specification when enclosed within square brackets.

It has an effect on all enumeration commands and all block environments inside the frame: they will be uncovered piece-wise with an incremental specification like <+->.

  • <+> Means that this material should appear on the next slide.
  • <+-> means that this appears on the next slide, and all subsequent slides.

Dynamic lists are possible on a case by case basis with the :overlay specification:

#+ATTR_BEAMER: :overlay <+->
- Item 1
- Item 2
- @@beamer:<1->@@ Item 1
- @@beamer:<2->@@ Item 2

can be shortened to:

- @@b:<1->@@ Item 1
- @@b:<2->@@ Item 2

with:

;; export snippet translations
(add-to-list 'org-export-snippet-translation-alist
             '("b" . "beamer"))
  • <1-| alert@1> Suppose p were the largest prime number.
  • <2-> Let q be the product of the first p numbers.
  • <3-> Then q + 1 is not divisible by any of them.
  • <1-> But q + 1 is greater than 1, thus divisible by some prime number not in the first p numbers.

Overlay specification for bold markup in the label of a description list:

Test
of a @@beamer:<2->@@useful feature!
@@beamer:<2->@@Test 2
of the same feature

Overprint

> What may not be easy or possible is to use the \only directive.

You can always use the only environment. https://github.com/suvayu/.emacs.d/blob/master/org-mode-config.el#L215

That said, I think overlays with only is not as smooth as with simple overlay specifications to regular environments or macros like \includegraphics, \item, etc.

Overlay specification: BEAMER_act

The Queen’s old armchair

  • Princess Anne
  • Prince Charles
  • corgis

Question on ML

\begin{figure}
  \begin{center}
    \includegraphics<1>[width=.7\textwidth]{figure1}
    \includegraphics<2>[width=.7\textwidth]{figure2}
    \includegraphics<3->[width=.7\textwidth]{figure3}
   \end{center}
\end{figure}

The following works for me:

#+Beamer: \only<1>{
[[file:figure1.png]]
#+Beamer: }\only<2>{
[[file:figure2.png]]
#+Beamer: }\only<3->{
[[file:figure3.png]]
#+Beamer: }

There is the BEAMER_act property that can be used to apply overlay information on blocks but I don’t think it’s possible on individual figures. Of course, you could put each figure in a separate block. The following/attached will match what you had originally.

 #+options: H:1
 * The slide
 ** figure 1
:PROPERTIES:
:beamer_act: <1>
:END:
    [[file:chromosome.png]]
 ** figure 2
:PROPERTIES:
:beamer_act: <2>
:END:
    [[file:diagram.png]]
 ** figure 3
:PROPERTIES:
:beamer_act: <3->
:END:
    [[file:equation1.png]]

Options

Option specification: BEAMER_opt

Insert optional arguments for the current ~frame~ or ~block~ environment using the BEAMER_OPT property.

The options will automatically be enclosed within square brackets. Don’t enclose them yourself!

You can add that special property by editing the Opt column within the “column view”:

  1. Turn on column view by pressing C-c C-x C-c (M-x org-columns)
  2. Go to the Opt column
  3. Press e to edit its contents, and add your value
  4. Exit the column editing by pressing q

fragile option is added automatically.

Get the slide number

With:

:PROPERTIES:
:BEAMER_opt: label=name
:END:

You can set the label of a frame and then use \ref{name} to get the slide number.

Vertical alignment

You can specify top vertical alignment globally by the t class option:

#+LaTeX_CLASS_OPTIONS: [t]

For single frames, you can use the same option locally:

** Vertically top-aligned
:PROPERTIES:
:BEAMER_opt: t
:END:

Some content.

Explicit page breaking

If the text does not fit on a single slide, all you have to do to automatically break up the frame into several frames, is set the option allowframebreaks.

  • To allow frame breaks on a frame by frame basis[fn:: Until the Beamer issue #265 is solved, we need to unset the framelabel as shown above (label=) when we use that option.]:
    ** A very long "frame" with breaks
    :PROPERTIES:
    :BEAMER_opt: allowframebreaks,label=
    :END:
        

    XXX This property shouldn’t be interpreted for the current slide!

  • You might want to put allowframebreaks=0.9 there
  • To add an explicit page break:
    #+beamer: \framebreak
        
  • To allow frame breaks for all frames of the whole document[fn:: Till Tantau (author of Beamer) was really not keen on the idea of setting the auto-breaking frames option globally.]:
    #+BIND: org-beamer-frame-default-options "allowframebreaks"
        

#

#

#

#

#

#

Big title in the middle

Power

Skip proof

Proof details

Summary

Summary

For further reading

Appendix NAME XXX

Proof details

Text omitted in main talk.

More details

Even more additional material.

Abbreviations

Contributing

Issues

Report issues and suggest features and improvements on the GitHub issue tracker.

Patches

I love contributions! Patches under any form are always welcome!

Donations

If you use the refcard-org-beamer project and feel it is making your life better and easier, you can show your appreciation and help support future development by making a donation through PayPal. Thank you!

Regardless of the donations, refcard-org-beamer will always be free both as in beer and as in speech.

License

Copyright (C) 2013-2024 Free Software Foundation, Inc.

Author: Fabrice Niessen
Keywords: reference card org-beamer

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this file. If not, see http://www.gnu.org/licenses/.

About

Streamline your Beamer presentations with our Org mode Beamer Refcard. Download now for quick reference and enhanced productivity. #orgmode #beamer #referencecard #productivity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages