emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Fraga, Eric" <e.fraga@ucl.ac.uk>
Cc: Tom Alexander <tom@fizz.buzz>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax?
Date: Wed, 20 Mar 2024 13:57:24 +0000	[thread overview]
Message-ID: <87plvproor.fsf@localhost> (raw)
In-Reply-To: <87wmr071dw.fsf@localhost>

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>


  reply	other threads:[~2024-03-20 13:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21 22:45 Subscript with parenthesis Tom Alexander
2023-09-21 23:02 ` Tom Alexander
2023-09-22  9:14   ` Ihor Radchenko
2023-09-29 16:12     ` Tom Alexander
2024-02-17 14:06     ` [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax? (was: Subscript with parenthesis) Ihor Radchenko
2024-02-17 19:36       ` William Denton
2024-02-17 20:03         ` Thomas Dye
2024-02-17 21:22       ` Mark Barton
2024-02-19 18:15       ` [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax? Fraga, Eric
2024-02-19 18:30         ` Ihor Radchenko
2024-03-20 13:57           ` Ihor Radchenko [this message]
2024-04-21  9:44             ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87plvproor.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=tom@fizz.buzz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).