Handle special characters for LaTeX.