I am trying to add a list of elements into a longtable
cell.
I have tried several solutions and the only one that has proved really applicable is the one I present in the following MWE.
The main problem is that I want to colour the table (with alternating rows) with the colour I have defined, called lightblue
.
Here's the example:
\documentclass[a4paper]{article}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{makecell}
\definecolor{lightblue}{rgb}{0.93,0.95,1.0}
\begin{document}
\subsection{Tracciamento} \label{subsec:tracciamento}
\rowcolors{1}{lightblue}{white}
\begin{longtable}[c]{|c|c|}
\hline
\textbf{Fonte} &
\textbf{Requisiti} \\
\hline
Capitolato & \makecell[t]{RF02\\RFD3\\RFD4} \\
\hline
Interno & \makecell[t]{RQO1\\RQO2\\RQD8} \\
\hline
UC 1 &
RF01 \\
\hline
UC 2 &
RF01.1 \\
\hline
\caption{Tracciamento fonte - requisiti} \label{tab:fonte_requisiti}
\end{longtable}
\end{document}
and this is the output after the compilation:
Now, the problem lies in the fact that the colour does not seem to work properly.
I thank anyone who can help me solve this problem!