summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdó Roig-Maranges <abdo.roig@gmail.com>2012-09-13 22:35:44 +0200
committerBastien Guerry <bzg@altern.org>2012-09-14 09:38:10 +0200
commitcb34324a82ef2628d5b1b6b5bd8b1246c2729969 (patch)
tree0fecdd88eb03a71f0fb8488d5012a977b026cc6d
parent4a7c99134c3c43e036f75cb3b9826a95e3a5b6fc (diff)
downloadorg-mode-cb34324a82ef2628d5b1b6b5bd8b1246c2729969.tar.gz
Fix the ltxpng path for HTML and ODT exporters
* org-html.el (org-export-html-preprocess) (org-export-html-format-image): Use `org-latex-preview-ltxpng-directory'. * org-odt.el (org-export-odt-do-preprocess-latex-fragments): Ditto. Commit 8474115b20ff2ac907d62f30a0f543064318f47d breaks LaTeX image exports as HTML and ODT. This fixes it.
-rw-r--r--lisp/org-html.el4
-rw-r--r--lisp/org-odt.el2
2 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 209e3ec..79b0286 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -763,7 +763,7 @@ The default is an extended format of the ISO 8601 specification."
(when (and org-current-export-file
(plist-get parameters :LaTeX-fragments))
(org-format-latex
- (concat "ltxpng/" (file-name-sans-extension
+ (concat org-latex-preview-ltxpng-directory (file-name-sans-extension
(file-name-nondirectory
org-current-export-file)))
org-current-export-dir nil "Creating LaTeX image %s"
@@ -2031,7 +2031,7 @@ PUB-DIR is set, use this as the publishing directory."
(defun org-export-html-format-image (src par-open)
"Create image tag with source and attributes."
(save-match-data
- (if (string-match "^ltxpng/" src)
+ (if (string-match (regexp-quote org-latex-preview-ltxpng-directory) src)
(format "<img src=\"%s\" alt=\"%s\"/>"
src (org-find-text-property-in-string 'org-latex-src src))
(let* ((caption (org-find-text-property-in-string 'org-caption src))
diff --git a/lisp/org-odt.el b/lisp/org-odt.el
index c3fc325..e7d4e31 100644
--- a/lisp/org-odt.el
+++ b/lisp/org-odt.el
@@ -2658,7 +2658,7 @@ using `org-open-file'."
cache-dir display-msg)
(cond
((eq latex-frag-opt 'dvipng)
- (setq cache-dir "ltxpng/")
+ (setq cache-dir org-latex-preview-ltxpng-directory)
(setq display-msg "Creating LaTeX image %s"))
((member latex-frag-opt '(mathjax t))
(setq latex-frag-opt 'mathml)