1

I can't find out how to split my table into 2 pages! I tried longtable package, but nothing worked.

My table contains many rows.

    \documentclass[12pt]{report}
    \usepackage[utf8]{inputenc} 
    \usepackage[T1]{fontenc} 

    \usepackage{booktabs}
    \usepackage{tabularx}
    \usepackage{adjustbox}
    \usepackage{multirow}
    \begin{document}

    \begin{table}[htbp]
    \centering
    \begin{tabularx}{\linewidth}{|l|X|X|X|}
     \hline % horizontal line and | for vertical line %
     \multicolumn{1}{|c|}{\textbf{characteristics}}         & \multicolumn{1}{c|}{\textbf{sub-characteristics}}&\multicolumn{1}{c|}{\textbf{metrics}} &\multicolumn{1}{c|}{\textbf{citation}}
         \tabularnewline\hline \hline 

    \multirow{ 6}{*}{Effectiveness(hight)} & 
        -Minimal memory load(low) &&  QUIM model 
        &\ &
         -Minimal memory load(low) && QUIM model
         &\ &
         -Minimal memory load(low) &&
         &\ &
         -Minimal memory load(low) &&
         &\ &
         -Minimal memory load(low) &&
         &\ &
        -Minimal memory load(low) &&
         &\ &
         -Minimal memory load(low) &&QUIM&
        \tabularnewline\hline

    \multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline


       \multirow{ 8}{*}{ efficiency(hight)}& -Minimal memory load(low) & &  QUIM model
        & \ &
        -Minimal memory load(low) & &QUIM 
        & \ &
        -Minimal memory load(low) & &QUIM
        &\ &
       -Minimal memory load(low) & &QUIM
        & \ &
        -Minimal memory load(low) & &QUIM
        & \ &
        -Minimal memory load(low) & & QUIM
        & \ & 
        -Minimal memory load(low) & & QUIM
        & \ &
        -Minimal memory load(low) & &QUIM &
        \tabularnewline\hline

       \multirow{ 2}{*}{User error protection} & & & &
        \tabularnewline\hline 

       \multirow{ 11}{*}{ Usefulness} &&&
       &\ &
       -Flexibility && 
       &\ &
        -Flexibility && 
       &\ &
        -Flexibility &&
       &\ &
        -Flexibility &&
       &\ &
        -Flexibility &&
       &\ &
       -Flexibility &&
       &\ &
        -Flexibility &&
       &\ &
        -Flexibility &&
       &\ &
        -Flexibility &&
       &\ &
        -Flexibility && QUIM & 
            \tabularnewline\hline

        \multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline
        \multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline
        \multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline

\multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline

\multirow{ 7}{*}{Satisfaction}& -Attractiveness & &QUIM model
        &\ & 
        -Attractiveness & &QUIM model 
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & &
        & \ &
        -Attractiveness & & &

        \tabularnewline\hline


     \end{tabularx} 
      \caption{A list of usability criteria }
    \label{table:usability criteria}   
    \end{table} 
    \end{document}
3
  • Instead \begin{table} ... \end{table} use begin{longtable}{<columns type} ...\end{longtable}, remove tabularx, replace X column type with p{...} and consolidate number of columns. For this you need to add \usepackage{longtable} in document preamble.
    – Zarko
    Commented Apr 8, 2017 at 13:36
  • 2
    What are all those & \ &? The number of &does not correspond to the declared number of columns.
    – Bernard
    Commented Apr 8, 2017 at 14:13
  • 1
    Please add a screenshot or a sketch to your question, showing how the layout of the resulting table should be ...
    – Mensch
    Commented Apr 8, 2017 at 21:42

1 Answer 1

1

Here's a highly imperfect attempt to convert your code to something that can fit into a longtable environment. I say "highly imperfect" because I had to make a lot of design decisions, such as (a) what to make of all the instances of "& \ &" and (b) assigning equal widths to the four columns. I've also gotten rid of all \multirow wrappers.

The following screenshot shows just the first few rows of the longtable.

enter image description here

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[letterpaper,margin=1in]{geometry} % set page parameters appropriately

\usepackage{booktabs,longtable,array,ragged2e}
\newlength\mylen
\setlength{\mylen}{\dimexpr0.25\textwidth-1.5\tabcolsep}
\newcolumntype{P}{>{\RaggedRight\arraybackslash}p{\mylen}}
\begin{document}

\begin{longtable}{@{} *{4}{P} @{}}
\caption{A list of usability criteria } \label{tab:criteria}
\label{table:usability criteria}\\
\toprule 
\textbf{Characteristics} & 
\textbf{Subcharacter\-istics}&
\textbf{Metrics} &
\textbf{Citation} \\
\midrule
\endfirsthead

\multicolumn{4}{c}{Table \ref{tab:criteria}, cont'd}\\
\addlinespace
\toprule 
\textbf{Characteristics} & 
\textbf{Subcharacter\-istics}&
\textbf{Metrics} &
\textbf{Citation} \\
\midrule
\endhead

\midrule
\endfoot
\bottomrule
\endlastfoot


     Effectiveness (height) & 
     -Minimal memory load (low) &&  QUIM model 
     \\
     &-Minimal memory load (low) && QUIM model
     \\
     &-Minimal memory load (low) &
     \\
     &-Minimal memory load (low) &
     \\
     &-Minimal memory load (low) &
     \\
     &-Minimal memory load (low) &
     \\
     &-Minimal memory load (low) &&QUIM
     \\
     \midrule

    Satisfaction & -Attractiveness & &QUIM model
    \\ 
    &-Attractiveness & &QUIM model 
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & & 

    \\
    \midrule

    Efficiency (height) 
    & -Minimal memory load (low) & &  QUIM model
    \\
    &-Minimal memory load (low) & &QUIM 
    \\
    &-Minimal memory load (low) & &QUIM
    \\
    &-Minimal memory load (low) & &QUIM
    \\
    &-Minimal memory load (low) & &QUIM
    \\
    &-Minimal memory load (low) & & QUIM
    \\ 
    &-Minimal memory load (low) & & QUIM
    \\
    &-Minimal memory load (low) & &QUIM 
    \\
    \midrule

    User error protection 
    \\
    \midrule 

    Usefulness
    &-Flexibility && 
    \\
    &-Flexibility && 
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility &&
    \\
    &-Flexibility && QUIM 
    \\
    \midrule

    Satisfaction& -Attractiveness & &QUIM model
    \\ 
    &-Attractiveness & &QUIM model 
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    \midrule

    Satisfaction& -Attractiveness & &QUIM model
    \\ 
    &-Attractiveness & &QUIM model 
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    \midrule

    Satisfaction& -Attractiveness &&QUIM model
    \\ 
    &-Attractiveness & &QUIM model 
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & & 
    \\
    \midrule

    Satisfaction& -Attractiveness & &QUIM model
    \\ 
    &-Attractiveness & &QUIM model 
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & &
    \\
    &-Attractiveness & & 
    \\

\end{longtable}
\end{document}
1
  • Appreciate your efforts @Mico ! , is just what i need .
    – S-Deniz
    Commented Apr 9, 2017 at 9:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .