Received: via tmail-4.1(11) (invoked by user schoepf) for schoepf; Sun, 9 Jan 2000 18:43:27 +0100 (MET) Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by mailserver1.zdv.Uni-Mainz.DE (8.9.3+Sun/8.9.1) with ESMTP id SAA20686 for ; Sun, 9 Jan 2000 18:42:15 +0100 (MET) MIME-Version: 1.0 Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate1.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id SAA11562 for ; Sun, 9 Jan 2000 18:42:14 +0100 (MET) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF5AC9.08AAC980" Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <0.AF45CE41@mail.listserv.gmd.de>; Sun, 9 Jan 2000 18:42:03 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 446979 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Sun, 9 Jan 2000 18:40:59 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id SAA26880 for ; Sun, 9 Jan 2000 18:40:54 +0100 (MET) Received: from knatte.tninet.se (knatte.tninet.se [195.100.94.10]) by relay.uni-heidelberg.de (8.9.1b+Sun/8.9.1) with SMTP id SAA21979 for ; Sun, 9 Jan 2000 18:41:53 +0100 (MET) Received: (qmail 16123 invoked from network); 9 Jan 2000 18:41:59 +0100 Received: from sinclair.tninet.se (195.100.94.101) by knatte.tninet.se with SMTP; 9 Jan 2000 18:41:59 +0100 Received: from [195.100.226.136] (du136-226.ppp.su-anst.tninet.se [195.100.226.136]) by tninet.se (BLUETAIL Mail Robustifier1.1.7) with ESMTP id s3557292t339650-bmr-sinclair for ; Sun, 09 Jan 2000 18:41:57 +0100 In-Reply-To: <200001082054.VAA00296@istrati.zdv.uni-mainz.de> References: Return-Path: x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil]["1958" "Sun" "9" "January" "2000" "18:36:23" "+0100" "Hans Aberg" "haberg@MATEMATIK.SU.SE" nil "49" "Re: environment templates" "^Date:" nil nil "1" nil "environment templates" nil nil nil]nil) X-Sender: haberg@pop.matematik.su.se Content-class: urn:content-classes:message Subject: Re: environment templates Date: Sun, 9 Jan 2000 18:36:23 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Hans Aberg" Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3497 This is a multi-part message in MIME format. ------_=_NextPart_001_01BF5AC9.08AAC980 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable At 21:54 +0100 2000/01/08, Frank Mittelbach wrote: > > One way to allow hacks like this could be to define \newenvironment = as > > > > \newenvironment :=3D > > \def\{ > > \begingroup > > > > } > > \def\end{ > > > > \endgroup > > } > > > > that is, to move the \begingroup, \endgroup from \begin and \end > > into the \foo, \endfoo commands. > >That could be a solution to get the best of both (costing a few tokens = per >defined environment but this is not really an issue) I have not followed this thread much. But when I worked on "environments with hooks", I arrived at the = conclusion that the environment definition should be such that the user does not = enter the \begingroup and \endgroup commands explicitly. The reason is that in order to control the nesting of environments, one needs to have some = local variables, so the group localities must always be present. Further, in order to allow for proper nesting of environments also in = the environment definition, I had to make use of more local variables than = the current LaTeX. If one writes \newenvironment{list}{...}{...} \newenvironment{mylist}{...\begin{list}...}{...\end{list}...} I thus had to keep track of both the ``list'' and ``mylist'' = environments when executing the ``mylist'' environment. In order to properly accomodate for the use of environment hooks, I had = to make an additional difference with LaTeX: In LaTeX2, the \begingroup = (resp \endgroup) command is executed by the \begin{...} (resp. \end{...}) commands. I had to change this, so that the \newenviroment{}{...}{...} = command creates commands \/begin containing the \begingroup command and \/end containing the \endgroup command. The \begingroup (resp \endgroup) command then executes \/begin (resp. \/end) = command. -- Perhaps this is the change you are looking for. Hans Aberg ------_=_NextPart_001_01BF5AC9.08AAC980 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: environment templates

At 21:54 +0100 2000/01/08, Frank Mittelbach = wrote:
> > One way to allow hacks like this could be = to define \newenvironment as
> >
> >   \newenvironment <name> = <begin-code> <end-code> :=3D
> >     = \def\<name>{
> >       = \begingroup
> >       = <begin-code>
> >     }
> >     = \def\end<name>{
> >       = <end-code>
> >       = \endgroup
> >     }
> >
> > that is, to move the \begingroup, \endgroup = from \begin and \end
> > into the \foo, \endfoo commands.
>
>That could be a solution to get the best of both = (costing a few tokens per
>defined environment but this is not really an = issue)

I have not followed this thread much.

But when I worked on "environments with = hooks", I arrived at the conclusion
that the environment definition should be such that = the user does not enter
the \begingroup and \endgroup commands explicitly. = The reason is that in
order to control the nesting of environments, one = needs to have some local
variables, so the group localities must always be = present.

Further, in order to allow for proper nesting of = environments also in the
environment definition, I had to make use of more = local variables than the
current LaTeX. If one writes
  \newenvironment{list}{...}{...}
  = \newenvironment{mylist}{...\begin{list}...}{...\end{list}...}
I thus had to keep track of both the ``list'' and = ``mylist'' environments
when executing the ``mylist'' environment.

In order to properly accomodate for the use of = environment hooks, I had to
make an additional difference with LaTeX: In LaTeX2, = the \begingroup (resp
\endgroup) command is executed by the \begin{...} = (resp. \end{...})
commands.

I had to change this, so that the = \newenviroment{<name>}{...}{...} command
creates commands \<name>/begin containing the = \begingroup command and
\<name>/end containing the \endgroup command. = The \begingroup (resp
\endgroup) command then executes \<name>/begin = (resp. \<name>/end) command.

-- Perhaps this is the change you are looking = for.

  Hans Aberg

------_=_NextPart_001_01BF5AC9.08AAC980--