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.

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.

share|improve this question
    
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 at 19:16

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer
    
impressive! What does booktabs do? –  Benjamin Jun 20 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 at 19:28

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.