Question

When I try to make a custom beamer class for Org-mode by manipulating org-export-latex-classes I do something like:

(add-to-list 'org-export-latex-classes
             '("mybeamer"
               "\\documentclass{beamer}
               \\usepackage{...}
               [NO-DEFAULT-PACKAGES]
               [NO-PACKAGES]
               [EXTRA]"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Obviously this does not work well with beamer because it structures content in other ways than by sections. How can I make Org-mode work with the way beamer structures content?

Was it helpful?

Solution

You can simply use org-beamer-sectioning instead of setting section by hand. So to make a custom beamer class for Org-mode which can be used via #+LaTeX_CLASS: mybeamer by putting something of the following form in your .emacs:

(add-to-list 'org-export-latex-classes
             '("mybeamer"
               "\\documentclass[presentation]{beamer}
               \\usepackage{...}
               [NO-DEFAULT-PACKAGES]
               [NO-PACKAGES]
               [EXTRA]
               [BEAMER-HEADER-EXTRA]"
               org-beamer-sectioning))

This requires (as for all manipulations of org-export-latex-classes) the following in your .emacs to work:

(require 'org-latex)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top