[Tex/LaTex] Remove whitespace between columns in table

booktabstables

I'm trying to create a table using booktabs, but for some reason I get extra whitespace between my last two columns.

\documentclass{article}

\usepackage{booktabs}
\begin{document}

\begin{table}\centering
\begin{tabular}{@{} c c c @{}} \toprule
\multicolumn{3}{c}{coordinates space filler}\\
\cmidrule{1-3}
x & y & z \\
\midrule
a & 0 & 0  \\
b & 0 & 0  \\
c & 0 & 0  \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

And this produces a large white space between the y-column and the z-column.
The larger I make the 'coordinates space filler' the worse it becomes.
But the distance between my x and y column is always okay.

Thanks in advance!

Best Answer

Your tabular without the coordinates space filler is not wide enough. I suggest using a fixed-width column for all columns to stretch things out far enough:

enter image description here

\documentclass{article}

\usepackage{booktabs}
\usepackage{array}
\newcolumntype{C}{>{\centering\arraybackslash}p{3em}}
\begin{document}

\begin{tabular}{@{} C C C @{}}
  \toprule
  \multicolumn{3}{c}{coordinates space filler} \\
  \cmidrule{1-3}
  x & y & z \\
  \midrule
  a & 0 & 0  \\
  b & 0 & 0  \\
  c & 0 & 0  \\
  \bottomrule
\end{tabular}
\end{document}
Related Question