3

This question already has an answer here:

I have a long word that describes all the values, so I don't want this big gap between A and B. The gap should be everywhere the same, so the word foooooo should not affect the gap between the values.

How to fix this?

enter image description here

\documentclass{article}
\usepackage{booktabs}
 \begin{document}

\begin{tabular}{@{} *5l @{}}    \toprule
\emph{name} & \emph{fooooooo} &&&  \\\midrule
Models    & A  & B  & C  & D  \\ 
 Model $X$ & X1 & X2 & X3 & X4\\ 
 Model $Y$ & Y1 & Y2 & Y3 & Y4\\\bottomrule
 \hline
\end{tabular}
\end{document}

marked as duplicate by Werner tables Oct 16 '15 at 0:04

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.

3

You can use \multicolumn so the cell for the "fooo" word spans all the other four columns:

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\noindent
\begin{tabular}{@{} *5l @{}}    
\toprule
\emph{name} & \multicolumn{4}{c}{\emph{fooooooo}}\\\midrule
 Models    & A  & B  & C  & D  \\ 
 Model $X$ & X1 & X2 & X3 & X4\\ 
 Model $Y$ & Y1 & Y2 & Y3 & Y4\\
\bottomrule
\end{tabular}

\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.