General ⇒ Placing a table at the end of chapter
Placing a table at the end of chapter
Hi,
I need to place a single table at the end of chapter (or section), but other tables should remain at their places (so, endfloat isn't a solution). How to achieve this?
And one more question: how to apply empty or plain page style on the page on which table appears ?
I need to place a single table at the end of chapter (or section), but other tables should remain at their places (so, endfloat isn't a solution). How to achieve this?
And one more question: how to apply empty or plain page style on the page on which table appears ?
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
Placing a table at the end of chapter
Hi meho_r,
you could put the table already in the source code at the end of the chapter or section. To prevent floating before or after you could use the H option with the float package or the \FloatBarrier command from the placeins package, in that case you could write \FloatBarrier a the end of the chapter or section, place the figure code and write \FloatBarrier again before the next section. Chapters would make \clearpage automatically, \FloatBarrier wouldn't be necessary before the next chapter. You can reach similar by using \clearpage before/after the figure.
For some more details and examples have a look here: Prevent floating of figures or tables.
Stefan
you could put the table already in the source code at the end of the chapter or section. To prevent floating before or after you could use the H option with the float package or the \FloatBarrier command from the placeins package, in that case you could write \FloatBarrier a the end of the chapter or section, place the figure code and write \FloatBarrier again before the next section. Chapters would make \clearpage automatically, \FloatBarrier wouldn't be necessary before the next chapter. You can reach similar by using \clearpage before/after the figure.
For some more details and examples have a look here: Prevent floating of figures or tables.
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Placing a table at the end of chapter
Declare the table at the end of the chapter and put a simple \clearpage (or \cleardoublepage) right behind the table environment to force its output. This should already be sufficient.meho_r wrote:[...] I need to place a single table at the end of chapter (or section), but other tables should remain at their places (so, endfloat isn't a solution). How to achieve this? [...]
You can use either fancyhdr or titlesec to declare page styles. Both allow to declare a special page layout for float pages. Refer to the documentation of fancyhdr (Section 14 - Special page layout for float pages, p. 14f) or titlesec (Section 5.3 - Running heads with floats, p. 13f) to see how to realise this. Perhaps both versions require that you place the figure with a special parameter on a separate (float) page.meho_r wrote:[...] And one more question: how to apply empty or plain page style on the page on which table appears? [...]
Code: Select all
\begin{figure}[!p]
\centering
...
\caption{Figure on a separate page}\label{fig:sep}
\end{figure}
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: Placing a table at the end of chapter
Thank you guys for both solution and references
I have one more question though. When the table is on that last page and it's alone on it, it is placed right on the center (vertically). How to make it appears on the top of the page?

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Placing a table at the end of chapter
It's not possible to comprehend that without any code. So, please provide a minimal working example (MWE) that shows this effect.meho_r wrote:[...] When the table is on that last page and it's alone on it, it is placed right on the center (vertically). How to make it appears on the top of the page?
Edit: Somehow I confused two topics hence this post makes no sense.
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
Placing a table at the end of chapter
Oh, sorry
Here it is:
As you can see, the table is alone on the last page and vertically centered. Is there a way to make it appear at top of that page?

Here it is:
Code: Select all
\documentclass[a4paper,10pt]{book}
\usepackage{lipsum}
\begin{document}
\lipsum[1-5]
\begin{table}[hb]
\centering
\caption{Test table}
\begin{tabular}{lll}
\hline
Text 1 & Text 2 & Text 3 \\
Text 4 & Text 5 & Text 6 \\
Text 1 & Text 2 & Text 3 \\
Text 4 & Text 5 & Text 6 \\
Text 1 & Text 2 & Text 3 \\
Text 4 & Text 5 & Text 6 \\
\hline
\end{tabular}
\end{table}
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Placing a table at the end of chapter
Hi,
it could be achieved by:
If you put this into your preamble, floats on pages of their own will appear at the top of the page. If it's too high just take a different value than 0pt.
Stefan
it could be achieved by:
Code: Select all
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
Stefan
LaTeX.org admin
Re: Placing a table at the end of chapter
Thanks a lot. It works. You are really invaluable source of informations. How did you learn all that stuff?
Impressive

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Placing a table at the end of chapter
To answer this: generally by reading a lot, beside documentation also source codes like cls and sty files, no magic ;). It also comes by the way when helping others like in this forum. But above is just a frequently asked question, see UK TeX FAQ: Vertical layout of float pages, I've seen this requirement several times myself.
Stefan
Stefan
LaTeX.org admin
Re: Placing a table at the end of chapter
Thanks for your patience. And thank you for trying to make us understand "why", not only "how" to do things with LaTeX and for mentioning relevant sources to discover new areas of LaTeX world. We appreciate that. Thank all of you 
