forked from mirrors/org-mode
ox-beamer: Do not add automatic label when "allowframebreaks" is set
* lisp/ox-beamer.el (org-beamer--format-frame): Do not add automatic label when "allowframebreaks" is set in default options. Do not check only headline properties.
This commit is contained in:
parent
9e05a6ac8a
commit
4a2e7c8db9
|
@ -424,9 +424,8 @@ used as a communication channel."
|
||||||
(let* ((beamer-opt (org-element-property :BEAMER_OPT headline))
|
(let* ((beamer-opt (org-element-property :BEAMER_OPT headline))
|
||||||
(options
|
(options
|
||||||
;; Collect nonempty options from default value and
|
;; Collect nonempty options from default value and
|
||||||
;; headline's properties. Also add a label for
|
;; headline's properties.
|
||||||
;; links.
|
(cl-remove-if-not #'org-string-nw-p
|
||||||
(cl-remove-if-not 'org-string-nw-p
|
|
||||||
(append
|
(append
|
||||||
(org-split-string
|
(org-split-string
|
||||||
(plist-get info :beamer-frame-default-options) ",")
|
(plist-get info :beamer-frame-default-options) ",")
|
||||||
|
@ -436,14 +435,20 @@ used as a communication channel."
|
||||||
;; them.
|
;; them.
|
||||||
(and (string-match "^\\[?\\(.*\\)\\]?$" beamer-opt)
|
(and (string-match "^\\[?\\(.*\\)\\]?$" beamer-opt)
|
||||||
(match-string 1 beamer-opt))
|
(match-string 1 beamer-opt))
|
||||||
","))
|
",")))))
|
||||||
;; Provide an automatic label for the frame
|
(fragile
|
||||||
;; unless the user specified one. Also refrain
|
;; Add "fragile" option if necessary.
|
||||||
;; from labeling `allowframebreaks' frames; this
|
(and fragilep
|
||||||
;; is not allowed by beamer.
|
(not (member "fragile" options))
|
||||||
(unless (and beamer-opt
|
(list "fragile")))
|
||||||
(or (string-match "\\(^\\|,\\)label=" beamer-opt)
|
(label
|
||||||
(string-match "allowframebreaks" beamer-opt)))
|
;; Provide an automatic label for the frame unless
|
||||||
|
;; the user specified one. Also refrain from
|
||||||
|
;; labeling `allowframebreaks' frames; this is not
|
||||||
|
;; allowed by Beamer.
|
||||||
|
(and (not (member "allowframebreaks" options))
|
||||||
|
(not (cl-some (lambda (s) (string-match-p "^label=" s))
|
||||||
|
options))
|
||||||
(list
|
(list
|
||||||
(let ((label (org-beamer--get-label headline info)))
|
(let ((label (org-beamer--get-label headline info)))
|
||||||
;; Labels containing colons need to be
|
;; Labels containing colons need to be
|
||||||
|
@ -451,14 +456,10 @@ used as a communication channel."
|
||||||
(format (if (string-match-p ":" label)
|
(format (if (string-match-p ":" label)
|
||||||
"label={%s}"
|
"label={%s}"
|
||||||
"label=%s")
|
"label=%s")
|
||||||
label))))))))
|
label))))))
|
||||||
;; Change options list into a string.
|
;; Change options list into a string.
|
||||||
(org-beamer--normalize-argument
|
(org-beamer--normalize-argument
|
||||||
(mapconcat
|
(mapconcat #'identity (append label fragile options) ",")
|
||||||
'identity
|
|
||||||
(if (or (not fragilep) (member "fragile" options)) options
|
|
||||||
(cons "fragile" options))
|
|
||||||
",")
|
|
||||||
'option))
|
'option))
|
||||||
;; Title.
|
;; Title.
|
||||||
(let ((env (org-element-property :BEAMER_ENV headline)))
|
(let ((env (org-element-property :BEAMER_ENV headline)))
|
||||||
|
|
Loading…
Reference in New Issue