[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DISCUSSION] What should we do with undocumented x^(superscript insi
From: |
Ihor Radchenko |
Subject: |
Re: [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax? |
Date: |
Wed, 20 Mar 2024 13:57:24 +0000 |
Ihor Radchenko <yantar92@posteo.net> writes:
> "Fraga, Eric" <e.fraga@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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax?,
Ihor Radchenko <=