how to change from $latex ....$ to $...$
So, if I want to post $latex 1+1=2$, I could post it as $1+1=2$.
Thanks!
how to change from $latex ....$ to $...$
So, if I want to post $latex 1+1=2$, I could post it as $1+1=2$.
Thanks!
This is probably a bad idea since it's likely it will break (the rare) "real" text in your post.
Example:
I bought the drink for $2, and the the popcorn for $3.
That said, if you really want to do this, you can change the \$latex[= ] to \$ in http://plugins.trac.wordpress.org/browser/wp-latex/trunk/wp-latex.php?rev=255694#L112
The plugin itself will probably never have this feature, so every time you upgrade the plugin, you'll have to make this change.
Alternatively, could write a little baby plugin yourself to "fix" this, so that you don't have to change the plugin code every time there is a new version.
/*
Plugin Name: My WP LaTeX "fix"
*/
function my_wp_latex_fix( $content ) {
return preg_replace( '#(\s+\$(?!latex))(.*?[^\\\\])(\$\s+)#i', '\\1latex \\2\\3', $content );
}
add_filter( 'the_content', 'my_wp_latex_fix', 5 );This topic has been closed to new replies.