I am pleased to announce (preliminary) support for embedding mathml files as ODF formulae in odt documents.
Specfically if one provides a link to mathml files as shown below [[./equation.mathml]] then the contents of the mathml file is embedded in the exported ODT document as a ODF formula. I intend to support link to *.odf files as well. (But this is not available yet). Moot point: I am still uncertain how the mathml equations specified in Org format. For example, does the current approach of using file links of the form *.mathml (or *.odf) extension sound OK? Should I use a new mathml:// link type? Please see the attached Org file for a quick demonstration of what the current set of changes mean. 1. Update work area 2. Copy mathml.org, formula1.mathml, formula2.mathml to the same directory 3. Use C-c C-e O to export. Currently the equations are embedded as unnumbered, display/paragraph types. IMPORTANT: I am following this mail with a patch to org.el which will add support for LaTeX-to-MathML conversion using an external converter.
#+TITLE: mathml.org #+AUTHOR: Jambunathan K #+EMAIL: kjambunat...@gmail.com #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+XSLT: * Unnumbered Display Equation (Non-captioned) [[./formula1.mathml]] * Un-numbered Display Equation (Captioned) #+CAPTION: Kinetic Energy #+LABEL:Equation:1 [[file:formula2.mathml]] * COMMENT LaTeX Fragment #+CAPTION: Kinetic Energy #+LABEL:Equation:1 \begin{equation*} e = \frac{1}{2}mv^2 \end{equation*}
<?xml version="1.0" encoding="UTF-8"?> <math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>x</mi> <mi mathvariant="normal">=</mi> <msqrt> <mi>b</mi> </msqrt> </mrow> <annotation encoding="StarMath 5.0">x = sqrt b</annotation> </semantics> </math>
<?xml version="1.0" encoding="UTF-8"?> <math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mrow> <mi>e</mi> <mi mathvariant="normal">=</mi> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <msup> <mi mathvariant="italic">mv</mi> <mn>2</mn> </msup> </mrow> <annotation encoding="StarMath 5.0">e=1 over 2 mv^2 </annotation> </semantics> </math>
mathml.odt
Description: mathml.odt
--