瀏覽代碼

ox-beamer: Export overlay specification for notes

* ox-beamer.el (org-beamer-headline): Pass overlay specification to
beamer `\note{}' command.

This is useful for animating multiple slides within a single frame and
displaying only relevant note for each step.

TINYCHANGE
Jamie Forth 6 年之前
父節點
當前提交
5c07b4522c
共有 2 個文件被更改,包括 20 次插入7 次删除
  1. 4 0
      etc/ORG-NEWS
  2. 16 7
      lisp/ox-beamer.el

+ 4 - 0
etc/ORG-NEWS

@@ -54,6 +54,10 @@ alternative was removed and there is no more a :use-xcolor options
 since now it's implicitly always true.
 
 ** New features
+*** Handle overlay specification for notes in Beamer export
+
+This aligns Beamer notes with slide overlays.
+
 *** Add a dispatcher command to insert dynamic blocks
 
 You can add dynamic block into ~org-dynamic-block-alist~ with function

+ 16 - 7
lisp/ox-beamer.el

@@ -645,13 +645,22 @@ as a communication channel."
 		contents))
        ;; Case 4: HEADLINE is a note.
        ((member environment '("note" "noteNH"))
-	(format "\\note{%s}"
-		(concat (and (equal environment "note")
-			     (concat
-			      (org-export-data
-			       (org-element-property :title headline) info)
-			      "\n"))
-			(org-trim contents))))
+        (concat "\\note"
+		;; Overlay specification.
+		(let ((overlay (org-element-property :BEAMER_ACT headline)))
+		  (when overlay
+		    (org-beamer--normalize-argument
+		     overlay
+		     (if (string-match "\\`\\[.*\\]\\'" overlay)
+			 'defaction 'action))))
+		(format "{%s}"
+                        (concat (and (equal environment "note")
+                                     (concat
+                                      (org-export-data
+                                       (org-element-property :title headline)
+				       info)
+                                      "\n"))
+				(org-trim contents)))))
        ;; Case 5: HEADLINE is a frame.
        ((= level frame-level)
 	(org-beamer--format-frame headline contents info))