LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Hans Aberg <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Mon, 24 Feb 1997 13:41:53 +0100
text/plain (37 lines)
  About the the question of implementation and interface, I just developed
my "environment with hooks" I posted here a few years ago, as a LaTeX2e
.sty file, developed in an "object oriented" style, with names like
and so on. This works out quite nicely.

  The user style is like
using the name \Environment as a "constructor" for converting an old LaTeX
environment "equation" to one of the new type. This definition then calls
the name
with the "@" indicating that the name "def" is private to the locality
"Environment/". More or less, this is C++ terminology straight on.

  Some specs:

  The environments can execute commands both before and after each of the
\begingroup and \endgroup environment commands, and all of these four
possible commands can take arguments, with definitions of the form
    {foo}par1{before cmds}{begin cmds}par2{end cmds}{after cmds}
where the first parameter block par1 (like "#1#2..") is used by both the
before and begin commands, and the second parameter block par2 is used by
both the end and after commands, so one can send arguments to these
commands quite freely.

  The environments also keep track of environments nested in the definition
of another environment. It is also possible to, as a user command, to
exclude the name in the endgroup (corresponding to constructs like
"\begin{foo} .. \end{}").

  If I get time, I might work this up to something more serious -- perhaps
introducing the ability of creating environments with optional arguments.

  Hans Aberg