\verb

 

\verb char literal_text char


or


\verb*char literal_text char

 

Typesets literal_text exactly as typed, including special characters and spaces, using a typewriter (\tt) font. There may be no space between \verb or \verb* and char (space is shown here only for clarity). The *-form differs only in that spaces are printed as "visual" spaces, i.e., a short, squat "u".

 

Any char except a space (or a * for the \verb form) may be chosen as the delimiter. Thus, the input

 \verb1This!is?the##1 verbatim  ...
would produce

 

This!is?the## verbatim ...

 

The \verb command may not be used in the argument of another command. For example, it cannot be used in the text of a sectioning command.

Related topics:

Environments, verbatim