[OS X TeX] \newcommand\eal{\end{align}

Herbert Schulz herbs at wideopenwest.com
Thu Nov 18 08:51:20 EST 2010


On Nov 18, 2010, at 12:06 AM, David Arnold wrote:

> All,
> 
> A colleague of mine asked why this won't compile.
> 
> \documentclass[12pt]{article}
> \usepackage{amsmath,amssymb}
> 
> \newcommand{\bal}{\begin{align*}}
> \newcommand{\eal}{\end{align*}}
> 
> \begin{document}
> 
> \bal
> 	\frac{3.5}{4.2} &= \frac{35}{42}\\
> 	&= \frac{5}{6}
> \eal
> 
> \end{document}
> 
> I just didn't have a good answer to give to him.  Can some expert out there explain?
> 
> Thanks.
> 
> David

Howdy,

Most likely because the align* environment is explicitly looking for the token set `\end{align*}' as the terminator for the environment.

I'd guess that person is trying to save some typing by making definitions like that. What editor are they using? Many editors with LaTeX support have a feature that allows environments to be completed without having to type the complete, wordy skeleton out.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list