Received: via tmail-4.1(11) (invoked by user schoepf) for schoepf; Sat, 8 Jan 2000 22:39:18 +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 WAA24120 for ; Sat, 8 Jan 2000 22:39:18 +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 WAA07862 for ; Sat, 8 Jan 2000 22:39:17 +0100 (MET) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF5A20.D0E84700" Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <7.A3046831@mail.listserv.gmd.de>; Sat, 8 Jan 2000 22:39:07 +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 446969 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Sat, 8 Jan 2000 22:38:03 +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 WAA08020 for ; Sat, 8 Jan 2000 22:37:59 +0100 (MET) Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by relay.uni-heidelberg.de (8.9.1b+Sun/8.9.1) with ESMTP id WAA27755 for ; Sat, 8 Jan 2000 22:39:03 +0100 (MET) Received: from mailserver1.zdv.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate1.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id WAA07853 for ; Sat, 8 Jan 2000 22:39:03 +0100 (MET) Received: from istrati.zdv.uni-mainz.de (dialin375.zdv.Uni-Mainz.DE [134.93.175.75]) by mailserver1.zdv.Uni-Mainz.DE (8.9.3+Sun/8.9.1) with ESMTP id WAA24071 for ; Sat, 8 Jan 2000 22:39:02 +0100 (MET) Received: (from design@localhost) by istrati.zdv.uni-mainz.de (8.9.3/8.9.3) id VAA00296; Sat, 8 Jan 2000 21:54:29 +0100 In-Reply-To: References: Return-Path: x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil]["2043" "Sat" "8" "January" "2000" "21:54:29" "+0100" "Frank Mittelbach" "frank.mittelbach@LATEX-PROJECT.ORG" nil "58" "Re: environment templates" "^Date:" nil nil "1" nil "environment templates" nil nil nil]nil) X-Authentication-Warning: istrati.zdv.uni-mainz.de: design set sender to design@istrati.zdv.uni-mainz.de using -f Content-class: urn:content-classes:message Subject: Re: environment templates Date: Sat, 8 Jan 2000 21:54:29 +0100 Message-ID: <200001082054.VAA00296@istrati.zdv.uni-mainz.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Frank Mittelbach" 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: 3496 This is a multi-part message in MIME format. ------_=_NextPart_001_01BF5A20.D0E84700 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Achim wrote: > > the problem with this and perhaps the problem with the whole = mechanism > > is that a lot of people have learned to write environments like = this: > > > > \newenvironment{foo}{...\quote ...}{ ... \endquote ...} > > > > ie without using \begin/\end internally. > > > > if all such things like \quote internally use \EndThisEnviornment = then > > guess what happens. so this needs some thoughts. > > > > a) do not allow above usage > > IMHO such hacks as above shouldn't be allowed anyway. If someone = directly > accesses internals of some package instead of using the defined > interface he deserves his code breaking when the implementation is > changed. In theory I do agree with this but in practice one might have to be more careful simply because this usage is so common. Unfortunately I was even = used (perhaps even is) by Leslie Lamport in its original class files. It also has the side-effect of not changing \@currenvir and some people = have used this deliberately to get proper error messages for their = environments. > Besides, what happenes if someone uses two nested lists in the > above way? So you have the problem regardless of whether all = templates > share a common name or each uses its own one. true, which is why I said one probably has to think about it more = generally. > 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) For the moment I will stick with a single command \EndThisEnvironment = and see how it develops. My note was mainly to record that there is something to = be thought about further at some stage cheers frank ------_=_NextPart_001_01BF5A20.D0E84700 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: environment templates

Achim wrote:

 > > the problem with this and perhaps the = problem with the whole mechanism
 > > is that a lot of people have learned = to write environments like this:
 > >
 > > \newenvironment{foo}{...\quote ...}{ = ... \endquote ...}
 > >
 > > ie without using \begin/\end = internally.
 > >
 > > if all such things like \quote = internally use \EndThisEnviornment then
 > > guess what happens. so this needs = some thoughts.
 > >
 > >  a) do not allow above = usage
 >
 > IMHO such hacks as above shouldn't be = allowed anyway. If someone directly
 > accesses internals of some package instead = of using the defined
 > interface he deserves his code breaking = when the implementation is
 > changed.

In theory I do agree with this but in practice one = might have to be more
careful simply because this usage is so common. = Unfortunately I was even used
(perhaps even is) by Leslie Lamport in its original = class files.

It also has the side-effect of not changing = \@currenvir and some people have
used this deliberately to get proper error messages = for their environments.

 > Besides, what happenes if someone uses two = nested lists in the
 > above way? So you have the problem = regardless of whether all templates
 > share a common name or each uses its own = one.

true, which is why I said one probably has to think = about it more generally.


 > 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)

For the moment I will stick with a single command = \EndThisEnvironment and see
how it develops. My note was mainly to record that = there is something to be
thought about further at some stage

cheers
frank

------_=_NextPart_001_01BF5A20.D0E84700--