[Tex/LaTex] Fit a long table on multiple pages

longtabletablestabularx

I have this table that it ok for the width but not for the height. How can I split into two different pages? I tried using longtable but I got so many errors.

I put an example of a long table taken on the net on this link

I also put the code here

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}

\title{Your Paper}

\author{You}

\date{\today}

\begin{document}
\maketitle

\begin{table}[h]
\begin{tabularx}{\linewidth}{|X|X|X|}

\hline
\textbf{Screen Charateristics} & \textbf{Qualifier} & \textbf{Description}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         \\ \hline
\multirow{4}{*}{Size}          & small              & Resources for small size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & normal             & Resources for normal size screens. (This is the baseline size.)                                                                                                                                                                                                                                                                                                                                                                                                                                              \\ \cline{2-3} 
                               & large              & Resources for large size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & xlarge             & Resources for extra-large size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      \\ \hline
\multirow{8}{*}{Density}       & ldpi               & Resources for low-density (ldpi) screens (~120dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                          \\ \cline{2-3} 
                               & mdpi               & Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)                                                                                                                                                                                                                                                                                                                                                                                                                       \\ \cline{2-3} 
                               & hdpi               & Resources for high-density (hdpi) screens (~240dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                         \\ \cline{2-3} 
                               & xhdpi              & Resources for extra-high-density (xhdpi) screens (~320dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                  \\ \cline{2-3} 
                               & xxhdpi             & Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                           \\ \cline{2-3} 
                               & xxxhdpi            & Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi). Use this for the launcher icon only, see note above.                                                                                                                                                                                                                                                                                                                                                                                  \\ \cline{2-3} 
                               & nodpi              & Resources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & tvdpi              & Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a ``primary'' density group. It is mostly intended for televisions and most apps shouldn't need it-providing mdpi and hdpi resources is sufficient for most apps and the system will scale them as appropriate. If you find it necessary to provide tvdpi resources, you should size them at a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi. \\ \hline
Orientation                    & land               & Resources for screens in the landscape orientation (wide aspect ratio).                                                                                                                                                                                                                                                                                                                                                                                                                                      \\ \hline
                               & port               & Resources for screens in the portrait orientation (tall aspect ratio).                                                                                                                                                                                                                                                                                                                                                                                                                                       \\ \hline
\multirow{2}{*}{Aspect Ratio}  & long               & Resources for screens that have a significantly taller or wider aspect ratio (when in portrait or landscape orientation, respectively) than the baseline screen configuration.                                                                                                                                                                                                                                                                                                                               \\ \cline{2-3} 
                               & notlong            & Resources for use screens that have an aspect ratio that is similar to the baseline screen configuration.                                                                                                                                                                                                                                                                                                                                                                                                    \\ \hline


\end{tabularx}
\caption{Resolution suffixes}
\label{table:ressuffixes}
\end{table}

\end{document}

Best Answer

The table seems easy to use as longtable :

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}

\title{Your Paper}

\author{You}

\date{\today}

\begin{document}
\maketitle


\begin{longtable}{|l|l|p{5.5cm}|}

\hline
\textbf{Screen Charateristics} & \textbf{Qualifier} & \textbf{Description}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         \\ \hline
\multirow{4}{*}{Size}          & small              & Resources for small size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & normal             & Resources for normal size screens. (This is the baseline size.)                                                                                                                                                                                                                                                                                                                                                                                                                                              \\ \cline{2-3} 
                               & large              & Resources for large size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & xlarge             & Resources for extra-large size screens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      \\ \hline
\multirow{8}{*}{Density}       & ldpi               & Resources for low-density (ldpi) screens (~120dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                          \\ \cline{2-3} 
                               & mdpi               & Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)                                                                                                                                                                                                                                                                                                                                                                                                                       \\ \cline{2-3} 
                               & hdpi               & Resources for high-density (hdpi) screens (~240dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                         \\ \cline{2-3} 
                               & xhdpi              & Resources for extra-high-density (xhdpi) screens (~320dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                  \\ \cline{2-3} 
                               & xxhdpi             & Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                           \\ \cline{2-3} 
                               & xxxhdpi            & Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi). Use this for the launcher icon only, see note above.                                                                                                                                                                                                                                                                                                                                                                                  \\ \cline{2-3} 
                               & nodpi              & Resources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.                                                                                                                                                                                                                                                                                                                            \\ \cline{2-3} 
                               & tvdpi              & Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a ``primary'' density group. It is mostly intended for televisions and most apps shouldn't need it-providing mdpi and hdpi resources is sufficient for most apps and the system will scale them as appropriate. If you find it necessary to provide tvdpi resources, you should size them at a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi. \\ \hline
Orientation                    & land               & Resources for screens in the landscape orientation (wide aspect ratio).                                                                                                                                                                                                                                                                                                                                                                                                                                      \\ \hline
                               & port               & Resources for screens in the portrait orientation (tall aspect ratio).                                                                                                                                                                                                                                                                                                                                                                                                                                       \\ \hline
\multirow{2}{*}{Aspect Ratio}  & long               & Resources for screens that have a significantly taller or wider aspect ratio (when in portrait or landscape orientation, respectively) than the baseline screen configuration.                                                                                                                                                                                                                                                                                                                               \\ \cline{2-3} 
                               & notlong            & Resources for use screens that have an aspect ratio that is similar to the baseline screen configuration.                                                                                                                                                                                                                                                                                                                                                                                                    \\ \hline



\caption{Resolution suffixes}
\label{table:ressuffixes}
\end{longtable}

\end{document}
Related Question