emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* latex equations and $ sign
@ 2014-06-06 10:47 Federico Beffa
  2014-06-06 14:10 ` Jorge A. Alfaro-Murillo
  2014-06-06 15:00 ` Rasmus
  0 siblings, 2 replies; 5+ messages in thread
From: Federico Beffa @ 2014-06-06 10:47 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

Hi,

I would like to have a mathematical equation typeset in latex and
automatically generated by sympy, embedded in an equation environment:

  #+NAME: mass-energy
  #+BEGIN_SRC python :results raw :exports results :wrap EQUATION
    import sympy as sp
    E, m, c = sp.symbols('E, m, c', real=True, positive=True)
    E = m*c**2
    return sp.latex(E)
  #+END_SRC


  #+NAME: eq:1
  #+RESULTS: mass-energy
  #+BEGIN_EQUATION
  c^{2} m
  #+END_EQUATION

The problem I'm facing is that despite the fact that the equation is
already in a mathematical mode latex environment, it still gets sub- and
superscripts surrounded by a $ sign. Here is the generated latex snippet:

\begin{equation}
\label{eq:1}
c$^{\text{2}}$ m
\end{equation}

Is there a way to teach org-mode not to insert $ signs in equation
environments?

Thanks,
Fede

[-- Attachment #2: Type: text/html, Size: 1090 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-09 13:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 10:47 latex equations and $ sign Federico Beffa
2014-06-06 14:10 ` Jorge A. Alfaro-Murillo
2014-07-09 13:32   ` Federico Beffa
2014-06-06 15:00 ` Rasmus
2014-07-09 13:31   ` Federico Beffa

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).