Improved math typesetting