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

Been looking around and everywhere it tells me to use \textbackslash in LaTeX.

However if I write a text "yadayadayada in \textbackslash c \textbackslash f we have...."

A demonstration or so would be highly apprectiated. Thanks for helping a noob.

share|improve this question
A demonstration of what? What are you trying to achieve? Please describe your problem. – Gonzalo Medina Apr 12 '11 at 16:56
Ah sorry.. what happens is that I get a warning and it doesn't work. I was thinking that I wanted a demonstration in the correct form to write something like "\hi" <- without the "" in LaTeX. Thank you for your comment. – user4832 Apr 12 '11 at 17:00
If you are trying to write verbatim short text, you can use \verb+\hi+. – Gonzalo Medina Apr 12 '11 at 17:04
Thanks! I found the issue. – user4832 Apr 12 '11 at 17:07
@Gonzalo: This should be an answer. – Caramdir Apr 12 '11 at 17:19

If you are trying to write verbatim short text, you can use \verb+\hi+; for longer verbatim texts you can use the verbatim environment; for further customizable possibilities you can use, for example, the fancyvrb package.

share|improve this answer

If you want to write


in normal text (not verbatim) use \textbackslash{}hi or \textbackslash hi. (I'm not sure if there's any real difference between the two.)

share|improve this answer
use \def\CS#1{\texttt{\textbackslash#1}} and \CS{hi} – Herbert Apr 12 '11 at 18:55
@Herbert I don't quite understand what you're responding to. Your solution gives me a macro for outputting Typewriter style text preceeded by a backslash; I was, however, proposing a solution in normal font style since I didn't see Donut saying that they wanted Typewriter/verbatim style (nor that a macro was needed?). – doncherry Apr 12 '11 at 19:36
@donherry: it is more or less common to set commands in typewriter font – Herbert Apr 12 '11 at 20:06
tex.stackexchange.com/questions/109968/… ... :) – doncherry May 9 '13 at 22:38
I do not understand what you want to say? – Herbert May 10 '13 at 5:30

Your Answer


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