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 have two tables nested inside of a larger table. One of the nested tables is taller than the other, and I'd like to have the two tables line up together at the bottom. I've tried inserting [b] in the outer table, and I've tried declaring the outer table's column containing the shorter inner table as b{0.25\textwidth} instead of l. Neither of these worked. I'm pretty new to LaTeX, so maybe there's something basic that I'm missing.

Here is a minimal version of what I'm working with:

\documentclass{article}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}

\begin{tabular*}{0.5\textwidth}{@{\extracolsep{\fill}}ll}
A & B \\ 
\begin{tabular}{rC{5em}}
aaa & 1 \\ 
bbb & 2 \\
ccc & 3 \\     
ddd & 4 \\ 
eee & 5 \\ 
fff & 6 \\ 
\end{tabular} &
\begin{tabular}[b]{rC{5em}}
ddd & 4 \\ 
eee & 5 \\ 
fff & 6 \\ 
\end{tabular} \\ 
\end{tabular*}

\end{document}

This is what my code is giving me:

http://i.stack.imgur.com/wiB17.png

But I'd like to have something like this:

http://i.stack.imgur.com/C7EY6.png

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The alignment specifier for a tabular could be considered an "anchor point". Use [b] for both the inner tabulars:

enter image description here

\documentclass{article}
\usepackage{array}% http://ctan.org/pkg/array
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}

\begin{tabular*}{0.5\textwidth}{@{\extracolsep{\fill}}ll}
  A & B \\ 
  \begin{tabular}[b]{rC{5em}}
    aaa & 1 \\ bbb & 2 \\ ccc & 3 \\ ddd & 4 \\ eee & 5 \\ fff & 6
  \end{tabular} &
  \begin{tabular}[b]{rC{5em}}
    ddd & 4 \\ eee & 5 \\ fff & 6
  \end{tabular} \\ 
\end{tabular*}

\end{document}
share|improve this answer
    
This did the trick. Thanks very much. –  WhiteHotLoveTiger Feb 13 '13 at 6:00
add comment

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.