write math ala latex

Signed-off-by: Riccardo Iaconelli <riccardo@kde.org>