I'm trying to design a layout that has tables nested within tables, and I'm having trouble getting things to line up. The question is quite similar to How to make width of an inner table use full column width of an outer table? except that I have no tabularx involved---I am looking to get the table itself to stretch.
I imagine that a solution will have two components:
- Some stretchiness to
\tabcolsep - Some way of telling the outer table not to fill on the left and right sides
I have not been able to figure out how to achieve such an effect.
Here is a minimal working example:
\documentclass{article}
\begin{document}
\begin{tabular}{cc}
A relatively wide line& Thin \\
\begin{tabular}{@{}ll@{}}
\hline
A&B\\
\hline
C&D\\
\hline
\end{tabular}&
Thicker\\
The ABCD table should stretch to fit&Thickest\\
\end{tabular}
\end{document}
The resulting table looks like

but what I want is for the ABCD table to stretch the full width of its column (even though that would look awful in this case).
What I am actually trying to accomplish can be illustrated by considering the misalignments in the following non-minimal example:

Two of the outcomes I would like are
- Section E stretches automatically to become the same width as section D
- Section G stretches automatically to become the same width as what's above it
Does anyone have ideas about how this might be accomplished?

\settowidthis not a bad trick, though. – Norman Ramsey May 31 '15 at 17:01