Graphics, Figures & Tableschapter and landscape table on the same page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
karisalk
Posts: 12
Joined: Wed Jul 21, 2010 12:59 pm

chapter and landscape table on the same page

Post by karisalk »

Hi, I have to put my table in the same page with the chapter heading. The code below gives two pages yet I want one.

\documentclass{report}
\usepackage{rotating}
\usepackage{colortbl}
\usepackage{titlesec}
\usepackage{setspace}

\titleformat{\chapter}[display]{\centering\normalfont\normalsize\bfseries}{\chaptername\ \thechapter}{16pt}{\normalsize}
\titlespacing*{\chapter}{10pt}{*-10}{*-01}
\usepackage[left=1.2in, right=1in, top=1in, bottom=1in]{geometry}

\begin{document}

\chapter{\normalsize{WORKPLAN}}

\begin{sidewaystable}[hb]
\begin{center}
\begin{tabular}{|p{3.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|}
\hline&
\textbf{Jan. 2011}&\textbf{Feb. 2011}&\textbf{Mar. 2011}&\textbf{Apr. 2011}& \textbf{May 2011}&\textbf{June 2011}& \textbf{July 2011}\\
\hline Proposal writing&\cellcolor[gray]{.5}&\cellcolor[gray]{0.5}&\cellcolor[gray]{0.5}&&&&\\
\hline
Proposal defence and submission&&&\cellcolor[gray]{.5}&\cellcolor[gray]{.5}&&&\\
\hline
Data simulation and study\vspace{40pt}&&&&&\cellcolor[gray]{0.5}&&\\
\hline
Project writing\vspace{50pt}&&&&&&\cellcolor[gray]{.5}&\\
\hline
Project defence and submission\vspace{50pt}&&&&&&&\cellcolor[gray]{0.5}\\
\hline
\end{tabular}
\end{center}
\caption{A Workplan Table}\label{tab:sample}
\end{sidewaystable}
\end{document}

Please help to put them in one page.

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

chapter and landscape table on the same page

Post by localghost »

The rotating package offers more stuff to rotate certain contents without starting a new page. Possible solutions are described in the document »Using Imported Graphics in LaTeX and pdfLaTeX«.


Thorsten
Post Reply