Article View: comp.text
Article #132Boxed example in TeX/LaTeX
From: Scott W. Fischer
Date: Fri, 23 Jun 1989 15:08
Date: Fri, 23 Jun 1989 15:08
38 lines
1938 bytes
1938 bytes
Hello-
I sent this originally to TeXhax, but I thought I'd send it out for
others to look at also.
I'm trying to define an EXAMPLEBOX environment. I would like to use
it in one of the following two ways.
\examplebox{box caption}{contents of box, pictures, lists,
unlimited possibilities}
or
\begin{examplebox}[box caption]
contents of box
pictures
lists
etc
\end{examplebox}
The output I would like would be an outlined box with arbitrary contents with
either the caption left justified on the first line of the box, or centered
below (and outside) the box. Eventually I would like to have the examples
automatically numbered, but that is a separate problem.
Using example 21.3 of The TeXbook, I can get what I want if I assign
the contents of the box to a box register and then use the first style
of calling. If, however, I just place the contents of the box, rather
than the register name, in the second pair of {} I get errors for
having too many "}"s. I haven't been able to even come close with
defining a boxed in environment.
Any help, suggestions, similar style fragments would be greatly appreciated.
Thanks.
--
/\ /\ || Scott Fischer (612) 625-0876 || ADA, C, Pascal, Fortran
//\\ .. //\\ || 4-192 EE/CS, 200 Union St. SE || phones, cabling, network
///\(( ))/\\\ || Minneapolis, MN 55455 || diag, documentation --
/ < `' > \ || EM: fischer@umn-cs.cs.umn.edu || Slave labor does it all.
Technical Details
Message-ID:
<13839@umn-cs.CS.UMN.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!umn-cs!fischerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!umn-cs!fischer From: fischer@umn-cs.CS.UMN.EDU (Scott W. Fischer) Newsgroups: comp.text Subject: Boxed example in TeX/LaTeX Message-ID: <13839@umn-cs.CS.UMN.EDU> Date: 23 Jun 89 15:08:43 GMT Reply-To: fischer@umn-cs.cs.umn.edu (Scott W. Fischer) Organization: CSci Dept., University of Minnesota, Mpls. Lines: 38