A typeset fraction is a two-dimensional layout that places one expression above another, commonly with a horizontal rule between them. The components are laid out as typesetting boxes before they are assembled. In MathML, an
mfrac element supplies the two components; mathematical typesetting style affects their presentation.[ref]For example,has a superscript in its upper component and a square root in its lower component. Their dimensions influence the space above and below the fraction rule. The expression's algebraic meaning and its geometry are related but distinct: the layout can contain arbitrary expressions, including ones whose values are not rational numbers.
A simple own box model makes the horizontal placement explicit. Suppose the component widths are and , and the layout adds a chosen side allowance . If both components are centred in widththeir left offsets are and . This is an illustrative centring model; real layouts also use vertical clearances, rule thickness and font data from an OpenType MATH table.
New to topics? Read the docs here!