1

This question already has an answer here:

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*}%

marked as duplicate by Torbjørn T., Werner, Adam Liter, Stefan Kottwitz Apr 1 '14 at 21:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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
  • I want to stretch the table to be automatically have the linewidth – Tak Mar 10 '14 at 3: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 3:48
  • Looks like it is solved with this answer: tex.stackexchange.com/a/44802/47522 – cslstr Mar 10 '14 at 3:51

Browse other questions tagged or ask your own question.