0

Can someone please help me to make this table with several images into a long table with several images?

I tried changing it into a longtable but I'm not sure I can use my specialcell that I declared this way

\newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}

This is what I've done so far

\begin {longtable}{| >{\footnotesize}c | >{\footnotesize}c | >{\footnotesize}c | >{\footnotesize}c | >{\footnotesize}c |}
\captionsetup{font={large}}
\caption{Algunos resultados de la clasificación ascendente de texturas de imágenes aéreas.} \label{cuadroPrias}\\
\hline Imagen a comparar & $1^{er}$ resultado de clasificación & $2^{do}$ resultado de clasificación & $3^{er}$ resultado de clasificación & $4^{to}$ resultado de clasificación \\
\hline
\endfirsthead
\captionsetup{font={large}}
\caption{Algunos resultados de la clasificación ascendente de texturas de imágenes aéreas. (Continuación)}\\
\hline Imagen a comparar & $1^{er}$ resultado de clasificación & $2^{do}$ resultado de clasificación & $3^{er}$ resultado de clasificación & $4^{to}$ resultado de clasificación \\
\hline
\endhead
\begin{center}
  %\setlength\extrarowheight{-6pt}
  %\begin{tabular}
 \specialcell{\includegraphics[scale=0.1]{agua/agua19.png} \\ agua19 \\\textbf{Clase 1}} & \specialcell{\includegraphics[scale=0.1]{agua/agua19.png} \\agua19 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{agua/agua16.png} \\agua16 \\(0.198622)} & \specialcell{\includegraphics[scale=0.1]{agua/agua27.png} \\agua27 \\(0.222616)} & \specialcell{\includegraphics[scale=0.1]{agua/agua3.png} \\agua3 \\(0.228815)} \\ \hline
      \specialcell{\includegraphics[scale=0.1]{agua/agua14.png} \\ agua14 \\\textbf{Clase 1}} & \specialcell{\includegraphics[scale=0.1]{agua/agua14.png} \\agua14 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{agua/agua2.png} \\agua2 \\(0.213596)} & \specialcell{\includegraphics[scale=0.1]{agua/agua9.png} \\agua9 \\(0.218779)} & \specialcell{\includegraphics[scale=0.1]{agua/agua25.png} \\agua25 \\(0.242551)} \\ \hline
      \specialcell{\includegraphics[scale=0.1]{bosque/bosque10.png} \\bosque10 \\\textbf{Clase 2}} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque10.png} \\bosque10 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque12.png} \\bosque12 \\(0.278897)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque20.png} \\bosque20 \\(0.281227)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque21.png} \\bosque21 \\(0.284423)} \\ \hline
      \specialcell{\includegraphics[scale=0.1]{bosque/bosque12.png} \\bosque12 \\\textbf{Clase 2}} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque12.png} \\bosque12 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque21.png} \\bosque21 \\(0.272703)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque17.png} \\bosque17 \\(0.273179)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque13.png} \\bosque13 \\(0.275049)} \\ \hline
      \specialcell{\includegraphics[scale=0.1]{rural/rural13.png} \\rural13 \\\textbf{Clase 3}} & \specialcell{\includegraphics[scale=0.1]{rural/rural13.png} \\rural13 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{rural/rural32.png} \\rural32 \\(0.37786)} & \specialcell{\includegraphics[scale=0.1]{rural/rural24.png} \\rural24 \\(0.392837)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque22.png} \\bosque22 \\(0.424352)}\\ \hline
      \specialcell{\includegraphics[scale=0.1]{rural/rural24.png} \\rural24 \\\textbf{Clase 3}} & \specialcell{\includegraphics[scale=0.1]{rural/rural24.png} \\rural24 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{rural/rural32.png} \\rural32 \\(0.356885)} & \specialcell{\includegraphics[scale=0.1]{rural/rural10.png} \\rural10 \\(0.367438)} & \specialcell{\includegraphics[scale=0.1]{rural/rural17.png} \\rural17 \\(0.373413)}\\ \hline
       \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio15.png} \\agricultura15 \\\textbf{Clase 4}} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio15.png} \\agricultura15 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque13.png} \\bosque13 \\(0.347481)} & \specialcell{\includegraphics[scale=0.1]{bosque/bosque8.png} \\bosque8 \\(0.35222)} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio24.png} \\agricultura24 \\(0.35803)}\\ \hline
      \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio28.png} \\agricultura28 \\\textbf{Clase 4}} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio28.png} \\agricultura28 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio24.png} \\agricultura24 \\(0.284979)} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio17.png} \\agricultura17 \\(0.315681)} & \specialcell{\includegraphics[scale=0.1]{sembradio/sembradio11.png} \\agricultura11 \\(0.32785)}\\ \hline
      \specialcell{\includegraphics[scale=0.1]{urbano/urbano25.png} \\urbano25 \\\textbf{Clase 5}} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano25.png} \\urbano25 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{rural/rural4.png} \\rural4 \\(0.361493)} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano4.png} \\urbano4 \\(0.393795)} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano9.png} \\urbano9 \\(0.393822)} \\ \hline
      \specialcell{\includegraphics[scale=0.1]{urbano/urbano32.png} \\urbano32 \\\textbf{Clase 5}} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano32.png} \\urbano32 \\(0.0)} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano1.png} \\urbano1 \\(0.36836)} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano14.png} \\urbano14 \\(0.378909)} & \specialcell{\includegraphics[scale=0.1]{urbano/urbano19.png} \\urbano19 \\(0.407045)} \\ \hline
  %\end{tabular}
\end{center}
\end{longtable}
1
  • Please complete your code in order to make it compilable and reduce the rest as much as possible. Why are you not sure if it works or not? What have you tried? What are the errors you are getting? This question shows very little effort but is more a code review question. You should ask for specific problems. Thank you.
    – LaRiFaRi
    Sep 25, 2014 at 6:34

1 Answer 1

2

If you want to know, where the actual error was, you will have to show as a full MWE, please.

Here is your table. Just remove the ,width=20mm parts which I needed to fit the table on my page.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage[demo]{graphicx}
\usepackage{longtable,array,caption}
\newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\usepackage{siunitx}
\usepackage{pdflscape}

\begin{document}
\begin{landscape}
\begin{longtable}{|*{5}{>{\footnotesize}c|}}
\captionsetup{font={large}}
\caption{Algunos resultados de la clasificación ascendente de texturas de imágenes aéreas.} \label{cuadroPrias}\\
\hline Imagen a comparar & 1.\textsuperscript{er} resultado de clasificación & 2.\textsuperscript{o} resultado de clasificación & 3.\textsuperscript{er} resultado de clasificación & 4.\textsuperscript{o} resultado de clasificación \\
\hline
\endfirsthead
\caption{Algunos resultados de la clasificación ascendente de texturas de imágenes aéreas. (Continuación)}\\
\hline Imagen a comparar & 1.\textsuperscript{er} resultado de clasificación & 2.\textsuperscript{o} resultado de clasificación & 3.\textsuperscript{er} resultado de clasificación & 4.\textsuperscript{o} resultado de clasificación \\
\hline
\endhead
\centering
    \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua19.png} \\ agua19 \\\textbf{Clase 1}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua19.png} \\agua19 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua16.png} \\agua16 \\(\num{0.198622})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua27.png} \\agua27 \\(\num{0.222616})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua3.png} \\agua3 \\(\num{0.228815})} \\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua14.png} \\ agua14 \\\textbf{Clase 1}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua14.png} \\agua14 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua2.png} \\agua2 \\(\num{0.213596})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua9.png} \\agua9 \\(\num{0.218779})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{agua/agua25.png} \\agua25 \\(\num{0.242551})} \\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque10.png} \\bosque10 \\\textbf{Clase 2}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque10.png} \\bosque10 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque12.png} \\bosque12 \\(\num{0.278897})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque20.png} \\bosque20 \\(\num{0.281227})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque21.png} \\bosque21 \\(\num{0.284423})} \\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque12.png} \\bosque12 \\\textbf{Clase 2}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque12.png} \\bosque12 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque21.png} \\bosque21 \\(\num{0.272703})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque17.png} \\bosque17 \\(\num{0.273179})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque13.png} \\bosque13 \\(\num{0.275049})} \\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural13.png} \\rural13 \\\textbf{Clase 3}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural13.png} \\rural13 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural32.png} \\rural32 \\(\num{0.37786})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural24.png} \\rural24 \\(\num{0.392837})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque22.png} \\bosque22 \\(\num{0.424352})}\\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural24.png} \\rural24 \\\textbf{Clase 3}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural24.png} \\rural24 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural32.png} \\rural32 \\(\num{0.356885})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural10.png} \\rural10 \\(\num{0.367438})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural17.png} \\rural17 \\(\num{0.373413})}\\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio15.png} \\agricultura15 \\\textbf{Clase 4}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio15.png} \\agricultura15 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque13.png} \\bosque13 \\(\num{0.347481})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{bosque/bosque8.png} \\bosque8 \\(\num{0.35222})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio24.png} \\agricultura24 \\(\num{0.35803})}\\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio28.png} \\agricultura28 \\\textbf{Clase 4}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio28.png} \\agricultura28 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio24.png} \\agricultura24 \\(\num{0.284979})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio17.png} \\agricultura17 \\(\num{0.315681})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{sembradio/sembradio11.png} \\agricultura11 \\(\num{0.32785})}\\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano25.png} \\urbano25 \\\textbf{Clase 5}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano25.png} \\urbano25 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{rural/rural4.png} \\rural4 \\(\num{0.361493})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano4.png} \\urbano4 \\(\num{0.393795})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano9.png} \\urbano9 \\(\num{0.393822})} \\ \hline
    \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano32.png} \\urbano32 \\\textbf{Clase 5}} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano32.png} \\urbano32 \\($0.0$)} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano1.png} \\urbano1 \\(\num{0.36836})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano14.png} \\urbano14 \\(\num{0.378909})} & \specialcell{\includegraphics[scale=0.1,width=20mm]{urbano/urbano19.png} \\urbano19 \\(\num{0.407045})} \\ \hline
\end{longtable}
\end{landscape}
\end{document}

enter image description here

1
  • I don't think that \begin {longtable} can be a source for errors.
    – egreg
    Sep 25, 2014 at 10:31

You must log in to answer this question.

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