forked from mirrors/org-mode
lisp/ox-beamer: Enable use of overlays for images
* ox-beamer.el (org-beamer-link): If an overlay beamer attributed has been provided, use it for images.
This commit is contained in:
parent
6cd7c6fb1c
commit
3303a54d74
|
@ -734,13 +734,23 @@ used as a communication channel."
|
|||
(or (org-export-custom-protocol-maybe link contents 'beamer info)
|
||||
;; Fall-back to LaTeX export. However, prefer "\hyperlink" over
|
||||
;; "\hyperref" since the former handles overlay specifications.
|
||||
(let ((latex-link (org-export-with-backend 'latex link contents info)))
|
||||
(if (string-match "\\`\\\\hyperref\\[\\(.*?\\)\\]" latex-link)
|
||||
(replace-match
|
||||
(format "\\\\hyperlink%s{\\1}"
|
||||
(or (org-beamer--element-has-overlay-p link) ""))
|
||||
nil nil latex-link)
|
||||
latex-link))))
|
||||
(let* ((latex-link (org-export-with-backend 'latex link contents info))
|
||||
(parent (org-export-get-parent-element link))
|
||||
(attr (org-export-read-attribute :attr_beamer parent))
|
||||
(overlay (plist-get attr :overlay)))
|
||||
(cond ((string-match "\\`\\\\hyperref\\[\\(.*?\\)\\]" latex-link)
|
||||
(replace-match
|
||||
(format "\\\\hyperlink%s{\\1}"
|
||||
(or (org-beamer--element-has-overlay-p link) ""))
|
||||
nil nil latex-link))
|
||||
((string-match "\\\\include\\(graphics\\|svg\\)\\([[{]?\\)" latex-link)
|
||||
;; Check for overlay specification and insert if
|
||||
;; present.
|
||||
(replace-match
|
||||
(format "\\\\include\\1%s\\2"
|
||||
(if overlay overlay ""))
|
||||
nil nil latex-link))
|
||||
(t latex-link)))))
|
||||
|
||||
|
||||
;;;; Plain List
|
||||
|
|
Loading…
Reference in New Issue