The Math block (formerly known as LaTeX) is a powerful markup language for writing complex mathematical equations, formulas, and more. Jetpack combines the power of LaTeX and the simplicity of WordPress to give you the ultimate in maths blogging platforms.
Follow these steps to enable the Math block:
- Visit Jetpack → Settings → Writing in your site’s WP Admin.
- Scroll down to the Composing section
- Toggle on the Add beautifully formatted math equations to your posts and pages using LaTeX.
Now you can begin using LaTeX on your site!
How to use Math (formerly known as LaTeX) in posts
To include the Math () code in your post, use the following:
$latex your-latex-code-here$
So, for example,
$latex i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$
produces
Understanding Math error messages
If your LaTeX (Math) code is broken, instead of the equation, you’ll see an ugly yellow and red error message.
We can’t provide support for LaTeX syntax, but there are plenty of useful guides elsewhere online. Or a quick post in our forums might find you a solution. One thing to keep in mind is that WordPress puts all of your LaTeX code inside a LaTeX math environment. If you try to use the Math block that doesn’t work inside the math environment (such as \begin{align} ... \end{align}), you will get an error:
How to adjust the Math size
You can change the size of the Math block by specifying an s parameter after the \LaTeX code.
$latex \LaTeX&s=X$
Where X goes from -4 to 4 (0 is the default). These sizes correspond to ‘s font size commands:
s= | font size | Example |
|---|---|---|
| -4 | \tiny | |
| -3 | \scriptsize | |
| -2 | \footnotesize | |
| -1 | \small | |
| 0 | \normalsize (12pt) | |
| 1 | \large | |
| 2 | \Large | |
| 3 | \LARGE | |
| 4 | \huge |
Changing colors in the Math block
WordPress tries to guess the background and foreground colors of your site and generates the LaTeX (Math) image accordingly. But, you can also change the colors if you wish. You can do this by specifying bg and fg parameters after the LaTeX code to change the background and foreground colors, respectively. The colors must be in hexadecimal RGB format: ffffff for white, 0000ff for bright blue, etc.
$latex \LaTeX&bg=ffcccc&fg=cc00ff&s=4$
Available Math packages
WordPress.com uses standard LaTeX with the following packages:
- amsmath
- amsfonts
- amssymb
More Information
For more information about the Math block, you can visit LaTeX documentation site and TeX Resources by American Mathematical Society.
Privacy Information
Math is deactivated by default. You can toggle it on Jetpack → Settings → Writing page.
| Data Used | |
|---|---|
| Site Owners / Users None. | Site Visitors None. |
| Activity Tracked | |
| Site Owners / Users None. | Site Visitors None. |
| Data Synced (Read More) | |
| Site Owners / Users We sync a single option that identifies whether or not the feature is activated. | Site Visitors None. |