I am writing an elementary summation proof and would like to write that
1 + 2 + 3 + ... + n-2 + n-1 + n
+ n + n-1 + n-2 + ... + 3 + 2 + 1
= n+1 + n+1 + n+1 + ...
and so on. I want the symbols to line up so that it’s easy to see the vertical addition. How do I do this in LaTeX? The align environment doesn’t do so well with multiple things to align on, and creating a tabular environment is annoying because it’s not in math mode.
The
arrayenvironment is the way to go here. This solution is better in some ways than Jack Kelly’s, and worse in other ways:Two things to notice in the column specification: we use
*{6}{spec}to get six copies of a column with specificationspec. We also use@to specify that each column separator should look like a six-point gap, a plus sign, and another gap.More on the
@trick here.