This question already has an answer here:

I normally use \verb|\LaTeXe| to typeset the command \LaTeXe in my document. But now I want to frame or/and colorize the command \LaTeXe. How can we do that?

\textcolor{blue}{text}\\ % without \verb is ok
\textcolor{blue}{\verb|\LaTeXe|}\\ % this is illegal, but I want to colorize the command \LaTeX2e
\fbox{text}\\ % without \verb is ok
\fbox{\verb|\LaTeXe|} % this is illegal too, but I want to frame around the command \LaTeXe. So how can I do that?

marked as duplicate by Werner, Masroor, Svend Tveskæg, Jesse, moewe Jan 30 '15 at 6:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.