# Set table position to top [duplicate]

This question already has an answer here:

some content
\begin{table}[t]
\begin{tabular}{c c c}
tabular content
\end{tabular}
\end{table}
\chapter{new chapter}


The output is:

First page:

some content


Second page:

table centered vertically


Third page:

new chapter


The problem is that table is centered vertically although its position is set to top [t] and second page's content is only table. How to force it to set it really on top?

-

## marked as duplicate by clemens, mafp, Martin Schröder, Heiko Oberdiek, ThorstenJun 14 '13 at 16:42

The optional arguments to table or figure aren't binding for LaTeX and changed if required. The \chapter creates a new page and flushes all floats using \clearpage. Apparently there is not enough material in 'some content' to fill the page where the table appears. Because the page only contains a float it is changed to a float page, i.e. [p], which centers the table. You could move the table earlier in the code to place it on top of the previous page. –  Martin Scharrer May 26 '11 at 20:24

If LaTeX doesn't find the way to put the table on top, it will keep the float until it finds a \clearpage command. In this case it's issued by \chapter. It's better to give more than one choice, [tp] should suffice.

It all depends on how much copy follows the table before the new chapter; if the table ends the chapter, there won't be many possibilities to place the float on top. Move the table environment back by some paragraphs, until it will be placed on top of the last page of the section.

-

You could try

\begin{table}[ht!]


Even if the float is on a single page, thus vertically centered by default, setting the distance from the top to the first float on that page to zero will help:

\makeatletter
\setlength{\@fptop}{0pt}
\makeatother


See Vertical layout of float pages for further explanation.

-