[Tugindia] Enclosing text contents in a box
Ragu.solaiappan, Integra
ragu.solaiappan at integra-india.com
Tue Mar 2 06:14:49 CET 2004
Please try with the combination of framed.sty and alltt.sty. Alltt.sty can
be replaced by any of other options decided by you.
\usepackage{framed,alltt}
\begin{shaded}
\begin{alltt}
asd
begin
progrom code
end
\end{alltt}
\end{shaded}
Regarding the color of your shaded box, you must define the color. The
sample is as follows
\definecolor{shadecolor}{gray}{.9}
\newenvironment{shaded}{%
\def\FrameCommand{\colorbox{shadecolor}}%
\MakeFramed {\FrameRestore}}%
{\endMakeFramed}
Thanks!
Regards
Ragu
How can I put a gray-colored box around a verbatim mode set text, like the
program code in a text. Please help.
Jagadeesh..
More information about the tugindia
mailing list