So replace

`$latex \left(\begin{array}{c}x'\\ y'\\ z'\\ w'\end{array}\right)=\left(\begin{array}{cccc}1&0&0&0\\ 0&1&0&0\\ 0&0&\cos\theta&-\sin\theta\\ 0&0&\sin\theta&\cos\theta\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\\ w\end{array}\right)$`

by

`$latex \begin{pmatrix}x'\\ y'\\ z'\\ w'\end{pmatrix}=\begin{pmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&\cos\theta&-\sin\theta\\ 0&0&\sin\theta&\cos\theta\end{pmatrix}\begin{pmatrix}x\\ y\\ z\\ w\end{pmatrix}$ `

Note the sace before the first 0 on the fourth row of the second matrix to prevent wordpress.com misreading it.

]]>The solution was to change the priority of latex render to something higher than that of markdown. The WordPress Plug-in API says you can do this with the optional priority argument for the `add_filter`

command. Specifically, I changed lines 18-20 of `latexrender-plugin.php`

to

add_filter('the_title', 'addlatex', 5);

add_filter('the_content', 'addlatex', 5);

add_filter('the_excerpt', 'addlatex', 5);

The number “5” was chosen arbitrarily. According to the API docs anything less than 10 (the default plug-in priority) would have worked.

]]>To resolve this, I read the above post and added the following three lines after line 29 in mimetex.php to undo WP’s:

$mimetex_formula = str_replace("& amp;","&",$mimetex_formula);

$mimetex_formula = str_replace("& nbsp;"," ",$mimetex_formula);

$mimetex_formula = str_replace("Ã‚","",$mimetex_formula);

(remove the spaces before “amp” and “nbsp”; I had to add spaces for this comment to display correctly)

Great program once I got it working! Hope this comment will be helpful for others.

]]>