Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to recreate the "Not Enough" table from the Example Tables 1 on slide 12/16 from here. This is my current code, its close but not right. How do I get the column headers to stack word over word, and how do I get the column headers to align with the rest of the column?

\begin{table}[H]
\centering
\begin{tabular}{llcc} 
{} &  {} & readers in 2006 & top editorial positions \\
\hline
\multicolumn{3}{l}{Dailies} \\
{} & Suddeustsche Zeitung & 44.0 & 10.0 \\
{} & Frankfurter & 36.0 & 6.25 \\
{} & Handelsblatt & 25.0 & 0 \\
\hdashline
\end{tabular}
\caption[Not Enough]{Not Enough}
\label{tab:tnotEnough}
\end{table}

NOTE: I am using \usepackage{arydshln} for \hdashline

share|improve this question

1 Answer 1

Use the array package to define a new fixed width column type with centered contents. Also, you might want to define a column type that aligns at the decimal point. Use the dcolumn package for that.

\documentclass{article}
\usepackage{array,booktabs,dcolumn,calc}
\newcolumntype{C}{>{\centering\arraybackslash}b{\widthof{positions}}}
\newcolumntype{d}{D{.}{.}{-2}}
\begin{document}

\begin{tabular}{@{\quad}l*{2}{d}@{}} 
& \multicolumn{1}{C}{readers in 2006} 
& \multicolumn{1}{C@{}}{top editorial positions} \\
\midrule
\multicolumn{3}{@{}l}{Dailies}     \\
Suddeustsche Zeitung & 44.0 & 10.0 \\
Frankfurter          & 36.0 & 6.25 \\
Handelsblatt         & 25.0 & 0    \\
\bottomrule
\end{tabular}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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