Newsgroups: comp.text.tex Path: utzoo!utgpu!watserv1!maytag!csg.waterloo.edu!giguere From: giguere@csg.waterloo.edu (Eric Giguere) Subject: Titled boxedminipage -- problems Message-ID: <1990Nov26.163646.3951@maytag.waterloo.edu> Sender: daemon@maytag.waterloo.edu (Admin) Organization: University of Waterloo Distribution: na Date: Mon, 26 Nov 90 16:36:46 GMT Lines: 78 I'm trying to modify the boxedminipage.sty style file so that I can get a boxed minipage with a title on it, of the form: --- Title -------------------------------------------------------- | text goes here ... blah blah blah | ------------------------------------------------------------------ What I've done is changed the initial \hrule\@height\fboxrule statement that draws the top rule into an hbox containing three other hboxes: \hbox{\hbox to 0.25in{\hrulefill}\hbox{Title}\hbox to \@brule{\hrulefill}} where \@brule is the width of the title. This works fine, except that there is now a small gap between where the top rule joins the two vertical rules. I've tried several things, including \vskip-\lastskip but nothing seems to work -- I always get the gap. Any clues as to what I should be doing? BTW, this is the full code for boxedminipage.sty, in case others might find it useful. I think I got if off of clarkson... --------------------------- boxedminipage.sty ------------------------------ % boxedminipage.sty % % adds the boxedminipage environment---just like minipage, but has a % box round it! % % The thickneess of the rules around the box is controlled by % \fboxrule, and the distance between the rules and the edges of the % inner box is governed by \fboxsep. % % This code is based on Lamport's minipage code. % % Fixed, 7 Jun 89 by Jerry Leichter % Leave \fboxsep worth of separation at top and bottom, not just at % the sides! % \def\boxedminipage{\@ifnextchar [{\@iboxedminipage}{\@iboxedminipage[c]}} \def\@iboxedminipage[#1]#2{\leavevmode \@pboxswfalse \if #1b\vbox \else \if #1t\vtop \else \ifmmode \vcenter \else \@pboxswtrue $\vcenter \fi \fi \fi\bgroup % start of outermost vbox/vtop/vcenter \hsize #2 \hrule\@height\fboxrule \hbox\bgroup % inner hbox \vrule\@width\fboxrule \hskip\fboxsep \vbox\bgroup % innermost vbox \vskip\fboxsep \advance\hsize -2\fboxrule \advance\hsize-2\fboxsep \textwidth\hsize \columnwidth\hsize \@parboxrestore \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ \let\@footnotetext\@mpfootnotetext \let\@listdepth\@mplistdepth \@mplistdepth\z@ \@minipagerestore\@minipagetrue \everypar{\global\@minipagefalse\everypar{}}} \def\endboxedminipage{% \par\vskip-\lastskip \ifvoid\@mpfootins\else \vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi \vskip\fboxsep \egroup % ends the innermost \vbox \hskip\fboxsep \vrule\@width\fboxrule \egroup % ends the \hbox \hrule\@height\fboxrule \egroup% ends the vbox/vtop/vcenter \if@pboxsw $\fi} ---------------------------------- end ------------------------------------ -- Eric Giguere giguere@csg.UWaterloo.CA Quoth the raven: "Eat my shorts!" --- Poe & Groening