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.
This commit is contained in:
Nicolas Goaziou 2013-03-06 13:33:51 +01:00
parent 10c735f18a
commit 8c48e8b2ac
1 changed files with 6 additions and 3 deletions

View File

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