emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Exponents / subscripts
Date: Thu, 23 Oct 2014 23:32:36 +0200	[thread overview]
Message-ID: <878uk6jwuj.fsf@gmx.us> (raw)
In-Reply-To: <87lho6mwb3.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 23 Oct 2014 21:16:00 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> 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$".
>
> No. What is inside a math snippet/environment is a black box for Org.
> Entities are a different beast that do not require a math environment
> (e.g., "\alpha" is not considered to be LaTeX code).

Bur surely the fact that $\beta$ is displayed $β$ is a consequence of
org-entities.el?  Whether desirable or not.

>> 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 don't think so. No fontification at all on LaTeX code is a decent
> default in an Org buffer. Additional, exact, fontification for it is
> a nice bonus.

I would like to agree, but I get too much joy from the current
imprecise implementation.  From a practical perspective the current
state is OK and much preferable over the alternative.  IOW and IMO,
let's not touch it unless we've got something better!

>>> 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?
>
> No it wouldn't, because Org would still have to fontify sub/superscript
> outside math snippets. Of course, dedicated fontification could override
> leaked one, but I think this would be troublesome in some occasions.
>
> At some point, I hope to introduce the parser in the fontification
> process, which would some the problem.

Just out of curiosity, can you mention a couple of (org) function to
look at to see how fontification works?

—Rasmus

-- 
m-mm-mmm-mmmm bacon!

  reply	other threads:[~2014-10-23 21:32 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
2014-10-23 19:16                 ` Nicolas Goaziou
2014-10-23 21:32                   ` Rasmus [this message]
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=878uk6jwuj.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).