Hi,
in my current document I have a sidewaystable that spans a whole page. It is inserted with the placement option "[h]". However, as LaTeX obviously tries to find the best spot for it, it gets pushed back, every time I add new text.
How can I make the text kind of "float around" the table? It would be very inconvenient if all my tables ended up at the end of the document just because they take a whole page...
Thanks!
Graphics, Figures & Tables ⇒ Table ends up at the end of the document
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Table ends up at the end of the document
Hi,
you could insert \clearpage to force the output of the table, or
using the afterpage package.
Stefan
you could insert \clearpage to force the output of the table, or
Code: Select all
\afterpage{\clearpage}
Stefan
LaTeX.org admin
Re: Table ends up at the end of the document
Whoa, thanks a lot. The afterpage package did the trick.
But now I discovered another problem with tables...
I have two sidewaystables placed with "[h]" and a "clearpage" in between them. The second table is very large, almost writing into the page borders. And for some reason, I always get an extra blank page between the tables. If I delete the "clearpage", however, I still get the extra blank page but now the first table ends up behind the second...
Any ideas why that might be?
But now I discovered another problem with tables...
I have two sidewaystables placed with "[h]" and a "clearpage" in between them. The second table is very large, almost writing into the page borders. And for some reason, I always get an extra blank page between the tables. If I delete the "clearpage", however, I still get the extra blank page but now the first table ends up behind the second...
Any ideas why that might be?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Table ends up at the end of the document
I can't comprehend the problem.
As far as I know the sidewaystable environment doesn't really accept optional arguments.
Best regards
Thorsten
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{rotating}
\usepackage{blindtext}
\begin{document}
\blinddocument
\begin{sidewaystable}
\caption{Dummy table One}\label{fig:dummy-1}
\centering
\rule{0.75\linewidth}{0.5\linewidth}
\end{sidewaystable}
\begin{sidewaystable}
\caption{Dummy table Two}\label{fig:dummy-2}
\centering
\rule{0.75\linewidth}{0.5\linewidth}
\end{sidewaystable}
\blinddocument
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Table ends up at the end of the document
Ah, I am so sorry. Thank you very much for your help.
Actually, I mixed this up. The second table is not a sidewaystable but a threeparttable. I now fixed the problem by wrapping a table-environment around the threeparttable.
But I did not know that sidewaystable will not accept any parameters like "[h]"...
Actually, I mixed this up. The second table is not a sidewaystable but a threeparttable. I now fixed the problem by wrapping a table-environment around the threeparttable.
But I did not know that sidewaystable will not accept any parameters like "[h]"...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Table ends up at the end of the document
This is one of the reasons for a minimal working example (MWE).Isopropyl wrote:[...] Actually, I mixed this up. The second table is not a sidewaystable but a threeparttable. I now fixed the problem by wrapping a table-environment around the threeparttable. []
Can be looked up in the rotating manual. That's what it's made for.Isopropyl wrote:[...] But I did not know that sidewaystable will not accept any parameters like "[h]"...
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10