Mathml in CSS based PDF output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 15
- Joined: Wed Mar 06, 2019 4:35 pm
Mathml in CSS based PDF output
Hi there,
I want to style the MathML equations in my PDF output (css based, Oxygen 20.1). Am I right with the conclusion that any CSS styling applied to the <math>element is visible in HTML but not in PDF? The merged XML seems just to copy the whole math node without any styling.
I just want to change the font-family and margins but found no way to do so yet. I hope you have a hint for me!
Cheers
Maripe
I want to style the MathML equations in my PDF output (css based, Oxygen 20.1). Am I right with the conclusion that any CSS styling applied to the <math>element is visible in HTML but not in PDF? The merged XML seems just to copy the whole math node without any styling.
I just want to change the font-family and margins but found no way to do so yet. I hope you have a hint for me!
Cheers
Maripe
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Mathml in CSS based PDF output
Hello,
Oxygen uses the JEuclid library to render MathML equations in the output and it seems JEuclid uses its own predefined fonts.
However, I logged this in our internal improvements tracking system so we will investigate this limitation and see if we could implement a solution to change the fonts.
We will let you know when/if we will find a way to do that.
However, as a workaround to change the margins, you could wrap the MathML equation (<m:math/> element in DITA) into a codeph or a paragraph and set a custom outputclass on it, so you could then match the outputclass in your customization CSS and apply the required margins or borders.
Unfortunately, this solution does not also work for changing the font-family.
Regards,
Costin
Oxygen uses the JEuclid library to render MathML equations in the output and it seems JEuclid uses its own predefined fonts.
However, I logged this in our internal improvements tracking system so we will investigate this limitation and see if we could implement a solution to change the fonts.
We will let you know when/if we will find a way to do that.
However, as a workaround to change the margins, you could wrap the MathML equation (<m:math/> element in DITA) into a codeph or a paragraph and set a custom outputclass on it, so you could then match the outputclass in your customization CSS and apply the required margins or borders.
Unfortunately, this solution does not also work for changing the font-family.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Mathml in CSS based PDF output
As a workaround, you could wrap your MathML equations in <equation-block/> or <equation-inline/> elements.
Then write a rule in your customization CSS that matches those equations and use the "Courier New" font, add padding, margins, borders or any other styling you want.
For example:
Costin
Then write a rule in your customization CSS that matches those equations and use the "Courier New" font, add padding, margins, borders or any other styling you want.
For example:
Code: Select all
*[class~="eqn-block"],
*[class~="eqn-inline"]{
font-family: 'Courier New';
padding: 1em;
margin-left: 2em;
border: solid red 1pt;
}
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
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