Fixes #28. Also fixes an undetected bug in MathML output for terminals.