Question Bank Content Editor

Mathematical Expressions

How to insert formulas using inline KaTeX syntax or the visual MathLive editor, and when to use subscript/superscript instead.

Updated 2026/07/11

The editor provides two ways to insert mathematical expressions: an inline formula for quick KaTeX entry and a visual math editor (MathLive) for building complex equations with a point-and-click interface.

Inline formula (KaTeX)

Open the Math Tools menu in the toolbar and choose Formula. Type a LaTeX expression directly — for example, \frac{a}{b} or \sqrt{x^2 + y^2}. The expression renders as a typeset formula inline with the surrounding text.

Visual math editor

Open the Math Tools menu and choose Math Editor. The MathLive dialog opens with a visual keyboard and palette. Click operators, symbols, and structures to build the expression; the LaTeX source updates in real time. When done, click insert to place the rendered formula at the cursor position.

Subscript and superscript

For simple cases like H₂O or E=mc², use the x₂ (subscript) and (superscript) buttons in the Math Tools menu instead of a full formula. These apply a character-level style and do not require LaTeX knowledge.

Tips

  • Use the visual editor when you are not confident in LaTeX syntax — it produces valid KaTeX automatically.
  • Inline formulas render at reading size and fit naturally in a sentence. For large display equations, place the formula on its own line.
  • Test the rendered output by previewing the question before publishing — some complex expressions may need minor syntax adjustments.
Go back