Youngwhan's Simple Latex

Description

This plugin enables latex expression in wordpress post/comment.

How to use

  • Usage: [math]{Latex Syntax}[/math]
  • For example, [math]x^2+y^2[/math].

Option1: pre

  • Usage: [math pre={Choose Number}]{Latex Syntax}[/math]
  • [math pre=”0″]{Latex Syntax}[/math]: Displays latex expression. It’s equivalent to [math]{Latex Syntax}[/math]
  • [math pre=”1″]{Latex Syntax}[/math]: Wrapping with <pre>, which shows [math]{Latex Syntax}[/math] itself. This just help to show the code itself
  • [math pre=”2″]{Latex Syntax}[/math]: Same as pre=”1″, but it doesn’t show [math] and [/math] code.

Option2: align

  • Usage: [math align=”{Choose Alignment}”]{Latex Syntax}[/math]
  • {Choose Alignment}: “top” (default), “bottom”, “middle”, “left”, “right”.
  • It is equivalent to <img style=”float:{Choose Alignment}”/>
  • For example, [math align=”left”]x^2+y^2[/math] will put the latex form at left with the wrapping text.

YW Latex Settings

It relys on the cgi to represent math symbols via latex syntax.

The setting could be one these:

  • http://www.forkosh.com/mathtex.cgi
  • http://www.forkosh.com/mimetex.cgi

, which is provided by John Forkosh.

If you want to have your own mathtex.cgi, you can refer to

  1. Install latex and dvipng
  2. Get and Compile mathtex.cgi

Once you get the latex(+dvipng) and mathtex.cgi, copy mathtex.cgi into a directory, and tell YW Latex Settings by specifing where the mathtex.cgi is.

Generally, it can be located in cgi-bin. For example, http://yourdomain.com/cgi-bin.

Then, put “http://yourdomain.com/cgi-bin/your-own-mathtex.cgi” in the YW Latex Settings.

Screenshots

  • Putting latex syntax in your post.
  • Actual showing in your blog.
  • Option menu in Administrator Panel
  • Option to specify mathtex.cgi location.

Installation

  1. Download the zipped plugin file to your local machine.
  2. Unzip the file.
  3. Upload the ‘yw-latex’ folder to the ‘{YOUR-WORDPRESS-DIRECTORY}/wp-content/plugins/’ directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. Optionally, go to the Settings->YW Latex, and choose the location of cgi ( as of Description )

FAQ

What is latex?
  • Refer to http://en.wikipedia.org/wiki/LaTeX
How do I know latex syntax?
  • Refer to http://en.wikipedia.org/wiki/Math_markup
What is usage of this plugin?
  • Usage: [math]{Latex Syntax}[/math]
  • For example, [math]x^2+y^2[/math].
What is difference mathtex.cgi and mimetex.cgi
  • Based on mimeTex, mathTeX is the successor to mimeTeX. It’s based on real LaTeX and renders higher quality images than mimeTeX.
  • So, mathtex gives better quality of image.
Error: your-domain is not authorized to use mathTeX on this server
  • This is due to the security issue. Based on John Forkosh, it is because your page doesn’t deliver “HTTP_REFERER”.
  • Solution is to put this into your header.php in your theme ( {YOUR-WORDPRESS-DIRECTORY}/wp-content/themes/{THEME-NAME}/header.php )
<meta name="referrer" content="always">
  • Alternatively, you may use without worring about the error
http://www.forkosh.com/mimetex.cgi

Reviews

CODING

Hi i have a Sensei Woothemes wp plugin that create online courses, and the problem is that it doesn’t recognize the latex code to display the maths formulas so it should be modified(code should be integrated to its core files). can annyone help me figure out this thing i am willing to pay 100$ by paypal to the one who figure it out. this is my e-mail : kmehdi@iastate.edu feel free to contact me
Thanks,

Read all 1 review

Contributors & Developers

“Youngwhan's Simple Latex” is open source software. The following people have contributed to this plugin.

Changelog

1.5.3

  • Bump version to 1.5.3 and minor cosmetic changes

1.5.2

  • Minor fix again for the rendering it in comment.

1.5.1

  • Minor updated that it needs to reserve whitespaces in other options.

1.5

  • Removed wpautop functionality for this plugin’s shortcode, “math”.

1.4.2

  • changed all version to match 1.4.2

1.4.1

  • Minor updated for readme.txt to follow wordpress readme.txt format

1.4.0

  • Updated Forkosh’s cgi location since it has changed.

1.3.0

  • Added a feature to enable to write latex in comment.

1.2.1

  • Fix a bug in 1.2.0 printing ‘n’, which was typo.

1.2.0

  • Added “align” option in “[math]” tag.

1.1.0

  • Added “pre” option

1.0.3

  • Updated readme.txt

1.0.2

  • Modified small readme.txt

1.0

  • Created the first version of latex plugin for wordpress.