Graphics, Figures & TablesMisplaced Appendix title and sidewaystable

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
melothe
Posts: 4
Joined: Tue Jun 01, 2010 5:46 pm

Misplaced Appendix title and sidewaystable

Post by melothe »

Heya,

I am writing my thesis and have a bit of a tricky situation with my tables in the appendices. Because the tables are so wide I need to rotate the table which I do using sidewaystable.

My problem then is that the title for the appendix is written on a otherwise empty page, and the sidewaystable comes on the next page instead. I have tried removing captions and decreasing the text of the table to make sure that it would be able to fit under the appendix title, but it does not help. My code is as follows:

\begin{sidewaystable}[!ht]
\centering
\begin{tabular}{ccccccrc}
\end{tabular}
\caption{}
\end{sidewaystable}

I would be grateful for any help on this, especially since I should hand in my thesis this thursday (3/6).

Best wishes,
Tobias

Recommended reading 2024:

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

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

TritonMan
Posts: 8
Joined: Tue Jun 01, 2010 1:58 am

Misplaced Appendix title and sidewaystable

Post by TritonMan »

The sidewaystable command always puts the rotated table on a new page, so, no matter how small you make it, it won't fit underneath your title :(

http://www.latex-community.org/forum/vi ... f=9&t=1146

However, you might be able to do something like:

Code: Select all

\rotatebox{90}{table contents here}
to get an object that will be placed underneath your title. I'm not sure what exactly can go in the contents of the rotate box though (i.e., whether you're allowed to begin a different environment}.

Good luck with your thesis - I'm doing much the same thing at the moment!
melothe
Posts: 4
Joined: Tue Jun 01, 2010 5:46 pm

Re: Misplaced Appendix title and sidewaystable

Post by melothe »

Thanks TritonMan for the advice, however rotatebox did not allow me to put a table inside it, I got a wall of errors for that only :(

Good luck to us both then!
TritonMan
Posts: 8
Joined: Tue Jun 01, 2010 1:58 am

Re: Misplaced Appendix title and sidewaystable

Post by TritonMan »

Sorry about that, was just an idea off the top of my head. Had a bit more of a think: what about putting the float inside a minipage environment? I think the floats get placed separately in that.
melothe
Posts: 4
Joined: Tue Jun 01, 2010 5:46 pm

Re: Misplaced Appendix title and sidewaystable

Post by melothe »

Thank you TritonMan, I am unsure how you mean with a minipage. I am unfamiliar with that. Could you please explain in code how you mean?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Misplaced Appendix title and sidewaystable

Post by localghost »

An older example from my archive.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{wrapfig}
\usepackage{blindtext}

\begin{document}
  \section{Dummy}
    \begin{wrapfigure}{r}{5cm}
      \rotcaption{Dummy}
      \centering
      \begin{sideways}
        \begin{tabular}{cc}\toprule
          Table head & Table head \\ \midrule
          Values & Values \\ \bottomrule
        \end{tabular}
       \end{sideways}
    \end{wrapfigure}
    \blindtext[2]
\end{document}
See the manuals of the involved packages for further information.

As soon as the problem is solved, please act according to Section 3 of the Board Rules (last two paragraphs).

Best regards and welcome to the board
Thorsten
Post Reply