More LaTeX fixes

This commit is contained in:
Carsten Dominik 2010-04-07 08:35:14 +02:00
parent b213c0f31e
commit 9a21870521
1 changed files with 3 additions and 2 deletions

View File

@ -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)