SYNTAX TROUBLESHOOTING
Fix common LaTeX equation errors without losing your source
Examples checked with MathTexLab’s base and AMS math renderer · Display style
When the preview reports an error, keep the source and repair the smallest relevant part. MathTexLab checks mathematical rendering, not whether an identity is true or a denominator is nonzero.
Check pairs before adding commands
Match opening and closing braces from the inside outward. A fraction
requires two arguments: \frac{a}{b}. After a syntax error,
image exports stay unavailable until the current source renders
successfully; an old image is not evidence that the new source is valid.
Use a known working baseline
The example has a root, a grouped numerator and a denominator. Load it, verify the preview, then replace one component at a time. If a change fails, Undo returns to the earlier source.
x=\frac{-b+\sqrt{b^2-4ac}}{2a}Open example in editor Distinguish unknown from misspelled commands
Command names are case-sensitive. Search the Symbols Library for the command you need. The renderer bundles base and AMS mathematical support; installing arbitrary packages, running TeX files and fetching extensions from an equation are outside this editor. A command that works in another application may need a different configuration there.
Reduce a difficult failure
Copy your source before making large edits. Remove unrelated terms until the
error is easy to isolate, then restore them one at a time. Match the names
in \begin{pmatrix} and \end{pmatrix}. Avoid
pasting full document preambles. If rendering succeeds but the formula means
something else, inspect grouping and mathematical assumptions separately.
Syntax reference
MathJax supported-command reference. The examples above are limited to the features described here; additional packages are not implied.
Continue with LaTeX Equation Editor.