LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Achim Blumensath <[log in to unmask]>
Date: Fri, 7 Jan 2000 21:25:39 CET
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: 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 <name> <begin-code> <end-code> :=
    \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.

>  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----|
____________________________________________________________________\___|

ATOM RSS1 RSS2