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?
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>
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>
Code: Select all
<mi>l</mi>
<mi>o</mi>
<mi>a</mi>
<mi>d</mi>
Code: Select all
<mi>load</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".
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