## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Monospaced Font Show Text Part by Default Show All Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Re: environment templates Achim Blumensath <[log in to unmask]> Fri, 7 Jan 2000 21:25:39 CET text/plain (54 lines) Frank Mittelbach wrote: > Achim Blumensath writes: > > > for the theoremstyle template type a good name could then be > > > something like \EndThisTheorem. > > > > I think it would be a good idea to uniformly call those commands > > \EndThisEnvironment. > > 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. 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. One way to allow hacks like this could be to define \newenvironment as   \newenvironment :=     \def\{       \begingroup            }     \def\end{              \endgroup     } that is, to move the \begingroup, \endgroup from \begin and \end into the \foo, \endfoo commands. > b) do implement your independent stack handling for these things > c) do provide your own groups already at the environment-template level > d) ...? Achim ________________________________________________________________________                                 _ | \_____/ |     // Achim Blumensath | \ _ \O/ \___/\ |    // [log in to unmask] |-< /_\ =o= \ /\ \|  \X/ (p^2 - m^2)\psi = 0 |_/ \_ /"\ o----| ____________________________________________________________________\___|