From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch][ox-latex] context-aware subscript Date: Mon, 19 Aug 2013 10:26:32 +0200 Message-ID: <87tximt7bb.fsf@gmail.com> References: <877gfjqq6w.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBKnG-0003Go-JV for emacs-orgmode@gnu.org; Mon, 19 Aug 2013 04:26:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBKn6-0005ck-UM for emacs-orgmode@gnu.org; Mon, 19 Aug 2013 04:26:30 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:39221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBKn6-0005cY-OE for emacs-orgmode@gnu.org; Mon, 19 Aug 2013 04:26:20 -0400 Received: by mail-wi0-f175.google.com with SMTP id hq12so2778177wib.8 for ; Mon, 19 Aug 2013 01:26:19 -0700 (PDT) In-Reply-To: <877gfjqq6w.fsf@pank.eu> (rasmus@gmx.us's message of "Sun, 18 Aug 2013 03:29:13 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Thanks for the patch. Here are some comments about it. Rasmus writes: > Currently one can't write something like \beta_t and get a nice result > in org when exporting to LaTeX (where nice result :=3D $\beta_t$). This > patch tries to fix it. Translating \beta_t into $\beta$$_\text{t}$ and \beta_bar into $\beta$$=C2=A0\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}}$ =E2=89=A0 $\alpha$$\beta$$_{{t}}$ =E2=89= =A0 $\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, --=20 Nicolas Goaziou