[texhax] making LaTeX-environment from existing command

Alexander Grahn A.Grahn at fzd.de
Thu Aug 16 11:25:17 CEST 2007

Dear list,

I'd like to create a LaTeX environment, using \newenvironment{}{}{},
that stores the commands between \begin and \end into a token register.

The following code fails with the message `! Missing { inserted.' :

--- 8< ---




\the\mytoks %exec token register

--- >8 ---

Unfortunately, I cannot put unbalanced {'s and }'s into the begdef and
enddef parameters of \newenvironment. Perhaps you have got an idea what
to do? There must be a way to accomplish this, since LaTeX defines,
e.g., the `lrbox' environment from the TeX command \setbox which seems
to be a similar task.

Help is greatly appreciated!


More information about the texhax mailing list