Selaa lähdekoodia

Put a frame around the automatically generated TOC in beamer

Requested by Sebastien Vauban.
Carsten Dominik 15 vuotta sitten
vanhempi
commit
c7f25c6b10
2 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 1 0
      lisp/ChangeLog
  2. 5 2
      lisp/org-beamer.el

+ 1 - 0
lisp/ChangeLog

@@ -3,6 +3,7 @@
 	* org-beamer.el (org-beamer-frame-default-options): New option.
 	(org-beamer-sectioning): Use default options if the user does not
 	have defined any.
+	(org-beamer-fix-toc): Put a frame around the table of contents.
 
 	* org-exp.el (org-export-remove-comment-blocks-and-subtrees): Make
 	sure case-folding works well when processing comment stuff.

+ 5 - 2
lisp/org-beamer.el

@@ -492,8 +492,11 @@ This funcion will run in the final LaTeX document."
   (when org-beamer-export-is-beamer-p
     (save-excursion
       (goto-char (point-min))
-      (when (re-search-forward "\\\\setcounter{tocdepth.*\n\\\\tableofcontents.*\n\\(\\\\vspace\\*.*\\)" nil t)
-	(delete-region (match-beginning 1) (match-end 1))))))
+      (when (re-search-forward "\\(\\\\setcounter{tocdepth.*\n\\\\tableofcontents.*\n\\)\\(\\\\vspace\\*.*\\)"
+			       nil t)
+	(replace-match
+	 "\\\\begin{frame}\n\\\\frametitle{Outline}\n\\1\\\\end{frame}"
+	 t nil)))))
 
 (defun org-beamer-property-changed (property value)
   "Track the BEAMER_env property with tags."