I'm fairly new to using tables in LaTeX. I am finding it difficult to align columns of numbers (particularly if they have negative signs). I've attached an example which I hope will make clear my issue. Any advice would be greatly appreciated.
Thanks in advance.
David
Code: Select all
\documentclass[12pt]{article}
\newcommand{\mb}[1]{\mbox{\boldmath $\bf#1$}}
\newcommand{\mbi}[1]{\mbox{\mathit{\boldmath $\bf#1$}}}
\setlength{\textwidth}{6.5in}\setlength{\textheight}{9.2in}
\setlength{\oddsidemargin}{-.05in} \setlength{\topmargin}{-.5in}
\usepackage{lscape}
\begin{document}
\pagestyle{empty}
\newpage
\begin{landscape}
\begin{table} [!hbp] \label{table3}
\begin{center} \small
\caption{$N_T$ = 1200}
\bigskip
\begin{tabular}{lcccccccrrrrrrrrrr}
\hline
&& $ICC_2$ && $ICC_2$ && $ICC_2$\\\\
&&0.0 ~~~0.1~~~ 0.2 ~~~0.3 ~~~0.4 && 0.0~~~0.1~~~ 0.2~~~ 0.3 ~~~0.4 && 0.0~~~ 0.1~~~ 0.2 ~~~0.3 ~~~0.4\\
\hline\\
&& 15 W/80 B && 20 W/60 B && 30 W/ 40 B\\\\
&& 0 ~~~~-4 ~~~~-9 ~~~~-12 ~~~~-15 &&0 ~~~~-3 ~~~~-7 ~~~~-11 ~~~~-14 && 0 ~~~~-3 ~~~~-8 ~~~~-11~~~~-15\\
&& -3 ~~~~-8 ~~~~-11 ~~~~-13 ~~~~-16 && -2 ~~~~-7 ~~~~-10 ~~~~-13 ~~~~-15 &&-2 ~~~~-7 ~~~~-10 ~~~~-13 ~~~~-15\\
$ICC_1$&& -6 ~~~~-9 ~~~~-11 ~~~~-14 ~~~~-17 && -5 ~~~~-8 ~~~~-11 ~~~~-13 ~~~~-16 && -5 ~~~~-9 ~~~~-11 ~~~~-13 ~~~~-16\\
&&-8 ~~~~-11 ~~~~-13 ~~~~-15 ~~~~-17 && -7 ~~~~-10 ~~~~-12 ~~~~-13 ~~~~-16 && -7 ~~~~-10 ~~~~-12 ~~~~-14 ~~~~-16\\
&&6 ~~~~-10 ~~~~-13 ~~~~-14 ~~~~-16 ~~~~-17 && -9 ~~~~-11 ~~~~-13 ~~~~-14 ~~~~-16 && -9 ~~~~-12 ~~~~-13 ~~~~-14 ~~~~-16\\\\\\
&& 40 W/30 B && 60 W/20 B && 80 W/ 15 B\\\\
&& $0$ ~~~{-4} ~~~-8 ~~~-12 ~~~-15 && 0 ~~~-4 ~~~-8 ~~~-12 ~~~-15 && 0 ~~~-5 ~~~-8 ~~~-13 ~~~-15\\
&& $-3$ ~~~{-8} ~~~-10 ~~~-14 ~~~-16 &&-3 ~~~-7 ~~~-11 ~~~-13 ~~~-16 &&-3 ~~~-8 ~~~-11 ~~~-14 ~~~-16\\
$ICC_1$&& $-5$ ~~~{-9} ~~~-11 ~~~-14 ~~~-16 && -5 ~~~-9 ~~~-12 ~~~-14 ~~~-16 && -5 ~~~-10 ~~~-12 ~~~-14 ~~~-17\\
&& $-8$ ~~~-11 ~~~-13 ~~~-14 ~~~-16 &&-8 ~~~-11 ~~~-12 ~~~-15 ~~~-17 &&-8 ~~~-11 ~~~-13 ~~~-15 ~~~-16\\
&& $-9$ ~~~-12 ~~~-13 ~~~-15 ~~~-16 &&-10 ~~~-12 ~~~-13 ~~~-15 ~~~-17 &&-10 ~~~-12 ~~~-14 ~~~-15 ~~~-17\\\\
\hline
\end{tabular}
\end{center}
\end{table}
\end{landscape}
\newpage
\begin{landscape}
\begin{table} [!hbp] \label{table4}
\begin{center} \small
\caption{Class size (.33, .33, .33)}
\bigskip
\begin{tabular}{lcccccccrrrrrrrrrr}
\hline
&& $ICC_2$ && $ICC_2$ && $ICC_2$\\\\
&&0.0 ~~~0.1~~~ 0.2 ~~~0.3 ~~~0.4 && 0.0~~~0.1~~~ 0.2~~~ 0.3 ~~~0.4 && 0.0~~~ 0.1~~~ 0.2 ~~~0.3 ~~~0.4\\
\hline\\
&& 15 W/80 B && 20 W/60 B && 30 W/ 40 B\\\\
&& 0 ~~6 ~~17 ~~24 ~~35 && 0 ~~~4 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