mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 11:12:54 +00:00
org-e-latex/org-e-beamer: Allow inserting class option when there was none
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Allow inserting class option when there was none. * contrib/lisp/org-e-latex.el (org-e-latex-template): Allow inserting class option when there was none. Thanks to Fabrice Popineau for suggesting this.
This commit is contained in:
parent
152ad3362e
commit
43c0ae945e
|
@ -743,11 +743,10 @@ holding export options."
|
|||
(let* ((header (nth 1 (assoc class org-e-latex-classes)))
|
||||
(document-class-string
|
||||
(and (stringp header)
|
||||
(if class-options
|
||||
(replace-regexp-in-string
|
||||
"^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
|
||||
class-options header t nil 1)
|
||||
header))))
|
||||
(if (not class-options) header
|
||||
(replace-regexp-in-string
|
||||
"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
|
||||
class-options header t nil 1)))))
|
||||
(when document-class-string
|
||||
(org-e-latex--guess-babel-language
|
||||
(org-e-latex--guess-inputenc
|
||||
|
|
|
@ -1009,11 +1009,10 @@ holding export options."
|
|||
(let* ((header (nth 1 (assoc class org-e-latex-classes)))
|
||||
(document-class-string
|
||||
(and (stringp header)
|
||||
(if class-options
|
||||
(replace-regexp-in-string
|
||||
"^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
|
||||
class-options header t nil 1)
|
||||
header))))
|
||||
(if (not class-options) header
|
||||
(replace-regexp-in-string
|
||||
"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
|
||||
class-options header t nil 1)))))
|
||||
(when document-class-string
|
||||
(org-e-latex--guess-babel-language
|
||||
(org-e-latex--guess-inputenc
|
||||
|
|
Loading…
Reference in a new issue