summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-10-04 19:12:40 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2013-10-04 19:12:40 (GMT)
commit1734eea184ffbb6cf99391246e97b8595039cb0d (patch)
tree7329b31bfe293d1138edc0214c16e903ea345983
parentee6c792ec7657e50524d78d309538e7e58bb2989 (diff)
parentb67ff6073c09b3f5c3878152d42efe34fcf0fd6e (diff)
downloadorg-mode-1734eea184ffbb6cf99391246e97b8595039cb0d.zip
org-mode-1734eea184ffbb6cf99391246e97b8595039cb0d.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-beamer.el24
1 files changed, 21 insertions, 3 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index a975d24..f1dbe82 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -444,13 +444,31 @@ INFO is a plist used as a communication channel."
"Format HEADLINE as a sectioning part.
CONTENTS holds the contents of the headline. INFO is a plist
used as a communication channel."
- ;; Use `latex' back-end output, inserting overlay specifications
- ;; if possible.
- (let ((latex-headline (org-export-with-backend 'latex headline contents info))
+ (let ((latex-headline
+ (org-export-data-with-backend
+ headline
+ ;; We create a temporary export back-end which behaves the
+ ;; same as current one, but adds "\protect" in front of the
+ ;; output of some objects.
+ (org-export-create-backend
+ :parent 'latex
+ :transcoders
+ (let ((protected-output
+ (function
+ (lambda (object contents info)
+ (let ((code (org-export-with-backend
+ 'beamer object contents info)))
+ (if (org-string-nw-p code) (concat "\\protect" code)
+ code))))))
+ (mapcar #'(lambda (type) (cons type protected-output))
+ '(bold footnote-reference italic strike-through
+ timestamp underline))))
+ info))
(mode-specs (org-element-property :BEAMER_ACT headline)))
(if (and mode-specs
(string-match "\\`\\\\\\(.*?\\)\\(?:\\*\\|\\[.*\\]\\)?{"
latex-headline))
+ ;; Insert overlay specifications.
(replace-match (concat (match-string 1 latex-headline)
(format "<%s>" mode-specs))
nil nil latex-headline 1)