From 8c48e8b2acb25177705de428b0afee11df6ce0c4 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 6 Mar 2013 13:33:51 +0100 Subject: [PATCH] ox-beamer: Remove frame arount toc when generated from a TOC keyword * lisp/ox-beamer.el (org-beamer-keyword): Remove frame arount toc when generated from a TOC keyword. Since TOC keywords are a way to add a table of contents at some precise location, it is reasonable to think the user will also want to control the frame surronding it. Table of contents generated with toc:t option item still get wrapped within a frame. --- lisp/ox-beamer.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 24d58bd45..17b2ced58 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -97,6 +97,11 @@ ;; sets overlay specifications and the last one inserts optional ;; arguments in current list environment. ;; +;; Table of contents generated from "toc:t" option item are wrapped +;; within a "frame" environment. Those generated from a TOC keyword +;; aren't. TOC keywords accept options enclosed within square +;; brackets (e.g. #+TOC: headlines [currentsection]). +;; ;; Eventually, an export snippet with a value enclosed within angular ;; brackets put at the beginning of an element or object whose type is ;; among `bold', `item', `link', `radio-target' and `target' will @@ -706,10 +711,8 @@ channel." (options (and (string-match "\\[.*?\\]" value) (match-string 0 value)))) (concat - "\\begin{frame}" (when (wholenump depth) (format "\\setcounter{tocdepth}{%s}\n" depth)) - "\\tableofcontents" options "\n" - "\\end{frame}"))) + "\\tableofcontents" options))) (t (org-export-with-backend 'latex keyword contents info)))))