[mathtext.rb] Added support for capitals/lowercase conversion and a bit clearer errors messages.