# using lists inside multirow

I want to use a multirow item list in a column of a table, but it does not work. it says an \item is missing but it already ended before.

\documentclass[a4paper,10pt]{article}

\usepackage[a4paper, top=2cm, bottom=2cm, left=2.5cm, right=1cm]{geometry}
\usepackage{lastpage}
\usepackage[utf8]{inputenc}
\usepackage{array,multirow}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{setspace}
\usepackage[table]{xcolor}
%definir a fonte a utilizar
\usepackage{times}
\renewcommand{\familydefault}{\sfdefault}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\vspace{0.5cm}
\noindent
\tabulinesep=1.5ex
\begin{tabu} to \linewidth {|X[m,c]|X[m,c]|X[m,c]}
\cline{0-1}
\begin{description}
\item[First] The first item
\item[Second] The second item
\item[Third] The third etc \ldots
\end{description}
}\\\cline{0-1}
\end{tabu}

\end{document}


UPDATE I have done it using a box, but now i have another issue. The table is vertical aligned to middle (m), and in this cell i need it to be aligned to TOP. Not the box, but the multirow.

\documentclass[a4paper,10pt]{article}

\usepackage[a4paper, top=2cm, bottom=2cm, left=2.5cm, right=1cm]{geometry}
\usepackage{lastpage}
\usepackage[utf8]{inputenc}
\usepackage{array,multirow}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{setspace}
\usepackage[table]{xcolor}
%definir a fonte a utilizar
\usepackage{times}
\renewcommand{\familydefault}{\sfdefault}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\vspace{0.5cm}
\noindent
\tabulinesep=1.5ex
\begin{tabu} to \linewidth {|X[m,c]|X[m,c]|X[m,c]}
\cline{0-1}
\parbox[t][][t]{4cm}{
\small
\begin{description}
\item[First] The first item
\item[Second] The second item
\item[Third] The third etc \ldots
\end{description}
}
}\\\cline{0-1}
\end{tabu}

\end{document}

• Welcome to TeX.SX! You have to pass a width to \multirow if you want to typeset a list in it; or you can set the description inside a minipage environment. Nov 7 '13 at 12:02
• Thanks! I have made it in other way, i'll update it. Ofcourse with other problems. Nov 7 '13 at 12:26

I've been thinking of your question. Why do you even want to have a description INSIDE a tabu cell?! If your answer is "to have it beside the table" or "I use the tabu for text alignment" please consider the following alternative. The output looks like the same, but requires much less tinkering.

\documentclass[a4paper,10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[a4paper, top=2cm, bottom=2cm, left=2.5cm, right=1cm]{geometry}
\usepackage{enumitem}
\usepackage{tabu}

\begin{document}

\noindent
\tabulinesep=1.5ex
\begin{tabu} to 0.66\linewidth [t] {|X[m,c]|X[m,c]|}
\firsthline
\hline
\hline
\end{tabu}
\begin{minipage}[t]{\hsize}
\begin{description}[itemsep=0pt,parsep=0pt]
\item[First] The first item
\item[Second] The second item
\item[Third] The third etc \ldots
\end{description}
\end{minipage}

\end{document}

• well ... that's it ... that 0.66 is the true answer. I am new to latex, so i was also unable to remember the minipage. Nov 11 '13 at 14:05
• @user2674293 No problem. I'm quite new to LaTeX as well. Sometimes when I ask a question someone (most of the times egreg) points out that what I'm trying to achieve is a huge overkill and the original task can be done in a "more tex" way (which is often shorter too). That's why I dared to add this answer. And your question triggered an answer which IMHO has really useful info.
– masu
Nov 11 '13 at 14:25

You can set your description in a minipage; with the help of enumitem you can remove the space between items (if desired). There's no need to guess the width of the minipage, because you can use \hsize.

Note that I removed the m specifier in the third column or you will never get top alignment.

This is a rare case where \multirow can benefit, although the purpose is not very clear.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\usepackage[a4paper, top=2cm, bottom=2cm, left=2.5cm, right=1cm]{geometry}

\usepackage{array,multirow,enumitem}
\usepackage{longtable}
\usepackage{tabu}

\begin{document}

\noindent
\tabulinesep=1.5ex
\begin{tabu} to \linewidth {|X[m,c]|X[m,c]|X}
% some cells to show the effect
\hline
A & B & C \\
\hline
% now an empty row
\multicolumn{3}{c}{} \\
\cline{0-1}
\begin{minipage}[t]{\hsize}
\begin{description}[itemsep=0pt,parsep=0pt]
\item[First] The first item
\item[Second] The second item
\item[Third] The third etc \ldots
\end{description}
\end{minipage}%
}\\\cline{0-1}
\end{tabu}

\end{document}


• "Note that I removed the m specifier in the third column or you will never get top alignment." - you said it all. and in this case ... i can change the align to top ... but if you wanted this to one one cell it would not be possible, right? Nov 7 '13 at 13:28
• @user2674293 I don't know precisely; and I'm not keen on burning my eyes looking at tabu's documentation. Nov 7 '13 at 13:31
• @egreg Your code is identical to the MWE of the asker. Is it on purpose? (Or am I missing sg?)
– masu
Nov 7 '13 at 17:08
• @egreg I don't think this is aligned to top (even with the m and x removed). Should it be?
– masu
Nov 7 '13 at 17:21
• I mean: a [t] is missing from tabu and a \firsthline would be appropriate.
– masu
Nov 7 '13 at 22:37

For information, you can put a {description} in a \Block in an {NiceTabular} of nicematrix.

\documentclass[a4paper,10pt]{article}
\usepackage[a4paper, top=2cm, bottom=2cm, left=2.5cm, right=1cm]{geometry}
\usepackage{nicematrix,xcolor,enumitem}

\begin{document}

\renewcommand{\arraystretch}{1.4}

\noindent
\begin{NiceTabular}{|X[m,c]|X[m,c]|X[m,c]}
\cline{1-2}
\Block{2-1}
{
\begin{description}[itemsep=0pt,parsep=0pt]
\item[First] The first item
\item[Second] The second item
\item[Third] The third, etc.
\end{description}
}
\\
\cline{1-2}

You need several compilations (because nicematrix` uses PGF/Tikz nodes under the hood).