On 03/10/2021 18:04, Rudolf Adamkovič wrote:
The following Org markup does not render properly in HTML export:
- foo $a<b$ bar foo $b>a$ bar
In Emacs, I see no signs of problems, such as broken math highlighting.
Further, when I export to LaTeX, the inequalities render properly. Does
one have to use \lt and \gt instead of < and
all the time? If so, why allow < and > characters in math
blocks? I ask because, when I reorganize my Org document, it breaks math
"at random" when I use < and > and Emacs does not tell me about it.
I had another reason to look into the manual today, so I noticed:
https://orgmode.org/manual/Math-formatting-in-HTML-export.html
(131)
Please note that exported formulas are part of an HTML document, and
that signs such as ‘<’, ‘>’, or ‘&’ have special meanings. See MathJax
TeX and LaTeX support.
The link is broken however.
http://docs.mathjax.org/en/latest/input/tex/html.html#html-special-characters
Usually, it is sufficient simply to put spaces around these symbols to
cause the browser to avoid them, so
... when $x < y$ we have ...
Though I am a bit surprised that Org did not replace characters to <
and > during export. Perhaps, it is possible to define a filter.