emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] latex export of \ce question


From: Richard Lawrence
Subject: Re: [O] latex export of \ce question
Date: Mon, 21 Apr 2014 21:14:41 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi John,

John Kitchin <address@hidden> writes:

> 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?

Hmm.  I've played around with this a little, and the best solution I've
got is to use an explicit fallback to LaTeX, like:

#+LATEX: \ce{ABO_{3-\delta}}

...or whatever literal LaTeX is the right output for your situation.
(What is the correct export output in this case?  In particular, should
the contents of the subscript be in math mode?)

The problem does indeed seem to be the embedded braces...I'm guessing
this is an inherent limitation, resulting form the fact that Org uses
regular expressions to recognize LaTeX expressions.

If this is something you need to do all the time, and the #+LATEX syntax
doesn't work for you (e.g. if you also need HTML export), you could look
into an Org macro or an export filter. 

Best,
Richard


(If possible, please encrypt your reply to me using my PGP key:
Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646.
See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]