06.29.05
Posted in WordPress, Mathematics at 8:29 pm by Haris
I’ve been using LatexRender for a while, and I must say it works wonderfully. I had hit a slight snag, which I figured out with the help of Sameer (well ok, that means he did all the work). It had to do with the fact that, by default, wordpress changes all ampersands to their escape codes, namely &038;. This is quite irritating, since if you are to have any matrices in the LaTeX code, it is bound to involve lots of ampersands to separate the columns, so you end up with lots of &038;’s floating around, quite irritating. The solution turns out to be fairly simple, and already implemented in LatexRender, albeit commented out, and it simply amounts to replacing all those &038;’s with &’s. What you have to do is locate your latex.php file, which in my case was in a folder called latexrender, and uncomment the lines around line 60, that have text like:
// $latex_formula = str_replace("&","&",$latex_formula);
// $latex_formula = str_replace("&","&",$latex_formula);
and also change #38 to #038, resulting in:
$latex_formula = str_replace("&","&",$latex_formula);
$latex_formula = str_replace("&","&",$latex_formula);
It should now work fine, once you remove the cached images located usually in the latexrender/pictures directory.
Later
Permalink
06.19.05
Posted in Uncategorized, WordPress at 9:09 pm by Haris
I just learned about the LaTeXRender plugin for WordPress. You can find lots of examples of its use here. It can generate nice math inside the posts, using latex commands. For instance, [tex]e^{\pi i}+1=0[/tex] will generate
, and so on. This was just to try to see if it works. Pretty nifty.
Later
Permalink
06.09.05
Posted in WordPress at 11:11 am by Haris
I fixed my little problem with the WeatherIcon. I wanted to make the various weather icons I was using in my Weather around the world page reflect the local time at the corresponding place, showing a sun if it was day and a moon if it was night. To do that I had to change the function WeatherIcon to accept one extra argument, and change one more line in the plugin file. Read the rest of this entry »
Permalink
Posted in WordPress at 12:29 am by Haris
I finally got around to learning some more about [WordPress](http://wordpress.org/), the publishing platform I and [Sameer](http://dcostanet.net/wordpress/) use for our blogs. It’s open-source, and *unbelievably powerful and friendly*.
* First thing to do is choose a theme. There is a lot of information there on how to design your own theme, but I opted for getting one of the numerous themes already available. The WordPress Theme Viewer was extremely helpful in that respect. You can choose from among more than 250 themes, and see how each one of them looks like on a sample blog. Read the rest of this entry »
Permalink
Comments off