Großer Text, der in Longtable + Multirow mit Overfull \ vbox auf die untere Zelle überläuft

Dec 11 2020

Ich bin ziemlich neu in LaTeX und es fällt mir wirklich schwer, eine Tabelle zu schreiben, die großen Text in LaTeX enthält.

Mein Ziel ist es, eine Tabelle mit 7 Spalten und 17 Zeilen zu zeichnen. Jede Zeile ist in zwei Zeilen mit zwei Zeilen unterteilt, die sich über die Spalten 2 bis 4 erstrecken. Einige Zellen in den Spalten 5, 6 und 7 erstrecken sich über zwei Zeilen, um sich wiederholenden Text zu reduzieren (siehe Abbildung unten).

Da die Tabelle zu groß ist, um in eine Seite zu passen, verwende ich das Longtable- Paket. Um das Aussehen der Tabelle zu optimieren, verwende ich zusätzlich die Pakete lscape ( Querformat ), Array und Multirow , um das Aussehen der zu optimieren Tabelle und für die Anordnung einiger mehrspaltiger Zellen.

Die Sache ist, dass einige Zellen, die großen Text enthalten, in die Zellen darunter überlaufen, anstatt die Höhe ihrer Zeile zu strecken. Dieses Problem scheint nicht aufzutreten, wenn der multirow{}{}{}Befehl nicht verwendet wird .

Ich habe in diesem und anderen Foren weit und breit nach der Lösung gesucht und auch die oben genannten Pakethandbücher (plus Tabellen usw.) überflogen , aber nachdem ich mehr Registerkarten geöffnet habe, als ich zugeben möchte, gebe ich auf. Ein Vorschlag könnte sein, das Gesamtdesign der Tabelle zu ändern oder sie sogar in kleinere Spaltenblöcke aufzuteilen, aber ich habe keine Wahl. Die Tabelle sieht in PDF nach dem Exportieren aus Excel OK aus, sodass ich sie \includepdfaus Paket- PDF-Seiten verwenden könnte , aber dies wäre ein letzter Ausweg.

Das Bild unten ist ein Beispiel dafür, wie die ersten Zeilen meiner Tabelle in Excel aussehen würden:

Die folgende MWE verwendet das Paket Lipsum zeitweise, um einen Dummy-Platzhaltertext (anstelle des Originals) zu generieren:

\documentclass{article}
\usepackage{longtable}
\usepackage{array}
\usepackage{multirow}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage{lscape}
\usepackage{lipsum} % For dummy text
\begin{document}
\newcommand\columnA{0.2\textwidth}
\newcommand\columnB{0.11\textwidth}
\newcommand\columnC{0.13\textwidth}
\newcommand\columnD{0.13\textwidth}
\newcommand\columnE{0.13\textwidth}
\newcommand\columnF{0.3\textwidth}
\newcommand\columnG{0.13\textwidth}
\begin{landscape}
\begin{small}
\begin{longtable}[c]{@{\extracolsep{\fill}}
    >{\raggedright\arraybackslash}m{\columnA}
    >{\centering\arraybackslash}m{\columnB}
    >{\centering\arraybackslash}m{\columnC}
    >{\centering\arraybackslash}m{\columnD}
    >{\centering\arraybackslash}m{\columnE}
    >{\centering\arraybackslash}m{\columnF}
    >{\centering\arraybackslash}m{\columnG}
    @{}}
\caption{A very big ugly table.\label{table1}}\\

\multirow{2}{\columnA}{\textbf{Study design}} & \multicolumn{3}{c}{\textbf{Participants}} & \multirow{2}{\columnE}{\textbf{Device name (Control options)}} & \multirow{2}{\columnF}{\textbf{User-environment interaction}} & \multirow{2}{\columnG}{\textbf{Type of outcomes assessed}} \\ \cline{2-4}
& \textbf{N} & \textbf{Description*} & \textbf{Diagnosis} & & & \\ \hline
\multicolumn{7}{c}{\textbf{Some category here}} \\ \hline
\endfirsthead
% additional pages' table head rows go here
\endhead
% additional pages' table foot rows go here...
\endfoot
\hline
\multicolumn{7}{l}{Table foot row 1}\\
\multicolumn{7}{l}{* Another foot row 2 \lipsum[10][2] }\\
\endlastfoot

\multirow{2}{\columnA}{Row 1 \lipsum[1][1]} & \textbf{Cases: 4} & \lipsum[1][2] & \lipsum[1][3] & \multirow{2}{\columnE}{\lipsum[1][4]} & \multirow{2}{\columnF}{\lipsum[1][5]} & \multirow{2}{\columnG}{\lipsum[1][6]} \\
& \textbf{Controls: 4} & Not reported & Just three words & & & \\
\multirow{2}{0.2\textwidth}{Row 2 \lipsum[2][1-2]} & \textbf{Cases: 10} & \lipsum[2][2] & \lipsum[2][3] & \multirow{4}{\columnE}{Quite long multirow tex:t \lipsum[2][4]} & \multirow{4}{\columnF}{Super long text \lipsum[2][1-15]} & \multirow{2}{\columnG}{\lipsum[2][6]} \\
& \textbf{Controls: -} & - & - & & & \\
\multirow{2}{\columnA}{Row 3 \lipsum[3][1]} & \textbf{Cases: 1} & two words & some more & & & \multirow{2}{\columnE}{Not that many words here either} \\
& \textbf{Controls: -} & - & - & & & \\
\multirow{2}{\columnA}{Row 4 \lipsum[4][1]} & \textbf{Cases: 9} & \lipsum[4][5] & Good & \multirow{2}{\columnE}{Couple of words} & \multirow{4}{\columnF}{Another short phrase with few words} & \multirow{2}{\columnG}{Yet another short text \& Only two words} \\
& \textbf{Controls: 20} & \lipsum[4][7] & Two words again & & & \\
\multirow{2}{\columnA}{Row 5 \lipsum[5][1-3]} & \textbf{Cases: 4} & something short & Bad & \multirow{2}{\columnE}{Something relatively short but not tiny} & & \multirow{2}{\columnG}{Again, something not that long} \\
& \textbf{Controls: -} & - & - & & & \\
\multirow{2}{\columnA}{Row 6 \lipsum[6][1]} & \textbf{Cases: 3} & \lipsum[6][2] & \lipsum[6][3] & \multirow{2}{\columnE}{\lipsum[6][4]} & \multirow{2}{\columnF}{\lipsum[6][5-10]} & \multirow{2}{\columnG}{Learning skills} \\
& \textbf{Controls: 3} & Short text & A few words & & & \\
\end{longtable}
\end{small}
\end{landscape}
\end{document}

Und das ist die Ausgabe:

Ich habe die Lösungen aus diesen und vielen anderen ähnlichen Fragen ausprobiert, aber ich konnte keine funktionierenden Lösungen reproduzieren und oder ich habe einen Punkt erreicht, an dem ich Kompilierungsfehler gefunden habe und nicht weiter in den Kaninchenbau gelangen konnte:

mehrzeilig mit wortumschlossenen Spalten in Longtable

Wie implementiere ich eine Tabelle mit einigen Zellen mit langen Texten?

Zentrieren Sie mehrzeiligen Text und platzieren Sie ihn auf jeder Seite in Longtabu, wenn die Seite bricht

Ich bin neu hier, daher ist jede Kritik an der Art und Weise, wie ich den Beitrag oder die Frage selbst geschrieben habe, willkommen, und ich werde sie bei Bedarf gerne erneut bearbeiten. Danke im Voraus!

Antworten

Zarko Dec 11 2020 at 09:08
  • vorgeschlagene Lösung imitieren excelBild (in dieser komplexen strukturierten Tabelle hat dies einen Sinn)
  • Anstelle des m{...}Spaltentyps schlage ich vor, lieber den p{...}Typ zu verwenden
  • Da es sich bei einigen Zellen um ziemlich langen, mehrzeiligen Text handelt, ist es sinnvoll, beispielsweise eine kleinere Schriftgröße zu verwenden \small
  • Für horizontale Regeln werden Regeln verwendet Xhlineund XclineRegeln im makecell-Paket definiert
  • Für mehr vertikalen Raum um den Zelleninhalt wird ein \makegapedcellsim makecellPaket definiertes Makro verwendet
  • Stattdessen werden definierte Befehle für Spaltentyp und -breite als neuer Spaltentyp definiert, der einen einfach vorgeschriebenen Anteil der Tabellenbreite ermöglicht (im Querformat wird davon ausgegangen, dass dies gleich ist \textheight).
  • In eine leere Zelle wird eine Regel eingefügt, die ihre Höhe definiert (siehe MWE unten).
  • denn multirowZellen gelten als Sinax\multirow[t]{<number of spanned lines>}{=}{<content>}
  • for cell \multicolumn{7}{|c|}{\textbf{Some category}}ist nicht klar, ob es Teil von Tabellenüberschriften mit fester Groß- / Kleinschreibung in jeder Überschrift ist oder an einer beliebigen Stelle in die Tabelle mit entsprechendem Text eingefügt werden kann (in MWE wird dies als früherer Fall betrachtet)

MWE:

\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{ragged2e}
\usepackage{array, longtable, 
            makecell,   % new
            multirow}
\renewcommand\theadfont{\footnotesize\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}}p{\dimexpr#1\linewidth-2\tabcolsep-\arrayrulewidth}}


\usepackage{pdflscape}
\usepackage{lipsum} % For dummy text

\begin{document}
    \begin{landscape}
    \vfil
\setcellgapes{3pt}
\makegapedcells
\small\linespread{0.84}\selectfont  % <---
\setlength\tabcolsep{2pt}
\begin{longtable}[c]{| 
                     L{0.13}| L{0.09} | L{0.09}| L{0.08}|  L{0.12}| L{0.36}| L{0.13}|
                     }
\caption{A very big ugly table.}
\label{table1}                                                                      \\
    \Xhline{1.2pt}
\multirow{2.8}{=}{\thead{Study\\ design}}
    &   \multicolumn{3}{c|}{\thead{Participants}}
                &   \multirow{2.8}{=}{\thead{Device name\\ (Control options)}}
                    &   \multirow{2.8}{=}{\thead{User-environment\\ interaction}}
                        &   \multirow{2.8}{=}{\thead{Type of outcomes\\ assessed}}  \\
    \Xcline{2-4}{0.6pt}
    &   \thead{N} 
        &   \thead{Description*} 
            &   \thead{Diagnosis} 
                &   &   &                                                           \\ 
    \Xhline{0.6pt}
\multicolumn{7}{c}{\textbf{Some category}}                                          \\
    \Xhline{0.6pt}
\endfirsthead
\caption[]{A very big ugly table.}                                                  \\
    \Xhline{1.2pt}
\multirow{2.8}{=}{\thead{Study\\ design}}
    &   \multicolumn{3}{c|}{\thead{Participants}}
                &   \multirow{2.8}{=}{\thead{Device name\\ (Control options)}}
                    &   \multirow{2.8}{=}{\thead{User-environment\\ interaction}}
                        &   \multirow{2.8}{=}{\thead{Type of outcomes\\ assessed}}  \\
    \Xcline{2-4}{0.6pt}
    &   \thead{N}
        &   \thead{Description*}
            &   \thead{Diagnosis}
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multicolumn{7}{c}{\textbf{Some category}}                                          \\
    \Xhline{0.6pt}
\endhead
    \multicolumn{7}{r}{\footnotesize\itshape{Continue is on the next page}}         %?
\endfoot
    \Xhline{1.2pt}
\endlastfoot
% table body
\multirow[t]{5}{=}{Row 1 \lipsum[1][1]} 
    & \textbf{Cases: 4}
        &   \lipsum[1][2] 
            &   \lipsum[1][3] 
                &   \lipsum[1][4] 
                    & \lipsum[1][5] 
                        &   \multirow[t]{5}{=}{\lipsum[1][6]}                       \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: 4} 
        &   Not reported 
            &   Just three words 
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow[t]{8}{=}{Row 2 \lipsum[2][1-2]} 
    &   \textbf{Cases: 10}
        &   \lipsum[2][2]
            &   \lipsum[2][3]
                &   \multirow[t]{22}{=}{Quite long multi line text \lipsum[2][4]}
                    &   \multirow[t]{11}{=}{Super long text \lipsum*[2][1-15]}
                        &   \multirow[t]{7}{=}{\lipsum[2][6]}                       \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: -}
        &   \hfil ---
            &   \hfil \centering ---
                &   &   &                                                           \\                                                         
    \Xcline{1-4}{0.6pt}
    \Xcline{7-7}{0.6pt}
\multirow[t]{2}{=}{Row 3 \lipsum[3][1]}
    & \textbf{Cases: 1}
        & two words
            & some more
                &   &   &   \multirow[t]{2}{=}{Not that many words here either}     \\
    \Xcline{2-4}{0.6pt}
    & \textbf{Controls: -}
        & \hfil ---
            & \hfil ---
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow[t]{3}{=}{Row 4 \lipsum[4][1]}
    &   \textbf{Cases: 9}
        &   \lipsum[4][5]
            &   Good
                &   Couple of words
                    &   Another short phrase with few words
                        &   \multirow[t]{3}{=}{Yet another short
                                               text \& Only two words}               \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: 20}
        &   \lipsum[4][7]
            &   Two words again
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow[t]{8}{=}{Row 5 \lipsum[5][1-3]}
    &   \multirow{2}{=}{\textbf{Cases: 4}}
        &   \multirow{2}{=}{something short}
            &   \multirow{2}{=}{Bad}
                &   \multirow{2}{=}{Something relatively short but not tiny}
                    &   \rule[-5.5\baselineskip]{0pt}{-0pt}   % <--- define empty cell height
                        & \multirow{2}{=}{Again, something not that long}           \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: -}
        & - & - &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow[t]{7}{=}{Row 6 \lipsum[6][1]}
    &   \textbf{Cases: 3}
        &   \lipsum[6][2]
            &   \lipsum[6][3]
                &   \multirow[t]{7}{=}{\lipsum[6][4]}
                    &   \multirow[t]{7}{=}{\lipsum*[6][5-10]}
                        & \multirow[t]{7}{=}{Learning skills}                          \\
     \Xcline{2-4}{0.6pt}
    &   {\textbf{Controls: 3}}
        &   {Short text }
            &   {A few words }
                &   &   &                                                           \\
\end{longtable}
    \end{landscape}
\end{document}

Für die endgültige Tabellenform müssen Sie MWE aufgrund von longtablemindestens zweimaligen Funktionen kompilieren .

Nachtrag:

  • Version unter Verwendung des m{...}Spaltentyps. Es wird immer noch ein makgapedcellsMakro verwendet, aber Ulrike Fisher ( Patch ) wird hinzugefügt , wodurch es für den Spaltentyp funktioniert m.

  • Aufgrund des reduzierten Zwischenraumes erfordert diese Lösung eine erhebliche manuelle Abstimmung:

\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{ragged2e}
\usepackage{array, longtable,
            makecell,   % new
            multirow}
\renewcommand\theadfont{\footnotesize\bfseries}
\makeatletter
\renewcommand\mcell@classz{\@classx
   \@tempcnta \count@
   \prepnext@tok
   \@addtopreamble{%\mcell@mstyle
      \ifcase\@chnum
         \hfil
         \mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
         \hskip1sp
         \mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
         \hfil\hskip1sp
         \mcell@agape{\d@llarbegin \insert@column\d@llarend}\or
         \mcell@agape{$\vcenter \@startpbox{\@nextchar}\insert@column\@endpbox$}\or
         \mcell@agape{\vtop
         \@startpbox{\@nextchar}\insert@column\@endpbox}\or
         \mcell@agape{\vbox
        \@startpbox{\@nextchar}\insert@column\@endpbox}%
      \fi
      \global\let\mcell@left\relax\global\let\mcell@right\relax
    }\prepnext@tok}
\makeatother
\renewcommand\theadgape{}

\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}}m{\dimexpr#1\linewidth-2\tabcolsep-\arrayrulewidth}}


\usepackage{pdflscape}
\usepackage{lipsum} % For dummy text

\begin{document}
    \begin{landscape}
    \vfil
\setcellgapes{3pt}
\makegapedcells
\small\linespread{0.84}\selectfont  % <---
\setlength\tabcolsep{2pt}
\begin{longtable}[c]{|
                     L{0.13}| L{0.09} | L{0.09}| L{0.08}|  L{0.12}| L{0.36}| L{0.13}|
                     }
\caption{A very big ugly table.}
\label{table1}                                                                      \\
    \Xhline{1.2pt}
\multirow{2.8}{=}{\thead{Study\\ design}}
    &   \multicolumn{3}{c|}{\thead{Participants}}
                &   \multirow{2.8}{=}{\thead{Device name\\ (Control options)}}
                    &   \multirow{2.8}{=}{\thead{User-environment\\ interaction}}
                        &   \multirow{2.8}{=}{\thead{Type of outcomes\\ assessed}}  \\
    \Xcline{2-4}{0.6pt}
    &   \thead{N}
        &   \thead{Description*}
            &   \thead{Diagnosis}
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multicolumn{7}{c}{\textbf{Some category}}                                          \\
    \Xhline{0.6pt}
\endfirsthead
\caption[]{A very big ugly table.}                                                  \\
    \Xhline{1.2pt}
\multirow{2.8}{=}{\thead{Study\\ design}}
    &   \multicolumn{3}{c|}{\thead{Participants}}
                &   \multirow{2.8}{=}{\thead{Device name\\ (Control options)}}
                    &   \multirow{2.8}{=}{\thead{User-environment\\ interaction}}
                        &   \multirow{2.8}{=}{\thead{Type of outcomes\\ assessed}}  \\
    \Xcline{2-4}{0.6pt}
    &   \thead{N}
        &   \thead{Description*}
            &   \thead{Diagnosis}
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multicolumn{7}{c}{\textbf{Some category}}                                          \\
    \Xhline{0.6pt}
\endhead
    \multicolumn{7}{r}{\footnotesize\itshape{Continue is on the next page}}         %?
\endfoot
    \Xhline{1.2pt}
\endlastfoot
% table body
\multirow{4}{=}{Row 1 \lipsum[1][1]}
    & \textbf{Cases: 4}
        &   \lipsum[1][2]
            &   \lipsum[1][3]
                &   \multirow{4}{=}[1ex]{\lipsum[1][4]}
                    & \multirow{4}{=}{\lipsum[1][5]}
                        &   \multirow{-2}{=}{\lipsum[1][6]}                       \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: 4}
        &   Not reported
            &   Just three words
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow{-2}{=}[2ex]{Row 2 \lipsum[2][1-2]}
    &   \textbf{Cases: 10}
        &   \lipsum[2][2]
            &   \lipsum[2][3]
                &   \multirow{-2.4}{=}{Quite long multi line text \lipsum[2][4]}
                    &   \multirow{-3.3}{=}{Super long text \lipsum*[2][1-15]}
                        &   \multirow{3.3}{=}{\lipsum[2][6]}                       \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: -}
        &   \hfil ---
            &   \hfil \centering ---
                &   &   &                                                           \\
    \Xcline{1-4}{0.6pt}
    \Xcline{7-7}{0.6pt}
\multirow{2}{=}{Row 3 \lipsum[3][1]}
    & \textbf{Cases: 1}
        & two words
            & some more
                &   &   &   \multirow{2}{=}{Not that many words here either}     \\
    \Xcline{2-4}{0.6pt}
    & \textbf{Controls: -}
        & \hfil ---
            & \hfil ---
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow{3}{=}{Row 4 \lipsum[4][1]}
    &   \textbf{Cases: 9}
        &   \lipsum[4][5]
            &   Good
                &   \multirow{4}{=}{Couple of words}
                    &   \multirow{4}{=}{Another short phrase with few words}
                        &   \multirow{4}{=}{Yet another short
                                               text \& Only two words}               \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: 20}
        &   \lipsum[4][7]
            &   Two words again
                &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow{-3.4}{=}{Row 5 \lipsum[5][1-3]}
    &   \multirow{2}{=}{\textbf{Cases: 4}}
        &   \multirow{2}{=}{something short}
            &   \multirow{2}{=}{Bad}
                &   \multirow{2}{=}{Something relatively short but not tiny}
                    &   \rule[-5.5\baselineskip]{0pt}{-0pt}   % <--- define empty cell height
                        & \multirow{3}{=}{Again, something not that long}           \\
    \Xcline{2-4}{0.6pt}
    &   \textbf{Controls: -}
        & - & - &   &   &                                                           \\
    \Xhline{0.6pt}
\multirow{4}{=}{Row 6 \lipsum[6][1]}
    &   \textbf{Cases: 3}
        &   \lipsum[6][2]
            &   \lipsum[6][3]
                &   \multirow{4}{=}{\lipsum[6][4]}
                    &   \multirow{-2}{=}{\lipsum*[6][5-10]}
                        & \multirow{3}{=}{Learning skills}                          \\
     \Xcline{2-4}{0.6pt}
    &   {\textbf{Controls: 3}}
        &   {Short text }
            &   {A few words }
                &   &   &                                                           \\
\end{longtable}
    \end{landscape}
\end{document}

SimonDispa Dec 11 2020 at 03:34

Dies ist möglicherweise nicht die beste Antwort, hilft Ihnen jedoch dabei, die Probleme zu erkennen.

Zuerst habe ich hinzugefügt booktabs, immer nützlich für bessere Zeilenabstände und Regeln und pdflscapeum die Landschaftstabelle horizontal im Monitor sehen zu können, um das Debuggen zu vereinfachen. Außerdem wurden einige \cmidrule{1-7}für die visuelle Gruppierung von Cases and Controls-Zeilen hinzugefügt .

Dies war nicht genug, also fügte ich manuell (der Schwachpunkt hier) einen vertikalen Raum am Ende der höheren Reihen hinzu, ähnlich [70pt]und ähnlich. Ich weiß nicht, ob es eine bessere Lösung gibt.

Schließlich habe ich einige \ pagebreak hinzugefügt, um die Seite an der richtigen Stelle zu brechen und Fälle und Steuerelemente zusammenzuhalten, anstatt longtableentscheiden zu müssen.

Ich habe auch die Kopfzeile bereinigt und den Spaltentyp so geändert p, dass in den meisten Zellen ein Text mit der oberen Ausrichtung angezeigt wird.

\documentclass{article}
\usepackage{longtable}
\usepackage{array}
\usepackage{multirow}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
%\usepackage{lscape}
\usepackage{lipsum} % For dummy text

\RequirePackage{pdflscape} % added
\RequirePackage{booktabs} % added   
\RequirePackage{bigstrut} % added
    
\begin{document}
    \newcommand\columnA{0.2\textwidth}
    \newcommand\columnB{0.11\textwidth}
    \newcommand\columnC{0.13\textwidth}
    \newcommand\columnD{0.13\textwidth}
    \newcommand\columnE{0.13\textwidth}
    \newcommand\columnF{0.3\textwidth}
    \newcommand\columnG{0.13\textwidth}     

    \begin{landscape}
        \begin{small}
            \begin{longtable}[c]{@{\extracolsep{\fill}}
                    >{\raggedright\arraybackslash}p{\columnA}
                    >{\centering\arraybackslash}p{\columnB}
                    >{\centering\arraybackslash}p{\columnC}
                    >{\centering\arraybackslash}p{\columnD}
                    >{\centering\arraybackslash}p{\columnE}
                    >{\centering\arraybackslash}p{\columnF}
                    >{\centering\arraybackslash}p{\columnG}
                    @{}}
                \caption{A very big ugly table.\label{table1}}\\
                \toprule    
                \multicolumn{1}{c}{\multirow{2}[4]{\columnA}{\textbf{Study design}}} &
                \multicolumn{3}{c}{\multirow{2}[-1]{*}{\textbf{Participants}}} & 
                \multirow{2}[4]{70pt}{\textbf{Device Name (control options)}} & 
                \multirow{2}[4]{\columnF}{\textbf{User-enviroment interaction}} & 
                \multirow{2}[4]{\columnG}{\textbf{Type of outcomes assesed}} \bigstrut[t]\\[10pt]
                \cline{2-4}     
                & \textbf{N }    & \textbf{Description*} & \textbf{Diagnosis} &       &       &  \bigstrut\\
                \midrule
                \multicolumn{7}{c}{\textbf{Some category}} \bigstrut[t]\\
                \midrule

                \endfirsthead
                
                \toprule    
                \multicolumn{1}{c}{\multirow{2}[4]{\columnA}{\textbf{Study design}}} &
                \multicolumn{3}{c}{\multirow{2}[-1]{*}{\textbf{Participants}}} & 
                \multirow{2}[4]{70pt}{\textbf{Device Name (control options)}} & 
                \multirow{2}[4]{\columnF}{\textbf{User-enviroment interaction}} & 
                \multirow{2}[4]{\columnG}{\textbf{Type of outcomes assesed}} \bigstrut[t]\\[10pt]
                \cline{2-4}     
                & \textbf{N }    & \textbf{Description*} & \textbf{Diagnosis} &       &       &  \bigstrut\\
                \midrule
                \multicolumn{7}{c}{\textbf{Some category}} \bigstrut[t]\\
                \midrule
                \endhead
                
                \multicolumn{7}{r}{\footnotesize \emph{to be continued in the next page \ldots{} }} \\ 
                \endfoot            
                \bottomrule
                \endlastfoot        
                
                \multirow{2}{\columnA}{Row 1 \lipsum[1][1]} & \textbf{Cases: 4} & \lipsum[1][2] & \lipsum[1][3] & \multirow{2}{\columnE}{\lipsum[2][4]} & \multirow{2}{\columnF}{\lipsum[2][4]} & \multirow{2}{\columnG}{\lipsum[1][6]} \\ [60pt]
                & \textbf{Controls: 4} & Not reported & Just three words & & & \\
                 \cmidrule{1-7} 
                \multirow{2}{0.2\textwidth}{Row 2 \lipsum[2][1-2]} & \textbf{Cases: 10} & \lipsum[2][2] & \lipsum[2][3] & \multirow{4}{\columnE}{Quite long multirow tex:t \lipsum[2][4]} & \multirow{4}{\columnF}{Super long text \lipsum[2][1-15]} & \multirow{2}{\columnG}{\lipsum[2][6]} \\[90pt]
                & \textbf{Controls: -} & - & - & & & \\ [80pt]
                \cmidrule{1-7} 
                \pagebreak
                \multirow{2}{\columnA}{Row 3 \lipsum[3][1]} & \textbf{Cases: 1} & two words & some more & & & \multirow{2}{\columnE}{Not that many words here either} \\[20pt]
                \textbf{Controls: -} & - & - & & & \\ [20pt]
                 \cmidrule{1-7} 
                \multirow{2}{\columnA}{Row 4 \lipsum[4][1]} & \textbf{Cases: 9} & \lipsum[2][5] & Good & \multirow{1}{\columnE}{Couple of words} & \multirow{1}{\columnF}{Another short phrase with few words} & \multirow{2}{\columnG}{Yet another short text \& Only two words } \\
                & \textbf{Controls: 20} & \lipsum[4][7] & Two words again & & & \\[20pt]
                \cmidrule{1-7} 
                \multirow{2}{\columnA}{Row 5 \lipsum[5][1-3]} & \textbf{Cases: 4} & something short & Bad & \multirow{2}{\columnE}{Something relatively short but not tiny} & & \multirow{2}{\columnG}{Again, something not that long} \\[40pt]
                & \textbf{Controls: -} & - & - & & & \\[30pt] 
                \cmidrule{1-7} 
                \pagebreak
                \multirow{2}{\columnA}{Row 6 \lipsum[6][1]} & \textbf{Cases: 3} & \lipsum[6][2] & \lipsum[6][3] & \multirow{2}{\columnE}{\lipsum[6][4]} & \multirow{2}{\columnF}{\lipsum[6][5-10]} & \multirow{2}{\columnG}{Learning skills} \\[60pt]
                & \textbf{Controls: 3} & Short text & A few words & & & \\[20pt]  
            \end{longtable}
        \end{small}
    \end{landscape}
\end{document}