all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Cc: John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: latex export of \ce question
Date: Mon, 21 Apr 2014 21:14:41 -0700	[thread overview]
Message-ID: <874n1m9f0u.fsf@berkeley.edu> (raw)
In-Reply-To: CAJ51ETq5TsEEgtuJSd5RbBzdQioYR_g-VhWZGvGNiCMnOMy44Q@mail.gmail.com

Hi John,

John Kitchin <jkitchin@andrew.cmu.edu> 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	other threads:[~2014-04-22  4:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 23:35 latex export of \ce question John Kitchin
2014-04-22  4:14 ` Richard Lawrence [this message]
2014-04-22 12:32 ` Rasmus
2014-04-22 15:03   ` John Kitchin
2014-04-22 22:44 ` John Hendy
2014-04-26 13:51   ` John Kitchin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874n1m9f0u.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.