Using the Questionmark Formula Editor | Questionmark

Using the Questionmark Formula Editor

Applies to the following products: 
Questionmark OnDemand
Questionmark OnDemand for Government
Questionmark OnPremise

The Questionmark Formula Editor is a WYSIWYG (what you see is what you get) editor designed to help authors add mathematical formulae to questions created in Authoring.

This page includes the following sections:

Opening the Questionmark Formula Editor

There are two ways you can open the Questionmark Formula Editor. You can either:

  • Double-click on an existing formula to modify it.
  • Place your cursor in the question wording where you want to add a new equation, and click the  icon in the text formatting toolbar to open the editor.


Once you have finished writing your formula, click OK to add the formula to the question as shown. Click Cancel to close the Formula Editor without saving any changes.

Formulae are treated like any other object in a question wording:

  • To select a formula in the editor, you can either click on it or move your cursor over it while holding Shift
  • To delete a formula, select it and press Delete. You can also place your cursor after it and press Delete. If you accidentally delete a formula, you can recover it by clicking the undo icon  in the Questionmark Formula Editor toolbar.
  • You can cut, copy, and paste formulae just as you would cut, copy, and paste text in a question wording
  • The center, left, and right align text formatting functions work with formulae. For instance, if you want to center a formula, select the formula and click the Center Align button in the text formatting toolbar.

List of icons

The following images show all the icons available in the Formula Editor toolbar tabs:

Working with formulas

The Questionmark Formula Editor toolbar editor window is split in two main areas: a tabbed menu containing a number of icons that allow you to create mathematical equations, and an area where you can see your current formula, the location of the cursor, and the text currently selected (if any). When you are finished creating or editing your equation, click OK to save changes. You can click Cancel to exit the editor without saving any changes that were made.


Writing text is done just as in any other WYSIWIG editor:

  • You can type keyboard characters.
  • You can move the cursor with the arrow keys, as well as with the Home and End keys. You can use Shift with them to select a part of the formula.
  • You can cut, copy, paste, undo, and redo parts previously undone.
  • You can use the mouse to move the cursor, and to select sub-formulae. The selection algorithm is smart.

In order to write a symbol, click on its icon and it will appear in the current location of the cursor. For instance, in order to write , click on the "Symbols" tab, then on the  icon, then on the "Greek" tab, and finally on the  icon.

You can change the font to be Regular, Bold, Italic, or Bold+Italic. The default font is AutoItalic, which means the editor recognizes the type of the symbols, and changes the font accordingly. You can always overwrite the editor guess, by selecting the part and changing the AutoIdent button.

Symbol typesetting

What makes the Questionmark Formula Editor a powerful tool is its ability to relate different expressions and symbols within a formula.

Let us start by seeing how to write . There are two ways to do this:

  1. First, write the square root symbol and then the x inside it.

    Click on the  icon in the "General" tab.
    Type x.
  2. Type first x and then put the square root symbol around it.

    Type x.
    Select x.
    Click on the  icon in the "General" tab.

All symbols that involve only one expression work in the same way.

Now, let us see how to write a symbol that involves two expressions. Let us write:

As before, there are two ways to do this:

  1. First, draw the fraction and then fill in the numerator and denominator.

    Click on the  icon in the "General" tab.
    Type the numerator.
    Click in the green denominator box.
    Type the denominator.
  2. First, write the square root symbol and then the x inside it.

    Type the numerator.
    Select the text that will become the numerator.
    Click on the  icon in the "General" tab.
    Click in the green denominator box.
    Type the denominator.

There are other symbols which involve up to five expressions, but they work in the same way than fractions. As an exercise, try to write the following formulae:


In the "Matrix" tab, there are some icons to build matrices, vectors and tables.

You can click any icon to have a table to start. Then a new tab will appear, with icons for adding and inserting rows and columns.

Scaling symbols and parentheses

Mathematical operations can be nested, so symbols can contain expressions with symbols. Many symbols expand to match the size of their contents; note, for instance, the variable size of the square root symbol:

Parentheses also will scale as expected if you do them with the  icons in the "General" tab. If you want simple non-scaling parentheses, just type them with the keyboard. By the way, scaling parentheses are a good way to avoid single non-closed parentheses.

Let us try one example, by writing:

Write the base of the power.
Select it.
Click on the  icon.
Select all of the parenthesis.
Click on the  icon in the General tab.
Click on the exponent and type 3.
If, instead of using the icon, we had used the ( and keys, the result would have been this:

Moving the cursor with the keyboard

The behavior of the arrow keys is as usual as long as we are working within pieces of text, but it is different near symbols. Let us see an example of cursor movement in a fraction:

Initial state: cursor in the denominator.
Pressing the left arrow key behaves as usual, since we move within the denominator, which is made up by text.
However, pressing again the left arrow key moves the cursor to the numerator, as if instead of a fraction we had two lines of text.
Pressing the down arrow key moves the cursor to the denominator.
Pressing the right arrow key moves the cursor after the fraction; note the change of size of the cursor, indicating that it is affecting the whole fraction.
Pressing the delete key selects the whole fraction, instead of deleting one character; if we pressed delete again, the whole fraction would be deleted.

This behavior can be a little bit confusing when first met; if at some point it seems you cannot exit from a power, click with the mouse where you want to go, or just keep pressing the right or left arrow keys until you exit from the problematic area.

We can select text by holding down the Shift key while we move the cursor with the arrow keys, or by pressing down the mouse left button at one end of the contents to select, moving it to the other end, and releasing the button. Pieces of formulae can be cut, copied, and pasted as expected.

Smart deleting

Sometimes the problem of having to delete one symbol without deleting its contents arises. In these cases, put the cursor after the symbol (or left parenthesis) and delete twice. In this example, we remove a square root:

Put the cursor after the  symbol but before its contents, either by using the mouse or the keyboard.
Press delete once; this selects everything that will be deleted if confirmed. Note how only the  symbol is selected.
Press delete again to confirm deletion of the  symbol.

When trying to delete a couple of matching parenthesis, those created by using the  icons in the "General" tab, there are two places to delete, and they do different things:

  • Deleting the left (opening) parenthesis will remove only both parentheses. Before the actual deletion, which will happen when the delete key is pressed twice, both parentheses will be shown highlighted:

  • Deleting the right (closing) parenthesis will remove both parentheses and their contents. As before, the actual deletion will happen when the delete key is pressed for the second time, and everything that will be deleted will be highlighted: