[oXygen-user] Word equations to oXygen Equation editor
leipold at comcast.net
leipold at comcast.net
Fri Aug 14 11:59:54 CDT 2020
Thank you so much, Radu! This works perfectly and looks great in PDF.
I do have one question about the HTML output. It puts the equation in the HTML output, but it is transformed into a linear equation instead of a professional one. It needs to appear as professional, just like it does in the PDF.
I am not sure if this is a css thing or something else in the transformation scenario. How do I make this transform in HTML with the correct formatting for equations. I have tried various transformation scenarios and they all have the same result so far.
Thanks,
Debbi
From: oXygen-user <oxygen-user-bounces at oxygenxml.com> On Behalf Of Radu Coravu
Sent: Thursday, August 13, 2020 12:52 AM
To: oxygen-user at oxygenxml.com
Subject: Re: [oXygen-user] Word equations to oXygen Equation editor
Hi Debbi,
I created an Oxygen XML Refactoring action based on XSLT to help you with this:
https://github.com/oxygenxml/dita-refactoring-examples/tree/master/34%20Change%20Prefix%20in%20MathML%20Equation%20for%20DITA%20topics
Please see more details on your forum thread:
https://www.oxygenxml.com/forum/post59058.html#p59058
Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 8/12/20 6:37 PM, leipold at comcast.net <mailto:leipold at comcast.net> wrote:
Hello,
I have an extremely large document to convert from Word to Oxygen DITA. One of the biggest problems is equations, and there are thousands of them.
I found a way to export the equation to from word MathML and get this:
<mml:math xmlns:mml=" <http://www.w3.org/1998/Math/MathML> http://www.w3.org/1998/Math/MathML" xmlns:m=" <http://schemas.openxmlformats.org/officeDocument/2006/math%22%3E%3Cmml:msub%3E%3Cmml:mrow%3E%3Cmml:mi%3EC%3C/mml:mi%3E%3C/mml:mrow%3E%3Cmml:mrow%3E%3Cmml:mn%3E1%3C/mml:mn%3E%3Cmml:mi%3E%CF%95%3C/mml:mi%3E%3C/mml:mrow%3E%3C/mml:msub%3E%3Cmml:mtext> http://schemas.openxmlformats.org/offic ... <mml:mtext> </mml:mtext><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>i</mml:mi><mml:mi>p</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:msqrt><mml:mfrac><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:mo>-</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:msqrt></mml:math>
I insert that into the equation editor and get this:
<p>MathML inline: <equation-inline>
<mml:math xmlns:mml=" <http://www.w3.org/1998/Math/MathML> http://www.w3.org/1998/Math/MathML" xmlns:m=" <http://schemas.openxmlformats.org/officeDocument/2006/math> http://schemas.openxmlformats.org/offic ... /2006/math">
<mml:mi>W</mml:mi><mml:mtext>
</mml:mtext><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>i</mml:mi><mml:mi>p</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:msqrt><mml:mfrac><mml:mrow><mml:mn>2</mml:mn><mml:mtext> </mml:mtext><mml:mfenced open="[" close="]" separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mtext> </mml:mtext><mml:mo>-</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi><mml:mo>,</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:msqrt></mml:math>
</equation-inline></p>
It looks fine in Author, but has element errors that MMM:Ml must be declared. It will not transform using the DITA Map PDF - based on HTML & CSS scenario.
I have gotten to the point where I just do not know how to fix this. I realize that the syntax isn't the same as:
<m:math display='inline'>
<m:semantics>
<m:mrow>
<m:msqrt>
...
But with thousands of these, I need the quickest way possible to get these equations in a format that can transform. I thought I had it because it finally looked right in Author, but I need to know how to add the correct element type to get it to transform.
Sorry if this topic has been addressed before. I didn't find it.
Thanks,
Debbi
Debbi Leipold | Mobile (410) 905-7948
_______________________________________________
oXygen-user mailing list
oXygen-user at oxygenxml.com <mailto:oXygen-user at oxygenxml.com>
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20200814/46fab808/attachment.html>
More information about the oXygen-user
mailing list