1

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:

this

However, it's appearing like this:

this

This is the script I used:

\begin{table*}[htbp]
  \centering
  \caption{Add caption}
    \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}%
  \label{tab:addlabel}%
\end{table*}%
Werner
  • 603,163
Tak
  • 2,346
  • 4
  • 20
  • 33
  • Can you space things out by using p{width} as your column specifier? Like http://tex.stackexchange.com/a/62718/47522 ? – cslstr Mar 10 '14 at 03:43
  • Additional \midrules can be used after the appropriate \\\ to add more separation lines... – cslstr Mar 10 '14 at 03:46
  • I want to stretch the table to be automatically have the linewidth – Tak Mar 10 '14 at 03:47
  • 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 03:48
  • Looks like it is solved with this answer: http://tex.stackexchange.com/a/44802/47522 – cslstr Mar 10 '14 at 03:51

0 Answers0