[OS X TeX] Verbatim in displaymath environment

Peter Dyballa Peter_Dyballa at Web.DE
Sat Dec 13 00:40:19 CET 2008


>>   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.


Have you thought of a minipage? For verbatim? Then there'll be some  
space on the left to fill with whatever. Maybe with \rule[lift]{width} 
{height}. As in:

	\rule{1mm}{1cm}
	\vspace*{1cm}\begin{minipage}[b]{0.96\linewidth}
	  \begin{verbatim}
	    (...)
	  \end{verbatim}
	\end{minipage}

The other way is not so easy to compute:

	\rule[-4mm]{1mm}{1cm}
	\begin{minipage}[t]{0.96\linewidth}
	  \begin{verbatim}
	    (...)
	  \end{verbatim}
	\end{minipage}


--
Greetings

   Pete

There is no worse tyranny than to force a man to pay for what he does  
not want merely because you think it would be good for him.
				– Robert Heinlein






More information about the macostex-archives mailing list