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)))
|
(let* ((header (nth 1 (assoc class org-e-latex-classes)))
|
||||||
(document-class-string
|
(document-class-string
|
||||||
(and (stringp header)
|
(and (stringp header)
|
||||||
(if class-options
|
(if (not class-options) header
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
|
"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
|
||||||
class-options header t nil 1)
|
class-options header t nil 1)))))
|
||||||
header))))
|
|
||||||
(when document-class-string
|
(when document-class-string
|
||||||
(org-e-latex--guess-babel-language
|
(org-e-latex--guess-babel-language
|
||||||
(org-e-latex--guess-inputenc
|
(org-e-latex--guess-inputenc
|
||||||
|
|
|
@ -1009,11 +1009,10 @@ holding export options."
|
||||||
(let* ((header (nth 1 (assoc class org-e-latex-classes)))
|
(let* ((header (nth 1 (assoc class org-e-latex-classes)))
|
||||||
(document-class-string
|
(document-class-string
|
||||||
(and (stringp header)
|
(and (stringp header)
|
||||||
(if class-options
|
(if (not class-options) header
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
|
"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
|
||||||
class-options header t nil 1)
|
class-options header t nil 1)))))
|
||||||
header))))
|
|
||||||
(when document-class-string
|
(when document-class-string
|
||||||
(org-e-latex--guess-babel-language
|
(org-e-latex--guess-babel-language
|
||||||
(org-e-latex--guess-inputenc
|
(org-e-latex--guess-inputenc
|
||||||
|
|
Loading…
Reference in New Issue