Using well known MathML codes

PowerMath can display the same characters in MathML as what are displayed in the PowerMath editor and InDesign/InCopy, however that requires the fonts to be installed on all of the computers that display the MathML equation.

PowerMath provides a mechanism to replace Pi characters with a specific well known or custom sequence of codes.  These codes can be sequences that are interpreted by MathML renderers.

In the following example, the operator represented as “5” is displayed as an equals sign in the WWDOC01 font.  This MathML equation requires the WWDOC01 font to be available on every computer that displays the equation.  If the font is not available, the MathML parser will attempt to find a suitable font.  In most cases, the equals sign will be displayed as a 5

<?xml version="1.0" encoding="UTF-8"?>
<math>
  <annotation encoding="PowerMath" superset="Default" text="[&amp;a|=|1&amp;]"/>
  <mstyle fontfamily="Times-Italic">
    <mi>a</mi>
    <mstyle fontfamily="WWDOC01">
      <mo>5</mo>
    </mstyle>
    <mstyle fontfamily="Times-Roman">
      <mn>1</mn>
    </mstyle>
  </mstyle>
</math>

To instruct the MathML parser to always use an equals sign, the well known code for equals sign &equals; should be used.  This can be changed on the Pi Character window

Open the Pi Character window

  1. Select the Pi character that represents the equals sign in your superset
  2. Click the edit button
  3. Change the MathML Output Type to Well Known

The MathML Well Known window will open and allow you to select a well known code.  Press OK to accept.

Click Save to save the Pi Character and save your superset.

Exporting the same equation now results in the following MathML and uses the well known code &equals; to represent the equals sign

<?xml version="1.0" encoding="UTF-8"?>
<math>
  <annotation encoding="PowerMath" superset="Default" text="[&amp;a|=|1&amp;]"/>
  <mstyle fontfamily="Times-Italic">
    <mi>a</mi>
    <mstyle fontfamily="Times-Roman">
      <mrow>
        <mo>&equals;</mo>
        <mn>1</mn>
      </mrow>
    </mstyle>
  </mstyle>
</math>