added extra parsing in latex.py