1

To align a long string of symbols I usually use

\begin{eqnarray*} ... \end{eqnarray*}.

I would like to know if there is any convenient alternative to this environment. For example, I know that

\[ ... \] 

can replace

$$ ... $$ and is more viable than

$$ ... $$.

What I am after is a simple alternative such that it is to

\begin{eqnarray*} ... \end{eqnarray*} 

what

\[ ... \] 

is to

$$ ... $$.
5

Actually, \[...\] is not a replacement or shorthand for $$...$$. It's preferred due to improved vertical spacing; see Why is \[\] preferable to $$$$?.

Also, eqnarray does not provide the best horizontal spacing around operators.

If shorthand is what you're after, then you could use \be...\ee as an alternative to \begin{eqnarray*}...\end{eqnarray*} where

\newcommand{\ba}{\begin{eqnarray*}}
\newcommand{\ea}{\end{eqnarray*}}

I would not recommend it though.

Perhaps you're stuck on the notation used by eqnarray:

... & .. & ... \\
... & .. & ...

In that sense, you may be interested in using the following alternative that combines the preferred notation \[...\] with the use of eqnarray's double-&:

enter image description here

\documentclass{article}
\usepackage{amsmath,array}

\newcommand{\ba}{% "\begin{eqnarray*}"
  \[% Start display math
    \renewcommand{\arraystretch}{1.4}% https://tex.stackexchange.com/q/31672/5764
    \begin{array}{@{}r@{}>{{}}c<{{}}@{}l@{}}% Start a 3-column array
}
\newcommand{\ea}{% "\end{eqnarray*}"
    \end{array}% End array
  \]% End display math
}

\begin{document}

\begin{align*}
  f(x) &= ax^2 + bx + c \\
  g(x) &= ax^2 + bx + c
\end{align*}

\ba
  f(x) &=& ax^2 + bx + c \\
  g(x) &=& ax^2 + bx + c
\ea

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.