Fix bug in embedded LaTeX