### Non italic math equations

Posted:

**Sat Apr 24, 2021 7:07 pm**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?

Page **1** of **1**

Posted: **Sat Apr 24, 2021 7:07 pm**

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?

Posted: **Mon Apr 26, 2021 11:47 am**

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

Posted: **Tue Apr 27, 2021 6:30 pm**

With the generic installation and no modifications, it outputs italic font. See attachment.

Posted: **Tue Apr 27, 2021 6:37 pm**

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

Posted: **Wed Apr 28, 2021 6:47 am**

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>
```

Posted: **Thu May 06, 2021 2:05 pm**

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

Posted: **Wed May 12, 2021 4:51 am**

Thank you

Posted: **Sun May 16, 2021 5:46 pm**

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-

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