Graphics, Figures & Tables ⇒ Table ends up at the end of the document
Table ends up at the end of the document
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!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Table ends up at the end of the document
you could insert \clearpage to force the output of the table, or
Code: Select all
\afterpage{\clearpage}
Stefan
Re: Table ends up at the end of the document
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
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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Table ends up at the end of the document
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]"...
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10