Author view: MathML and TeX Encoding
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Fri Oct 14, 2011 12:11 pm
Author view: MathML and TeX Encoding
Hi,
I have a problem viewing formula in author view.
We capture our formulas as MathML (coming from Word or via Mathflow Editor). When I switch to author view I can see the whole formula. So far everthing works fine.
Now, during the process we generate a TeX represenation of the formula. When I switch to author view agein I see only little parts of the formula. Is this something that can be fixed?
The Tex is captured with the annotation element inside the mathml:
I would like to upload 2 images and a zip file with xml data, but it seems not possible yet.
Thanks for your help!
Andrea
I have a problem viewing formula in author view.
We capture our formulas as MathML (coming from Word or via Mathflow Editor). When I switch to author view I can see the whole formula. So far everthing works fine.
Now, during the process we generate a TeX represenation of the formula. When I switch to author view agein I see only little parts of the formula. Is this something that can be fixed?
The Tex is captured with the annotation element inside the mathml:
Code: Select all
<formula>
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
<m:semantics>
<!-- MathML code -->
<m:annotation encoding="TeX">{tex code}</m:annotation>
</m:math>
</formula>
Thanks for your help!
Andrea
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author view: MathML and TeX Encoding
Hi Andrea,
Whenever you want to upload additional resources other than images you will either have to contact us using the support email address support@oxygenxml.com or via our tech support web form:
http://www.oxygenxml.com/techSupport.html
Now coming back to the question, for now Oxygen does not support at all rendering (or editing) TEX equations in the Author mode, probably in your case it presents directly the text content from that m:annotation node. As in your case the MathML equation is also available inside the XML content you could add in the CSS a rule to hide the content of the TEX node completely, for example something like:
or show some static content in-place:
Are the users who edit the document required to modify the TEX formula directly in the Author mode?
Ideally you would not have in the XML document a formula in both forms because it is redundant to do so, you would generate the TEX form at publishing time.
Regards,
Radu
Whenever you want to upload additional resources other than images you will either have to contact us using the support email address support@oxygenxml.com or via our tech support web form:
http://www.oxygenxml.com/techSupport.html
Now coming back to the question, for now Oxygen does not support at all rendering (or editing) TEX equations in the Author mode, probably in your case it presents directly the text content from that m:annotation node. As in your case the MathML equation is also available inside the XML content you could add in the CSS a rule to hide the content of the TEX node completely, for example something like:
Code: Select all
*[encoding="TeX"]{
display:none;
}
Code: Select all
*[encoding="TeX"]{
visibility:-oxy-collapse-text;
content:"TEX EQUATION";
}
Ideally you would not have in the XML document a formula in both forms because it is redundant to do so, you would generate the TEX form at publishing time.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 10
- Joined: Fri Oct 14, 2011 12:11 pm
Re: Author view: MathML and TeX Encoding
Hi Radu,
I sent a zip-file to the support and hope you can view the files.
We already escape the tex-encoding via the stylesheet. The thing is, whenever we even use the annotation element we can't view the MathML formula in author view. So the rendering is different than without the annotations. I would like to see the MathML formula no matter what annotations I generate.
Thank you and regards
Andrea
I sent a zip-file to the support and hope you can view the files.
We already escape the tex-encoding via the stylesheet. The thing is, whenever we even use the annotation element we can't view the MathML formula in author view. So the rendering is different than without the annotations. I would like to see the MathML formula no matter what annotations I generate.
Thank you and regards
Andrea
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author view: MathML and TeX Encoding
Hi Andrea,
I took a look at the samples. In the case which does not get properly rendered (the one which also contains the annotation with the TEX expression) the entire equation is contained in a <semantics> element. Oxygen uses by default the JEuclic library to render MathML and this particular library seems to have trouble rendering the equation when this wrapper element is used.
I tried to use the commercial MathFlow libraries to render the MathML:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ditor.html
and it rendered the equation correctly in both cases so this looks like a bug in JEuclid.
But I got the equation to render correctly also in JEuclid by surrounding the entire fraction in a <mstyle> element like:
I do not know that much MathML I'm afraid but I think it's a bug in JEuclid and your original equation (the one with the added annotation) should have worked without additional changes in it.
Regards,
Radu
I took a look at the samples. In the case which does not get properly rendered (the one which also contains the annotation with the TEX expression) the entire equation is contained in a <semantics> element. Oxygen uses by default the JEuclic library to render MathML and this particular library seems to have trouble rendering the equation when this wrapper element is used.
I tried to use the commercial MathFlow libraries to render the MathML:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ditor.html
and it rendered the equation correctly in both cases so this looks like a bug in JEuclid.
But I got the equation to render correctly also in JEuclid by surrounding the entire fraction in a <mstyle> element like:
Code: Select all
<semantics>
<mstyle>
<mtext>NPH recovery rate=</mtext>
<mfrac>
<mrow>
<msub>
<mrow>
<mtext>NPH grading</mtext>
</mrow>
<mrow>
<mtext>postoperative</mtext>
</mrow>
</msub>
<mo>-</mo>
<msub>
<mrow>
<mtext>NPH grading</mtext>
</mrow>
<mrow>
<mtext>preoperative</mtext>
</mrow>
</msub>
</mrow>
<mrow>
<msub>
<mrow>
<mtext>NPH grading according to Kiefer [2]</mtext>
</mrow>
<mrow>
<mtext>preoperative</mtext>
</mrow>
</msub>
</mrow>
</mfrac>
<mo>×</mo>
<mn>10</mn>
</mstyle>
<annotation encoding="TeX">\hbox{NPH recovery rate=}{{\hbox{NPH
grading}}_{\hbox{postoperative}}-{\hbox{NPH
grading}}_{\hbox{preoperative}}\over{{\hbox{NPH grading according to Kiefer
[2]}}_{\hbox{preoperative}}}}\times 10</annotation>
</semantics>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author view: MathML and TeX Encoding
I added an issue here:
https://sourceforge.net/p/jeuclid/bugs/42/
If you are interested you can follow it and maybe we'll get more info from the JEuclid developers.
Regards,
Radu
https://sourceforge.net/p/jeuclid/bugs/42/
If you are interested you can follow it and maybe we'll get more info from the JEuclid developers.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service