Subject: | |
From: | |
Reply To: | |
Date: | Wed, 21 Oct 1998 20:17:02 PST |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 21:09 +0200 98/10/21, Martin Schroeder wrote:
>
>\newenvironment{foo}{start}{end} defines \foo{start} and \endfoo{end}.
>
>But this is an undocumented feature -- which you can use at your own
>risk.
Hans Aberg <mailto:[log in to unmask]>
> So LaTeX defines \begin{list} and \end{list} as a part of the
>list-environment interface, but \list and \endlist are part of the
>implementation of the list environment. ...
> ... \list and \endlist do not belong to the interface,
All untrue! The command equivalent of an environment is "documented"
on pages 25 and 34 of Lamport's Manual (1st ed; check the index for
Environment > made from declaration). It's not *well* documented,
(omitting mention of the \end form) but it is clearly intended to
be part of the user interface.
For the package or class writer, it is *preferred* to use the commands
rather than the environments for two reasons:
- less overhead and stack use (minor)
- better syntax checking (important!)
Let's say you use \begin{list} when defining a new environment {citation},
and a document has omitted \end{citation}. The error message you get is
! LaTeX Error: \begin{list} on input line xx ended by \end{document}.
but if you use \list and \endlist you get the proper
! LaTeX Error: \begin{citation} on input line xx ended by \end{document}.
Donald Arseneau [log in to unmask]
|
|
|