2

I am making a LaTeX document and I am having HTML tags like List<? extends Number> which when I put in LaTeX turn out to be List¡? extends Number¿. I tried escaping with \ but did not help. Anybody knows how to escape < and > in LaTeX?

migrated from stackoverflow.com Sep 18 '13 at 14:58

This question came from our site for professional and enthusiast programmers.

5

The LaTeX expressions to insert < and > would be \textless and \textgreater.

In a verbatim environment you can also include such characters without escaping. To properly include HTML code I would suggest that you have a look into the listings or lstlistings package.

4
\documentclass[preview,border=12pt]{standalone}
\usepackage[T1]{fontenc}
\begin{document}
< you must use T1 font encoding >
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy