# WordPress.org

## WP LaTeX

WP LaTeX creates PNG images from inline $\LaTeX$ code in your posts and comments.

#### How do I add LaTeX to my posts?

This plugin uses the WordPress Shortcode Syntax. Enter your LaTeX code inside of a $...$ shortcode.

$e^{\i \pi} + 1 = 0$

You may alternatively use the following equivalent syntax reminiscent of LaTeX's inline math mode syntax.

$latex e^{\i \pi} + 1 = 0$

That is, if you would have written $some-code$ in a LaTeX document, just write $latex some-code$ in your WordPress post.

For the curious, the shortcode syntax is slightly faster for WordPress to process, but the inline syntax is a little easier for us humans to read. Pick your poison.

#### Can I change the color of the images produced?

Yes. You can set the default text color and background color of the images in the Plugins -> WP LaTeX admin page.

You can also change the colors on an image by image basis by specifying color and background attributes inside the LaTeX shortcode. For example:

[latex color="ff0000" background="00ff00"]e^{\i \pi} + 1 = 0[/latex]

will produce an image with a bright green background and a bright red foreground color. Colors are specified in RGB with the standard 6 digit hex notation.

The equivalent "inline" syntax uses fg and bg parameters after the LaTeX code.

$latex e^{\i \pi} + 1 = 0&bg=00ff00&fg=ff0000$

#### Can I change the size of the image?

You can specify a size attribute in the LaTeX shortcode:

[latex size="4"]e^{\i \pi} + 1 = 0[/latex]

or, equivalently, an s parameter after the LaTeX inline syntax:

$latex e^{\i \pi} + 1 = 0&s=4$

The size can be any integer from -4 to 4 (0 is the default). These numbers correspond to the following LaTeX size commands.

size = LaTeX size
-4     \tiny
-3     \scriptsize
-2     \footnotesize
-1     \small
0      \normalsize (12pt)
1      \large
2      \Large
3      \LARGE
4      \huge

#### The LaTeX images work, but they don't really fit in with my blog's theme

You can adjust the CSS used for the LaTeX images to suit your theme better. Go to Settings -> WP LaTeX and edit the Custom CSS.

#### I want to break out of math mode and do some really wild stuff. How do I do that?

You can't with this plugin. WP LaTeX forces you to stay in math mode. Formatting and styling for your posts should be done with markup and CSS, not LaTeX.

If you really want hardcore LaTeX formatting (or any other cool LaTeX features), you should probably just use LaTeX.

#### Instead of images, I get error messages. What's up

• Formula does not parse: Your LaTeX is invalid; there must be a syntax error or something in your code (WP LaTeX doesn't provide any debugging).
• Formula Invalid: Your LaTeX code attempts to use LaTeX commands that this plugin does not allow for security reasons.
• You must stay in inline math mode: Fairly self explanitory, don't you think? See above.
• The forumula is too long: Break your LaTeX up into multiple images. WP LaTeX limits you to 2000 characters per image.
• Could not open TEX file for writing or Could not write to TEX file: You have some file permissions problems. See Intallation instructions.

Requires: 3.2 or higher
Compatible up to: 4.1.5
Last Updated: 2015-1-16
Active Installs: 3,000+

5 out of 5 stars

### Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

### Compatibility

WordPress Plugin 4.2.2 4.2.1 4.2 4.1.5 4.1.4 4.1.3 4.1.2 4.1.1 4.1 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0 3.9.6 3.9.5 3.9.4 3.9.3 3.9.2 3.9.1 3.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 3.8.2 3.8.1 3.8 3.7.8 3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.7.2 3.7.1 3.7 3.6.1 3.6 3.5.2 3.5.1 3.5 3.4.2 3.4.1 3.4 3.3.2 3.3.1 3.3 3.2.1 3.2 3.1.4 3.1.3 3.1.2 3.1.1 3.1 3.0.5 3.0.4 3.0.3 3.0.2 3.0.1 3.0 2.9.2 2.9.1 2.9 + 1.9.2 1.9.1 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 0.7 0.6 = Works! Broken :( Not enough data

0 people say it works.
0 people say it's broken.

 100,1,1 100,2,2 100,1,1 100,3,3 100,1,1 100,4,4 100,2,2 100,3,3 100,5,5 100,1,1 100,2,2 100,2,2 100,1,1 75,4,3 0,1,0 100,1,1 100,1,1 100,1,1 100,1,1 0,1,0