Search code examples
htmlmathml

Mathml is not rendered properly in inline html


It seems that even inline <maths> add extra spaces below and above the line. As shown here and here. How can I avoid this behaviour ? Here is the code I used.

<p>
  The series
  <math xmlns="http://www.w3.org/1998/Math/MathML" display='inline'>
    <munderover>
    <mo>&sum;</mo>
    <mrow>
    <mi>n</mi>
    <mo>=</mo>
    <mn>1</mn>
    </mrow>
    <mi>&infin;</mi>
    </munderover>
    <mfrac>
    <mn>1</mn>
    <mi>n</mi>
    </mfrac>
  </math>
  is divergent.
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum a magna vel lorem auctor sagittis. Nullam viverra quam et quam sodales convallis. Donec felis nulla, scelerisque vel ante nec, ultricies viverra erat. Ut aliquet mollis dolor, sodales fringilla purus ultrices eu. Integer elit metus. 
</p>

Thanks.


Solution

  • Ok so it seems that Linux on Ubuntu was not using the last of latin-modern, which caused the bug. Following this procedure has led to a correct rendering.