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?

2 Answers 2

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

You must log in to answer this question.