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
Code, edit and compile here:
\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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