Document Classes ⇒ Positioning of tables
Positioning of tables
I have a question about positioning of tables.
Why is a table on an otherwise empty page placed in the middle of the page and not at the top as I try to do with [ht] ?
How can I change this behaviour?
Conny
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
Positioning of tables
Code: Select all
\makeatletter
\setlength\@fptop{0pt}
\setlength\@fpsep{20pt plus 2pt minus 2pt}
\setlength\@fpbot{0pt}
\makeatother
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Positioning of tables
those values will probably work if there's just one table at the page and perhaps will produce a warning "underfull \vbox".
If there are two tables, one will be positioned at the top and one at the bottom, because of the value 0pt for \@fpbot and the stretchability of \@fpsep.
I think its better not to change \@fpbot, it could keep its default value 0pt+1fil, so the tables will go up to the top of the page. Further there will be no warning about the underfull \vbox.
Stefan
Re: Positioning of tables
\makeatletter
\setlength\@fptop{0pt}
\setlength\@fpsep{20pt plus 2pt minus 2pt}
\setlength\@fpbot{0pt}
\makeatother
one is at the top and one at the bottom. This remains when I remove the "fpsep" line. When I just put
\makeatletter
\setlength\@fptop{0pt}
\makeatother
the second table is somewhere in the middle of the page. I dont have the problem with the two tables right now, but how would I fix that?
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Positioning of tables
I meant \@fpbot above, that should not be changed, I've corrected it.
So try:
Code: Select all
\makeatletter
\setlength\@fptop{0pt}
\setlength\@fpsep{20pt plus 2pt minus 2pt}
\makeatother
Re: Positioning of tables

now it works! Thanks!