I am using tabularx environment and in the MWE I have three columns. The first column contains short text, the second column contains long text and the third column contains short text again.
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{6cm}{|p{2cm}|b{2cm}|p{2cm}|}
short 1 & long text spanning more than one row & short 2 \
\end{tabularx}
\end{document}
As expected, the result is that both short 1 and short 2 align to the bottom.
If I change the setting on middle column from b{2cm} to p{cm}, as expected both short 1 and short 2 align to the top.
I would like to make short 1 align to the top and short 2 align to the bottom. How can I achieve that?
Thanks in advance.
EDIT:
Following the suggestion by @NBur who pointed me out to this post, I've implemented the following changes:
\documentclass{article}
\usepackage{tabularx}
\newcolumntype{C}{b{2cm}<{\vfill}}
\begin{document}
\begin{tabularx}{6cm}{|C|b{2cm}|p{2cm}|}
short 1 & long text spanning more than one row & short 2 \
\end{tabularx}
\end{document}
Unfortunately this code brings up the text only by one line and not all the way up to the top of the cell, so it does not work.
Are there any other suggestions?



tabularnottabularxhere as all the columns arepnotX– David Carlisle Feb 05 '21 at 18:19/vfillbrings up the text in the cell only by one line, not all the way to the top. Do you have any other suggestion? Maybe using some kind of a box? – jopeto Feb 07 '21 at 06:42tabularxfor my table, I have just stripped down all the unnecessary parts for the purpose of MWE. – jopeto Feb 07 '21 at 06:44