用多张图片构建长桌

用多张图片构建长桌

有人可以帮我把这张包含多张图片的表格变成一张包含多张图片的长表格吗?

我尝试将其更改为 longtable,但我不确定我是否可以使用我以这种方式声明的 specialcell

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

这是我目前所做的

\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

如果您想知道实际错误在哪里,您必须显示完整的 MWE。

这是你的表格。只需删除,width=20mm我需要的部分,使表格适合我的页面即可。

\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}

在此处输入图片描述

相关内容