I have a number of tables in a book that I am busy with that have quite a few tables of the general form shown below:

If you notice the fractional part of the numbers 5 1/2 and 16 1/2 protrude to the right (the numbers are right justified).
For this particular example, I achieved the result by adding a phantom character on all the figures except the fractional numbers, for example:
&5280\z ...
&660\z ...
&$16\frac{1}{2}$ ...
...
where, \z is defined as \def\z{\phantom{0}}
Any suggestions as to how to automate this?
The figures are all auto-generated by TeX. The input is only the first two rows. Based on this the rest of the numbers are calculated. Fractions are only displayed for numbers ending with 0.25, 0.5 etc..These are detected automatically, so I can add a kern if necessary. Tried this but did not look so good.
Sorry for not posting a minimal as the code is too lengthy.


\rlap{\frac{1}{2}}for the fractions? – morbusg Feb 26 '11 at 21:27
– Christian Lindig Feb 26 '11 at 21:41\def\nicefrac#1/#2{\leavevmode \raise.5ex\hbox{\the\scriptfont0 #1} \kern-.1em/\kern-.15em \lower.25ex\hbox{\the\scriptfont0 #2}}\xfracfor fractions. Don't really know why I didn't use it here. I guess I was concentrating on the coding part:) – yannisl Feb 26 '11 at 21:50booktabspackage? It constructs very beautiful tables and the documentation contains lots of tips on how to create typographically nice tables.For example, all those vertical lines are advised against.
– Ben Feb 27 '11 at 14:57