Latex 中的 lscape 和 supertabular
我想将图片放入 lscape 环境中的超级表中。代码是:
\newcounter{themenumber}
\newcounter{classnumber}
\newcounter{imagenumber}
\tablefirsthead{
\hline
\backslashbox{Concept}{Class} &\multicolumn{3}{|c|}{Class 0} & \multicolumn{3}{|c|}{Class 1} \\ %\textbf{A} & \textbf{B}\\
\hline}
\tablehead{
\hline
\multicolumn{7}{|l|}{\small\sl continued from previous page}\\
\hline
\backslashbox{Concept}{Class} &\multicolumn{3}{|c|}{Class 0} & \multicolumn{3}{|c|}{Class 1} \\ %\textbf{A} & \textbf{B}\\
\hline}
\tabletail{
%\hline
\multicolumn{7}{|l|}{\small\sl continued on next page}\\
\hline}
\tablelasttail{} %\tablelasttail{\hline}
\begin{landscape}
\begin{supertabular}{| c || c | c | c || c | c | c |}
\topcaption{Examples of All the Concepts. \label{tab:conceptsimgs}}
\forloop{themenumber}{1}{\value{themenumber} < 24}{
\arabic{themenumber}
\forloop{classnumber}{0}{\value{classnumber} < 2}{
\forloop{imagenumber}{1}{\value{imagenumber} < 4}{
& \includegraphics[scale=0.5]{../\arabic{themenumber}/\arabic{classnumber}_\arabic{imagenumber}.eps}
}
}
\\
\hline
}
\end{supertabular}
\end{landscape}
但是结果有问题:没有显示标题,每页表格部分的高度超过页面高度,最后一页有多余的东西。请参阅下面的图片:
如何解决问题?谢谢和问候!
更新:
时,所有问题仍然存在
1 &
\includegraphics[scale=0.5]{../1/0_1.eps}
&\includegraphics[scale=0.5]{../1/0_2.eps}
&\includegraphics[scale=0.5]{../1/0_3.eps}
&\includegraphics[scale=0.5]{../1/1_1.eps}
&\includegraphics[scale=0.5]{../1/1_2.eps}
&\includegraphics[scale=0.5]{../1/1_3.eps} \\
\hline
... % from 2 to 22
23 &
\includegraphics[scale=0.5]{../23/0_1.eps}
&\includegraphics[scale=0.5]{../23/0_2.eps}
&\includegraphics[scale=0.5]{../23/0_3.eps}
&\includegraphics[scale=0.5]{../23/1_1.eps}
&\includegraphics[scale=0.5]{../23/1_2.eps}
&\includegraphics[scale=0.5]{../23/1_3.eps} \\
\hline
当 forloop 被删除并替换为:知道如何解决这些问题 ?谢谢!
I would like to put pictures into a supertabular table within lscape enviroment. The code is:
\newcounter{themenumber}
\newcounter{classnumber}
\newcounter{imagenumber}
\tablefirsthead{
\hline
\backslashbox{Concept}{Class} &\multicolumn{3}{|c|}{Class 0} & \multicolumn{3}{|c|}{Class 1} \\ %\textbf{A} & \textbf{B}\\
\hline}
\tablehead{
\hline
\multicolumn{7}{|l|}{\small\sl continued from previous page}\\
\hline
\backslashbox{Concept}{Class} &\multicolumn{3}{|c|}{Class 0} & \multicolumn{3}{|c|}{Class 1} \\ %\textbf{A} & \textbf{B}\\
\hline}
\tabletail{
%\hline
\multicolumn{7}{|l|}{\small\sl continued on next page}\\
\hline}
\tablelasttail{} %\tablelasttail{\hline}
\begin{landscape}
\begin{supertabular}{| c || c | c | c || c | c | c |}
\topcaption{Examples of All the Concepts. \label{tab:conceptsimgs}}
\forloop{themenumber}{1}{\value{themenumber} < 24}{
\arabic{themenumber}
\forloop{classnumber}{0}{\value{classnumber} < 2}{
\forloop{imagenumber}{1}{\value{imagenumber} < 4}{
& \includegraphics[scale=0.5]{../\arabic{themenumber}/\arabic{classnumber}_\arabic{imagenumber}.eps}
}
}
\\
\hline
}
\end{supertabular}
\end{landscape}
However there is something wrong with the result: no caption is shown, the height of the part of table in each page exceeds the page height and there is something extra unwanted at the last page. See images below:
How to fix the problems? Thanks and regards!
Update:
All the problems remain when forloop is removed and replaced with:
1 &
\includegraphics[scale=0.5]{../1/0_1.eps}
&\includegraphics[scale=0.5]{../1/0_2.eps}
&\includegraphics[scale=0.5]{../1/0_3.eps}
&\includegraphics[scale=0.5]{../1/1_1.eps}
&\includegraphics[scale=0.5]{../1/1_2.eps}
&\includegraphics[scale=0.5]{../1/1_3.eps} \\
\hline
... % from 2 to 22
23 &
\includegraphics[scale=0.5]{../23/0_1.eps}
&\includegraphics[scale=0.5]{../23/0_2.eps}
&\includegraphics[scale=0.5]{../23/0_3.eps}
&\includegraphics[scale=0.5]{../23/1_1.eps}
&\includegraphics[scale=0.5]{../23/1_2.eps}
&\includegraphics[scale=0.5]{../23/1_3.eps} \\
\hline
Any idea how to fix the problems? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能与LaTeX中的forloop和table相同的问题
尝试创建没有 forloop 的表格 - 只需复制粘贴同一行足够多次即可。如果问题消失,则很可能是同一问题。
Might be the same problem as forloop and table in LaTeX
Try to create a table without
forloop
— just copy-paste the same line enough times. If the problem disappears, it's most probably the same one.