I have a problem with vertically aligning content in a tabular
environment:
\documentclass{article}
\begin{document}
\begin{tabular}{ p{2em} p{2em} }
test & \begin{tabular}{l} s s s \\ s s s \end{tabular} \\
\end{tabular}
\end{document}
Which as far as I understand the array
documentation should give me two table cells which are top-aligned and have a with of 2em
.
The thing is that if I don't have a table in the second cell but simply text then it works as intended:
\documentclass{article}
\begin{document}
\begin{tabular}{ p{2em} p{2em} }
\hline
test & s s s s s s s s s s s s s s s \\
\hline
\end{tabular}
\end{document}
What is the reason for the difference in appearance?
\parbox[t]
and therefore be lined up in a way that the parbox top aligns with the current text line?[t]
as placing an anchor point for that\parbox
. Putting[t]
for the left would not add any value, since it is only a single line. Meanwhile, it is required for the second entry, otherwise the anchor will be in the middle.