emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [odt][ANN]  Embed links to mathml files as ODF formula
@ 2011-09-08 15:38 Jambunathan K
  2011-09-08 19:57 ` [PATCH] org.el: Add support for LaTeX to MathML conversion Jambunathan K
  0 siblings, 1 reply; 3+ messages in thread
From: Jambunathan K @ 2011-09-08 15:38 UTC (permalink / raw)
  To: emacs-orgmode

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


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.


[-- Attachment #2: mathml.org --]
[-- Type: text/plain, Size: 695 bytes --]

#+TITLE:     mathml.org
#+AUTHOR:    Jambunathan K
#+EMAIL:     kjambunathan@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*}
  

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: formula1.mathml --]
[-- Type: text/xml, Size: 293 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: formula2.mathml --]
[-- Type: text/xml, Size: 414 bytes --]

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

[-- Attachment #5: mathml.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9453 bytes --]

[-- Attachment #6: Type: text/plain, Size: 5 bytes --]


-- 

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

end of thread, other threads:[~2011-09-17 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 15:38 [odt][ANN] Embed links to mathml files as ODF formula Jambunathan K
2011-09-08 19:57 ` [PATCH] org.el: Add support for LaTeX to MathML conversion Jambunathan K
2011-09-17 19:35   ` Jambunathan K

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