* [PATCH] Export overlay specification for beamer notes
@ 2019-01-21 18:51 Jamie Forth
2019-01-26 11:33 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Forth @ 2019-01-21 18:51 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ox-beamer.el-Export-overlay-specification-for-n.patch --]
[-- Type: text/x-diff, Size: 1812 bytes --]
From 5faeaf613b3eb8f687ca2a2addfce974d588fafe Mon Sep 17 00:00:00 2001
From: Jamie Forth <j.forth@gold.ac.uk>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: note-test.org --]
[-- Type: text/x-org, Size: 898 bytes --]
#+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:
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Export overlay specification for beamer notes
2019-01-21 18:51 [PATCH] Export overlay specification for beamer notes Jamie Forth
@ 2019-01-26 11:33 ` Nicolas Goaziou
2019-01-26 13:22 ` Jamie Forth
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2019-01-26 11:33 UTC (permalink / raw)
To: Jamie Forth; +Cc: emacs-orgmode
Hello,
Jamie Forth <j.forth@gold.ac.uk> writes:
> 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.
Thank you. Could you also add an entry in ORG-NEWS file?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Export overlay specification for beamer notes
2019-01-26 11:33 ` Nicolas Goaziou
@ 2019-01-26 13:22 ` Jamie Forth
2019-01-26 17:26 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Forth @ 2019-01-26 13:22 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
Hello,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Thank you. Could you also add an entry in ORG-NEWS file?
Of course, sorry to miss this first time around.
Regards,
--
Jamie Forth
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ox-beamer.el-Export-overlay-specification-for-n.patch --]
[-- Type: text/x-diff, Size: 2096 bytes --]
From d2ab748302a72879a348748fbb9d021b32bc3b0a Mon Sep 17 00:00:00 2001
From: Jamie Forth <j.forth@gold.ac.uk>
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 the relevant note(s) for each slide.
TINYCHANGE
---
etc/ORG-NEWS | 2 ++
lisp/ox-beamer.el | 23 ++++++++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index e06d0c09b..d1b247ab9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -105,6 +105,8 @@ matches the same structures than 'latex but it calls
org-src-font-lock-fontify-block instead, thus bringing about full
LaTeX font locking.
+*** Export Beamer overlay specification for notes
+
** New functions
*** ~org-dynamic-block-insert-dblock~
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 05894ffab..eaff3ca53 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Export overlay specification for beamer notes
2019-01-26 13:22 ` Jamie Forth
@ 2019-01-26 17:26 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2019-01-26 17:26 UTC (permalink / raw)
To: Jamie Forth; +Cc: emacs-orgmode
Jamie Forth <j.forth@gold.ac.uk> writes:
> Of course, sorry to miss this first time around.
No problem. I applied you patch. Thank you.
Regards,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-26 17:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-21 18:51 [PATCH] Export overlay specification for beamer notes Jamie Forth
2019-01-26 11:33 ` Nicolas Goaziou
2019-01-26 13:22 ` Jamie Forth
2019-01-26 17:26 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).