summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-25 09:40:54 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-25 09:40:54 +0200
commit6fac813a5230c0e4d1eb998e89168e9c5e435510 (patch)
tree6870959d0b3cdd82a82b76a52c61ba3004b229dc
parentcc631078ad0ad5def8b726d98c49927232edc5b7 (diff)
parente903288e5080775cbd4d87c69deeba3268cda5c1 (diff)
downloadorg-mode-6fac813a5230c0e4d1eb998e89168e9c5e435510.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-latex.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6fe05e0..12f6b9e 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1630,15 +1630,15 @@ non-nil, only includes packages relevant to image generation, as
specified in `org-latex-default-packages-alist' or
`org-latex-packages-alist'."
(let* ((class (plist-get info :latex-class))
- (class-options (plist-get info :latex-class-options))
- (header (nth 1 (assoc class (plist-get info :latex-classes))))
(class-template
(or template
- (and (stringp header)
- (if (not class-options) header
- (replace-regexp-in-string
- "^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
- class-options header t nil 1)))
+ (let* ((class-options (plist-get info :latex-class-options))
+ (header (nth 1 (assoc class (plist-get info :latex-classes)))))
+ (and (stringp header)
+ (if (not class-options) header
+ (replace-regexp-in-string
+ "^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
+ class-options header t nil 1))))
(user-error "Unknown LaTeX class `%s'" class))))
(org-latex-guess-polyglossia-language
(org-latex-guess-babel-language
@@ -1651,7 +1651,9 @@ specified in `org-latex-default-packages-alist' or
snippet?
(mapconcat #'org-element-normalize-string
(list (plist-get info :latex-header)
- (plist-get info :latex-header-extra)) ""))))
+ (and (not snippet?)
+ (plist-get info :latex-header-extra)))
+ ""))))
info)
info)))