Use `org-preview-latex-image-directory' instead of hardcoding

* lisp/ox-odt.el (org-odt--translate-latex-fragments):
* lisp/ox-html.el (org-html--format-image): Use
`org-preview-latex-image-directory' instead of hardcoding the
directory name.

See <https://orgmode.org/list/87a70v9jan.fsf@ucl.ac.uk>

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
This commit is contained in:
Bastien 2020-09-05 10:41:36 +02:00
parent 6d031c4f86
commit 9ad3606bf3
2 changed files with 4 additions and 2 deletions

View File

@ -1638,7 +1638,8 @@ a communication channel."
(org-html--make-attribute-string (org-html--make-attribute-string
(org-combine-plists (org-combine-plists
(list :src source (list :src source
:alt (if (string-match-p "^ltxpng/" source) :alt (if (string-match-p
(concat "^" org-preview-latex-image-directory) source)
(org-html-encode-plain-text (org-html-encode-plain-text
(org-find-text-property-in-string 'org-latex-src source)) (org-find-text-property-in-string 'org-latex-src source))
(file-name-nondirectory source))) (file-name-nondirectory source)))

View File

@ -3730,7 +3730,8 @@ contextual information."
(cache-dir (file-name-directory input-file)) (cache-dir (file-name-directory input-file))
(cache-subdir (concat (cache-subdir (concat
(cl-case processing-type (cl-case processing-type
((dvipng imagemagick) "ltxpng/") ((dvipng imagemagick)
org-preview-latex-image-directory)
(mathml "ltxmathml/")) (mathml "ltxmathml/"))
(file-name-sans-extension (file-name-sans-extension
(file-name-nondirectory input-file)))) (file-name-nondirectory input-file))))