From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [BUG] Export of sub- and superscripts to LaTeX inconsistent in tables? Date: Thu, 21 Jun 2012 10:13:28 -0400 Message-ID: <7876.1340288008@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shi8k-0007ju-PO for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 10:13:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Shi8d-0000bJ-QH for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 10:13:42 -0400 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:4217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shi8d-0000aR-Kf for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 10:13:35 -0400 In-Reply-To: Message from Yu of "Thu, 21 Jun 2012 15:24:59 +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: Yu Cc: org-mode mailing list Yu 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