Hello everyone, For a static web-site export without JavaScript, I needed to include some math. Stand alone formulas could be pictures, but this is no solution for inline math expressions.
Today all Web-Browser support MathML for this. From [[https://lists.gnu.org/archive/html/emacs-orgmode/2025-07/msg00067.html] [this thread on the org mailing list]] I got that there is no simple solution. So I added a quick and dirty hack to provide this with GNU groff specific output target =MathML=. For this I misused the =latex fragment=. Write /roff/ instead of /TeX/ math - I'm more used to it anyway - and a patch in ~org-html-latex-fragment~ passes this on for the conversion. The patch for ox-html.el (works with 9.7.11 (Emacs 30.2), 9.7.35 and many more) is below. For ease of use I put my ox-roff with an already patch ~org-html-latex-fragment~ on [[https://github.com/mbeppler/ob-roff][github]]. You only need to load this after ~org~. I hope somebody else finds this also useful. Markus #+begin_example ,*** 3150,3155 **** --- 3150,3157 ---- (let ((latex-frag (org-element-property :value latex-fragment)) (processing-type (plist-get info :with-latex))) (cond + ((memq processing-type '(roff-mathml)) + (org-html-roff-mathml latex-frag info)) ;; FIXME: Duplicated value in ‘cond’: t ((memq processing-type '(t mathjax)) (org-html-format-latex latex-frag 'mathjax info)) #+end_example
