TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 tried:

\begin{verbatim} is_terminating() \end{verbatim} function can be implemented as follows:

But the text after verbatim section will be printed in a next line, is there a way to prevent this happen? Thank you.

share|improve this question
Do you know of \verb|is_terminating()| for inline verbatim? – Werner Jul 20 '11 at 21:52
@Werner Grundlingh: Thank you sir! That's exactly what I want. – Chan Jul 20 '11 at 22:03
up vote 4 down vote accepted

Consider using inline verbatim: \verb|is_terminating()|. For some discussion on the different verbatim environments, read this.

The listings package also provides a form of inline verbatim through its inline code macro \lstinline. It works uses the same interface as inline verbatim with delimiters defining the inline code range: \lstinline!is_terminating()!.

share|improve this answer
Thanks again ;) – Chan Jul 20 '11 at 22:04

Use the \verb command instead. The first character after \verb acts as delimiter, "such that all text up to the next occurence of that character is printed literally. This character may not appear in the literal text, obviously." (Kopka and Daly, Guide to LaTeX)

\verb|is_terminating()| function can be implemented as follows:
share|improve this answer
Thanks a lot ;) – Chan Jul 20 '11 at 22:03

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.