From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: latex export of \ce question Date: Tue, 22 Apr 2014 14:32:43 +0200 Message-ID: <8761m1ilxw.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcZqI-00021t-PF for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 08:30:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcZqC-0002c9-Af for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 08:30:30 -0400 Received: from plane.gmane.org ([80.91.229.3]:60337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcZqB-0002c5-LP for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 08:30:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WcZqA-0003aT-N3 for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 14:30:22 +0200 Received: from 109.201.154.210 ([109.201.154.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Apr 2014 14:30:22 +0200 Received: from rasmus by 109.201.154.210 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Apr 2014 14:30:22 +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: emacs-orgmode@gnu.org John Kitchin writes: > Hi all, > > I often have to use the mhchem latex package to write chemical formulas, > and I have teh following export issue. > > If I have this in an org file: > > \ce{ABO_3} > > \ce{ABO_{3-\delta}} > > this exports as > \ce{ABO_3} > > \ce\{ABO$_{\text{3-}\delta}$\} > > The first one is fine, but the second one is not. The nested {} seems to > mess it up. Is there a way to get this to export correctly? You could use snippets. If you prefer the macro syntax you could also use that. . . #+MACRO: ce @@latex:ce($1)@@ @@latex:ce{ABO_{3-\delta}}@@ {{{ce(ABO_{3-\delta})}}} -- This is the kind of tedious nonsense up with which I will not put