Tony Zorman <tony.zor...@tu-dresden.de> writes: >> For example, something like \alpha is a valid Org mode entity. >> Without `org--math-p' advice, if you do "`a" in Org buffer with >> org-cdlatex-mode, you will see $\alpha$ inserted. With the advice, just >> \alpha will be inserted. > ... > > For example, I would think it's expected behaviour that "`a" in a string > produces "\(\alpha\)" with CDLaTeX; indeed, so far I thought it was just > a bug that it didn't! Likewise, that a standalone `a produces \alpha > instead of \(\alpha\). Why is this not expected behaviour in Org?
In Org mode, there is a significant difference between \alpha and \(\alpha\). The former is natively fontified (with `org-pretty-entities' set to t) and natively exported to HTML/ASCII/ODT/etc. In contrast, \(\alpha\) is very generic and Org mode has to invoke LaTeX, and transform the contents into an image to render it. This includes export. So, plain \alpha entity is generally more universal when in Org mode. Further on the topic of the advice, the original texmathp has no idea about Org-mode's syntax. If you have something like Verbatim text: =\(= followed by \alpha \) Then, (texmathp) will return non-nil on "\alpha" disregarding Org mode's syntax. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>