diff options
author | Bastien <bzg@gnu.org> | 2020-02-24 11:43:45 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-24 11:43:45 +0100 |
commit | 30d0b6e1f6d3c4f247a2ce1c9833d56a5401da0b (patch) | |
tree | 07d032895eb7c85bb8df95274f71bfec97040d09 | |
parent | e062ca71996547bdb98833e51cf79531405c2ad1 (diff) | |
download | org-mode-30d0b6e1f6d3c4f247a2ce1c9833d56a5401da0b.tar.gz |
org.el: Tiny enhancements `org-format-latex-as-html'
* lisp/org.el (org-create-math-formula): Use `warn'.
(org-format-latex-as-html): Don't set a free variable, return
the string directly.
-rw-r--r-- | lisp/org.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index a9fdda7..31133c5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15766,7 +15766,7 @@ inspection." (write-region mathml nil mathml-file)) (when (called-interactively-p 'any) (message mathml))) - ((message "LaTeX to MathML conversion failed") + ((warn "LaTeX to MathML conversion failed") (message shell-command-output))) (delete-file tmp-in-file) (when (file-exists-p tmp-out-file) @@ -15803,14 +15803,13 @@ inspection." ;; Failed conversion. Return the LaTeX fragment verbatim latex-frag))) -(defun org-format-latex-as-html (latex-frag) - "Convert LaTeX to HTML with a custom conversion command. -`LATEX-FRAG' is the latex fragment -Set the custom command with `org-latex-to-html-convert-command'." +(defun org-format-latex-as-html (latex-fragment) + "Convert LATEX-FRAGMENT to HTML. +This uses `org-latex-to-html-convert-command', which see." (let ((cmd (format-spec org-latex-to-html-convert-command - `((?i . ,latex-frag))))) + `((?i . ,latex-fragment))))) (message "Running %s" cmd) - (setq shell-command-output (shell-command-to-string cmd)))) + (shell-command-to-string cmd))) (defun org--get-display-dpi () "Get the DPI of the display. |