branch: externals/org
commit fbaef0ebbcf9183e05645a0e0393be2f7cb469c9
Author: Jacob S. Gordon <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    ox-odt: Add option to specify path of generated MathML files
    
    * etc/ORG-NEWS: (New and changed options): Announce option.
    * lisp/org.el (org-latex-mathml-directory): Add option.
    * lisp/ox-odt.el (org-odt--translate-latex-fragments): Replace
    hard-coded MathML directory with the option.
---
 etc/ORG-NEWS   | 5 +++++
 lisp/org.el    | 9 +++++++++
 lisp/ox-odt.el | 2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index dbe15746a4..ad01b69ecb 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -438,6 +438,11 @@ Previously, only a few conversion methods (~dvipng~, 
~imagemagick~,
 exporting to ODT.  Now any method in ~org-preview-latex-process-alist~
 can be used.
 
+*** New option ~org-latex-mathml-directory~
+
+This option specifies the path where MathML files generated from LaTeX
+fragments are stored.
+
 ** New functions and changes in function arguments
 
 # This also includes changes in function behavior from Elisp perspective.
diff --git a/lisp/org.el b/lisp/org.el
index afb2a6d9ba..910c075cd7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3514,6 +3514,15 @@ images at the same place."
   :package-version '(Org . "9.0")
   :type 'string)
 
+(defcustom org-latex-mathml-directory "ltxmathml/"
+  "Path to store MathML files converted from LaTeX fragments.
+A relative path here creates many directories relative to the
+processed Org files paths.  An absolute path puts all files
+in the same place."
+  :group 'org-latex
+  :package-version '(Org . "9.8")
+  :type 'string)
+
 (defun org-format-latex-mathml-available-p ()
   "Return t if `org-latex-to-mathml-convert-command' is usable."
   (save-match-data
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index ef747a925f..a8f6fe4acb 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -3838,7 +3838,7 @@ contextual information."
                 (cache-subdir (concat
                                (if is-image
                                    org-preview-latex-image-directory
-                                 "ltxmathml/")
+                                 org-latex-mathml-directory)
                                (file-name-sans-extension
                                 (file-name-nondirectory input-file))))
                 (display-msg

Reply via email to