Magnus G?fvert wrote: > > We want to convert a lot of legacy documentation to DocBook 5. This > includes MS Word documents written with MS Equation Editor 3.0. > Fortunately, these equations can be converted to MathML, similar to the > example below. The conversion is done inline, so the equations in the > Word document are replaced by their MathML text (no rendering). Now, I > have not found any convenient way to get these converted equations into > db5 documents using XXE. My naive hope was that I could simply copy the > MathML text to the clipboard from MS Word and then paste it into an > equation element in XXE. But, I cannot get this or any of the other many > variations of this that I have tried. There are hundreds of equations, > so this really must be done with as little manual intervention as > possible for each equation. Any suggestions on how to proceed? >
This should work fine provided that: [1] The clipboard contains plain text. [2] This plain text starts with an XML declaration: <?xml version="1.0"...?> (This is absolutely mandatory when pasting XML in XXE, even if an absent XML declaration is allowed by the XML standard.) [3] The XML is well-formed. [4] The XML is truly MathML. What follows lacks the XML declaration and moreover, the "m" prefix is not declared. If you cannot instruct MS-Word to generate correct MathML, there is always the possibility to write a custom command which massages the contents of the clipboard prior to pasting it. How to write such command is out of this mailing list but is fully documented. See http://www.xmlmind.com/xmleditor/_distrib/doc/dev/command.html and http://www.xmlmind.com/xmleditor/_distrib/doc/dev/command2.html > > <m:math display='block'> > <m:mrow> > <m:msub> > <m:mi>L</m:mi> > <m:mrow> > <m:mi>r</m:mi><m:mi>e</m:mi> > </m:mrow> > </m:msub> > <m:mo>=</m:mo><m:msub> > <m:mi>L</m:mi> > <m:mrow> > <m:mi>t</m:mi><m:mi>h</m:mi> > </m:mrow> > </m:msub> > <m:mrow><m:mo>(</m:mo> > <m:mrow> > <m:mn>1.54</m:mn><m:mo>+</m:mo><m:mn>5</m:mn><m:mfrac> > <m:mi>l</m:mi> > <m:mi>D</m:mi> > </m:mfrac> > <m:msup> > <m:mi>e</m:mi> > <m:mrow> > <m:mfrac> > <m:mrow> > <m:mo>−</m:mo><m:mi>l</m:mi> > </m:mrow> > <m:mi>D</m:mi> > </m:mfrac> > </m:mrow> > </m:msup> > </m:mrow> > <m:mo>)</m:mo></m:mrow> > </m:mrow> > </m:math> >

