
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%20Chan... 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@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" xmlns:m="http://schemas.openxmlformats.org/offic ... <mml:mtext <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>> </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" xmlns:m="http://schemas.openxmlformats.org/offic ... /2006/math <http://schemas.openxmlformats.org/officeDocument/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@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user