Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by cgnieder, mafp, Martin Schröder, Heiko Oberdiek, Thorsten Jun 14 '13 at 16:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
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

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.