2

I have a similar question as ipavlic, that is, the break of a long table by the supertabular package comes too soon. The solution proposed by egreg works well for the supertabular environment, however, being a LateX noob I cannot get it to work for the supertabular* environment.

Minimal working example

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

However, when I change supertabular* to strictsupertabular* I get an error. Is it possible to define a strictsupertabular environment that has tabular* functionality?

2
  • Or you could try longtable? Oct 23, 2012 at 20:00
  • 1
    We'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation.
    – lockstep
    Oct 23, 2012 at 21:05

1 Answer 1

1

[OP's answer, moved from question]

I figured it out, the following definition of the new strictsupertabular* environment works

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.