emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff@gmail.com>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: non-math superscripts in LaTeX export
Date: Mon, 17 Dec 2018 15:23:24 -0800	[thread overview]
Message-ID: <87zht33fgz.fsf@geus3064linuxwsm.geus.dk> (raw)
In-Reply-To: <871s6f4ww3.fsf@geus3064linuxwsm.geus.dk>


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 <mankoff@gmail.com> 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.

  reply	other threads:[~2018-12-17 23:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 22:21 non-math superscripts in LaTeX export Ken Mankoff
2018-12-17 23:23 ` Ken Mankoff [this message]
2018-12-17 23:45 ` Nicolas Goaziou
2018-12-18  0:17   ` Ken Mankoff

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=87zht33fgz.fsf@geus3064linuxwsm.geus.dk \
    --to=mankoff@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).