Sorry, I know that other questions similar to this one were answered but I was not able to figure out how to split a long table in multiple lines.
I have the following code for a table but I need to split it in two pages.
\begin{document}
\begin{table}[h]
\centering
\caption{Comparação dos resultados obtidos.}
\label{comp}
\begin{tabular}{ccccccc}
\hline
Teste & \begin{tabular}[c]{@{}c@{}}Maior\\ resultado (\%)\end{tabular} &
\begin{tabular}[c]{@{}c@{}}N\\ (NoC)\end{tabular} & Tipo & \begin{tabular}[c]{@{}c@{}}Característca\\ extraída\end{tabular} & \begin{tabular}[c]{@{}c@{}}Rotina\\de ML\end{tabular}& \begin{tabular}[c]{@{}l@{}}Conversão para\\ níveis de cinza\end{tabular} \\
\hline
1 & 67,5000 & 6 (24) & Haar & Energia & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:pratt}\\
2 & 67,5000 & 6 (24) & Haar & Energia & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:customeq} \\
3 & 65,9167 & \begin{tabular}[c]{@{}c@{}} 3 (12)\\ 4 (16) \end{tabular} & db4 & Energia & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:pratt}\\
4 & 66,8333 & 4 (16) & db4 & Energia & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:customeq}\\
5 & 67,5833 & 5 (40) & Haar & Energia e Std & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:pratt}\\
6 & 67,5000 & \begin{tabular}[c]{@{}c@{}} 4 (32)\\ 5 (40) \end{tabular} & Haar & Energia e Std & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:customeq}\\
7 & 68,6667 & 2 (16) & db4 & Energia e Std & \begin{tabular}[c]{@{}c@{}}IBk\\
\textit{percentage split}\end{tabular}& eq. \ref{eq:pratt}\\
8 & 68,3333 & \begin{tabular}[c]{@{}c@{}} 2 (16)\\ 3 (24) \end{tabular} & db4 & Energia e Std & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\\ \textit{percentage split}\end{tabular} & eq. \ref{eq:customeq}\\
9 & 71,0000 & 3 (33) & db16 & \begin{tabular}[c]{@{}c@{}}Energia, Std\\e entropia\end{tabular} & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:pratt} \\
10 & 71,0833 & 3 (33) & db16 & \begin{tabular}[c]{@{}c@{}}Energia, Std\\e entropia\end{tabular} & \begin{tabular}[c]{@{}c@{}}IBk\\ \textit{cross-validation}\end{tabular} & eq. \ref{eq:customeq}\\
\hline
\end{tabular}
\end{table}
\end{document}
\documentclass{...}
and ending with\end{document}
. You may want to have a look at thelongtable
package.[h]
as the only placement option for a float. Instead you should use something like[htbp]
which will tryh
but if that doesn't work out has reasonable fallbacks. Withh
only you might end up with pretty bad placement (e.g. at the end of the document/chapter).