🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #200

Re: Boxed example in TeX/LaTeX

#200
From: Brian T. Schellenberger
Date: Wed, 28 Jun 1989 16:57
26 lines
1142 bytes
This puts a box around arbitrary text.  It also happens to set up \.
for leaders, but that's a separate issue.  The key is using \bgroup
and \egroup.

Also, if you want to allow arbitrary text, you *must* take a width a
a parameter, or use a hard-coded one (possibly some smidge less than
\textwidth). . . .

\newenvironment {leaderbox*} [1]
  {
  \begingroup
  \par \noindent \hfill
  \setbox0=\vbox \bgroup \hsize #1 \@parboxrestore
  \let \. = \leaderfill
  }
  {
  \egroup
  \fbox{\box0}
  \hfill \penalty0 \par
  \endgroup
  }
-- 
-- Brian, the Man from Babble-on.		...!mcnc!rti!sas!bts
--
"Every jumbled pile of person has a thinking part that wonders what the part
that isn't thinking isn't thinking of" -- THEY MIGHT BE GIANTS
Technical Details
Message-ID: <1078@sas.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!rti!sas!bts
References: <13839@umn-cs.CS.UMN.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!rti!sas!bts
From: bts@sas.UUCP (Brian T. Schellenberger)
Newsgroups: comp.text
Subject: Re: Boxed example in TeX/LaTeX
Message-ID: <1078@sas.UUCP>
Date: 28 Jun 89 16:57:48 GMT
References: <13839@umn-cs.CS.UMN.EDU>
Reply-To: bts@sas.UUCP (Brian T. Schellenberger)
Organization: SAS Institute Inc, Cary NC
Lines: 26