🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #441

Re: Syntax question for LaTeX newenvironment

#441
From: Lennart Staflin
Date: Sun, 26 Jul 1992 16:41
17 lines
1134 bytes
>>>>> On 23 Jul 92 17:34:38 GMT, edavid@lri.lri.fr (Erwan David) said:
Erwan> 	Just put in a .sty file 
Erwan> \def\@boxenv[#1]{\fbox{#1}}
Erwan> \newenvironment{boxit}{ <beginning stuff>  \@boxenv[}{] <end stuff> }

That will not work.  TeX will not be able to parse the argument to
\@boxenv, the closing ] is not "visible" until \end{boxit} has been
expanded.

Something that does work is:

\newenvironment{boxit}{\setbox0\hbox\bgroup}{\egroup\fbox{\box0}}


--
Lennart Staflin   :   There's more to life than books, you know 
les@ida.liu.se	  :   but not much more           --- The Smiths
Technical Details
Message-ID: <LES.92Jul26184150@pan8.IDA.LiU.SE>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!liuida!curofix!les
References: <schwartz.711810279@lead17> <1992Jul23.173438.14385@lri.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!liuida!curofix!les
From: les@IDA.LiU.SE (Lennart Staflin)
Newsgroups: comp.text.tex
Subject: Re: Syntax question for LaTeX newenvironment
Message-ID: <LES.92Jul26184150@pan8.IDA.LiU.SE>
Date: 26 Jul 92 16:41:52 GMT
References: <schwartz.711810279@lead17> <1992Jul23.173438.14385@lri.fr>
Sender: news@ida.liu.se
Organization: CIS Dept, University of Linkoping, Sweden
Lines: 17
In-Reply-To: edavid@lri.lri.fr's message of 23 Jul 92 17: 34:38 GMT