# [OS X TeX] Verbatim in displaymath environment

Fri Dec 12 19:42:42 CET 2008

On Dec 11, 2008, at 10:15 PM, ewan.Delanoy at math.unicaen.fr wrote:

> Hello all,
>
>
>   I have  some computer science code in my text that I display with
> the verbatim environment, and I should like to precede it with
> two large vertical bars, usually obtained by \left|\left| in the
> displaymath environment. So I tried the following~:
>
> \begin{displaymath}
> \left|\left|
>  \begin{verbatim}
> (...)
> \end{verbatim}
> \right.\right.
> \end{displaymath}
>
>    Not surprisingly, this does not work.
>    How would the correct version of this look like?

Perhaps not exactly what you asked for, but the fancyvrb package
might have things to help you get what you want. Looking at its
manual using "texdoc fancyvrb", the following comes perhaps close to
what you want:

\usepackage{fancyvrb}
\begin{document}
\begin{Verbatim}[frame=leftline]
(...)
more stuff here
and more
\end{Verbatim}
\end{document}

>                                            Ewan