[texhax] problem with a defined command

Lars Madsen daleif at imf.au.dk
Fri Jan 17 09:54:21 CET 2014


Please do not do things like this, it really annoys editors and makes the code a lot less readable. If you find it annoying to write \begin{align} then consider finding a better editor that can help you insert these

The way align is constructed it explicitly looks for the string \end{align} to end the environment
 

/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf


________________________________________
From: texhax [texhax-bounces at tug.org] on behalf of A Emery [emery at u.washington.edu]
Sent: 17 January 2014 07:19
To: texhax at tug.org
Subject: [texhax] problem with a defined command

I define the following commands

\newcommand{\beq}{\begin{align}}
\newcommand{\eeq}{\end{align}}
\newcommand{\besq}{\begin{subequations}}
\newcommand{\eesq}{\end{subequations}}

then use them as
\beq
x=sin(y)
\eeq

The response is

Runaway argument?
x=sin(y) \eeq
! Paragraph ended before \align was complete.
<to be read again>
                    \par

But this works
\beq
x=sin(y)
\end{align}

However, \besq and \eesq  work perfectly

any ideas?

thanks



_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: postmaster at tug.org




More information about the texhax mailing list