I don't think there are very many smarter ways of doing it, since this depends on the scope (how many of these tables you have, or how big they are, and to what extent you want to automate the process) and some aesthetics. However, there are many other ways of doing it:
\documentclass{article}
\begin{document}
\begin{tabular}{lrrr}
& \multicolumn{1}{l}{$\phantom{-}$a} &
\multicolumn{1}{l}{$\phantom{-}$b} &
\multicolumn{1}{l}{$\phantom{-}$c} \\
A & $-0.62645$ & $-0.82047$ & $ 1.51178$ \\
B & $ 0.18364$ & $ 0.48743$ & $ 0.38984$ \\
C & $-0.83563$ & $ 0.73832$ & $-0.62124$ \\
\end{tabular}
\end{document}
The above uses math mode to typeset the numbers in you tabular
. Alternatively, you could also typeset the entire table in an array
environment and merely switch to text mode where needed (for the column/row indexes, say). For this, amsmath
provides \text{<stuff>}
, where <stuff>
can include spaces.
Additionally, the motivation for the above suggestion is to use r
ight alignment for the columns containing numbers, and switch to l
eft alignment for the column indexes only (row 1). That way you only have to worry about the minuses in the "header". Also, the alignment adjustment for the minus sign is accomplished via \phantom{<stuff>}
which leaves space equivalent to <stuff>
without actually typesetting it. This can help in a general setting where you want to leave space for something other than a minus sign, and spacing is adjusted for by the font and text mode.
Here is another alternative that exploits a zero-width column separation @{}
to remove the gap between successive columns:
\documentclass{article}
\begin{document}
\begin{tabular}{l*{3}{r@{}l}}
& &a & &b & &c \\
A & $-$&$0.62645$ & $-$&$0.82047$ & &$1.51178$ \\
B & &$0.18364$ & &$0.48743$ & &$0.38984$ \\
C & $-$&$0.83563$ & &$0.73832$ & $-$&$0.62124$ \\
\end{tabular}
\end{document}