Converts lines of mathematical statements and symbols into LaTeX syntax