0

In Latex pdf export (C-c C-e l o) $m$ renders correctly as italics m but in HTML export (C-c C-e h o) it renders as Roman m.

Reverse slash Latex formulas like $\mathbb{N}$ render fine in both Latex and HTML.

How can I fix this so that $m$ renders as m in HTML too?


UPDATE

This appears to be a Mac OSX Chrome issue. Safari renders the page correctly. I signed out of my Chrome account but the same issue remained. In this video you can see that when I refresh the page Chrome briefly renders the page correctly but then it reverts back to the Roman font styling (The video is in slow motion).


I use this header for both exports:

#+SETUPFILE: ~/.emacs.d/org-templates/level-2.org
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://cavendish-deneyi.com/css/worg-classic-new.css"/>

enter image description here

enter image description here

9
  • 1
    $m +0 = m$ renders the m as italic in both PDF and HTML export here. Are you using MathJax in your HTML export?
    – NickD
    Commented Dec 11, 2023 at 16:37
  • @NickD I'm not sure. Some sources say mathjax is default in org. This page docs.mathjax.org/en/latest/web/start.html gives a script to add to <head>. I did that but nothing changed. How do I activate mathjax?
    – zeynel
    Commented Dec 11, 2023 at 16:53
  • @NickD I found this answer emacs.stackexchange.com/a/66416/36380 where they tell how to open mathjax options. I did that but I was scared to change anything. Nothing made sense.
    – zeynel
    Commented Dec 11, 2023 at 17:11
  • @NickD "By default, Org loads MathJax from jsDelivr," orgmode.org/manual/Math-formatting-in-HTML-export.html
    – zeynel
    Commented Dec 11, 2023 at 17:16
  • 1
    So check the HTML file that is produced and see if it contains the following: <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> </script>. You might also try \(m+0 = m\) instead of the dollar signs.
    – NickD
    Commented Dec 11, 2023 at 18:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.