MathML: How to insert line breaks?
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 480
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
MathML: How to insert line breaks?
Post by Frank Ralf »
Hi,
I've tried both recommended methods to insert a line break in MathML but this is neither rendered in oXygen 16.1 nor in the PDF output when including the MathML in a DITA document.
Am I missing something?
Best regards,
Frank
I've tried both recommended methods to insert a line break in MathML but this is neither rendered in oXygen 16.1 nor in the PDF output when including the MathML in a DITA document.
Code: Select all
<mspace linebreak='newline' />
<mo linebreak='newline' linebreakstyle='after'>+</mo>
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
Re: MathML: How to insert line breaks?
Hi Frank,
Line breaks seem to be a feature added in MathML 3.0 and the Apache JEuclid library used by default by Oxygen to render MathML equations in the Author mode and when producing the PDF does not have support for MathML 3.0:
http://jeuclid.sourceforge.net/faq.html
Oxygen also has support for installing a commercial MathFlow editor to be used for editing and rendering in the Author editing mode:
https://www.oxygenxml.com/doc/versions/ ... odes2.html
and possibly Mathflow could also be used somehow to convert the Mathml equation to an SVG in order to include it in a PDF. But I do not know if Mathflow supports this type of line breaks in equations, they would need to be contacted and asked further.
Regards,
Radu
Line breaks seem to be a feature added in MathML 3.0 and the Apache JEuclid library used by default by Oxygen to render MathML equations in the Author mode and when producing the PDF does not have support for MathML 3.0:
http://jeuclid.sourceforge.net/faq.html
Oxygen also has support for installing a commercial MathFlow editor to be used for editing and rendering in the Author editing mode:
https://www.oxygenxml.com/doc/versions/ ... odes2.html
and possibly Mathflow could also be used somehow to convert the Mathml equation to an SVG in order to include it in a PDF. But I do not know if Mathflow supports this type of line breaks in equations, they would need to be contacted and asked further.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 480
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: MathML: How to insert line breaks?
Post by Frank Ralf »
Hi Radu,
Many thanks for your quick reply. Actually, <mspace linebreak='newline' /> should also work with MathML 2.0. However, most rendering engines don't seem to support line breaking (yet), for example Firefox. But according to http://jeuclid.sourceforge.net/jeuclid- ... break3.xml, jeuclid renders line breaks correctly.
MathFlow provides some useful information about MathML 3 Linebreaking and Indentation Examples.
Kind regards,
Frank
Many thanks for your quick reply. Actually, <mspace linebreak='newline' /> should also work with MathML 2.0. However, most rendering engines don't seem to support line breaking (yet), for example Firefox. But according to http://jeuclid.sourceforge.net/jeuclid- ... break3.xml, jeuclid renders line breaks correctly.
MathFlow provides some useful information about MathML 3 Linebreaking and Indentation Examples.
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 480
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: MathML: How to insert line breaks?
Post by Frank Ralf »
Regarding JEuclid, the strange thing is that line breaks do render in the MathML 2.0 test suite but not in the MathML 3.0 test suite.
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
Re: MathML: How to insert line breaks?
Hi Frank,
JEuclid also distributes a MathViewer based on its own libraries. Here's the Windows version for it:
https://sourceforge.net/projects/jeucli ... p/download
and neither of the samples from their test suite seems to generate a line break when using it.
Regards,
Radu
JEuclid also distributes a MathViewer based on its own libraries. Here's the Windows version for it:
https://sourceforge.net/projects/jeucli ... p/download
and neither of the samples from their test suite seems to generate a line break when using it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 480
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: MathML: How to insert line breaks?
Post by Frank Ralf »
Hi Radu,
Many thanks for this pointer and testing.
Best regards,
Frank
Many thanks for this pointer and testing.
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: MathML: How to insert line breaks?
Post by chrispitude »
Hmmm, I need a solution to this too! We have multi-line equations in our books that are not breaking in the PDF Chemistry output using any of the methods I've tried.
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: MathML: How to insert line breaks?
Post by chrispitude »
Some additional data - the LibreOffice Math open-source equation editor does not understand the <mspace linebreak='newline' /> element, but the MathFlow commercial equation editor does (including creating multi-line equations).
-
- Posts: 605
- Joined: Wed Oct 16, 2019 3:47 pm
Re: MathML: How to insert line breaks?
Post by julien_lacour »
Hello,
I have logged an issue in our tracking system, I will let you know as soon as a fix will be available.
At the moment, the only solution is to split the equation in multiple blocks using <equation-block> elements.
Regards,
Julien
I have logged an issue in our tracking system, I will let you know as soon as a fix will be available.
At the moment, the only solution is to split the equation in multiple blocks using <equation-block> elements.
Regards,
Julien
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: MathML: How to insert line breaks?
Post by chrispitude »
MathJax 2.x renders the linebreak but MathJax 3.x does not. I added a comment here:
https://github.com/mathjax/MathJax/issues/2495
https://github.com/mathjax/MathJax/issues/2495
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: MathML: How to insert line breaks?
Post by chrispitude »
Here's the reply to my comment in the MathJax issue discussion:chrispitude wrote: ↑Thu Oct 08, 2020 11:45 pm MathJax 2.x renders the linebreak but MathJax 3.x does not. I added a comment here:
https://github.com/mathjax/MathJax/issues/2495
It is scheduled for second-quarter next year.
-
- Posts: 605
- Joined: Wed Oct 16, 2019 3:47 pm
Re: MathML: How to insert line breaks?
Post by julien_lacour »
Hello Chris,
At the moment Oxygen PDF Chemistry does not include MathJax library.
I will let you know if in the future, we integrate MathJax as MathML rendering tool.
Regards,
Julien
At the moment Oxygen PDF Chemistry does not include MathJax library.
I will let you know if in the future, we integrate MathJax as MathML rendering tool.
Regards,
Julien
Return to “General XML Questions”
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