Testing Latex

Latex:

\frac12 < \left\lfloor \mathrm{mod} \left( \left\lfloor \frac{y}{17}\right\rfloor 2^{-17\lfloor x\rfloor -\mathrm{mod}(\lfloor y\rfloor , 17)},2\right)\right\rfloor

Code: [tex ]\frac12 < \left\lfloor \mathrm{mod} \left( \left\lfloor \frac{y}{17}\right\rfloor 2^{-17\lfloor x\rfloor -\mathrm{mod}(\lfloor y\rfloor , 17)},2\right)\right\rfloor[ /tex]

WP Math Pub:
[pmath](a^2+b^2)=a^2+2ab+b^2[/pmath]

Code: \[pmath \](a^2+b^2)=a^2+2ab+b^2[ /pmath]

WP Math Pub looks nicer, but LaTex seems the standard, offering more portability in the future. MathML is probably the most accessible, but is dependent on browser support and looks cumbersome.

I made two changes to wp-latexrender:

  1. PHP 5 interprets formfeed characters differently, meaning that \formulabox ends up outputting ormulabox, which ends up on screen. Fixed by amending the wrap_formula function in class.latexrender.php to use single quotes
  2. Changed latex.php so that img tags are xhtml compliant
I didn’t want to use a web service, as this adds load to the remote service, and means messing around with image tags in each post.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>