# [texhax] \begin{...}...\end{...} VS. its shorthands

Jerrold Leichter jerrold.leichter at smarts.com
Sun Jun 1 12:39:02 CEST 2003

| Using \begin{...}...\end{...} kills our time.
| Is there any best way to save the time?
Back when I started using LaTeX, I thought this, too.  So I defined a pair of
macros, \B and \E.  \B is like \begin except it doesn't need the braces;
\E closes the last-opened environment.  (Since LaTeX tells you if you type the
wrong environment name to \end, it obviously knows what the right value should
be.)

I was rather proud of that effort - it involved digging through the LaTeX
sources for the first of what proved to be many times - but in retrospect it
was time wasted.  Within a very short time, I stopped using these macros.  I
found they produce a useful - in practice, essential - error check.  LaTeX
syntax can be rather unforgiving, and the error messages TeX/LaTeX are able to
produce are cryptic.  It's been years since I used these macros - they are
still in my standard set of definitions, but I don't even know if they still
work properly - LaTeX has changed over the years, and they haven't.

Many people use "electric modes" of various sorts to deal with the extra
typing.  I generally don't like them, though I did define a mode for an editor
I used to use.  What I do today is:  Type the \begin{whatever}; copy and paste
it; change \begin to \end.  (All my mode did was prompt for the name of the
environment and insert the begin/end pair.)

-- Jerry