# Set Table width and separate some rows [duplicate]

I'm trying to make the table take the line width of the paper but I don't know how to do this. I want it to look like this:

However, it's appearing like this:

This is the script I used:

\begin{table*}[htbp]
\centering
\begin{tabular}{rlrr}
\toprule
\multicolumn{1}{l}{\textbf{E}} & \textbf{A} & \multicolumn{1}{l}{\textbf{B}} & \multicolumn{1}{l}{\textbf{C}} \\
\midrule
& \textbf{q} & 0     & 0 \\
\multicolumn{1}{l}{\textbf{X}} & \textbf{w} & 0     & 0 \\
& \textbf{e} & 0     & 0 \\
& \textbf{r} & 0     & 0 \\
\multicolumn{1}{l}{\textbf{Y}} & \textbf{t} & 0     & 0 \\
& \textbf{y} & 0     & 0 \\
& \textbf{u} & 0     & 0 \\
\multicolumn{1}{l}{\textbf{Z}} & \textbf{i} & 0     & 0 \\
& \textbf{o} & 0     & 0 \\
\bottomrule
\end{tabular}%

• Can you space things out by using p{width} as your column specifier? Like tex.stackexchange.com/a/62718/47522 ? – cslstr Mar 10 '14 at 3:43
• Additional \midrules can be used after the appropriate \\ to add more separation lines... – cslstr Mar 10 '14 at 3:46
• You can use p{\dimexpr 0.25\linewidth-2\tabcolsep} as specified in the link I mentioned earlier. Each column will be equally spaced, but it will come out to \linewidth width. – cslstr Mar 10 '14 at 3:48