Text overflows in multirow table

multicolumnmultirowtablestabularxtextwidth

I have a table with four columns. The problem is:

  • The text overflows in the third and fourth column as shown in below image. These columns contains dense text.
  • The text should be within table.

I tried by searching the existing answers (1,2), but most of them are using p{width} column type. This method is not working with multirow situation.

enter image description here

Desired table:

enter image description here

Here is an example to illustrate the problem:

\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}
\begin{table}[H]
\caption{}
\label{tab:my-table}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|}
\hline
\textbf{Research group} & \textbf{Ref} & \textbf{Common attributes} & \textbf{features noted} \\ \hline
(Yasir et al., 2020) &
  [1] &
  \multirow{9}{*}{\begin{tabular}[c]{@{}l@{}}1) blah blah blah blah blah blah blah blah blah blah blah.\\ ---------------------------------------------------------\\ \\ -------------------------------------------------------\\ \\ ------------------------------------------------------\\ \\ \\ \\ 2). blah blah blah blah blah blah blah blah blah blah blah.\\ ---------------------------------------------------------\\ \\ -------------------------------------------------------\\ \\ ------------------------------------------------------\\ \\ \\ \\ 3)- blah blah blah blah blah blah blah blah blah blah blah.\\ ---------------------------------------------------------\\ \\ -------------------------------------------------------\\ \\ -----------------------------------------------------\\ \\ \\ \\ \\ blah blah blah blah blah blah blah blah blah blah blah.\\ \\ ---------------------------------------------------------\\ \\ -------------------------------------------------------\\ \\ ------------------------------------------------------\end{tabular}} &
  \multirow{9}{*}{\begin{tabular}[c]{@{}l@{}}1).blah blah blah blah blah blah blah blah blah blah blah.\\ \\ ---------------------------------------------------------\\ -------------------------------------------------------\\ ------------------------------------------------------\\ \\ 2). blah blah blah blah blah blah blah blah blah blah blah.\\ \\ ---------------------------------------------------------\\ -------------------------------------------------------\\ ------------------------------------------------------\\ \\ \\ 3).blah blah blah blah blah blah blah blah blah blah blah.\\ \\ ---------------------------------------------------------\\ -------------------------------------------------------\\ -----------------------------------------------------\\ \\ \\ \\ 4). blah blah blah blah blah blah blah blah blah blah blah.\\ ---------------------------------------------------------\\ \\ ------------------------------------------------------\\ \\ ------------------------------------------------------\end{tabular}} \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \cline{1-2}
(Yasir et al., 2020)    & [1]          &                            &                         \\ \hline
\end{tabular}%
}
\end{table}
\end{document}

Best Answer

From your desired table, I think you may want something like this.

enter image description here

\documentclass{article}

\usepackage{tabularray}
\usepackage{lipsum}
\UseTblrLibrary{booktabs}

\begin{document}
\begin{table}
\caption{}
\label{tab:my-table}
    \begin{tblr}{
        width = \textwidth,
        stretch = 1.5,
        colspec={X[0.5,m] Q[c,m] *{2}{X[m]}},
        row{1} = {font=\bfseries},
        vspan = even
    }
        \toprule
        Research group & Ref & Common attributes & features noted \\\midrule
        (Yasir et al., 2020)   & [1]          &
          \SetCell[r=3]{halign=l, valign=h} \lipsum[1][1-2]
          &
          \SetCell[r=3]{halign=l, valign=h} \lipsum[1][1-2]\\
        (Yasir et al., 2020)    & [1]          &                            &                         \\
        (Yasir et al., 2020)    & [1]          &                            &                         \\ \midrule
        (Yasir et al., 2020)    & [1]          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]
          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]\\
        (Yasir et al., 2020)    & [1]          &                            &                         \\ \midrule
        (Yasir et al., 2020)    & [1]          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]
          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]\\
        (Yasir et al., 2020)    & [1]          &                            &                         \\ \midrule
        (Yasir et al., 2020)    & [1]          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]
          &
          \SetCell[r=2]{halign=l, valign=h} \lipsum[1][1-2]\\
        (Yasir et al., 2020)    & [1]          &                            &                         \\
        \bottomrule
    \end{tblr}%
\end{table}
\end{document}

Edit (according to OP's comment): A table with lists using Ulrike Fischer's answer here.

\documentclass{article}

\usepackage{tabularray}
\usepackage{enumitem}
\usepackage{lipsum}
\UseTblrLibrary{booktabs}

%to remove space from top of the list
\makeatletter
\newcommand\novspace{\@minipagetrue}
\makeatother

\begin{document}
\begin{table}
\caption{}
\label{tab:my-table}
    \begin{tblr}{
        width = \textwidth,
        stretch = 1.5,
        % vlines, %uncomment if you want vertical lines
        colspec={X[0.5,m] Q[c,m] *{2}{X[c,m]}},
        row{1} = {font=\bfseries},
        vspan = even
    }
        \toprule
        Research group & Ref & Common attributes & features noted \\\midrule
        (Yasir et al., 2020)   & [1]          &
          \SetCell[r=9]{halign=l, valign=h} 
          \parbox[t]{\linewidth}{\novspace %to remove space from the bottom of the list
          \begin{itemize}[leftmargin=*]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
          \end{itemize}}
          &
          \SetCell[r=9]{halign=l, valign=h} 
          \parbox[t]{\linewidth}{\novspace
          \begin{itemize}[leftmargin=*]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
              \item \lipsum[1][1-3]
          \end{itemize}}\\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2} 
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\cmidrule{1-2}
        (Yasir et al., 2020)    & [1] & & \\\bottomrule
    \end{tblr}%
\end{table}
\end{document}

enter image description here