Equation
A formula on its own line, centred, with its number at the right margin. This is the one block where you write LaTeX yourself — and the preview you see is the same formula the PDF prints.
For a formula inside a sentence, see Writing text.
Writing a formula
Insert an Equation block. Type the formula's LaTeX source in the field under the preview; the preview updates as you type.
\int_0^1 x^2 \,dx = \frac{1}{3}Click elsewhere and only the rendered formula remains. Click the formula to edit it again.
You type the formula only — no $, no \begin{equation}. Texifine adds the environment.
If the source cannot be read, the preview shows a short error message instead of the formula. Nothing else is blocked, and you can keep typing.
Environments
Choose the environment in the right column.
| Environment | Use it for | Notes |
|---|---|---|
| equation | A single formula | One number. |
| align | Several rows aligned on a symbol | Put & before the symbol to align on, \\ at the end of each row. Every row is numbered. |
| gather | Several formulas, each centred | \\ between rows. Every row is numbered. |
| multline | One long formula broken over several lines | \\ where it breaks. One number. |
An aligned derivation:
(a+b)^2 &= (a+b)(a+b) \\
&= a^2 + 2ab + b^2For comments on each row, one number for a group of rows and the usual mistakes, see How to align equations in LaTeX.
Numbered or plain
Numbered prints the number at the right: (1), or (2.1) inside chapter 2. Plain prints none, and the equation does not count.
With align and gather, each row takes a number: the block shows the range, for example (2)–(4). Numbering applies to the whole block: every row, or none.
Matrices
Click the Matrix button next to the source — in an equation block or in a formula inside a sentence — choose the number of rows and columns and the delimiters, then Insert. The matrix is inserted at the caret with empty cells:
\begin{pmatrix}
& \\
&
\end{pmatrix}Fill the cells; & separates columns and \\ separates rows.
| Delimiter | Environment |
|---|---|
| Parentheses ( ) | pmatrix |
| Brackets [ ] | bmatrix |
| Braces { } | Bmatrix |
| Bars | vmatrix |
| Double bars | Vmatrix |
| None | matrix |
A matrix may have up to 20 columns. The builder offers up to 10 rows; you can type more by hand.
Vectors, dots, determinants, an augmented matrix: How to write a matrix in LaTeX has the source of each.
Colour
To colour part of a formula, select that part in the source and click Colour, next to the Matrix button — in an equation block or in a formula inside a sentence. Pick one of the six colours: the selection is wrapped in a colour command.
a + \textcolor{#D32F2F}{b} = cWith nothing selected, the command is inserted empty and the caret waits between its braces. To remove a colour, delete the command and keep what is inside its second pair of braces.
The colours are the same six as for text, and print identically in the PDF. You can also write the command yourself, with a colour's name (\textcolor{red}{x}) or any hex colour (\textcolor{#0077AA}{x}); \color and \colorbox work the same way.
To colour a whole formula written inside a sentence, select the sentence around it and use the colour of the text menu instead.
Symbols without typing them
Open the Symbols tab of the left column and click a symbol: its command is written at the caret, complete — \sum_{}^{}, \frac{}{}, \sqrt{} — with the caret in the first empty pair of braces. Tab moves to the next one. You can search the library by name, and the symbols you use most stay at the top. See The editor.
What you can use
- Everything in LaTeX's maths mode, and the
amsmathandamssymbpackages: fractions, sums, integrals,\text{…},\mathbb{R},cases,aligned, the matrix environments. The symbol list has the common commands, and Fractions, sums, integrals and limits in LaTeX the formulas written most often. - A few more packages, loaded on their own when a formula uses them:
\bm{x}(bold symbols),\cancel{x},\mathscr{L},\textcolor{red}{x}and\color,\coloneqqand the other colon relations,\llbracket,\braket{a|b}, the extensible arrows (\xRightarrow{…}), and thedcases,rcasesand starred matrix environments (pmatrix*). You have nothing to declare. - The shorthands of the preview:
\R,\N,\Zfor\mathbb{R}…,\infin,\sub,\isin,\lang,\rang,\tg,\argmax… They are written out as standard LaTeX in the generated source. - Symbols typed as characters — ×, ≤, α, →, ∞ — are converted to their commands.
- A cross-reference to the equation, from any text: see Numbering and references.
Keyboard
Tabjumps to the next empty{}of a command — from the numerator of\frac{}{}to its denominator — then steps out of the last one.Shift+Tabgoes back to the previous empty one.Enteradds a line to the source — a line break is part of a formula.Entertwice at the end (on an empty last line) leaves the equation and starts a paragraph.Backspacein an empty equation deletes it.Ctrl+Entercompiles, as everywhere.
What it cannot do
- No package of your choice. Beyond the ones listed above, commands from other packages —
physics,siunitx,tikz,esint— are not available and stop the compilation. - A few commands are drawn by the preview and cannot be printed —
\phase,\utilde,\overgroup, the named colours (\red,\blueA)… The editor warns you under the formula as soon as you type one. - No macros of your own.
\def,\newcommandand similar commands are disabled. - Some commands are disabled for safety:
\input,\include,\write,\def,\newcommand,\let,\catcode,\csname,\href,\urland a few others. They are printed as text instead of being run, and the editor warns you while you type. - A command the preview does not know is not run either. A formula may use the commands the preview can draw — the ones of the symbol list and many more. Anything else is printed as text in the PDF, and the preview already shows the formula as broken.
- No formatting buttons. Bold, italic and the other formats are written in LaTeX:
\mathbf{x},\mathrm{d}. - An empty equation prints nothing and takes no number.
- The preview is slightly more forgiving than LaTeX about mistakes — an unbalanced brace, a
&in the wrong environment. A formula that renders in the editor almost always compiles; if it does not, the PDF tab shows why. See Fixing compilation errors.
What it prints
\begin{equation}
\label{blk-…}
\int_0^1 x^2 \,dx = \frac{1}{3}
\end{equation}A plain equation uses the starred environment (equation*, align*…) and has no label.