XML-Technologien / MathML / Presentation markup / General layout elements / Making expressions invisible

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The mphantom element makes its content invisible while preserving the size and position of the bounding box of its contents. This element is useful for aligning parts of an expression.

For example, in the expression below the x in the numerator is aligned with the x in the denominator if you explicitly add a "+ x²" term enclosed in an mphantom element, in the numerator:

Presentation markup: equation 19

<mfrac>
  <mrow>
    <mn>1</mn><mo>+</mo><mi>x</mi>
    <mphantom>
      <mo>+</mo>
      <msup>
        <mi>x</mi>
        <mn>2</mn>
      </msup>
    </mphantom>
  </mrow>
  <mrow>
    <mn>1</mn><mo>+</mo><mi>x</mi><mo>+</mo>
    <msup>
      <mi>x</mi>
      <mn>2</mn>
    </msup>
  </mrow>
</mfrac>

   

 

 

 

 

nach oben