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 8474115b20
breaks LaTeX
image exports as HTML and ODT. This fixes it.
This commit is contained in:
parent
4a7c99134c
commit
cb34324a82
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue