16

I would like to display \begin{verbatim}...\end{verbatim} inside the environment verbatim like in the folowing piece of code. Is it possible ?

\begin{verbatim}
Bla, bla,
\begin{verbatim}...\end{verbatim}
Bla, bla,...
\end{verbatim}
1
  • 1
    Any reasons why you have to use verbatim, could you use the listings package instead?
    – ArTourter
    Apr 6, 2012 at 22:37

1 Answer 1

26

You could use the verbatim package then define your own variant

\newenvironment{myverbatim}%
{\verbatim}%
{\endverbatim}

then you can use myverbatim if you want to have literal \end{verbatim}

\begin{myverbatim}
Bla, bla,
\begin{verbatim}...\end{verbatim}
Bla, bla,...
\end{myverbatim}
1
  • So simple... Sorry for my to-easy-to-solve-question...
    – projetmbc
    Apr 6, 2012 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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