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.28.05
Posted in Mathematics at 10:27 pm by Haris
I haven’t been talking about math yet in this blog, so now it’s time to start. Here’s an interesting little tidbit I realized during teaching this week. I was telling my students about the cross product of vectors, and defined it as a determinant:

where as usual
are the standard unit vectors in 3-space. Now, the cool thing about this definition is that it shows immediately why
is perpendicular to both a and b. For that, one simply has to check that the dot product of it with each of them is 0. But the dot product with, say, a amounts to computing the determinant:

which of course is zero since two rows of the determinant are the same. Now, one my students asked me: Well, what about other dimensions? I was about to give them the usual answer about there being a mysterious reason why this would work only in dimension 3, but then I realized that in fact this works in all dimensions. If you have n-1 vectors in dimension n, then you can immediately produce a vector perpendicular to them as an n by n determinant:

The exact same reasoning shows that this vector is perpendicular to all the n-1 vectors comprising the rows of this determinant. An amusing special case is when n=2, in which case we get that the vector in the plane perpendicular to the vector
is none other than 
! So clearly the magic of the cross product is not simply in it being perpendicular to the original vectors.
It’s stuff like that that makes me love teaching math!
Later
Permalink
06.23.05
Posted in Mac OS X, computers at 8:24 pm by Haris
Continuing my story of installing all my favorite goodies in my brand new hard drive, I forgot to mention that I was very lucky with porting my mailboxes. I just backed up the folder /Library/Mail to an external hard drive, and then just copied it back up to the new system. This did not keep my account information, but once I created the accounts again, all my mail was there! Very
Read the rest of this entry »
Permalink
Posted in Mac OS X, computers at 1:00 am by Haris
I just did the unthinkable: I opened up my iBook and changed its hard drive!
Ok, it’s not unthinkable, many people have done it before. But it certainly is not for the faint at heart. Luckily there are lots of instructions and pictures online, namely here. It went overall ok, except I think I did not put the extra memory back properly (hear that Sameer?). Anyway, I am now back to restoring my computer to the settings that I am used to, and I will document it all here, so that I have it easily accessible the next time I have to do it. I’ll skip the links, which were included in another post.
Read the rest of this entry »
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
« Previous entries ·