emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inequalities in math blocks


From: Max Nikulin
Subject: Re: Inequalities in math blocks
Date: Sat, 5 Nov 2022 20:06:25 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

This is a reminder of an old bug. From my point of view it is serious enough, but not release critical due to its age.

&<> characters must be escaped as HTML entities when LaTeX snippets and blocks are exported for MathJax

Form my year-old notes:
- =#+options: tex:verbatim= properly escapes symbols.
- There are functions that performs such replacement in ox-html and ox-odt, but `org-format-latex` resides in org.el, so some refactoring and backward compatibility stubs are necessary.

This thread was tracked at https://updates.orgmode.org for a minor fix of the manual.

On 07/10/2021 22:05, Max Nikulin wrote:
On 07/10/2021 20:05, Timothy wrote:
Org should rewrite < and > to &lt; and &gt; to avoid broken HTML, or as < and  in general.

I think we’ve drifted a bit to the differences in processing (where the `\( ... \)' vs `$ ... $' comments are most pertinent), but as you say for valid HTML < and > should be rewritten. I don’t think I’ve seen an issue because MathJax seems to take care of it, but it looks like MathJax is also fine with &lt; and &rt;.

"<" and ">" characters are valid only markup elements in HTML (part of tags, comments). MathJax interprets text content. Normally, to add text "<" or ">", "&lt;" or "&gt;" should be used in HTML sources. Browsers may pass "<" and ">" from source to text content if they are totally confused by invalid markup that does not resemble tags or something else. I do not think, it should be abused.

I cited MathJax docs just to show a temporary workaround till the bug will be fixed in Org. It is quite strange that Org properly converts "<>&" to entities in text but leaves them as is in math snippets. Unsure whether git history might clarify some reasons of such behavior.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]