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.


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.

< you must use T1 font encoding >

enter image description here

Your Answer

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