[Tex/LaTex] Vertical alignment of a tabularx cell

nestingtablestabularxvertical alignment

I have a tabularx table with:

  • a variable width column X on the left
  • a cell with a nested tabular table on the right

Like so:

\begin{tabularx}{\textwidth}{ | X | c | }
\lipsum[1-1]
&
\begin{tabular}{rl}
test&test\\
test&test\\
test&test\\
test&test\\
test&test\\
test&test\\
\end{tabular}
\end{tabularx}

Now the problem I have is that for some reason it looks like this:

enter image description here

And I want it to look like this:

right

How do I go about this?

Best Answer

You are aligning the top line of the paragraph with the centre of the tabular.

Use

\begin{tabular}[t] 

so that the top line of the tabular is taken as the alignment point, which will then align with the top line of the paragraph in the first column.