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 longtable where every row can have a slightly different height and is followed by a \hline. How can I get the rows of the pages to be \flushbottomend?

Here's a MWE:

\documentclass[a5paper]{article}
\usepackage{longtable}
\usepackage[showframe]{geometry}
\usepackage{lipsum}
\setlength{\parindent}{0pt}
\flushbottom
\begin{document}
\lipsum[1-4]\newpage
\begin{longtable}{@{}p{\linewidth}@{}}
\lipsum[1]\tabularnewline\hline
\lipsum[1]\tabularnewline\hline
\lipsum[1]\tabularnewline\hline
\lipsum[1]\tabularnewline\hline
\lipsum[1]\tabularnewline\hline
\end{longtable}
\end{document}

A pdf is here. Ideally every row should stretch, but I'd be satisfied if only the last one was stretched.

share|improve this question
    
I'm not sure what the question is. Are you asking how to relax the line spacing parameters so that the final line of a given paragraph will be at the bottom of the page? –  Mico Aug 14 '12 at 14:51

1 Answer 1

up vote 7 down vote accepted

Basically you can't.

What you could do is insert some stretch space between rows (so long as you have no vertical rules) for example

\documentclass[a5paper]{article}
\usepackage{longtable}
\usepackage[showframe]{geometry}
\usepackage{lipsum}
\setlength{\parindent}{0pt}
\flushbottom
\begin{document}
\lipsum[1-4]\newpage
\begin{longtable}{@{}p{\linewidth}@{}}
\lipsum[1]\tabularnewline\hline\noalign{\vfill}
\lipsum[1]\tabularnewline\hline\noalign{\vfill}
\lipsum[1]\tabularnewline\hline\noalign{\vfill}
\lipsum[1]\tabularnewline\hline\noalign{\vfill}
\lipsum[1]\tabularnewline\hline\noalign{\vfill}
\end{longtable}
\end{document}

Pushes the rows down turning

enter image description here

into this:

enter image description here

But you can't affect the typesetting within the rows for the usual reasons that TeX page breaking happens in the output routine after the galley has been set so can't affect the boxes within the page.

Of course it is possible to do anything, but not necessarily possible with that package...

share|improve this answer
    
Sigh. I feared as much. I'll ask if that feature is really needed (of course one can imagine a multi-pass solution for this, but that's probably too much work). But at least I have another question for the ConTeXt experts. :-). –  Martin Schröder Aug 14 '12 at 15:06

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.