防止 supertabular* 过早崩溃

防止 supertabular* 过早崩溃

我有类似的问题伊帕夫利奇,也就是说,supertabular包对长表的拆分来得太早了。egreg 提出的解决方案对于supertabular环境来说效果很好,但是,作为一个 LateX 新手,我无法让它在环境中工作supertabular*

最小工作示例

    \documentclass[a4paper,12pt,oneside]{article}
    \usepackage{supertabular}

    \makeatletter 
    \def\mod@estimate@lineht{% 
      \ST@lineht=\arraystretch \baslineskp 
      %\global\advance\ST@lineht by 1\p@ 
      \ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskp 
      \ifdim\ST@stretchht<\z@\ST@stretchht\z@\fi 
      \ST@trace\tw@{Average line height: \the\ST@lineht}% 
      \ST@trace\tw@{Stretched line height: \the\ST@stretchht}% 
    } 
    \newenvironment{strictsupertabular*} 
      {\let\estimate@lineht\mod@estimate@lineht\supertabular*} 
      {\endsupertabular*} 
    \makeatother

    \begin{document}

    \tablefirsthead{\hline\hline a & b & c\\\hline}
    \tablehead{\hline\hline a & b & c\\\hline}
    \tabletail{\hline\hline}
    \tablelasttail{\hline\hline}
    \topcaption{caption}
    \centering
    \begin{supertabular*}{1 \columnwidth}{@{\extracolsep{\fill}} c c c}
    1 & 2 & 3\\
    4 & 5 & 6\\
    \end{supertabular*}

    \end{document}

但是,当我更改supertabular*为时,strictsupertabular*出现错误。是否可以定义strictsupertabular具有tabular*功能的环境?

答案1

[原帖者的回答,从问题中移出]

我明白了,新strictsupertabular*环境的以下定义有效

    \newenvironment{strictsupertabular*} 
      {\let\estimate@lineht\mod@estimate@lineht\@nameuse{supertabular*}} 
      {\@nameuse{endsupertabular*}}

相关内容