forked from mirrors/org-mode
ox-latex: Allow to span documentclass options accross multiple lines in template
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Allow to span documentclass options accross multiple lines in template. * lisp/ox-beamer.el (org-beamer-template): Allow to span documentclass options accross multiple lines in template. * lisp/ox-latex.el (org-latex-template): Allow to span documentclass options accross multiple lines in template. Thanks to Michael Strey for reporting this bug.
This commit is contained in:
parent
6e1bac2430
commit
f1e23104e3
|
@ -183,11 +183,10 @@ holding export options."
|
||||||
(let* ((header (nth 1 (assoc class org-latex-classes)))
|
(let* ((header (nth 1 (assoc class org-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))))
|
|
||||||
(if (not document-class-string)
|
(if (not document-class-string)
|
||||||
(user-error "Unknown LaTeX class `%s'")
|
(user-error "Unknown LaTeX class `%s'")
|
||||||
(org-latex-guess-babel-language
|
(org-latex-guess-babel-language
|
||||||
|
|
|
@ -841,7 +841,7 @@ holding export options."
|
||||||
(and (stringp header)
|
(and (stringp header)
|
||||||
(if (not class-options) header
|
(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)))))
|
||||||
(if (not document-class-string)
|
(if (not document-class-string)
|
||||||
(user-error "Unknown LaTeX class `%s'" class)
|
(user-error "Unknown LaTeX class `%s'" class)
|
||||||
|
|
|
@ -1109,7 +1109,7 @@ holding export options."
|
||||||
(and (stringp header)
|
(and (stringp header)
|
||||||
(if (not class-options) header
|
(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)))))
|
||||||
(if (not document-class-string)
|
(if (not document-class-string)
|
||||||
(user-error "Unknown LaTeX class `%s'" class)
|
(user-error "Unknown LaTeX class `%s'" class)
|
||||||
|
|
Loading…
Reference in New Issue