The basic problem is that I need an enumeration in a table cell. The special requirement is to have the text in the cell (or whole column) left to this cell top-aligned.
My first approach is:
\begin{table}[h!]
\begin{tabular}{r|l}
\textbf{Input} &
some text\\
\textbf{Work} &
\parbox{\linewidth}{\begin{enumerate}
\item The first step
\item The second step which is very long, so this text is more than the table width and should be broken .
\end{enumerate}}\\
\textbf{Output}: & some other text.\\
\end{tabular}
\end{table}
As you see, the text in the left column is not top aligned. I tried multiple ways, e.g. this one but could not fix it.
My second approach was to use nested tables:
\begin{table}[h!]
\begin{tabular}{r|l}
\textbf{Input} &
some text\\
\textbf{Work} &
\begin{tabular}[t]{ll}
1. & The first step \\
2. & The second step which is very long, so this text is more than the table width and should be broken.\\
\end{tabular}
\\
\textbf{Output}: & some other text.\\
\end{tabular}
\end{table}
Which fixes the alignment issue, but cuts the text:
I tried to fix the width of the inner table (see here) but this also did not work.
How can I have an enumeration in a table with the cells to the left top-aligned? Thank you!
multirow