What is the best way to produce the following: (Image shows a typo)
Although using a
Some manual manipulation of the last three lines would be necessary,
in order to get the single digit numbers 9,8 and 7 to line up properly with the double digit numbers on the top three lines. To achieve this you need to use a
We define this as a macro called
and the full code:
Some options are
(I've edited the example, thanks Martin Tapankov).
or a simple tabular environment.
You might also want to include extra spacing in
Following Martin Scharrer's advice, you could also use array package for ensuring mathmode.
Okay, let me start by saying that I do not recommend this solution! But I've just been learning a bit about catcodes and felt like trying them out. So here's a solution that allows you to type the equations as they are and typesets them as you want. The only extra typing is the
Code (the extra equation is to show that the alignments are correct):