From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Exponents / subscripts
Date: Wed, 22 Oct 2014 11:54:58 +0200 [thread overview]
Message-ID: <87d29kjuod.fsf@gmx.us> (raw)
In-Reply-To: <87ppdkmppl.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 22 Oct 2014 11:13:58 +0200")
Hi,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Had preview-latex supported Org I'd maybe agree, but I disagree
>> strongly at this time.
>
> Patch welcome.
Cf. a recent thread on emacs.devel it's pretty non-trivial to make
preview-latex work outside of AUCTeX.
>> sub/superscript works well with entities and makes it very easy to
>> edit math and get approximate live feedback.
>
> Unfortunately, some users complain about the approximation. OTOH, I'm
> pretty sure that most LaTeX users can parse sub/superscript LaTeX code
> without any fontification at all.
Of course they can, but it takes more effort. Compare:
(1) \beta E_{t}[\sum_{j=t}^{T} z_{j}^{e}]
(2) βE_{t}[∑_{j=t}^{T} z_{j}^{e}]
(3) βEₜ[∑ⱼ₌ₜᵀzⱼᵉ]
(3) takes no effort to read, whereas the barebone (1) and the
entities-only (2) still take considerable amount of effort to parse
IMO.
>> IOW and IMO, the "bug", if any, is the fontification of superscript in
>> math.
>
> This is not Org's job since you're talking about a non-compatible
> syntax. I think it should be done in a different library (i.e., not
> "org.el"), if at all.
An external library is ideal (had it existed), but where to stop? Are
entities wrapped in math "supported syntax"?
E.g. "$\alpha\beta\gamma\delta$".
> You want to implement a subset of Auctex. Either you delegate it to that
> major mode (à la Babel), at the price of some slowdown, or you duplicate
> code from it (i.e., `font-latex-match-script').
> In both cases, you need to know when point is on a math snippet or
> environment, which should rely on `org-element-context' if you're
> serious about it.
So your strategy would be to disable fontification within math (since
the syntax is not org), and delegate it to a separate library, say
tex-fold.el (which also doesn't work out-of-the-box in Org-buffers)?
In theory it's ideal, but consistency (e.g. supported entities) and
comparability is probably issues.
I know nothing on the technical level of fortification so I'm not sure
I could work on this issue efficiently.
> This doesn't solve the leak of Org's fontification on math snippets and
> environments.
But it would if you can delegate parsing of math to a separate
library, no?
—Rasmus
--
To err is human. To screw up 10⁶ times per second, you need a computer
next prev parent reply other threads:[~2014-10-22 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 15:28 Exponents / subscripts Fabrice Popineau
2014-10-19 17:08 ` Nicolas Goaziou
2014-10-19 19:52 ` Fabrice Popineau
2014-10-20 9:43 ` Nicolas Goaziou
2014-10-20 22:23 ` Rasmus
2014-10-21 16:34 ` Nicolas Goaziou
2014-10-21 20:06 ` Rasmus
2014-10-22 9:13 ` Nicolas Goaziou
2014-10-22 9:54 ` Rasmus [this message]
2014-10-23 19:16 ` Nicolas Goaziou
2014-10-23 21:32 ` Rasmus
2014-10-23 21:44 ` Nicolas Goaziou
2014-10-22 13:19 ` Fabrice Popineau
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=87d29kjuod.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
/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).