diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-13 09:07:44 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-13 09:07:44 +0100 |
commit | 591ca3a0f375163a0362825ef9d307874dda4acb (patch) | |
tree | b0276f07b66af0285e1fb4bf89ee4d70a9105240 | |
parent | 9fb2e047d2963ff5f4218d43bbb006898e8eac6f (diff) | |
parent | f747ee43bd369f46c39363072f25e9842d783ece (diff) | |
download | org-mode-591ca3a0f375163a0362825ef9d307874dda4acb.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-beamer.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 9a26dc0..d566516 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -721,13 +721,14 @@ channel." CONTENTS is the description part of the link. INFO is a plist used as a communication channel." (or (org-export-custom-protocol-maybe link contents 'beamer) - ;; Fall-back to LaTeX export. However, if link is becomes - ;; a "\hyperlink" macro, try to sneak in Beamer overlay - ;; specification, if any. - (let ((latex-link (org-export-with-backend 'latex link contents info)) - (overlay (org-beamer--element-has-overlay-p link))) - (if (and overlay (string-match "\\`\\\\hyperlink" latex-link)) - (replace-match (concat "\\&" overlay) nil nil latex-link) + ;; 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)))) |