Browse Source

ox-beamer: Obey to `org-latex-prefer-user-labels'

* lisp/ox-beamer.el (org-beamer--get-label): Obey to
  `org-latex-prefer-user-labels'.

Suggested-by: Fabrice Popineau <fabrice.popineau@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101894>
Nicolas Goaziou 9 years ago
parent
commit
e8f4488f43
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/ox-beamer.el

+ 4 - 1
lisp/ox-beamer.el

@@ -337,7 +337,10 @@ function assumes HEADLINE will be treated as a frame."
     (if (and (stringp opt)
 	     (string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)" opt))
 	(match-string 1 opt)
-      (format "{sec:%s}" (org-export-get-reference headline info)))))
+      (or (and (plist-get info :latex-prefer-user-labels)
+	       (org-element-property :CUSTOM_ID headline))
+	  (format "{sec:%s}"
+		  (org-export-get-reference headline info))))))
 
 (defun org-beamer--frame-level (headline info)
   "Return frame level in subtree containing HEADLINE.