Graphics, Figures & TablesAvoiding Whitespace before Table rotated with 'lscape'

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
qbk
Posts: 3
Joined: Sat Jun 18, 2011 8:42 pm

Avoiding Whitespace before Table rotated with 'lscape'

Post by qbk »

Hello,
I have to create a rotated 90* table in a document. I've tried lscape but the problem is that it introduces a lot of whitespace before the table -- the rotated table is on a new page, but the next section in my document doesn't start right after the previous section, but only after this rotated page.

Here's an MWE:

Code: Select all

Code, edit and compile here:
\documentclass{report}
%\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{rotating}
\begin{document}
\chapter{Chapter 1}
% PAGE 1
\section{A}
Some text
% A LOT OF FREE SPACE HERE
% PAGE 2 -- landscaped
\begin{center}
\begin{landscape}
\begin{table}[t] % no matter what i put in [] -- h,t,b,p -- the next section always starts on a new page
\centering
\begin{tabular}{lll}
A & B & C \tabularnewline
A & B & C \tabularnewline
A & B & C \tabularnewline
A & B & C \tabularnewline
\end{tabular}
\end{table}
\end{landscape}
\end{center}
% PAGE 3
\section{B}
Some text
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
What I want to achieve is that section B starts immediately after section A, and rotated table is on a separate page.

I use LEd (MikTeX). The strange thing is that using two different compile methods, compile output in LEd is different, but finally PDF always has 3 pages:

LaTeX -> DVI (F9, says '3 pages') -> PDF (really 3 pages), using lscape (pdflscape produces compile error).
LaTeX -> PDF (PDFLaTex, F7) says 'Compile result: 2 pages' but PDF has 3 pages (using either lscape or pdflscape).

Regards and thanks in advance for your responses.
Last edited by qbk on Tue Jun 21, 2011 9:35 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

qbk
Posts: 3
Joined: Sat Jun 18, 2011 8:42 pm

Re: Avoiding Whitespace before Table rotated with 'lscape'

Post by qbk »

Okay, I found out the solution is to use \sidewaystable instead of \table and do not use \landscape.
Post Reply