Create equations using MathML

Understand how you can create equations using MathML style editor and structure editor in Adobe FrameMaker.

In this topic

Introduction

In addition to using the FrameMaker Equation panel to add equations to your documents, you can also use the MathFlow editor from Design Science to design complex mathematical equations. You can then add these equations to your FrameMaker documents. You also have the option to later modify these equations in the same MathFlow editor and publish documents containing MathML equations.

MathML equations are available for use in FrameMaker structured and unstructured documents.

Note: You can also insert MathML equations in DITA 1.3 topics (topic, task, concept, reference, and troubleshooting.) A new element named, “mathml” is created when you insert a MathML equation.

If you generate PDF output for a document containing MathML equations, a reader can search for the contents of these equations.

FrameMaker ships with a trail version of the following MathFlow editors:

For a feature comparison of the editors, see MathFlow Editors. Also, for the procedure to upgrade to the full version of the MathFlow editor, see Configure the installation settings.

See the video, MathML in unstructured documents.

Create and insert a MathML equation into a document

  1. On the Insert menu, choose MathML Equation.

  2. Create an equation in the MathFlow Editor window.

    For details on how to create equations in the MathFlow see the MathFlow help. You can launch the MathFlow help from within the MathFlow Editor window.

  3. To add the equation to the document, click OK.

When the MathML equation is created, an image (.png) file is inserted in the document.

Note: If you get a “Font initialization failed” error message, see the KB article MathML font initial­ization error for resolution.
Note: FrameMaker does not support the .eps file format for MathML images.

Edit a MathML equation in a document

  1. Double-click the equation in the document or right-click on the equation and select Edit with MathFlow.

  2. Edit the equation in the MathFlow Editor window.

  3. To update the equation in the document, click OK.

FrameMaker also supports the copy-paste and undo-redo operation on equations on MathML equations in a document.

Important: For structured (DITA 1.3) and unstructured document, you can insert MathML equations at any appropriate location of the document. However, in the case of your own structured documents, you will need to first define an element in the Elements catalog that supports this type of object. FrameMaker ships with a sample structured app (for DITA 1.2) that includes a MathML element. For details how to use this element, see Sample DITA MathML structured app.

Configure the MathFlow settings in FrameMaker

To configure MathML settings in FrameMaker, choose Edit > Preferences to open the Preferences dialog and select the MathML tab.

Configure the installation settings

FrameMaker ships with a 30 day trial version of Style and Structure editor of MathFlow from Design Science. You can obtain the full version of the Style or Structure editor from Design Science and integrate that with FrameMaker.

  1. After you have installed the full version of the Style or Structure editor, go to the MathFlow section of the MathML tab.

  2. The trial version that ships with FrameMaker is installed in the Adobe FrameMaker installation path. If you have installed MathFlow in an alternative path, specify that path.

  3. In the License File Path text box, specify the path to the license file and click OK.

You need to restart FrameMaker to ensure these changes take effect.

Note: The MathFlow 30 day trial period starts from the first time to invoke the editor. Not from the day you install the version of FrameMaker that includes the editor.

Format a MathML equation

You can update the formatting of a selected MathML equation in a document or you can change the preferences for all MathML equations. By default, the font size of the equations is set to 14 px. DPI for the images that FrameMaker inserts into a document for each equation defaults to 300 dpi. Also, you can choose to place an equation inline with the enclosing paragraph and you can apply the formatting of the enclosing paragraph to the equation.

To update the formatting of the current selected MathML equation:

  1. Select the MathML equation and choose Graphic > Object Properties.

    Or choose Graphic > Object Style Designer.

    These options are also available in the context menu.

  2. Update the formatting for the currently selected MathML equation in the MathML Equation Properties dialog.

Figure 3. MathML Equation Properties dialog
Formattinga MathML equation in MathML Equation Properties dialog

DPI and Font
Change the DPI and Font size settings.
Inline
Place the image inline with the enclosing paragraph.
Apply Paragraph Style

Apply the following formats of the enclosing paragraph to the equation:

  • Font

  • Font family

  • Background color

  • Foreground color

You can also apply these settings globally to all MathML equations created subsequently.

  1. Open the Preferences dialog (Edit > Preferences).

  2. In the MathFlow settings section of the MathML tab, change the equation settings.

These settings take effect immediately. So you do not need to restart FrameMaker.

Configure the MathFlow editor

The trial version of the MathFlow editor includes the Style and Structure editors. During this period, you can choose between either of these editors.

  1. To change the MathFlow editor, go to the Editor Type section of the MathML tab.

  2. Choose the required MathFlow editor and click OK.

You need to restart FrameMaker to ensure these changes take effect.

Note: When installing the full version of MathFlow, you need to choose between the Style and Structure editors. The MathFlow trial integration with FrameMaker includes both the editors. So you are recommended to use both these editors when trying out this feature.

Sample DITA MathML structured app

FrameMaker includes a sample DITA 1.2 MathML application named DITA_1.2_MathML_Sample. This <mathml> element has complete support for the MathML equations that are rendered by the MathFlow Style and Structure editors. To add MathML to a document, you can create a file based on this application and then use the MathML element in it.

See the video, MathML in structured documents.

To insert a MathML type element, do the following:

  1. Choose File > New > XML.

  2. In the New XML dialog, go to the Structured Applications tab and select DITA_1.2_MathML_Sample. Click OK.

    A new document is created.

  3. Go to any part of the document where you want to insert a MathML equation.

    The MathML element, mathml, is available in the Elements catalog of the sample structured app.

    Note: A mathml element is available at any point in the document where a foreign element is available.
  4. Double-click the <mathml> element to insert it at the point in the document.

  5. Go to the XML view of the current document.

    The XML of the structured document contains a MathML node at the location where you inserted the MathML element.

    Note: Each element within the mathml node has an mml prefix. This prefix is used to avoid name conflicts with other elements used in the XML either from the Elements catalog of the structured app or from elements defined in the MathML structure.

You also have the option to edit the equation within the mathml node in the XML view. The changes can then be seen in the WSIYWIG view.

Note: If you try to publish a DITA_1.2_MathML_Sample document without inserting any MathML equation, then no output is generated for such document.