{"id":1780,"date":"2007-05-04T21:23:39","date_gmt":"2007-05-04T21:23:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-latex\/"},"modified":"2025-11-18T21:39:40","modified_gmt":"2025-11-18T21:39:40","slug":"wp-latex","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/wp-latex\/","author":6015,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.9.3","stable_tag":"1.9.3","tested":"4.1.42","requires":"3.2","requires_php":"","requires_plugins":null,"header_name":"WP LaTeX","header_author":"Automattic, Inc.","header_description":"","assets_banners_color":"","last_updated":"2025-11-18 21:39:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/automattic.com\/code\/","header_author_uri":"http:\/\/automattic.com\/","rating":5,"author_block_rating":0,"active_installs":800,"downloads":46155,"num_ratings":10,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.6":{"tag":"0.6","author":"mdawaffe","date":"2007-05-09 02:36:09"},"0.7":{"tag":"0.7","author":"mdawaffe","date":"2007-05-09 23:17:34"},"1.1":{"tag":"1.1","author":"mdawaffe","date":"2009-03-22 20:33:52"},"1.2":{"tag":"1.2","author":"mdawaffe","date":"2009-03-24 00:24:13"},"1.3":{"tag":"1.3","author":"mdawaffe","date":"2009-03-24 01:30:32"},"1.4":{"tag":"1.4","author":"mdawaffe","date":"2009-06-11 02:44:45"},"1.5":{"tag":"1.5","author":"mdawaffe","date":"2010-06-03 22:15:50"},"1.6":{"tag":"1.6","author":"mdawaffe","date":"2010-06-21 22:12:20"},"1.7":{"tag":"1.7","author":"mdawaffe","date":"2011-07-05 22:52:28"},"1.8":{"tag":"1.8","author":"mdawaffe","date":"2013-06-21 22:52:24"},"1.9":{"tag":"1.9","author":"mdawaffe","date":"2014-09-05 19:40:19"},"1.9.1":{"tag":"1.9.1","author":"mdawaffe","date":"2014-09-05 19:44:12"},"1.9.2":{"tag":"1.9.2","author":"mdawaffe","date":"2015-01-16 21:17:02"},"1.9.3":{"tag":"1.9.3","author":"mdawaffe","date":"2025-11-18 21:39:40"}},"upgrade_notice":{"1.9.2":"<p>Add SSL Support.<\/p>","1.9.1":"<p>Fixes PHP Warnings.<\/p>","1.9":"<p>Fixes PHP Warnings.<\/p>","1.8":"<p>PHP 5.4 Compatibility, better sanitation, and more.<\/p>","1.7":"<p>Multiline LaTeX is now easier.<\/p>","1.6":"<p>Fixes inline syntax output.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"10"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.6","0.7","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.9.1","1.9.2","1.9.3"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[25668,6566,10503,1644],"plugin_category":[],"plugin_contributors":[77494,77559,81358],"plugin_business_model":[],"class_list":["post-1780","plugin","type-plugin","status-publish","hentry","plugin_tags-equations","plugin_tags-latex","plugin_tags-math","plugin_tags-wordpress-com","plugin_contributors-automattic","plugin_contributors-mdawaffe","plugin_contributors-sidney","plugin_committers-mdawaffe"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-latex.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>NOTE<\/strong>: For must users, we recommend using <a href=\"http:\/\/jetpack.me\/\">Jetpack<\/a> and\nits <a href=\"http:\/\/jetpack.me\/support\/beautiful-math-with-latex\/\">Beautiful Math feature<\/a>.\nWP LaTeX offers additional control since it allows you to host your own LaTeX\nimage server.<\/p>\n\n<p>Writing equations and formulae is a snap with LaTeX, but really hard on a website.\nNo longer.  This plugin combines the power of LaTeX and the simplicity of WordPress\nto give you the ultimate in math blogging platforms.<\/p>\n\n<p>Wow that sounds nerdy.<\/p>\n\n<h3>Other Plugins<\/h3>\n\n<p><a href=\"http:\/\/sixthform.info\/steve\/wordpress\/index.php?p=13\">Steve Mayer's LatexRender Plugin<\/a>\nis based on a <a href=\"http:\/\/www.mayer.dial.pipex.com\/tex.htm\">LaTeX Rendering Class<\/a> originally\nwritten by Benjamin Zeiss.  Its requirements are somewhat different and has a different \ninstallation procedure.<\/p>\n\n<p><a href=\"http:\/\/wordpress.org\/plugins\/mathjax-latex\/\">MathJax-LaTeX<\/a><\/p>\n\n<p><a href=\"http:\/\/wordpress.org\/plugins\/simple-mathjax\/\">Simple Mathjax<\/a><\/p>\n\n<!--section=installation-->\n<p>This plugin can generate the PNG images either by using <a href=\"http:\/\/wordpress.com\/\">WordPress.com<\/a>'s\nLaTeX server (recommended) or by using the version of LaTeX installed on your webserver\n(LaTeX is not installed on most webservers; this method is recommended for advanced users only).<\/p>\n\n<h4>Using WordPress.com's LaTeX Sever (recommended)<\/h4>\n\n<ol>\n<li>Install and activate this plugin.<\/li>\n<li>If you want to allow LaTeX images in your blog's comments in addition to your blog's posts,\ngo to Settings -&gt; WP LaTeX, check the Comments checkbox, and save the settings.<\/li>\n<li>That's it :)<\/li>\n<\/ol>\n\n<h4>Using Your Server's Installation of LaTeX (advanced)<\/h4>\n\n<p>If you choose this advanced method, you will need several external programs to be installed and\nworking on your webserver, so installation is bit complicated.  Many hosts will not be able to\nsupport this method.<\/p>\n\n<p>Server Requirements:<\/p>\n\n<ol>\n<li>Your server must be running some flavor of Linux, UNIX, or BSD.<\/li>\n<li>You must have a working installation of LaTeX running.  I recommend the <code>texlive-latex-base<\/code>\npackage together with the <code>tetex-math-extra<\/code> package.  Both are available to most Linux\ndistributions.<\/li>\n<li>Either <code>dvipng<\/code> (provided by the <code>dvipng<\/code> package) or both <code>dvips<\/code> and <code>convert<\/code> (provided by\nthe <code>dvips<\/code> and <code>imagemagick<\/code> or <code>graphicsmagick<\/code> packages, respectively) must installed as\nwell.  <code>dvipng<\/code> is preferred.<\/li>\n<\/ol>\n\n<p>Setup:<\/p>\n\n<ol>\n<li>Create a subdirectory called <code>latex\/<\/code> in your <code>wp-content\/<\/code> directory and make it writable by\nyour webserver (chmod 777 will do the trick, but talk to your host to see what they recommend).<\/li>\n<li>Install and activate this plugin.<\/li>\n<li>Go to Settings -&gt; WP LaTeX to configure the plugin and test the PNG generation.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20add%20latex%20to%20my%20posts%3F'><h3>How do I add LaTeX to my posts?<\/h3><\/dt>\n<dd><p>This plugin uses the <a href=\"http:\/\/codex.wordpress.org\/Shortcode_API\">WordPress Shortcode Syntax<\/a>.\nEnter your LaTeX code inside of a <code>[latex]...[\/latex]<\/code> shortcode.<\/p>\n\n<pre><code>[latex]e^{\\i \\pi} + 1 = 0[\/latex]\n<\/code><\/pre>\n\n<p>You may alternatively use the following equivalent syntax reminiscent of LaTeX's inline\nmath mode syntax.<\/p>\n\n<pre><code>$latex e^{\\i \\pi} + 1 = 0$\n<\/code><\/pre>\n\n<p>That is, if you would have written <code>$some-code$<\/code> in a LaTeX document, just\nwrite <code>$latex some-code$<\/code> in your WordPress post.<\/p>\n\n<p>For the curious, the shortcode syntax is slightly faster for WordPress to process, but the\ninline syntax is a little easier for us humans to read.  Pick your poison.<\/p><\/dd>\n<dt id='can%20i%20change%20the%20color%20of%20the%20images%20produced%3F'><h3>Can I change the color of the images produced?<\/h3><\/dt>\n<dd><p>Yes.  You can set the default text color and background color of the images in the\nPlugins -&gt; WP LaTeX admin page.<\/p>\n\n<p>You can also change the colors on an image by image basis by specifying <code>color<\/code>\nand <code>background<\/code> attributes inside the LaTeX shortcode.  For example:<\/p>\n\n<pre><code>[latex color=\"ff0000\" background=\"00ff00\"]e^{\\i \\pi} + 1 = 0[\/latex]\n<\/code><\/pre>\n\n<p>will produce an image with a bright green background and a bright red foreground color.\nColors are specified in RGB with the standard 6 digit hex notation.<\/p>\n\n<p>The equivalent \"inline\" syntax uses <code>fg<\/code> and <code>bg<\/code> parameters after the LaTeX code.<\/p>\n\n<pre><code>$latex e^{\\i \\pi} + 1 = 0&amp;bg=00ff00&amp;fg=ff0000$\n<\/code><\/pre><\/dd>\n<dt id='can%20i%20change%20the%20size%20of%20the%20image%3F'><h3>Can I change the size of the image?<\/h3><\/dt>\n<dd><p>You can specify a <code>size<\/code> attribute in the LaTeX shortcode:<\/p>\n\n<pre><code>[latex size=\"4\"]e^{\\i \\pi} + 1 = 0[\/latex]\n<\/code><\/pre>\n\n<p>or, equivalently, an <code>s<\/code> parameter after the LaTeX inline syntax:<\/p>\n\n<pre><code>$latex e^{\\i \\pi} + 1 = 0&amp;s=4$\n<\/code><\/pre>\n\n<p>The size can be any integer from -4 to 4 (0 is the default).  These numbers correspond to\nthe following LaTeX size commands.<\/p>\n\n<pre><code>    size = LaTeX size\n    -4     \\tiny\n    -3     \\scriptsize\n    -2     \\footnotesize\n    -1     \\small\n    0      \\normalsize (12pt)\n    1      \\large\n    2      \\Large\n    3      \\LARGE\n    4      \\huge\n<\/code><\/pre><\/dd>\n<dt id='the%20latex%20images%20work%2C%20but%20they%20don%27t%20really%20fit%20in%20with%20my%20blog%27s%20theme'><h3>The LaTeX images work, but they don't really fit in with my blog's theme<\/h3><\/dt>\n<dd><p>You can adjust the CSS used for the LaTeX images to suit your theme better.  Go to\nSettings -&gt; WP LaTeX and edit the Custom CSS.<\/p><\/dd>\n<dt id='i%20want%20to%20break%20out%20of%20math%20mode%20and%20do%20some%20really%20wild%20stuff.%20%20how%20do%20i%20do%20that%3F'><h3>I want to break out of math mode and do some really wild stuff.  How do I do that?<\/h3><\/dt>\n<dd><p>You can't with this plugin.  WP LaTeX forces you to stay in math mode.  Formatting and\nstyling for your posts should be done with markup and CSS, not LaTeX.<\/p>\n\n<p>If you really want hardcore LaTeX formatting (or any other cool LaTeX features), you\nshould probably just use LaTeX.<\/p><\/dd>\n<dt id='instead%20of%20images%2C%20i%20get%20error%20messages.%20%20what%27s%20up'><h3>Instead of images, I get error messages.  What's up<\/h3><\/dt>\n<dd><ul>\n<li><code>Formula does not parse<\/code>: Your LaTeX is invalid; there must be a syntax error or\nsomething in your code (WP LaTeX doesn't provide any debugging).<\/li>\n<li><code>Formula Invalid<\/code>: Your LaTeX code attempts to use LaTeX commands that this plugin\ndoes not allow for security reasons.<\/li>\n<li><code>You must stay in inline math mode<\/code>: Fairly self explanitory, don't you think?\nSee above.<\/li>\n<li><code>The forumula is too long<\/code>: Break your LaTeX up into multiple images.  WP LaTeX\nlimits you to 2000 characters per image.<\/li>\n<li><code>Could not open TEX file for writing<\/code> or <code>Could not write to TEX file<\/code>: You have\nsome file permissions problems.  See Intallation instructions.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.9.3<\/h4>\n\n<ul>\n<li>Bug Fix: Fix interactions between LaTeX, <code>wptexturize()<\/code>, and <code>wpautop()<\/code>.<\/li>\n<li>Bug Fix: Fix specifying size in <code>$latex$<\/code> format.<\/li>\n<\/ul>\n\n<h4>1.9.2<\/h4>\n\n<ul>\n<li>Bug Fix: Add SSL Support: http:\/\/wordpress.org\/support\/topic\/lack-of-https-support<\/li>\n<\/ul>\n\n<h4>1.9.1<\/h4>\n\n<ul>\n<li>Bug Fix: Fix version number.<\/li>\n<\/ul>\n\n<h4>1.9<\/h4>\n\n<ul>\n<li>Enhancement: Do not use deprecated WordPress functions.<\/li>\n<li>Enhancement: Fix PHP Strict errors.<\/li>\n<\/ul>\n\n<h4>1.8<\/h4>\n\n<ul>\n<li>Enhancement: Add pixel density support.<\/li>\n<li>Enhancement: Make LaTeX sanitation more forgiving.<\/li>\n<li>Bug Fix: Fix LaTeX Document generation under PHP 5.4.<\/li>\n<li>Bug Fix: Fix formula length limit.<\/li>\n<li>Bug Fix: Always use <code>wp_safe_redirect()<\/code> for added security.<\/li>\n<li>Bug Fix: Prevent unserialization of objects.<\/li>\n<li>Bug Fix: Better prevention of breaking out from mathmode.<\/li>\n<\/ul>\n\n<h4>1.7<\/h4>\n\n<ul>\n<li>Bug Fix: Strip <code>&lt;p&gt;<\/code> and <code>&lt;br&gt;<\/code> from shortcode contents to make multiline LaTeX easier.\nOnly works in shortcode syntax.<\/li>\n<\/ul>\n\n<h4>1.6<\/h4>\n\n<ul>\n<li>Bug Fix: Make inline and shortcode syntax outputs consistent.<\/li>\n<li>Bug Fix: i18n<\/li>\n<li>Bug Fix: \"Settings\" not \"Options\"<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Bug Fix: Minus sign incorrectly parsed. (Fix for WordPress 2.8.)<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Bug Fix: Typos in PHP4 constructor for Automattic_Latex_DVIPNG<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Bug Fix: Compatibility with PHP 4<\/li>\n<li>Clarify syntax for LaTeX in posts<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Bug Fix: RGB parsing in DVIPNG<\/li>\n<li>Bug Fix: Hash collisions in file names<\/li>\n<li>Big Fix: Default colors never used<\/li>\n<li>Support for 3 digit hex codes<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Bug Fix: <code>tmpnam()<\/code> can return an error on some setups when called with a null parameter.\nUse <code>\/tmp<\/code> instead (it should fall back to the system's temp directory). Props Marin Saric.<\/li>\n<li>Bug Fix: Additional entity -&gt; ASCII cleaning.  Props Marin Saric.<\/li>\n<li>No longer requires the FauxML plugin.<\/li>\n<\/ul>","raw_excerpt":"WP LaTeX creates PNG images from inline $\\LaTeX$ code in your posts and comments.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/1780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=1780"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mdawaffe"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=1780"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=1780"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=1780"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=1780"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=1780"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=1780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}