The Help+Manual equation editor tool is available in Write > Insert Object. It inserts simple or complex equations directly into your topic pages.

formula_editor

How equations are inserted and exported

Equations are inserted in your topics in encapsulated code in the XML source of the topic. However, when your project is exported this is rendered by the compiler and converted to a bitmap graphic.

Using the tool

Entering expressions

Select the expression you want to enter using the buttons in the middle of the tool. This inserts the LaTeX code in the Expression box and immediately displays the result in the Preview box. You can then edit the code manually, or add additional expressions. If you enter an invalid or unknown expression the preview display will switch to an envelope graphic.

Formatting

Font:

Choose the math font for the expression. The default is Cambria Math and this will usually work well.

Font size:

This adjusts the size of the equation. It is not really the size of the characters, as all the characters are scaled vectors.

Spacing:

Adds padding around the equation

Alignment:

Position of the equation relative to the text surrounding it

Vertical alignment of inline equations

The alignment control in the equation editor positions the equation in relation to the text around it. Most equations are considerably higher than the text line, so you will naturally position them either on the baseline for the first line in a paragraph, or in the middle for equations in the middle of a paragraph. That is pretty obvious and trouble-free.

Alignment issues with single-line inline equations

Vertical alignment can be a little more tricky for single-line equations that are effectively the same height as the text around them, like x + y = z, for example. Help+Manual exports your equations as inline SVG images that scale without quality loss. And depending on the size of the picture (the height of the equation), the characters used in the equation and the surrounding text in the line, the alignment may look a little "off" in some cases, because it is an image and not regular text.

Best alignment settings for single-line equations

When optimizing the alignment of inline equations you need to be aware of the presence of characters with "descenders", which are portions of the character that generally extend below the text line, like p, q, y and g. Text takes account of this, but an SVG image cannot, so you need to adjust the vertica:;l alignment accordingly.

For best results:

Use the same font size for the equation as the text around it

Use align-bottom for single-line equations with characters with descenders (p, y etc.)

Use align-baseline for single-line equations without any characters with descenders

Use align-middle for multi-line equations (e.g. fractions)

LaTeX-based equations

The editor uses code based on the standard LaTeX equation syntax, which is displayed and edited in the Expression box. This means that you can use any standard guide to LaTeX math formatting to learn how to manipulate the code displayed.

Restrictions on custom LaTeX code

Note that not all LaTeX math codes are supported, although you will find that almost all basic symbols and expression types are available. If you insert invalid or unsupported code this will be indicated by a standard envelope image for the entire equation:

formulaed_invalid