Skip to main content

math_context_font

Function math_context_font 

Source
pub fn math_context_font(xmath: &Node) -> Option<String>
Expand description

The font a formula’s tokens are read against: a font inside the formula (between the XMath and its ltx:Math), never the text around it. Perl’s pmml_top/cmml_top take find_inherited_attribute (MathML.pm:278, :1293), the enclosing text element’s font, which is right only while the tokens are written relative to that element; ours are written relative to the text default (document.rs finalize_rec), so a token without a font is upright serif whatever text surrounds the formula, and a sans or italic text font must not reach it (<mi> of \mathrm{c} in a theorem body, of + in \emph of a sans document). OXIDIZED_DESIGN_DIVERGENCES #780; witness 2608.14133.