Latex 中的 lscape 和 supertabular

发布于 2024-08-27 07:00:20 字数 2686 浏览 3 评论 0原文

我想将图片放入 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 页 第 2 页 第3页 第4页

如何解决问题?谢谢和问候!


更新:

时,所有问题仍然存在

    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:

page1 page2 page3 page4

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

优雅的叶子 2024-09-03 07:00:20

可能与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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文