I wrote some recipes for creating the kinds of slides I need with emacs org-mode export to beamer latex.
Update: Read ox-beamer [1] to see how to adapt this to work with the new export engine in org-mode 0.8.
[2] The recipes as PDF (21 slides, 247 KiB) [2]
[3] The org-mode sources (12.2 KiB) [3]
Below is an html export of the org-mode file. Naturally it does not look as impressive as the real slides, but it captures all the sources, so I think it has some value.
Note: To be able to use the simple block-creation commands, you need to add #+startup: beamer to the header of your file or explicitely activate org-beamer with M-x org-beamer-mode
.
PS: I hereby allow use of these slides under any of the licenses used by worg [4] and/or the emacs wiki [5].
Hello World #+LaTeX_CLASS: beamer #+BEAMER_FRAME_LEVEL: 2 * Hello ** Hello GNU Nice to see you!
done: Your first org-beamer presentation.
Recipes #+LaTeX_CLASS: beamer #+BEAMER_FRAME_LEVEL: 2 * Introduction ** org-mode + beamer = love *** Code :BMCOL: :PROPERTIES: :BEAMER_col: 0.7 :END: <example block> *** Simple block :BMCOL:B_block: :PROPERTIES: :BEAMER_col: 0.3 :BEAMER_env: block :END: it's that easy!
it's that easy!
** Two columns - in commands *** Commands C-c C-b | 0.7 C-c C-b b C-n <eTAB (write example) C-n C-n *** Result C-c C-b | 0.3 C-c C-b b even easier - and faster!
even easier - and faster!
*** Column 1 :B_ignoreheading:BMCOL: :PROPERTIES: :BEAMER_env: ignoreheading :BEAMER_col: 0.5 :END: *** One *** Three *** Column 2 :BMCOL:B_ignoreheading: :PROPERTIES: :BEAMER_col: 0.5 :BEAMER_env: ignoreheading :END: *** Two *** Four
*** C-c C-b | 0.5 # column C-c C-b i # ignore heading *** One C-c C-b b # block *** Three C-c C-b b *** C-c C-b | 0.5 C-c C-b i *** Two C-c C-b b *** Four C-c C-b b
*** Code :B_block:BMCOL: :PROPERTIES: :BEAMER_env: block :BEAMER_col: 0.5 :BEAMER_envargs: C[t] :END: *** Result :B_block:BMCOL: :PROPERTIES: :BEAMER_env: block :BEAMER_col: 0.5 :END: pretty nice!
pretty nice!
\tiny
*** :B_columns: :PROPERTIES: :BEAMER_env: columns :END: **** Code :BMCOL: :PROPERTIES: :BEAMER_col: 0.6 :END: **** Result :BMCOL: :PROPERTIES: :BEAMER_col: 0.4 :END: *** Underneath :B_ignoreheading: :PROPERTIES: :BEAMER_env: ignoreheading :END: Much text underneath! Very Much. Maybe too much. The whole width!
\normalsize
Much text underneath! Very Much. Maybe too much. The whole width!
#+begin_quote Emacs org-mode is a great presentation tool - Fast to beautiful slides. - Arne Babenhauserheide #+end_quote
Emacs org-mode is a great presentation tool - Fast to beautiful slides.
- Arne Babenhauserheide
\( 1 + 2 = 3 \) is clear
\[ 1 + 2 \cdot 3 = 7 \]
\( 1 + 2 = 3 \) is clear
\( \LaTeX \) gives a space after math mode. \LaTeX{} does it, too. \LaTeX does not. At the end of a sentence both work. Try \LaTeX. Or try \LaTeX{}. Only \( \LaTeX \) and \( \LaTeX{} \) also work with HTML export.
\( \LaTeX \) gives a space after math mode.
\LaTeX{} does it, too.
\LaTeX does not.
At the end of a sentence both work. Try \LaTeX. Or try \LaTeX{}.
Only \( \LaTeX \) and \( \LaTeX{} \) also work with HTML export.
#+caption: GNU Emacs icon #+label: fig:emacs-icon [[/usr/share/icons/hicolor/128x128/apps/emacs.png]] This is image (\ref{fig:emacs-icon})
GNU Emacs icon
This is image (emacs-icon)
Autoscaled to the block width!
: #+bla: foo : * Example Header
Gives an example, which does not interfere with regular org-mode parsing.
#+begin_example content #+end_example
Gives a simpler multiline example which can interfere.
#+bla: foo * Example Header
Gives an example, which does not interfere with regular org-mode parsing.
content
Gives a simpler multiline example which can interfere.
<Title> #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+AUTHOR: <empty for none, if missing: inferred> #+DATE: <empty for none, if missing: today> #+BEAMER_FRAME_LEVEL: 2 #+TITLE: <causes <Title> to be regular content!>
Put these lines into your .emacs or in a file your .emacs pulls in - i.e. via (require 'mysettings) if the other file is named mysettings.el and ends in (provide 'mysettings).
(org-babel-do-load-languages ; babel, for executing 'org-babel-load-languages ; code in org-mode. '((sh . t) (emacs-lisp . t))) (require 'org-latex) ; latex export (add-to-list ; with highlighting 'org-export-latex-packages-alist '("" "minted")) (add-to-list 'org-export-latex-packages-alist '("" "color")) (setq org-export-latex-listings 'minted)
You can easily set these via M-x customize-variable.
(custom-set-variables ; in ~/.emacs, only one instance '(org-export-latex-classes (quote ; in the init file! (("beamer" "\\documentclass{beamer}" org-beamer-sectioning)))) '(org-latex-to-pdf-process (quote ((concat "pdflatex -interaction nonstopmode" "-shell-escape -output-directory %o %f") "bibtex $(basename %b)" (concat "pdflatex -interaction nonstopmode" "-shell-escape -output-directory %o %f") (concat "pdflatex -interaction nonstopmode" "-shell-escape -output-directory %o %f")))))
(concat "…" "…") is used here to get nice, short lines. Use the concatenated string instead ("pdflatex…%f").
To get org-mode and edit .org files effortlessly.
emerge emacs
To create the presentation.
emerge dev-tex/latex-beamer app-text/texlive
To color the source code (with minted).
emerge dev-python/pygments
Thanks go to the writers of emacs and org-mode, and for this guide in particular to the authors of the org-beamer tutorial on worg [9].
Thank you for your great work!
This presentation is licensed under the GPL [10] (v3 or later) with the additional permission to distribute it without the sources and the copy of the GPL if you give a link to those.1
1 : \tiny As additional permission under GNU GPL version 3 section 7, you may distribute these works without the copy of the GNU GPL normally required by section 4, provided you include a license notice and a URL through which recipients can access the Corresponding Source and the copy of the GNU GPL.\normalsize
Anhang | Größe |
---|---|
emacs-org-beamer-recipes-thumnail.png [11] | 8.92 KB |
emacs-org-beamer-recipes-thumnail-org.png [12] | 20.61 KB |
2012-08-08-Mi-recipes-for-beamer-latex-presentation-using-emacs-org-mode.pdf [2] | 247.11 KB |
2012-08-08-Mi-recipes-for-beamer-latex-presentation-using-emacs-org-mode.org [3] | 12.18 KB |
Links:
[1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html
[2] http://www.xn--drachentrnen-ocb.de/files/2012-08-08-Mi-recipes-for-beamer-latex-presentation-using-emacs-org-mode_1.pdf
[3] http://www.xn--drachentrnen-ocb.de/files/2012-08-08-Mi-recipes-for-beamer-latex-presentation-using-emacs-org-mode_1.org
[4] http://orgmode.org/worg/
[5] http://emacswiki.org
[6] http://gnu.org/software/emacs
[7] https://bitbucket.org/rivanvx/beamer
[8] http://pygments.org
[9] http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html
[10] http://gnu.org/licenses/gpl.html
[11] http://www.xn--drachentrnen-ocb.de/files/emacs-org-beamer-recipes-thumnail.png
[12] http://www.xn--drachentrnen-ocb.de/files/emacs-org-beamer-recipes-thumnail-org.png