[Tex/LaTex] How to display table headers that are wider than the rest of the column

tables

I have a table with lots of columns, which only contain a short values, but have long headings. I think this table would fit width-wise on a single (landscape) page, if I could get the headings sit on alternating rows, with the ends overlapping.

How can I achieve this?

(I've tried writing two header rows, with half the column names in one row and half in another, using \multicolumn, but I can't get them to then align neatly with the columns.)

\documentclass[]{article}
\usepackage{booktabs}

\begin{document}

\begin{tabular}{ccc}
\toprule
Lengthy words which & make my  columns too wide like & antidisestablishmentarianism\\
\midrule
1 & 0 & 0\\
3 & 7 & 5\\
\bottomrule
\end{tabular}

\end{document}

Or, alternatively, is Big table with rotated column labels using booktabs the preferred layout for tables with long headings?
I am reluctant to use it, because there are enough rows that the headers will need to be repeated on multiple pages already; making them taller will exacerbate this problem.

Best Answer

I first thought in an answer like that:

\documentclass{article}
\usepackage{array}
\usepackage{rotating}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ccc}
\toprule 
\begin{sideways} Lengthy words which  \end{sideways} & 
\begin{sideways} make my columns too wide like  \end{sideways} & 
\begin{sideways} antidisestablishmentarianism \end{sideways} \\
\midrule 
1  & 0  & 0\\
3  & 7  & 5\\
\bottomrule
\end{tabular}
\end{document}

But I believe that this is point again to the wrong target. Although you can wrap the headings with p columns, or tabularx or using multicolumns, o rotate 90ยบ the headings, o some other trick, there are not a good LaTeX solution for this, because the table still will have probably a bad looking design. Just compare these four tables:

Mwe

The first table made with tabularx have horrible headings expanding in four lines and still a lot of space between columns. If you want reduce this space (second table) the headngs are even longer (more than horrible). And rotate headings as in the above MWE force to the reader to do some fun neck exercises. LaTeX can do the best with the given text, but not a miracle. The main problem is the bad design of the table, and the solution is the re-desing of the table. What table is better?

I know that this is too obvious, and surely is not considered for some good reason in this case, but in general the best solutions for long headings just are (1) use shorter headers (including using acronyms, predefined labes, etc.) or (2) transposing columns and rows:

\documentclass[]{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lcc}
\toprule
Some long to explain & a & b \\
\midrule
Lengthy words which & 1 & 3 \\
make my  columns too wide like & 0 & 7 \\
antidisestablishmentarianism & 0 & 5 \\
\bottomrule
\end{tabular}
Related Question