From 9ad3606bf32049d4df871c6697441f702a225dca Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 5 Sep 2020 10:41:36 +0200 Subject: [PATCH] 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 Reported-by: Eric S Fraga --- lisp/ox-html.el | 3 ++- lisp/ox-odt.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 4b2f3c513..76ccbbc4a 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1638,7 +1638,8 @@ a communication channel." (org-html--make-attribute-string (org-combine-plists (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-find-text-property-in-string 'org-latex-src source)) (file-name-nondirectory source))) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index d353a3a2e..104319a9d 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -3730,7 +3730,8 @@ contextual information." (cache-dir (file-name-directory input-file)) (cache-subdir (concat (cl-case processing-type - ((dvipng imagemagick) "ltxpng/") + ((dvipng imagemagick) + org-preview-latex-image-directory) (mathml "ltxmathml/")) (file-name-sans-extension (file-name-nondirectory input-file))))