Converts lines of mathematical statements into LaTeX syntax