ox-beamer/latex/koma-letter: Fix missing newlines in header
authorNicolas Goaziou <n.goaziou@gmail.com>
Fri, 12 Jul 2013 07:07:23 +0000 (09:07 +0200)
committerNicolas Goaziou <n.goaziou@gmail.com>
Fri, 12 Jul 2013 07:07:23 +0000 (09:07 +0200)
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Fix
  missing newlines in header.
* lisp/ox-beamer.el (org-beamer-template): Fix missing newlines in
  header.
* lisp/ox-latex.el (org-latex-template): Fix missing newlines in
  header.

contrib/lisp/ox-koma-letter.el
lisp/ox-beamer.el
lisp/ox-latex.el

index 1ffb455..0be0be9 100644 (file)
@@ -176,27 +176,28 @@ holding export options."
    (and (plist-get info :time-stamp-file)
         (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
    ;; Document class and packages.
-   (let ((class (plist-get info :latex-class))
-         (class-options (plist-get info :latex-class-options)))
-     (org-element-normalize-string
-      (let* ((header (nth 1 (assoc class org-latex-classes)))
-             (document-class-string
-              (and (stringp 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
-           (org-latex-guess-inputenc
-            (org-splice-latex-header
-             document-class-string
-             org-latex-default-packages-alist ; defined in org.el
-             org-latex-packages-alist nil     ; defined in org.el
-            (concat (plist-get info :latex-header)
-                    (plist-get info :latex-header-extra))))
-           info)))))
+   (let* ((class (plist-get info :latex-class))
+         (class-options (plist-get info :latex-class-options))
+         (header (nth 1 (assoc class org-latex-classes)))
+         (document-class-string
+          (and (stringp 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
+       (org-latex-guess-inputenc
+        (org-element-normalize-string
+         (org-splice-latex-header
+          document-class-string
+          org-latex-default-packages-alist ; Defined in org.el.
+          org-latex-packages-alist nil     ; Defined in org.el.
+          (concat (org-element-normalize-string
+                   (plist-get info :latex-header))
+                  (plist-get info :latex-header-extra)))))
+       info)))
    ;; Define "From" data.
    (format "\\setkomavar{fromname}{%s}\n"
            (org-export-data (plist-get info :author) info))
index 3c564b0..003bd97 100644 (file)
@@ -856,28 +856,30 @@ holding export options."
      (and (plist-get info :time-stamp-file)
          (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
      ;; 2. Document class and packages.
-     (let ((class (plist-get info :latex-class))
-          (class-options (plist-get info :latex-class-options)))
-       (org-element-normalize-string
-       (let* ((header (nth 1 (assoc class org-latex-classes)))
-              (document-class-string
-               (and (stringp 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'" class)
-           (org-latex-guess-babel-language
-            (org-latex-guess-inputenc
-             (org-splice-latex-header
-              document-class-string
-              org-latex-default-packages-alist
-              org-latex-packages-alist nil
-              (concat (plist-get info :latex-header)
-                      (plist-get info :latex-header-extra)
-                      (plist-get info :beamer-header-extra))))
-            info)))))
+     (let* ((class (plist-get info :latex-class))
+           (class-options (plist-get info :latex-class-options))
+           (header (nth 1 (assoc class org-latex-classes)))
+           (document-class-string
+            (and (stringp 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'" class)
+        (org-latex-guess-babel-language
+         (org-latex-guess-inputenc
+          (org-element-normalize-string
+           (org-splice-latex-header
+            document-class-string
+            org-latex-default-packages-alist
+            org-latex-packages-alist nil
+            (concat (org-element-normalize-string
+                     (plist-get info :latex-header))
+                    (org-element-normalize-string
+                     (plist-get info :latex-header-extra))
+                    (plist-get info :beamer-header-extra)))))
+         info)))
      ;; 3. Insert themes.
      (let ((format-theme
            (function
index 0f6fbb5..0fffd82 100644 (file)
@@ -1069,27 +1069,28 @@ holding export options."
      (and (plist-get info :time-stamp-file)
          (format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
      ;; Document class and packages.
-     (let ((class (plist-get info :latex-class))
-          (class-options (plist-get info :latex-class-options)))
-       (org-element-normalize-string
-       (let* ((header (nth 1 (assoc class org-latex-classes)))
-              (document-class-string
-               (and (stringp 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'" class)
-           (org-latex-guess-babel-language
-            (org-latex-guess-inputenc
-             (org-splice-latex-header
-              document-class-string
-              org-latex-default-packages-alist
-              org-latex-packages-alist nil
-              (concat (plist-get info :latex-header)
-                      (plist-get info :latex-header-extra))))
-            info)))))
+     (let* ((class (plist-get info :latex-class))
+           (class-options (plist-get info :latex-class-options))
+           (header (nth 1 (assoc class org-latex-classes)))
+           (document-class-string
+            (and (stringp 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'" class)
+        (org-latex-guess-babel-language
+         (org-latex-guess-inputenc
+          (org-element-normalize-string
+           (org-splice-latex-header
+            document-class-string
+            org-latex-default-packages-alist
+            org-latex-packages-alist nil
+            (concat (org-element-normalize-string
+                     (plist-get info :latex-header))
+                    (plist-get info :latex-header-extra)))))
+         info)))
      ;; Possibly limit depth for headline numbering.
      (let ((sec-num (plist-get info :section-numbers)))
        (when (integerp sec-num)