Menu

#406 MathML uses invalid attribute "fontweight" instead of "style"

None
closed-fixed
nobody
None
2021-04-23
2020-10-12
ManDay
No

There is no attribute fontweight on <mstyle> (3.3.4 Style Change), the translation of \mathbf therefore does not work in W3C conformant browsers. The correct attribute is style="font-weight:bold".

Discussion

  • ManDay

    ManDay - 2020-10-12

    Needed change, for what it's worth.

     
  • Günter Milde

    Günter Milde - 2020-10-28

    Thank you for the report and patch.
    Unfortunately, with the output of

    .. math::
    
           a = \mathbf{c}^2 + \mathrm{d}x
    

    my firefox (78.4.0esr) ignores the style="font-weight:bold" argument
    (just as it ignored the fontweight).
    OTOH, WebKit and Chromium show a bold "c" but the 2 is no superscript and all variables are upright :(

     
  • Günter Milde

    Günter Milde - 2020-11-25

    After a new look, I would suggest to use the "mathvariant" attribute on <mi> instead of a style wrapper for \mathbf (which in LaTeX is used to convey semantics of a variable, not just style).

    https://www.w3.org/TR/MathML3/mathml.html#chapter3_presm.commatt

     
  • Günter Milde

    Günter Milde - 2021-04-08
    • status: open --> open-fixed
     
  • Günter Milde

    Günter Milde - 2021-04-08

    Fixed in r8675 with a modified version of the provided patch (mathvariant="bold" instead of the "style" attribute).
    Thank you for the report and patch.

     
  • Günter Milde

    Günter Milde - 2021-04-23

    Fixed in 0.17.1. Thank you for the report.

     
  • Günter Milde

    Günter Milde - 2021-04-23
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Auth0 Logo