From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Forth Subject: [PATCH] Export overlay specification for beamer notes Date: Mon, 21 Jan 2019 18:51:58 +0000 Message-ID: <874la1sv1t.fsf@lutyens> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn0aR-0008JZ-Gm for emacs-orgmode@gnu.org; Fri, 25 Jan 2019 07:27:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn0Sq-0002Mw-IO for emacs-orgmode@gnu.org; Fri, 25 Jan 2019 07:20:05 -0500 Received: from [195.159.176.226] (port=51538 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gn0Sq-0002Gy-9O for emacs-orgmode@gnu.org; Fri, 25 Jan 2019 07:20:04 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gn0So-000xoj-HZ for emacs-orgmode@gnu.org; Fri, 25 Jan 2019 13:20:02 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi, Sometime I find it useful to align Beamer notes with slide overlays, for example, when stepping through a worked example (see attachment). Beamer permits notes to have overlay specifications but presently these are not exported by org. -- Jamie Forth --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-ox-beamer.el-Export-overlay-specification-for-n.patch >From 5faeaf613b3eb8f687ca2a2addfce974d588fafe Mon Sep 17 00:00:00 2001 From: Jamie Forth Date: Mon, 21 Jan 2019 18:01:13 +0000 Subject: [PATCH] lisp/ox-beamer.el: 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 --- lisp/ox-beamer.el | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 05894ffab..7811dd6b5 100644 --- a/lisp/ox-beamer.el +++ b/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)) -- 2.20.1 --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename=note-test.org #+startup: beamer #+beamer_theme: Singapore #+beamer_header: \usepackage{pgfpages} #+beamer_header: \setbeameroption{show notes on second screen=right} #+options: toc:nil H:2 * Section 1 ** Slide 1 *** Step 1 :B_onlyenv: :PROPERTIES: :BEAMER_ACT: <+> :BEAMER_env: onlyenv :END: **** Foo - a - b **** Step 1 note :B_note: :PROPERTIES: :BEAMER_env: note :BEAMER_ACT: <.> :END: - qux *** Step 2 :B_onlyenv: :PROPERTIES: :BEAMER_ACT: <+> :BEAMER_env: onlyenv :END: **** Bar - c - d **** Step 2 note :B_note: :PROPERTIES: :BEAMER_env: note :BEAMER_ACT: <.> :END: - qux # Local Variables: # org-beamer-environments-extra: (("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}")) # End: --=-=-=--