all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch][ox-latex] context-aware subscript
Date: Wed, 28 Aug 2013 15:38:42 +0200	[thread overview]
Message-ID: <874naaorz1.fsf@gmail.com> (raw)
In-Reply-To: <87r4deqbav.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 28 Aug 2013 13:55:52 +0200")

Hello,

Rasmus <rasmus@gmx.us> writes:

> I know it's intended but I dislike it.  In earlier version of
> ox-latex.el it didn't use the \text-macro.

Earlier versions were broken in many ways. They didn't handle spaces,
unicode characters and nested sub/superscript like \text does.

>> Also, merging consecutive subscript and superscript is fragile (and
>> the
>> code in `org-latex--script-size' could be improved in that area), as
>> it
>> also depends on user's filters. Here is a contrived example:
>>
>> Let's assume I have a filter which removes any subscript with the
>> letter
>> "a" in it. With the following code:
>>
>>   \beta_a
>>
>> Trying to merge both the entity and the subscript will return
>>
>>   $\beta
>>
>> which is wrong.
>
> OK.  Perhaps it can be made less fragile.

That's not an easy task. I think it would involve adding implicit
pseudo-objects (i.e. object types specific to `latex' back-end).
Unfortunately, there's no API for that in either org-element or ox.

For now, I think we can put it aside.

> But it is broken, since even 
>
> (*)    $\beta$$_{\text{t}}$
>
> doesn't produce the correct output (spacing is wrong; compare to
> $\beta_{\text{t}}$).

Correct. Then, fixing it is more important than caring about some user
filter.

> To sum up, my (implicit) claim and what I intended to fix with the
> patch, was
>
>   1. Fixing the bug that subscripts produce wrong output.

OK.

>   2. Try to make the type of subscript configurable.  Previously,
>      "math subscripts" were forced, now \text subscripts are forced.

I think filters are good enough for the job. No need for another
configuration variable.

Also, entering math mode is easy enough in Org, whereas exiting math
mode isn't (if it is forced). I often use constructs like \(I_n\) since
I want the "I" char to be in the same font as "n".



Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-08-28 13:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-18  1:29 [patch][ox-latex] context-aware subscript Rasmus
2013-08-19  8:26 ` Nicolas Goaziou
2013-08-28 11:55   ` Rasmus
2013-08-28 13:38     ` Nicolas Goaziou [this message]
2013-08-28 13:46       ` Rasmus
2013-08-28 19:21         ` Nicolas Goaziou
2013-08-29 10:50           ` Rasmus
2013-08-31  8:11             ` Nicolas Goaziou
2013-08-31 13:59               ` Rasmus
2013-08-31 14:46                 ` Nicolas Goaziou

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

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

  git send-email \
    --in-reply-to=874naaorz1.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.