This is a follow-up question to \eqnarray vs \align.
Sadly, some journals (and their accompanying document classes) still require the use of eqnarray to arrange a number of equations in a single block. What would be the easiest (and best) way to modify the eqnarray environment to match the output of align without having to modify the input regime. Something that produces the output of the second set of equations (in align) given the first set (in eqnarray):

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{eqnarray}
f(x) & = & ax^2 + bx + c \\
g(x) & = & dx^2 + ex + f
\end{eqnarray}
\setcounter{equation}{0}
\begin{align}
f(x) & = ax^2 + bx + c \\
g(x) & = dx^2 + ex + f
\end{align}
\end{document}
The idea is to provide a very minimal package that could be added to a document when it still uses eqnarray, without having to modify the code used for eqnarray.
My first attempt was to modify the setup within \eqnarray (from latex.ltx). Currently defined as
\def\eqnarray{%
\stepcounter{equation}%
\def\@currentlabel{\p@equation\theequation}%
\global\@eqnswtrue
\m@th
\global\@eqcnt\z@
\tabskip\@centering
\let\\\@eqncr
$$\everycr{}\halign to\displaywidth\bgroup
\hskip\@centering$\displaystyle\tabskip\z@skip{##}$\@eqnsel
&\global\@eqcnt\@ne\hskip \tw@\arraycolsep \hfil${##}$\hfil
&\global\@eqcnt\tw@ \hskip \tw@\arraycolsep
$\displaystyle{##}$\hfil\tabskip\@centering
&\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup
\tabskip\z@skip
\cr
}
It's obvious that the three components of an equation are handled separately. Additionally, a horizontal skip of 2\arraycolsep is inserted around the middle component while also making that component equivalent to \mathord (wrapping it within {..}). A possible correction of this is therefore:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\makeatletter
\def\eqnarray{%
\stepcounter{equation}%
\def\@currentlabel{\p@equation\theequation}%
\global\@eqnswtrue
\m@th
\global\@eqcnt\z@
\tabskip\@centering
\let\\\@eqncr
$$\everycr{}\halign to\displaywidth\bgroup
\hskip\@centering$\displaystyle\tabskip\z@skip{##}$\@eqnsel
&\global\@eqcnt\@ne${}##{}$% Removed horizontal skip + forced mathord
&\global\@eqcnt\tw@% Removed horizontal skip
$\displaystyle{##}$\hfil\tabskip\@centering
&\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup
\tabskip\z@skip
\cr
}
\makeatother
\begin{document}
\begin{eqnarray}
f(x) & = & ax^2 + bx + c \\
g(x) & = & dx^2 + ex + f
\end{eqnarray}
\setcounter{equation}{0}
\begin{align}
f(x) & = ax^2 + bx + c \\
g(x) & = dx^2 + ex + f
\end{align}
\end{document}
What else?

\qedhere. – barbara beeton Jan 31 '13 at 19:40\qedhereis something that is not specific toeqnarrayto begin with. So users ofeqnarraywould most likely not use\qedhere. The idea is that codeeqnarrayinput code remains unchanged, while the output is updated to be better (like that ofalign+ friends). – Werner Jan 31 '13 at 19:46\qedherefacility would be wanted (at least by a careful editor). however, i think that no math journal requireseqnarrayvia its document class, and physicists and computer scientists don't usually deal in theorems and proofs, so maybe the point is moot. (if you are certain that no math journal is a culprit, then i'll be happy to remove the comment.) – barbara beeton Jan 31 '13 at 20:00amsmathpackage allowed? – Jan 31 '13 at 20:06alignfrom the start. However, a solution that usesamsmathbut maintains the input ofeqnarrayin all aspects would be okay I guess. – Werner Jan 31 '13 at 20:13eqnarrayis the spacing around the relation sign that makes the spot of the alignment. Also the syntax is awkward, but that's not changeable. You lose, as I said before, automatic offset when the display is too near to the equation number. Add\displaystylealso in the middle column, to avoid problems when that column is not really used for a relation. – egreg Jan 31 '13 at 21:51\labelfeature ineqnarray*? See the example in myeqnarrayarticle in PracTeX – daleif Feb 01 '13 at 11:02eqnarraytoalign. So the question might be now: Is it allowed to steal long pieces of code fromamsmath(namely all needed byalign)? – yo' Feb 01 '13 at 13:13