仅在带有超表栏的长表的偶数页上放置表脚

仅在带有超表栏的长表的偶数页上放置表脚

我需要排版一个很长的表格,其中每个偶数页上都应该出现一个带有一些说明的表脚。我考虑过使用supertabular,然后\tabletail在包的帮助下定义一个适当的ifoddpage表脚。但是,在所有页面上,表脚都标记为偶数。有没有办法做到这一点,或者我可以使用其他替代方法?

代码

\documentclass{article}
\usepackage{supertabular}
\usepackage{ifoddpage}
\usepackage{booktabs}

\begin{document}

\tablefirsthead{%
  \multicolumn{4}{@{}l@{}}{\large\sffamily{unnumbered pseudo caption}}\\
  \hline
  heading a & heading s & heading d & heading f\checkoddpage \\
  \midrule
}
\tablehead{%
  \multicolumn{4}{@{}l@{}}{\large\sffamily{unnumbered pseudo caption (continued)}}\\
  \hline
  heading a & heading s & heading d & heading f\checkoddpage \\
  \midrule
}
\tabletail{\hline\ifoddpage ODD\else EVEN\fi\\}
\tablelasttail{\hline LAST}

\begin{supertabular*}{\hsize}{llll}
  A1 & S & D & F \\
  A2 & S & D & F \\
  A3 & S & D & F \\
  A4 & S & D & F \\
  A5 & S & D & F \\
  A6 & S & D & F \\
  A7 & S & D & F \\
  A8 & S & D & F \\
  A9 & S & D & F \\
  A10 & S & D & F \\
  A11 & S & D & F \\
  A12 & S & D & F \\
  A13 & S & D & F \\
  A14 & S & D & F \\
  A15 & S & D & F \\
  A16 & S & D & F \\
  A17 & S & D & F \\
  A18 & S & D & F \\
  A19 & S & D & F \\
  A20 & S & D & F \\
  A21 & S & D & F \\
  A22 & S & D & F \\
  A23 & S & D & F \\
  A24 & S & D & F \\
  A25 & S & D & F \\
  A26 & S & D & F \\
  A27 & S & D & F \\
  A28 & S & D & F \\
  A29 & S & D & F \\
  A30 & S & D & F \\
  A31 & S & D & F \\
  A32 & S & D & F \\
  A33 & S & D & F \\
  A34 & S & D & F \\
  A35 & S & D & F \\
  A36 & S & D & F \\
  A37 & S & D & F \\
  A38 & S & D & F \\
  A39 & S & D & F \\
  A40 & S & D & F \\
  A41 & S & D & F \\
  A42 & S & D & F \\
  A43 & S & D & F \\
  A44 & S & D & F \\
  A45 & S & D & F \\
  A46 & S & D & F \\
  A47 & S & D & F \\
  A48 & S & D & F \\
  A49 & S & D & F \\
  A50 & S & D & F \\
  A51 & S & D & F \\
  A52 & S & D & F \\
  A53 & S & D & F \\
  A54 & S & D & F \\
  A55 & S & D & F \\
  A56 & S & D & F \\
  A57 & S & D & F \\
  A58 & S & D & F \\
  A59 & S & D & F \\
  A60 & S & D & F \\
  A61 & S & D & F \\
  A62 & S & D & F \\
  A63 & S & D & F \\
  A64 & S & D & F \\
  A65 & S & D & F \\
  A66 & S & D & F \\
  A67 & S & D & F \\
  A68 & S & D & F \\
  A69 & S & D & F \\
  A70 & S & D & F \\
  A71 & S & D & F \\
  A72 & S & D & F \\
  A73 & S & D & F \\
  A74 & S & D & F \\
  A75 & S & D & F \\
  A76 & S & D & F \\
  A77 & S & D & F \\
  A78 & S & D & F \\
  A79 & S & D & F \\
  A80 & S & D & F \\
  A81 & S & D & F \\
  A82 & S & D & F \\
  A83 & S & D & F \\
  A84 & S & D & F \\
  A85 & S & D & F \\
  A86 & S & D & F \\
  A87 & S & D & F \\
  A88 & S & D & F \\
  A89 & S & D & F \\
  A90 & S & D & F \\
  A91 & S & D & F \\
  A92 & S & D & F \\
  A93 & S & D & F \\
  A94 & S & D & F \\
  A95 & S & D & F \\
  A96 & S & D & F \\
  A97 & S & D & F \\
  A98 & S & D & F \\
  A99 & S & D & F \\
  A100 & S & D & F \\
\end{supertabular*}

\end{document}

辅助文件

\relax 
\providecommand \oddpage@label [2]{}
\oddpage@label{2}{1}
\oddpage@label{3}{2}
\oddpage@label{4}{3}

答案1

删除和设置\checkoddpage中的命令。将此命令放在tabletail 设置中的命令之前。tablefirstheadertablehead\ifoddpage

为了避免出现水平盒子未满的警告,我@{\extracolsep{\fill}\hspace{\tabcolsep}}在第一个列说明符之前添加了该命令。这样,每列都会根据自动等距分布\hsize

以下是工作代码:

\documentclass{article}
\usepackage{supertabular}
\usepackage{ifoddpage}
\usepackage{booktabs}
\begin{document}

\tablefirsthead{%
  \multicolumn{4}{@{}l@{}}{\large\sffamily{unnumbered pseudo caption}}\\
  \hline
  heading a & heading s & heading d & heading f \\
  \midrule
}
\tablehead{%
  \multicolumn{4}{@{}l@{}}{\large\sffamily{unnumbered pseudo caption (continued)}}\\
  \hline
  heading a & heading s & heading d & heading f \\
  \midrule
}
\tabletail{\hline\checkoddpage\ifoddpage ODD\else EVEN\fi\\}
\tablelasttail{\hline LAST\\ }

\begin{supertabular*}{\hsize}{@{\extracolsep{\fill}\hspace{\tabcolsep}}llll}
  A1 & S & D & F \\
  A2 & S & D & F \\
  A3 & S & D & F \\
  A4 & S & D & F \\
  A5 & S & D & F \\
  A6 & S & D & F \\
  A7 & S & D & F \\
  A8 & S & D & F \\
  A9 & S & D & F \\
  A10 & S & D & F \\
  A11 & S & D & F \\
  A12 & S & D & F \\
  A13 & S & D & F \\
  A14 & S & D & F \\
  A15 & S & D & F \\
  A16 & S & D & F \\
  A17 & S & D & F \\
  A18 & S & D & F \\
  A19 & S & D & F \\
  A20 & S & D & F \\
  A21 & S & D & F \\
  A22 & S & D & F \\
  A23 & S & D & F \\
  A24 & S & D & F \\
  A25 & S & D & F \\
  A26 & S & D & F \\
  A27 & S & D & F \\
  A28 & S & D & F \\
  A29 & S & D & F \\
  A30 & S & D & F \\
  A31 & S & D & F \\
  A32 & S & D & F \\
  A33 & S & D & F \\
  A34 & S & D & F \\
  A35 & S & D & F \\
  A36 & S & D & F \\
  A37 & S & D & F \\
  A38 & S & D & F \\
  A39 & S & D & F \\
  A40 & S & D & F \\
  A41 & S & D & F \\
  A42 & S & D & F \\
  A43 & S & D & F \\
  A44 & S & D & F \\
  A45 & S & D & F \\
  A46 & S & D & F \\
  A47 & S & D & F \\
  A48 & S & D & F \\
  A49 & S & D & F \\
  A50 & S & D & F \\
  A51 & S & D & F \\
  A52 & S & D & F \\
  A53 & S & D & F \\
  A54 & S & D & F \\
  A55 & S & D & F \\
  A56 & S & D & F \\
  A57 & S & D & F \\
  A58 & S & D & F \\
  A59 & S & D & F \\
  A60 & S & D & F \\
  A61 & S & D & F \\
  A62 & S & D & F \\
  A63 & S & D & F \\
  A64 & S & D & F \\
  A65 & S & D & F \\
  A66 & S & D & F \\
  A67 & S & D & F \\
  A68 & S & D & F \\
  A69 & S & D & F \\
  A70 & S & D & F \\
  A71 & S & D & F \\
  A72 & S & D & F \\
  A73 & S & D & F \\
  A74 & S & D & F \\
  A75 & S & D & F \\
  A76 & S & D & F \\
  A77 & S & D & F \\
  A78 & S & D & F \\
  A79 & S & D & F \\
  A80 & S & D & F \\
  A81 & S & D & F \\
  A82 & S & D & F \\
  A83 & S & D & F \\
  A84 & S & D & F \\
  A85 & S & D & F \\
  A86 & S & D & F \\
  A87 & S & D & F \\
  A88 & S & D & F \\
  A89 & S & D & F \\
  A90 & S & D & F \\
  A91 & S & D & F \\
  A92 & S & D & F \\
  A93 & S & D & F \\
  A94 & S & D & F \\
  A95 & S & D & F \\
  A96 & S & D & F \\
  A97 & S & D & F \\
  A98 & S & D & F \\
  A99 & S & D & F \\
  A100 & S & D & F \\
\end{supertabular*}

\end{document}

在此处输入图片描述 在此处输入图片描述

相关内容