3

How can I make a table that looks like this:

enter image description here

where column 2's values are centered between column 1's values.

  • For future consideration: How about giving a table that has the values completed? It'll speed up the consumption of the problem in the community. – Werner Jun 20 '14 at 19:16
5

You can set every column in its own tabular - they would necessarily be vertically centred, giving the indication that the output rows are offset:

enter image description here

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

\begin{tabular}{c c c c}
  \toprule
  Sample person's data & Cal year & Age & Person-years by stratum \\
  \midrule
  \begin{tabular}{@{}c@{}}
    AAA \\ AAA \\ AAA \\ AAA \\ AAA \\ AAA \\ AAA
  \end{tabular} &
  \begin{tabular}{@{}c@{}}
    BBB \\ BBB \\ BBB \\ BBB \\ BBB \\ BBB
  \end{tabular} & 
  \begin{tabular}{@{}c@{}}
    CCC \\ CCC \\ CCC \\ CCC \\ CCC \\ CCC
  \end{tabular} &
  \begin{tabular}{@{}c@{}}
    DDD \\ DDD \\ DDD \\ DDD \\ DDD \\ DDD
  \end{tabular} \\
  \cmidrule{4-4}
  & & & XX
\end{tabular}

\end{document}
  • impressive! What does booktabs do? – bdeonovic Jun 20 '14 at 19:25
  • @Benjamin: Read the booktabs documentation! :) The main idea is to avoid excessive horizontal rules, and never use vertical rules. – Werner Jun 20 '14 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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