emacs-orgmode@gnu.org archives
 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: Mon, 19 Aug 2013 10:26:32 +0200	[thread overview]
Message-ID: <87tximt7bb.fsf@gmail.com> (raw)
In-Reply-To: <877gfjqq6w.fsf@pank.eu> (rasmus@gmx.us's message of "Sun, 18 Aug 2013 03:29:13 +0200")

Hello,

Thanks for the patch. Here are some comments about it.

Rasmus <rasmus@gmx.us> writes:

> Currently one can't write something like \beta_t and get a nice result
> in org when exporting to LaTeX (where nice result := $\beta_t$).  This
> patch tries to fix it.

Translating \beta_t into $\beta$$_\text{t}$ and \beta_bar into
$\beta$$ \text{bar}$ is intended.

Unless you explicitly ask for math mode, Org defaults to text mode. The
fact that it needs to go through math mode to insert some entities is
not relevant. IOW, there's a difference between \beta_{$t$} and \beta_t.

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.

> As is evident from the pdf output
>
>   $\alpha$$\beta$$_{\text{t}}$ ≠ $\alpha$$\beta$$_{{t}}$ ≠ $\alpha\beta_{t}$
>
> There seems to be no difference between $\alpha$$\beta$ and
> $\alpha\beta$ in the pdf, but the latter is more aesthetically
> pleasing in the source.

Beautifying LaTeX code is fine, unless it means adding yet another
variable, and making some assumptions about user's configuration. If it
ain't broken, don't fix it.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-08-19  8:26 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 [this message]
2013-08-28 11:55   ` Rasmus
2013-08-28 13:38     ` Nicolas Goaziou
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

  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=87tximt7bb.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 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).