Non italic math equations
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Non italic math equations
Post by IsleofGough »
Is there a way to modify the xls transform for doc book to pdf so that mathml equations are displayed as regular rather than italic font?
Re: Non italic math equations
Hi,
With a stock installation of Oxygen 23.1 I take this DocBook small file:
and publish it using the "DocBook PDF" predefined transformation scenario, the equation in the output PDF does not have the "Some text here" in italics, it's in plain text.
Did you set any publishing parameters which might have interfered with this?
Regards,
Radu
With a stock installation of Oxygen 23.1 I take this DocBook small file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.oxygenxml.com/docbook/xml/5.0/rng/dbmathmlsvg.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>MathML</title>
<equation>
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="block">
<mml:mrow>
<mml:msub>
<mml:mi>Some text here</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:msqrt>
<mml:mn>5</mml:mn>
</mml:msqrt>
</mml:mfrac>
</mml:mrow>
</mml:math>
</equation>
</article>
Did you set any publishing parameters which might have interfered with this?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: Non italic math equations
Post by IsleofGough »
With the generic installation and no modifications, it outputs italic font. See attachment.
- MathItalics.jpg (175.28 KiB) Viewed 1868 times
Re: Non italic math equations
Hi,
Can you also post the DocBook XML content for such an equation so that I can try the same thing on my side?
You are on Windows, right?
Regards,
Radu
Can you also post the DocBook XML content for such an equation so that I can try the same thing on my side?
You are on Windows, right?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: Non italic math equations
Post by IsleofGough »
I am on a Mac (Mac Pro 2019 running OS X 11.3). Here is a paragraph from the docbook:
Code: Select all
<para>When a loop crosses over itself - termed a "riding turn" - the capstan effect becomes important. At the point of crossing, the loop will exert force down on the underlying suture. If the free end is pulled just to the point of slippage, the force pulling will be equal and opposite to the frictional force of the suture. </para>
<para><inlineequation>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>l</mi>
<mi>o</mi>
<mi>a</mi>
<mi>d</mi>
</mrow>
</msub>
<mo>=</mo>
<mi>μ<!-- μ --></mi>
<mo>×<!-- × --></mo>
<mi>N</mi>
<mi>o</mi>
<mi>r</mi>
<mi>m</mi>
<mi>a</mi>
<mi>l</mi>
</math>
</inlineequation> , but also, <inlineequation>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>l</mi>
<mi>o</mi>
<mi>a</mi>
<mi>d</mi>
</mrow>
</msub>
<mo>=</mo>
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>h</mi>
<mi>o</mi>
<mi>l</mi>
<mi>d</mi>
</mrow>
</msub>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>μ<!-- μ --></mi>
<mi>θ<!-- θ --></mi>
</mrow>
</msup>
</math>
</inlineequation>
</para>
Re: Non italic math equations
Hi,
Sorry for the delay.
I can reproduce the problem on my side, somehow at least in my case when I have those consecutive <mi> elements:
they are rendered as italic as if you have only one <mi> element like this:
it' rendered as plain.
It's quite strange so I looked at the MathML specs:
https://www.w3.org/Math/draft-spec/math ... 3_presm.mi
Regards,
Radu
Sorry for the delay.
I can reproduce the problem on my side, somehow at least in my case when I have those consecutive <mi> elements:
Code: Select all
<mi>l</mi>
<mi>o</mi>
<mi>a</mi>
<mi>d</mi>
Code: Select all
<mi>load</mi>
It's quite strange so I looked at the MathML specs:
https://www.w3.org/Math/draft-spec/math ... 3_presm.mi
so the PDF renderer seems to obey the specs, if you have one character inside an <mi> it's rendered in Italic font because the specs says soSpecifies the logical class of the token. The default is "normal" (non-slanted) unless the content is a single character, in which case it would be "italic".
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
-
- Posts: 907
- Joined: Thu May 02, 2019 2:32 pm
Re: Non italic math equations
Post by chrispitude »
Hi Radu,Radu wrote: ↑Thu May 06, 2021 2:05 pmIt's quite strange so I looked at the MathML specs:
https://www.w3.org/Math/draft-spec/math ... 3_presm.mi
so the PDF renderer seems to obey the specs, if you have one character inside an <mi> it's rendered in Italic font because the specs says soSpecifies the logical class of the token. The default is "normal" (non-slanted) unless the content is a single character, in which case it would be "italic".
Regards,
Radu
I always thought <mi> was a "math-italic" element, which led to lots of confusion when I ran into this same behavior! It turns out that <mi> is a "math-identifier" element instead.
For future searchers that find this thread, there are two ways to make multi-character content italic:
- wrap each character with <mi>
- Use the mathvariant="italic" attribute
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