Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Or you could try longtable? –  David Carlisle Oct 23 '12 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 '12 at 21:05
add comment

1 Answer

[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*}}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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