Adding a mathematical equation with a text element

You can add a mathematical equation in your document-style report by adding a script to a text element.

Procedure

  1. Drag a Text element into the template content editor.
  2. Double-click the text element.
  3. Select the Script expression tab.
  4. Copy and paste your mathematical equation that is written in a mathematical markup language (MathML).
    The following example is the MathML for the quadratic equation:
    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
      <mml:mi>x</mml:mi>
      <mml:mo>=</mml:mo>
      <mml:mfrac>
        <mml:mrow>
          <mml:mo>-</mml:mo>
          <mml:mi>b</mml:mi>
          <mml:mo>±</mml:mo>
          <mml:msqrt>
            <mml:msup>
              <mml:mrow>
                <mml:mi>b</mml:mi>
              </mml:mrow>
              <mml:mrow>
                <mml:mn>2</mml:mn>
              </mml:mrow>
            </mml:msup>
            <mml:mo>-</mml:mo>
            <mml:mn>4</mml:mn>
            <mml:mi>a</mml:mi>
            <mml:mi>c</mml:mi>
          </mml:msqrt>
        </mml:mrow>
        <mml:mrow>
          <mml:mn>2</mml:mn>
          <mml:mi>a</mml:mi>
        </mml:mrow>
      </mml:mfrac>
    </mml:math>
  5. Select the XHTML Input and XHTML Output options.
    Script expression tab displaying the quadratic formula mathematical equation.
  6. Click OK.
  7. Generate the output.
    The following output formats are supported for generating a document-style report with mathematical equations:
    • HTML
    • Microsoft Word
    • PDF
    • XSL-FO
    For the generated HTML documents, Mozilla Firefox is the supported web browser to render the mathematical equations. The web browsers, Google Chrome, and Microsoft Internet Explorer, might not render the mathematical equations properly. You can set Mozilla Firefox on your operating system as your default web browser. For more information, see how to set default programs in the documentation for your operating system.

Results

The generated output of the example quadratic formula:
Generated output of the example quadratic formula.
Remember: If a rich text contains MathML input from products such as IBM® Engineering Requirements Management DOORS® Next or IBM Engineering Test Management, Engineering Publishing renders the input as a mathematical equation.

For more information, see video Math equations: