# 3 columns with top-align and bottom-align [tabularx]

I'm trying to put together a three column table (in tabularx) that have the following layout (in full line width):

Section  Description           Page
1-5  text text text ......    7
5-12  text text text text
text ................  121


Note:

• Left column is to be top right align
• Middle column spans one/multiple lines and ends with a \dotfill
• Right column is to be bottom-right align

PS: This worked for the middle + right columns, but when I added the left most column, I can't get the text to aligned at the top.

Any suggestions on how to make this work?

(Compiling wit LuaTex in document class memoir)

Building upon the solution in Tabular - 3 columns with top-align and bottom-align I came up with the following:

\documentclass[]{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{rXr}
Section & Description & Page\\ \addlinespace
1-5 &
test text text  text  text  text  text  text  text  text  text
text  text  text  text  text  text  text  text\dotfill
&\\[-\normalbaselineskip]&
5-12 &
test text text  text  text  text  text  text   \dotfill
&\\[-\normalbaselineskip]&
&121\\
\end{tabularx}

\end{document}

• Yes, awesome, thanks Jul 15, 2019 at 6:46

like this?

With use of the multirow package, where you need manually set the number of lines in the second column:

\documentclass{memoir}
\usepackage{multirow, tabularx}

\begin{document}
\noindent
\begin{tabularx}{\linewidth}{ r X r }
1-5     &   test text text text text text text text text text text text text text text text text text text\dotfill
&   \multirow[b]{2}{*}{1-2}  \\
5-12    &   test text text text text text text text text text text test text text text text text text text text text text text text text text text text text text\dotfill
&   \multirow[b]{3}{*}{34-143}
\end{tabularx}
\end{document}

• Correct. However, I need to change the index manually each time (in above MWE: 2 for first row and 3 for second row) as I go along? This can show to be problematic if the paper size is changed etc. Is there a way of getting the same result with the right most column aligning bottom without manually inputing for each row? Jul 14, 2019 at 23:16