Adding a text element

You can use text elements to display text in the output document.

Procedure

  1. Add a Text element to the template content editor by one of the following methods:
    • In the Palette view, select a Text icon Text element and drag it into the template content editor.
    • In the editor area, right-click and select Insert > Text icon Text.
    • In the Outline view, right-click Content and select Insert > Text icon Text.
  2. Double-click the text element.
  3. Enter the text to display in the output.
  4. Click File > Save As or click the Save icon.

Creating a horizontal line with a text element

You can create a horizontal line across your document 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. Enter an html tag. Example: <html>
  5. Enter a line tag. Example: <hr />
  6. Close the html tag. Example: </html>
    Important: Invalid XHTML causes document generation to fail. Verify that your XHTML is valid before you save your changes.
  7. Select the XHTML output option
    Script expression tab displaying the script result.
  8. Click OK.
  9. Generate the output.

Adding a mathematical equation with a text element

You can add a mathematical equation in your document 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 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. There is a known limitation that 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 Rational® DOORS® Next Generation or Rational Quality Manager, Rational Publishing Engine renders the input as a mathematical equation.

Feedback