瀏覽代碼

More LaTeX fixes

Carsten Dominik 15 年之前
父節點
當前提交
9a21870521
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -15336,12 +15336,13 @@ EXTRA is a string."
 		      "" (org-latex-packages-to-string pkg t))
 	      tpl (replace-match rpl t t tpl))
       (if pkg (setq end (concat end "\n" (org-latex-packages-to-string pkg)))))
-    
+
     (if (string-match "\\[\\(NO-\\)?EXTRA\\][ \t]*\n?" tpl)
 	(setq rpl (if (or (match-end 1) (not extra))
 		      "" (concat extra "\n"))
 	      tpl (replace-match rpl t t tpl))
-      (if pkg (setq end (concat end "\n" (org-latex-packages-to-string pkg)))))
+      (if (and extra (string-match "\\S-" extra))
+	  (setq end (concat end "\n" extra))))
 
     (if (string-match "\\S-" end)
 	(concat tpl "\n" end)