Convert arbitrary mathematical writing to latex