From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Multiple underscores crash org latex export; other exporters survive Date: Sun, 11 Dec 2016 22:37:37 -0500 Message-ID: References: <49b70a0c-f81b-660b-e2f5-9921ab488d65@gmail.com> <50e77033-c13c-c0be-5d4a-ec5c107e93ae@gmail.com> <87bmwsatox.fsf@nicolasgoaziou.fr> <87mvg8ipmf.fsf@nicolasgoaziou.fr> <084a9c31-e7b1-72af-8d78-9655dc006d00@gmail.com> <87fum0htmk.fsf@nicolasgoaziou.fr> <878trncou3.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGHSK-0006IY-2z for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:39:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGHSH-0002wJ-1N for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:39:12 -0500 Received: from mail-io0-f182.google.com ([209.85.223.182]:34651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGHSG-0002tq-Tu for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:39:08 -0500 Received: by mail-io0-f182.google.com with SMTP id p42so155646558ioo.1 for ; Sun, 11 Dec 2016 19:38:47 -0800 (PST) In-Reply-To: <878trncou3.fsf@nicolasgoaziou.fr> 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" To: emacs-orgmode@gnu.org, Nicolas Goaziou On 12/10/2016 07:05 PM, Nicolas Goaziou wrote: > Hello, > > Scott Randby writes: > >> First, a_b_c and a_bc give nearly identical results when processed >> except that the spacing between letters in the subscript coming from >> a_b_c is wider than that in the subscript coming from a_bc. The spacing >> issue can be seen more clearly by comparing the processed versions of >> a_b_c_d and a_bcd. The wider spacing looks funny when compared to >> surrounding text. >> >> Second, I've been considering the issue of what the primary meaning of >> a_b_c should be when it is used in a file. Since underscores are used in >> LaTeX to designate subscripts in mathematical expressions, it is clear >> to me that a_b_c should mean a_(b_c) instead of a_(bc). Similarly, a^b^c >> should mean a^(b^c) instead of a^(bc). I really can't think of any case >> when I would type in a_b_c in order to get a_(bc). > > I chose this translation because > > 1. It was the easiest to implement; > 2. It is the closest to what Org (unlike to LaTeX) really sees; It seems odd to me that Org would see multiple subscripts as being really one subscript. And the spacing in the subscript when a_b_c is exported and processed is still bad. > 3. It doesn't matter since it is a pathological case. I agree. > >> Finally, I question the use of text style instead of math style when >> a_b, a^b, or similar expressions are exported to LaTeX. TeX was designed >> to produce beautiful typeset mathematics, and the math style is an >> essential part of that beauty. Math style is also the expected way of >> presenting mathematical expressions in all of the professional journals >> that I read and use. New users may not be aware of professional >> standards, but we could help them be aware by translating a_b_c as >> \(a_{b_{c}}\) exactly. Similarly a^b^c would be translated as >> \(a^{b^{c}}\) exactly. > > I strongly disagree. > > Org is not a front-end to LaTeX. LaTeX is but one of its export output > formats. In most of the others, sup/superscript doesn't force math mode > on the user. I realize that Org is not a front-end to LaTeX. But the standards of other output formats are not the standards of LaTeX. Different output formats have different purposes. In this case, one could view Org as forcing text mode on the user when math mode is appropriate. > > In Org, if you want to enter math mode, you need to explicitly request > it, e.g., with: > > a_{$1 + 1$} If this was true, then a_b would be exported to a\_b instead of a\(_\text{b}\). Math mode is entered any time \(...\) is used, and in the a_b case, the user did not explicitly request it. Scott Randby