JavaScript display engine for mathematics