From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: non-math superscripts in LaTeX export Date: Mon, 17 Dec 2018 15:23:24 -0800 Message-ID: <87zht33fgz.fsf@geus3064linuxwsm.geus.dk> References: <871s6f4ww3.fsf@geus3064linuxwsm.geus.dk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ2EU-00052y-Qd for emacs-orgmode@gnu.org; Mon, 17 Dec 2018 18:23:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ2ER-0007PP-8x for emacs-orgmode@gnu.org; Mon, 17 Dec 2018 18:23:30 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:37431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZ2EQ-0007OW-R1 for emacs-orgmode@gnu.org; Mon, 17 Dec 2018 18:23:27 -0500 Received: by mail-pg1-x534.google.com with SMTP id c25so5345902pgb.4 for ; Mon, 17 Dec 2018 15:23:26 -0800 (PST) Received: from geus3064linuxwsm ([136.27.11.161]) by smtp.gmail.com with ESMTPSA id h79sm24789295pfj.186.2018.12.17.15.23.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 15:23:24 -0800 (PST) In-reply-to: <871s6f4ww3.fsf@geus3064linuxwsm.geus.dk> 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 Mailinglist I know pandoc is not the Org reference implementation, but digging into this further I noticed that pandoc exports a^{b} from Org to LaTeX the way I expected/hoped Org would: $ echo "a^{b}" | pandoc -f Org -t latex a\textsuperscript{b} -k. On 2018-12-17 at 14:21 -0800, Ken Mankoff wrote: > Hi, > > This file: > > Math mode: a\(^{b}\) > Non-math mode: a^{b} > What I'd like: a\textsuperscript{b} > > Is exported to this LaTeX code: > > Math mode: a\(^{b}\) > Non-math mode: a\(^{\text{b}}\) > What I'd like: a\textsuperscript{b} > > > When viewing a PDF from that LaTeX source, the first (Math mode) appears correct. The second (non-math) appears correct in the PDF, but I'm not sure it is in the LaTeX source. The third looks correct. > > > A more severe end-product appearance issue comes downstream. I find Pandoc generates better ODT and DOCX files than Org when the inputs are complicated. When viewing a DOCX generated from the above LaTeX with: > > $ pandoc -f LaTeX -i foo.tex -t DOCX -o foo.docx foo.tex > > there is a more serious issue: The b power is not attached to the a, so there is an empty box and it looks like this (where ^b is actually raised as a superscript): a[]^b. Or see attached screenshot. > > I've tried toggling #+OPTIONS ^:{} and ^:nil but it doesn't solve this. It seems to me like a^b should export as a\textsuperscript{b}. Do others agree? Or is this a pandoc bug I should be raising in that project? > > Thanks, > > -k.