TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to display the following:

.\integrate blah

in a monospaced font.

For everything else I've wanted to put in a monospace font, \texttt or \verb has worked fine, but it doesn't with this. I've worked out that I need to escape the \ in the text, but replacing it with \\ gives a newline.

What should I use to escape the \ in LaTeX?

share|improve this question
\verb+\integrate+ works OK. – Gonzalo Medina Mar 7 '11 at 17:00
Is that trying to display an integration sign? I'm trying to display the actual text "integrate". – robintw Mar 7 '11 at 17:04
No. \verb+\integrate+ will display "\integrate" in a monospaced font. – Gonzalo Medina Mar 7 '11 at 17:18
up vote 10 down vote accepted

You can use \verb to display a backslash in monospaced font; the following example shows another option to display a backslash in monospaced font:







share|improve this answer

You could use \textbackslash to produce a backslash. To get it monospaced, you should use T1 font encoding which is recommendable anyway, otherwise it's not a true typewriter backslash.

You might also have a look at answers to these questions:



\texttt{.\textbackslash integrate}



backslash screenshot

share|improve this answer
but \textbackslash will not produce a backslash in monospaced font. – Gonzalo Medina Mar 7 '11 at 17:20
@Gonzalo: it produces a monospaced backslash in T1 encoding, which is very recommendable. You're right, with the default (OT1) encoding the backslash would be in another font. I will add that restriction to the answer. – Stefan Kottwitz Mar 7 '11 at 17:38


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.