I'd like to define a shorthand command for \begin{align*} and \end{align*}. When I write


it works fine. But when I write


LaTeX complains. It looks like it's interpreting it as part of the environment and is not happy with that. Anyone know how to fix this?

  • 5
    This seems the sort of thing you should have a shortcut for in your editor, rather than in LaTeX itself. Commented Apr 21, 2010 at 14:27

3 Answers 3


An alternative solution -- this is the code in the custom document class I use for everything:



  x^2 + 9 &= 0

(Obviously, change the command name to suit your preference.)

  • Thanks for the help! I defined the \eq command, and it's working well.
    – Dmitry Vaintrob
    Commented Apr 30, 2010 at 6:01
  • This is a great idea, thank you. What does the [1] signify?
    – Eric Auld
    Commented Sep 26, 2013 at 15:52
  • It's the number of arguments your new \eq command will require. See en.wikibooks.org/wiki/LaTeX/Macros for more information.
    – Etaoin
    Commented Sep 28, 2013 at 0:03

A little testing shows that this appears to be fairly specific to the "align" environment from amsmath. For example,





hello world


works fine. I'm not sure why align* doesn't work (it doesn't work without the star either); I suspect that the myriad expansions and aliases surrounding the align environment do something a little more complicated than a "traditional" LaTeX environment. However, I have found something that might just achieve the same objective for you:





x^2 &= y^2 \\
z^2 &= t^2


Hope that helps!


It seems to me that it's a bug.


LaTeX complains about align not being closed.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .