modifications for LaTeX parsing