Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!lll-winken!iggy.GW.Vitalink.COM!widener!dsinc!netnews.upenn.edu!vax1.cc.lehigh.edu!spot.CC.Lehigh.EDU!lubkt From: lubkt@spectrum.CC.Lehigh.EDU (Binod K. Taterway) Newsgroups: comp.text.tex Subject: boxing verbatim in latex Message-ID: Date: 15 May 91 13:27:25 GMT Distribution: comp.text.tex Organization: Lehigh University, Bethlehem, PA Lines: 62 Nntp-Posting-Host: spectrum.cc.lehigh.edu I want to place a box around the verbatim environment. Unfortunately, when I do the following, % Make boxes. Inspired from Exercise 21.3 from TeXbook. \def\boxit#1{\vbox{\hrule\hbox{\vrule \kern1.2pt \vbox{\kern1.2pt{ \parindent 0pt \tt #1}\kern1.2pt}\kern1.2pt\vrule} \hrule}} \boxit{ \begin{verbatim} this better come out in boxed verbatim mode ... \end{verbatim} } I get the following error message: ! Argument of \@xverbatim has an extra }. \par } \boxit ...vbox {\kern 1.2pt{ \parindent 0pt \tt #1 }\kern 1.2pt}\kern 1.2pt\v... \boxed ...t}{\boxit {\vbox {\hsize \textwidth #1}} } \end {flushleft} l.523 } ? h I've run across a `}' that doesn't seem to match anything. For example, `\def\a#1{...}' and `\a}' would produce this error. If you simply proceed now, the `\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. But if your `}' was spurious, just type `2' and it will go away. Well, I have tried many other ways. I actually tried using the definition of verbatim in boxit, but that didn't work either. Do you know a way to do this? Doesn't matter if it is simple or complicated. BTW, I want the box to be the same size as textwidth, i.e., from the global leftmargin to the global rightmargin, and not the current left margin. For example, if my left margin is here .. +-----------------------------------------------------------------------+ | I want the boxed environment like this. | +-----------------------------------------------------------------------+ any clues? Thanks in advance. -- Binod Taterway | lubkt@spectrum.CC.Lehigh.EDU Sr. User Consultant | bt00@lehigh.BITNET Lehigh University Computing Center | (215) 758-3984 (off) Bethlehem, PA 18015 | (215) 758-4983 (fax)