From 1f70f3f41b266da204abd8dbcdddfefe648868eb Mon Sep 17 00:00:00 2001 From: James Harkins Date: Sat, 11 Jan 2014 11:59:32 +0800 Subject: [PATCH] ox-beamer: Wrap the title command in a frame for "beamer" class This supports an option, described in the beamer user guide, for supporting material using the beamerarticle package. 1. Write presentation contents in slides. 2. Write content /outside/ of slides for the print version. 3. To make #2 invisible in the slideshow, include "ignorenonframetext" in the LaTeX class options. The problem was that Beamer export writes the title command outside of a frame. So, the title frame disappears when using ignorenonframetext. But, you don't want the title inside a frame for article export. The patch tests :latex-class. If it's "beamer," it adds \begin{frame} before and \end{frame} after the title command. --- lisp/ox-beamer.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 2868944..9f8624f 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -871,13 +871,16 @@ holding export options." ;; 9. Document start. "\\begin{document}\n\n" ;; 10. Title command. - (org-element-normalize-string + (let ((titlecmd (org-element-normalize-string (cond ((string= "" title) nil) ((not (stringp org-latex-title-command)) nil) ((string-match "\\(?:[^%]\\|^\\)%s" org-latex-title-command) (format org-latex-title-command title)) - (t org-latex-title-command))) + (t org-latex-title-command))))) + (if (string= (plist-get info :latex-class) "beamer") + (format "\\begin{frame}%s\\end{frame}" titlecmd) + titlecmd)) ;; 11. Table of contents. (let ((depth (plist-get info :with-toc))) (when depth -- 1.7.9.5