[texhax] \usebox in environment to save text for future use

Uwe Lueck uwe.lueck at web.de
Fri May 8 13:27:54 CEST 2009


Ulrike Fischer <news3 at nililand.de> schrieb am 08.05.2009 10:02:08:
> Am Thu, 7 May 2009 21:07:32 +0200 schrieb Stefan Björk:
> 
> > 2009/5/5 Ulrike Fischer <news3 at nililand.de>:
> >>> I expect the following code to define the \mybox within the
> >>> environment info for later use, but it does not work. The use of lrbox
> >>> environment seem restricted to the info environment only. How to get
> >>> around this?
> 
> >>> \newenvironment{info}{\begin{lrbox}{\mybox}}{\end{lrbox}}
> ...
> >>  \newenvironment{info}{\global\lrbox{\mybox}}{\endlrbox}
> 
> > Can't make this work. Just adding \global does not seem to solve the issue.
> 
> My code doesn't not "just add" \global. I have made some more
> changes. 

Just do not define a new environment for this purpose. Use \begin{lrbox}{\mybox}...\end{lrbox} which serves this purpose already. 
-- HTH, Uwe. 



More information about the texhax mailing list