From 9a21870521d6c071bb7dba5c1067c30ae63ac219 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 7 Apr 2010 08:35:14 +0200 Subject: [PATCH] More LaTeX fixes --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f5a10032f..e64d54848 100644 --- a/lisp/org.el +++ b/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)