KaTeX Extension
Rendering math is enabled using KaTeX. The extension adds the ability to create numbered equations as well as reference the equations with traditional shortcut syntax: e.g., [eq-heat]
.
Key | Default | Description |
---|---|---|
prefix | Eq. | The prefix to used when referring to an equation by the \\label content. |
Block Equations
Numbered and non-numbered equations are defined using the \begin{equation}
and \end{equation}
environment common to LaTeX mathematics, as shown in Example 1.
\begin{equation}
y = a\cdot x + b
\end{equation}
(1)
To include a non-numbered equation, simply use the *
version of the environment, as shown in Example 2.
\begin{equation*}
c^2 = a^2 + b^2
\end{equation*}
It is possible to reference numbered block equations. First, the equation must contain a label. A label is added using traditional \label{my-eq}
command. Then within the text this label can be used within a shortcut link, e.g. [my-eq]
(see Core Extension:Shortcut links).
Example 3 provides a complete example of creating and referencing an equation. The prefix is dictated by the extension prefix configuration option (see Table 1).
[eq-label] is a famous equation.
\begin{equation}
\label{eq-label}
E = mc^2
\end{equation}
Eq. 2 is a famous equation.
(2)
Inline Equations
Inline equations also use traditional LaTeX syntax, i.e., the content is wrapped in single $
as shown below.
This $y=2\phi$ is inline.