I find array
environment pretty useful for aligning some blocks of equations, especially more flexible way of aligning each column as a whole, unlike alugn
, however it has a couple of issues
- You have to put
array
inside another math environment - All math like fractions, sum limits, integrals look small, because array isn't a display environment
- Spacing between rows is different from other amsmath environments like
align
. I want spacing to be exactly the same as ingather
for example
Here's a comparison with align
The solution that I'm looking for has to take care of all listed issues above, but also keep the key feature of array
: full control of columns type: l
, r
and especially c
and all other properties like @{}
, >{}
<{}
, vertical lines c|c
, etc.
Basically I need a standalone display variant default array
that has same spacing as other amsmath environments. Making each row being labeled isn't the most important thing for me, but it would be nice to have such an option.
Here's the "MWE" of desired environment and it's output
\documentclass{article}
\begin{document}
\begin{displayArray}{ *{3}{c} }
a^2+b^2=c^2 & \frac{m}{n} = q & 1+2+3+4+5=15 \\
\sum_{i=1}^n & \int_a^bf(x)dx=F(x) & k=j
\end{displayArray}
\end{document}
align
? By adding another&
before each=
sign (three on easch line, six in all), that should give the same result as yourdisplayArray
. Proper use of align is described in the user guide foramsmath
--texdoc amsldoc
.align
?align
will format multiple two-part expressions (each "part" is what is separated by an&
, asa&=b
) separated by another&
(where it will insert a space), and finally center the entire environment, except for the equation numbers. The result is very like what you've produced with yourdusplayArray
, but spaced a bit differently. It's what is used in publications of the American Mathematical Society, so is "publication quality" according to the guidelines of a major math publisher.