Backport recent changes in trunk to the mathtex branch.
Authored by: evilguru 2009-08-12
Parent: [r7478]
Child: [r7480]