فهرست منبع

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.
Nicolas Goaziou 12 سال پیش
والد
کامیت
f1e23104e3
3فایلهای تغییر یافته به همراه6 افزوده شده و 7 حذف شده
  1. 4 5
      contrib/lisp/ox-koma-letter.el
  2. 1 1
      lisp/ox-beamer.el
  3. 1 1
      lisp/ox-latex.el

+ 4 - 5
contrib/lisp/ox-koma-letter.el

@@ -183,11 +183,10 @@ holding export options."
       (let* ((header (nth 1 (assoc class org-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)))))
         (if (not document-class-string)
 	    (user-error "Unknown LaTeX class `%s'")
           (org-latex-guess-babel-language

+ 1 - 1
lisp/ox-beamer.el

@@ -841,7 +841,7 @@ holding export options."
 		(and (stringp header)
 		     (if (not class-options) header
 		       (replace-regexp-in-string
-			"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
+			"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
 			class-options header t nil 1)))))
 	  (if (not document-class-string)
 	      (user-error "Unknown LaTeX class `%s'" class)

+ 1 - 1
lisp/ox-latex.el

@@ -1109,7 +1109,7 @@ holding export options."
 		(and (stringp header)
 		     (if (not class-options) header
 		       (replace-regexp-in-string
-			"^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)"
+			"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
 			class-options header t nil 1)))))
 	  (if (not document-class-string)
 	      (user-error "Unknown LaTeX class `%s'" class)