13

Let's say I want to use the align-environment in a newenvironment like this:

\newenvironment{mequation}{\align}{\endalign}

This works fine. However, what if I want to use the starred version of align*?

\newenvironment{mequation}{\align*}{\endalign*}

Doesn't seem to work.. Any ideas?

1
  • I expect there is a simple xparse solution to this: defining a starred and non-starred version at the same time...
    – Seamus
    Commented Mar 21, 2011 at 18:52

1 Answer 1

20

* cannot be used for the name of a control sequence. You must use the \csname...\endcsname pair here :

\newenvironment{mequation}{\csname align*\endcsname}{\csname endalign*\endcsname}
1
  • 3
    Good answer. One should note that \newenvironment{mequation}{\begin{align*}}{\end{align*}} does not work. It's the same problem as with split, explained here by barbara beeton. Commented Mar 21, 2011 at 18:21

You must log in to answer this question.

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