fniessen / refcard-org-beamer

Streamline your Beamer presentations with our Org mode Beamer Refcard. Download now for quick reference and enhanced productivity. #orgmode #beamer #referencecard #productivity
GNU General Public License v3.0
296 stars 31 forks source link

+TITLE: Org Beamer reference card

+AUTHOR: Fabrice Niessen

+EMAIL: (concat "fniessen" at-sign "pirilampo.org")

+DESCRIPTION:

+KEYWORDS:

+LANGUAGE: en

+OPTIONS: H:2 num:nil ^:{}

+PROPERTY: header-args :eval no

+SETUPFILE: ~/org/theme-readtheorg.setup

+LaTeX_CLASS_OPTIONS: [presentation, t]

+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt)

+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC

+LaTeX_HEADER: \setbeamertemplate{navigation symbols}{}

+BEAMER_THEME: Boadilla

+BEAMER_THEME: AnnArbor

include navigation bars

+BEAMER_THEME: Antibes

include a table of contents sidebar

+BEAMER_THEME: Hannover

include a "Mini Frame Navigation"

+BEAMER_THEME: Singapore

have the section and subsection titles at the top of each frame

+BEAMER_THEME: Warsaw

+BEAMER_COLOR_THEME: crane

+BEAMER_HEADER: \usepackage{lxfonts}

+BEAMER_HEADER: \usefonttheme{professionalfonts}

+INCLUDE: "./listings.org"

+LATEX_HEADER: \lstdefinelanguage{R}{}

+LATEX_HEADER: \definecolor{mylinkcolor}{HTML}{006DAF}

+LATEX_HEADER: \hypersetup{colorlinks=true, linkcolor=mylinkcolor, urlcolor=mylinkcolor}

+LATEX_HEADER: \usepackage{tikz}

For every picture that defines or uses external nodes, you'll have to

apply the 'remember picture' style. To avoid some typing, we'll apply

the style to all pictures.

+LaTeX: \tikzstyle{every picture}+=[remember picture]

+EXCLUDE_TAGS: noexport

+begin_quote

[!TIP]

** Elevate your Emacs skills in Paris, Utrecht, Leuven or Valencia! Unlock the power of Emacs! Join my next exclusive "Emacs Boost" course!*

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

What you'll learn:

Audience:

Open to anyone interested in Emacs, from beginners to advanced users.

Why choose my course?

Don't miss this opportunity to take your Emacs skills to the next level! \

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

+end_quote

+begin_export html

:license-gpl-blue.svg

btn_donate_LG.gif

+end_export

** 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:

** Requirements :PROPERTIES: :ID: c4f6745b-2147-4538-bd96-9f8e1e1d4669 :END:

** Creating a title page :PROPERTIES: :BEAMER_opt: allowframebreaks,label= :END:

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 insertion of ~\author~ can be turned off with:

+begin_src org

,#+OPTIONS: author:nil

+end_src

+beamer: \framebreak

The author's email can be included with:

+begin_src org

,#+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

+end_src

Other elements:

+begin_src org :eval no

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

+end_src

+begin_note

On [2015-03-21 Sat], Rasmus sent a patch to add the ~#+SUBTITLE~ keyword to

~ox-beamer~.

+end_note

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

The [[id:f6d1f139-2460-4844-93f1-c71277c810e0][inner theme]] dictates how the title page is rendered.

+begin_src org :eval no

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

+end_src

** 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.

+begin_src org :eval no

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

+end_src

(on one line.)

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

** Structure basics

Org mode presentations contain headings at different levels.

By default,

+begin_src org

,#+OPTIONS: toc:nil

,* Frame 1

Some content.

,** Block

This is a block.

+end_src

** Creating a simple frame

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

+begin_src org

,* A title

+Beamer: \framesubtitle{A subtitle}

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

+BEGIN_SRC latex :file diagram.pdf :packages '(("" "tikz")) :border 1em :eval yes

\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}

+END_SRC

The problem was three-fold:

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

** TODO Using graphics and text

Look at ~wrapfig~ or ~parinc~

** Frame with code

Here is a simple R code block...

+begin_src org

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

+end_src

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

+begin_src R :eval yes :exports both

summary(cars)

+end_src

+results:

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

XXX Is this needed?

+begin_src org

,#+LATEX_HEADER: \lstdefinelanguage{R}{}

+end_src

** Frame with code only

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

+begin_src org

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

+end_src

It only renders the code:

+begin_src R :eval no

summary(cars)

+end_src

** 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 org

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

+end_src

It only renders the results:

+begin_src R :eval yes :exports results

summary(cars)

+end_src

+results:

| Min. : 4.0 | Min. : 2.00 | | 1st Qu.:12.0 | 1st Qu.: 26.00 | | Median :15.0 | Median : 36.00 | | Mean :15.4 | Mean : 42.98 | | 3rd Qu.:19.0 | 3rd Qu.: 56.00 | | Max. :25.0 | Max. :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 org

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

+end_src

+begin_src R :eval yes :exports results :results graphics :file qplot.png

+begin_src R :eval yes :exports results :results graphics :file qplot.png

+begin_src R :eval yes :exports results :results graphics :file qplot.png

library(ggplot2)

qplot(speed, dist, data=cars) + geom_smooth()

plot(cars)

+end_src

+begin_center

+ATTR_LaTeX: :height 4.5cm

+results:

[[file:qplot.png]]

+end_center

** Creating a table of contents :PROPERTIES: :ID: b4252974-1d3d-4652-b42e-e7cd016f45f7 :BEAMER_opt: allowframebreaks,label= :END:

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

+begin_src org

,#+OPTIONS: H:2 toc:t

+end_src

then:

XXX Misplaced footnote!

+beamer: \framebreak

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

+begin_src org

,#+OPTIONS: H:3 toc:t

+end_src

then:

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

** Present a bibliography

** Exporting to PDF

Type:

+begin_src emacs-lisp

M-x load-library RET ox-beamer RET

+end_src

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

+begin_note

You do not need to set ~LaTeX_CLASS~ to ~beamer~.

+end_note

+begin_note

YYou do not need to set ~LaTeX_CLASS~ to ~beamer~.

+end_note

** Support editing

Type:

+begin_src emacs-lisp

M-x org-beamer-mode RET

+end_src

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 [[id:77f1b7a3-6e7d-4f2b-bd1f-02e6f02bba2f][Beamer environment]]).

You can also turn it on with:

+begin_src org

,#+STARTUP: beamer

+end_src

in your document.

** Label!!!

Label to theorem.

** 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.

+begin_src org

,#+LATEX_CLASS_OPTIONS: [handout]

,#+LATEX_HEADER: \usepackage{pgfpages} ,#+LATEX_HEADER: \mode ,#+LATEX_HEADER: { ,#+LATEX_HEADER: ... see below ... ,#+LATEX_HEADER: }

+end_src

** Draw a border around the frames

Add a rectangle around each frame in the handout:

+begin_src org

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

+end_src

** 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 [[http://www.guidodiepen.nl/2009/07/creating-latex-beamer-handouts-with-notes/][handoutWithNotes.sty]] for PowerPoint like handout.

+begin_src org :eval no

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

+end_src

** Print as article

Using ~beamerarticle~.

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

+begin_src org

,#+LATEX_CLASS_OPTIONS:

+end_src

Common options:

+begin_src org

,#+LaTeX_CLASS_options: [bigger,allowframebreaks]

+end_src

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

+begin_src org

,#+LaTeX_CLASS_options: [aspectratio=169]

+end_src

** LaTeX preamble

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

+begin_src org

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

+end_src

It will go (in that order) in the ~[EXTRA]~ placeholder of the header associated to the ~beamer~ LaTeX class (see [[id:c4f6745b-2147-4538-bd96-9f8e1e1d4669][~org-latex-classes~]]).

** Inline LaTeX :PROPERTIES: :BEAMER_opt: allowframebreaks,label= :END:

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

*** Left :BMCOL: :PROPERTIES: :BEAMER_col: 0.43 :END:

+begin_src org

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

+end_src

+begin_src org

,#+LaTeX: \parbox{4cm}{...}

+end_src

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

*** Right :BMCOL: :PROPERTIES: :BEAMER_col: 0.43 :END:

+begin_src org

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

+end_src

+begin_src org

,#+Beamer: \parbox{4cm}{...}

+end_src

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

*** Back to one column :B_ignoreheading: :PROPERTIES: :BEAMER_env: ignoreheading :END:

+beamer: \framebreak

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_src org

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

+end_src

+begin_center

+begin_export LaTeX

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

+end_export

+end_center

** Affiliated keywords

The Beamer back-end reads both

affiliated keywords.

XXX Code with figure or table

** Using a custom theme :PROPERTIES: :ID: f6d1f139-2460-4844-93f1-c71277c810e0 :END:

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

For example:

+begin_src org :eval no

,#+BEAMER_THEME: Boadilla

+end_src

which is equivalent (for ~Boadilla~) to:

+begin_src org :eval no

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

+end_src

** 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.

+begin_src org

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

+end_src

** Changing font size for example environment

Something along these lines will work:

+begin_src org

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

+end_src

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~:

+begin_src org :eval no

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

+end_src

You can also use LaTeX ~resizebox~ to shrink table fonts:

+LaTeX: \resizebox{\textwidth}{!}{

| 124.195 | 310.528 |

| 120.848 | 122.702 |

+LaTeX: }

** Column view

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

+begin_src org

,#+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)

+end_src

** Environment specification: BEAMER_env

XXX Put = or ~ around BEAMER_env in title...

** Frames

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

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.

+begin_src org

,#+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!

+end_src

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

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

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).

+begin_src org

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

This becomes a frame, with its title ignored!

+end_src

** ~block~ environment :PROPERTIES: :ID: 77f1b7a3-6e7d-4f2b-bd1f-02e6f02bba2f :END:

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

+begin_src org

,*** A block

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

+end_src

*** A block

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

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

Comments:

** ~alertblock~ environment

Insert a block whose title is highlighted.

+begin_src org

,*** 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.

+end_src

*** 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.

** ~exampleblock~ environment

Insert a block that is supposed to be an example.

+begin_src org

,*** 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.

+end_src

*** 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.

** ~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~.

+begin_src org

,#+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.

+end_src

+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.

** ~beamercolorbox~ environment

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

+begin_src org

,*** 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.

+end_src

*** 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.

** ~beamercolorbox~ environment

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

+begin_src org

,*** 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.

+end_src

*** 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.

** ~beamercolorbox~ environment

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

+begin_src org

,*** 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.

+end_src

*** 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.

** ~structureenv~ environment

*** structureenv :B_structureenv: :PROPERTIES: :BEAMER_env: structureenv :END:

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

** ~definition~ environment

+begin_src org

,*** 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.

+end_src

*** 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.

** ~example~ environment

+begin_src org

,*** 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.

+end_src

*** 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.

** ~theorem~ environment

+begin_src org

,*** Niessen, 2010 :B_theorem: :PROPERTIES: :BEAMER_env: theorem :END:

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

+end_src

*** Niessen, 2010 :B_theorem: :PROPERTIES: :BEAMER_env: theorem :END:

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

** ~proof~ environment

+begin_src org

,*** Proof :B_proof: :PROPERTIES: :BEAMER_env: proof :END:

Description of proof.

+end_src

*** Proof :B_proof: :PROPERTIES: :BEAMER_env: proof :END:

Description of proof.

** ~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_src org

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

+end_src

+begin_quote

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

+end_quote

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

+begin_src org

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

+end_src

+LaTeX: \begin{raggedleft}

(Albert Einstein)

+LaTeX: \par\end{raggedleft}

** ~quotation~ environment

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

+begin_src org

,#+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

+end_src

+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_src org

,#+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

+end_src

+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 environment syntax (without option)

+begin_src org

,#+begin_theorem There is no largest prime number. ,#+end_theorem

+end_src

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

+begin_src org

,*** :B_theorem: :PROPERTIES: :BEAMER_env: theorem :END:

There is no largest prime number.

+end_src

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)

+begin_src org

,#+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

+end_src

+begin_src org

,*** 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:

+end_src

+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

** Alternative environment syntax (with option)

+begin_src org

,#+attr_latex: :options [Prime number] ,#+begin_definition A prime number is... ,#+end_definition

+end_src

+begin_src org

,*** Prime number :B_definition: :PROPERTIES: :BEAMER_env: definition :END:

A prime number is...

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

+end_src

+attr_latex: :options [Prime number]

+begin_definition

A prime number is...

+end_definition

** Add extra environments

For simple environments, use:

+attr_latex: :options {3}

+begin_myenvironment

Test of a new

environment

+end_myenvironment

I think we should changes some environment placeholders:

The previous definition would become:

'("textpos1" "w" "\begin{textblock}%r \visible %a {" "} \end{textblock}")

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.

** 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~.

    +begin_warning

    No absolute width (such as ~4cm~), which wouldn't be correctly translated...

    +end_warning

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 :BMCOL: :PROPERTIES: :BEAMER_col: 0.39 :END:

First column

Two \ lines.

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

*** Second column :BMCOL: :PROPERTIES: :BEAMER_col: 0.39 :END:

Second column

One line (but aligned).

$\frac{1}{n} \sum{i=1}^{n} x{i}$

** 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 :BMCOL: :PROPERTIES: :BEAMER_col: 0.39 :END:

+ATTR_LaTeX: :width 3cm

[[file:images/square.png]]

mygraphic.jpg

*** Text :BMCOL: :PROPERTIES: :BEAMER_col: 0.39 :END:

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~ :B_columns: :PROPERTIES: :BEAMER_env: columns :BEAMER_opt: [c] :END:

*** Column 1 :BMCOL: :PROPERTIES: :BEAMER_col: 0.3 :END:

Colonne 1.

*** Column 2 :BMCOL: :PROPERTIES: :BEAMER_col: 0.7 :END:

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.

+LATEX_HEADER: \usepackage{multicol}

+LaTeX: \begin{multicols}{2}

... a fancy verbatim block ...

+LaTeX: \end{multicols}

** 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:

+begin_src org

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

Backup slides

+end_src

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~.

+begin_src org

,#+LATEX_HEADER: \setbeameroption{show notes}

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

This is a note.

** 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:

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

+begin_src latex

\againframe{BEAMER_ref's name}

+end_src

Contents are ignored.

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

** ignoreheading :PROPERTIES: :ID: 7bf1634d-2bd6-484b-adae-67a80846cdf4 :END:

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

+begin_src org

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

+end_src

** 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:

+begin_src org

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

It is translated as:

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 ~<+->~.

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

+begin_src org

,#+ATTR_BEAMER: :overlay <+->

+begin_src org

can be shortened to:

+begin_src org

with:

+begin_src emacs-lisp

;; export snippet translations (add-to-list 'org-export-snippet-translation-alist '("b" . "beamer"))

+end_src

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

** 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 :PROPERTIES: :BEAMER_act: <1-> :END:

** Question on ML

+begin_src latex

\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}

+end_src

The following works for me:

+begin_src org

+Beamer: \only<1>{

[[file:figure1.png]]

+Beamer: }\only<2>{

[[file:figure2.png]]

+Beamer: }\only<3->{

[[file:figure3.png]]

+Beamer: }

+end_src

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.

+begin_src org

+options: H:1

** 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:

+begin_src org

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

+end_src

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

** Vertical alignment :PROPERTIES: :BEAMER_opt: c :END:

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

+begin_src org

,#+LaTeX_CLASS_OPTIONS: [t]

+end_src

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

+begin_src org

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

Some content.

+end_src

** 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~.

+beamer: \framebreak

** Frame without surroundings

:PROPERTIES:

:BEAMER_opt: plain

:END:

#

~plain~ causes the headlines, footlines, and sidebars to be suppressed. This is

useful for creating single frames with different head- and footlines or for

creating frames showing big pictures that completely fill the frame.

#

+begin_src org

,**  

:PROPERTIES:

:BEAMER_opt: plain

:END:

#

,#+begin_export beamer

\begin{centering}

\includegraphics[height=\textheight]{somebigimagefile}

\par\end{centering}

,#+end_export

+end_src

#

(Non-breaking space inserted so that headline is not empty.)

** :some_tag_so_that_heading_is_empty:

:PROPERTIES:

:BEAMER_opt: plain

:END:

#

+begin_export beamer

\begin{centering}

\includegraphics[height=\textheight]{images/Carsten}

\par\end{centering}

+end_export

**  

:PROPERTIES:

:BEAMER_opt: plain

:END:

#

+begin_export beamer

\begin{centering}

\includegraphics[height=\textheight]{images/Carsten}

\par\end{centering}

+end_export

** Big title in the middle

+begin_export beamer

\begin{center} \begin{minipage}[h]{.75\textwidth} \centering {\Huge This is my BIG title!} \end{minipage} \end{center}

+end_export

** Including Hyperlinks

+begin_src org

,#+TITLE: LaTeX export minimal test

,* Intro :PROPERTIES: :CUSTOM_ID: introduction :END:

This is the first slide.

,* Summary

As we saw on slide [[#introduction]], ...

+end_src

or

+begin_src org

,#+TITLE: LaTeX export minimal test

,* <> Intro

This is the first slide.

,* Summary

As we saw on slide [[introduction]], ...

+end_src

** Including Hyperlinks and Buttons

https://www.sharelatex.com/blog/2013/08/16/beamer-series-pt3.html#.U586LCjrzYQ

+begin_src org

\hyperlink{sec-2}{\beamerbutton{"Authoring presentations" chapter}}

\hyperlink{sec-2}{\beamergotobutton{columns page}}

\hyperlink{sec-2}{\beamerskipbutton{pictures page}}

\hyperlink{sec-2}{\beamerreturnbutton{pictures page}}

+end_src

** Absolute positioning

You can also place the logo on an absolute position of the titlepage using ~tikz~ or ~textpos~.

Note -- ~textpos~ is incompatible to ~pgfpages~, even though it is mentioned in the beamer userguide as the way to go for absolute positioning.

Here an example using ~tikz~:

+begin_src latex

\XXXbegin{frame} \tikz [remember picture,overlay] \node at ([yshift=3cm]current page.south) %or: (current page.center) {\includegraphics[width=\textwidth,height=.5\textheight]{someimage}}; \titlepage \XXXend{frame}

+end_src

** Multimedia

+LaTeX: \movie[externalviewer]{\beamergotobutton{Start movie}}{cc.mp4}

** More on Org: Exporting a subtree

Skip proof

See

http://www.r-project.org/nosvn/conferences/useR-2011/TalkSlides/Contributed/16Aug_1115_FocusI_4-ReportingWorkflows_3-Leha.pdf,

page 15

[[Proof details]]

** Summary

** For further reading

Mettre ox-beamer, beamer.pdf, org manual, etc. comme références

+begin_export latex

\begin{thebibliography}{10}

\beamertemplatebookbibitems \bibitem{sal:b:formal-languages} A.~Salomaa. \newblock {\em Formal Languages}. \newblock Academic Press, 1973. \pause

\beamertemplatearticlebibitems \bibitem{dij:j:smoothsort} E.~Dijkstra. \newblock Smoothsort, an alternative for sorting in situ. \newblock {\em Science of Computer Programming}, 1(3):223--233, 1982. \pause

\bibitem{FeldmanO1973} E.~Feldman and J.~Owings, Jr. \newblock A class of universal linear bounded automata. \newblock {\em Information Sciences}, 6:187--190, 1973. \pause

\bibitem{JancarMPV1995} P.~Jan{\v c}ar, F.~Mr{\'a}z, M.~Pl{\'a}tek, and J.~Vogel. \newblock Restarting automata. \newblock {\em FCT Conference 1995}, LNCS 985, pages 282--292. 1995.

\end{thebibliography}

+end_export

** Proof details

Text omitted in main talk.

** More details

Even more additional material.

** Abbreviations

** Issues

Report issues and suggest features and improvements on the [[https://github.com/fniessen/refcard-org-beamer/issues/new][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 [[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VCVAS6KPDQ4JC&lc=BE&item_number=refcard%2dorg%2dbeamer&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted][donation]] through PayPal. Thank you!

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

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/.

This is for the sake of Emacs.

Local Variables:

org-latex-src-block-backend: 'listings

eval: (org-shifttab 2)

End: