Suvayu Ali <fatkasuvayu+li...@gmail.com> writes:

> On Mon, 28 Mar 2011 16:09:00 +0530
> Jambunathan K <kjambunat...@gmail.com> wrote:
>
>> Any opinions on TeX to MathML converters (specifically those that are
>> amenable to be integrated within Orgmode/Emacs ).
>
> I am not sure whether this is what you are asking about but just in
> case you are.

I am not looking for anything specific just brainstorming. 

I was thinking of transforming LaTeX equations in to MathML and have the
resulting markup embedded within odt doucment.

With existing HTML exporter, there are limitation in embedding equations
as png images. With MathJax I don't see the MathML markup right within
the resulting HTML file [1].

MathToWeb [2] comes close to what I have in mind. It's also GPLed to
boot. For the sake of record,

The following input file (say eqn.txt)

--8<---------------cut here---------------start------------->8---
   \begin{equation}
     e = \frac{1}{2}mv^2
   \end{equation}
--8<---------------cut here---------------end--------------->8---

when passed throught mathtoweb as below


--8<---------------cut here---------------start------------->8---
java -jar mathtoweb.jar eqn.txt -unicode
--8<---------------cut here---------------end--------------->8---

produces

--8<---------------cut here---------------start------------->8---
<!-- begin MathToWeb -->
<!-- (your LaTeX) \begin{equation}
     e = \frac{1}{2}mv^2
   \end{equation} -->
<table class="equation" style="width: 100%; margin-top: 1.0%; margin-right: 
0.0%; margin-bottom: 1.0%; margin-left: 0.0%;">
<tr>
<td style="text-align: left">

<math xmlns="http://www.w3.org/1998/Math/MathML";>
<mrow>
        <mspace width="1.00em" />
        <mi>e</mi>
        <mo>=</mo>
        <mfrac linethickness="1">
                <mn>1</mn>
                <mn>2</mn>
        </mfrac>
        <mi>m</mi>
        <msup>
                <mi>v</mi>
                <mn>2</mn>
        </msup>
</mrow>
</math>

</td>
<td style="text-align: right; vertical-align: center"><a id=""><span 
style="color: #FFFFFF">()</span></a></td>
</tr>
</table>
<!-- end MathToWeb -->
--8<---------------cut here---------------end--------------->8---


The above output (between <math ../>) could be embedded in a odt
document (after stripping the HTML markups with equivalent odt elements)
[3]

> I use ooolatex plugin with OOo (maybe we should start calling
> it Libreoffice from now :) ).  It lets me specify custom latex headers
> to choose packages and renders equations as scalable images. The
> rendered images can then be re-edited by selecting them again. And as
> far as I recall it stays editable across OOo installations as long as
> the ooolatex plugin and latex are installed.
>
> Since it uses latex, I am guessing on paper this could be made to work
> with emacs? Hope this is what you wanted to know.

Footnotes: 
[1]  Follow the embedded in Nick's earlier post.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00534.html
http://free.linux.hp.com/~nick/euler/euler-mj.html

[2]  http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl

[3] odt exporter can embed the XML content of the equation while relying
on the viewer to "update/infer" the frame parameters of the resulting
equation.

-- 
Jambunathan K.

Reply via email to