[OS X TeX] Re: Floating table in landscape orientaton results in a half empty page

Piet van Oostrum piet at cs.uu.nl
Fri Feb 22 06:47:48 EST 2008

>>>>> Olga Lyashevskaya <olgalyashevskaya at yahoo.com> (OL) wrote:

>OL> Dear all,

>OL> Thank you for your suggestions.

>OL> Unfortunately I still have the same problem.

>OL> Peter Dyballa wrote:

>>> Can you give us a minimal example *with* the bug?

>OL> \documentclass[12pt]{article}
>OL> \usepackage {lscape}
>OL> \begin{document}

>OL> text before table \ref{DefBio}

>OL> \begin{landscape}
>OL>  \begin{table}[htbp]
>OL>  \centering
>OL>  \setlength{\abovecaptionskip}{0pt}
>OL>   \setlength{\belowcaptionskip}{5pt}
>OL>  \caption {Definitions of biodiversity} \label {DefBio}
>OL>   \begin{tabular} {p{8cm} | p{2cm} | p{2.5cm} | p{5cm}}

>OL> some content

>OL>  \end{tabular}
>OL>  \end{table}
>OL>  \end{landscape}

>OL> text after table

>OL> \end{document}

>OL> and in pdf output I get:

>OL> page 1
>OL> text before table, reference table
>OL> [only a few lines, the rest of the page is empty]

>OL> page 2
>OL> table

>OL> page 3 
>OL> text after table

>OL> I would expect a part of the text from page 3 to be moved on page 1 to fill the space, but it does not happen.
>OL> I hope it is a bit clear what I mean.
Hello Olga,

As others have already said, this is the way the landscape environment is
designed to work. However, there is a way around using the afterpage
package: You put the whole landscape environment in a separate tex file,
say lscapetable1.tex and the change your main file to:

\usepackage {lscape}

text before table \ref{DefBio}

text after table


If you have more landscape parts, just put each one in a separate file.
(You can also put the whole landscape environment as argument to the
\afterpage command but it is recommended to put it in a separate file.)
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org

More information about the MacOSX-TeX mailing list