Fix a bug in the LaTeX representation for equations