emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Yu <yu_icq@gmx.at>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Export of sub- and superscripts to LaTeX inconsistent in tables?
Date: Thu, 21 Jun 2012 10:13:28 -0400	[thread overview]
Message-ID: <7876.1340288008@alphaville> (raw)
In-Reply-To: Message from Yu <yu_icq@gmx.at> of "Thu, 21 Jun 2012 15:24:59 +0200." <CANtbJLHe-LiHeMavpcB2TVU8WYnSWL2JCoEs8Sc_ivPpZ5J1Mw@mail.gmail.com>

Yu <yu_icq@gmx.at> wrote:

> Hello!
> 
> When I use superscripts/subscripts in tables, they are incorrectly
> exported to LaTeX -- the placement of math-mode marks ($), braces ({,
> }) seems mixed up.
> 
> As an example an excerpt of my current laboratory book.
> 
> ========================
> | Calculation         | Zn layers | E_tot [eV/atom] (new) |
> (interpolated) | \Delta{}E_tot  [meV/atom] |
> |---------------------+-----------+----------------------+----------------+-------------------|
> [...]
> The energy difference \Delta{}E_tot seems [...]
> ========================
> 
> This gets exported as:
> ========================
> \begin{center}
> \begin{tabular}{lllll}
>  Calculation  &  Zn layers  &  E_tot [eV/atom] (new)  &  (interpolated)  &  \D\
> elta\{}E_tot  [meV/atom]  \\
> \hline
> \end{tabular}
> \end{center}
> 
> 
> The energy difference $\Delta${}E$_{\mathrm{tot}}$ seems [\ldots{}]
> ========================
> 
> Outside the table it works as expected.
> 
> You can see 3 errors in the export of "\Delta{}E_tot" to latex in the table:
>     1. There are no $ marks. During PDF-Conversion this causes
>         "! Extra }, or forgotten $" messages.
>     2. The braces around the subscript are missing -- only the first
> character thus is
>         recognized as a subscript by (pdf)latex.
>     3. For some reason, the opening brace after Delta is escaped.
> 
> The problem doesn't depend on the specific case of a LaTeX entity
> before the subscript (i.e. \Delta{}). It occurs too throughout the
> document for combinations like "E_gb", though of course the escaped
> brace  ( \{} ) doesn't occur there.
> 
> When explicitly writing "E_{tot}" in the table, this was exported as
> "E_\{tot\}", which is just as unexpected.
> 
> I tested this with a freshly pulled version from the git repository
> and with the org-mode sample above as the contents of a minimal file
> with the same result.
> 

I think you'll be happier with the new exporter: it does this correctly
I think, and if you find other problems, I'm sure Nicolas will be happy
to fix them.

At the risk of putting words into Bastien's mouth, I would say that at
this point, the old latex exporter should probably be considered
unmaintained: nobody is putting much time into it.

To use the new exporter, see a post of mine from a couple of days ago:

  http://thread.gmane.org/gmane.emacs.orgmode/56993/focus=57007

HTH,
Nick

      reply	other threads:[~2012-06-21 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 13:24 [BUG] Export of sub- and superscripts to LaTeX inconsistent in tables? Yu
2012-06-21 14:13 ` Nick Dokos [this message]

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=7876.1340288008@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yu_icq@gmx.at \
    /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).