Ihor Radchenko <yanta...@posteo.net> writes:

> "Fraga, Eric" <e.fr...@ucl.ac.uk> writes:
>
>> On Saturday, 17 Feb 2024 at 14:06, Ihor Radchenko wrote:
>>> Inconsistent with LaTeX syntax, Org mode not only allows
>>> x^{superscript}, but also x^(superscript) with round braces used for
>>> grouping.
>>
>> Inconsistent with LaTeX is not a sufficient reason for removing this, in
>> my opinion.  Org has /dwim/ elements which make it easier to write some
>> expressions than in LaTeX.  Another example is ~x^-1~ which works as I
>> want but would make no sense in LaTeX (where only the "-" would be
>> superscripted, not the 1).
>
> Good point.
> Although, do note that unlike x^word, x^(some text) is not documented.
> Moreover, options like ^:{} create an impression that only curly braces
> are accepted.

Upon further examination, I found that ^:{} does accept _only_ curly
braces:

#+options: ^:{}
x^word
x^{word}
x^(word)

yields (in latex export):

x\^{}word
x\textsuperscript{word}
x\^{}(word)

So, round braces can be seen as another variant of DWIM behavior.

I conclude that there is no reason to change the existing syntax.

I will need to update `org-use-sub-superscripts' docstring and
https://orgmode.org/worg/org-syntax.html#Subscript_and_Superscript to
document this special case.

Maybe also update the manual section 12.3 Subscripts and Superscripts.

-- 
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>

Reply via email to