A little thing I am hoping to integrate into this blog. It uses MediaWiki’s texvc to generate a PNG from an equation in LaTeX.
function mts {
tex=$(texvc /tmp $1 $2 iso-9559-1 | tr -d "\0" |
sed -r 's ^.(.{32}).* \1 ')
if [ "$3" = 'hash' ]; then
nm=$(print $1 | md5sum | awk '{print $1}')
else
nm=${2// /_}
fi
mv "${1}/${tex}.png.png" "${1}/${nm}.png"
}