[Tex/LaTex] Vertically align text to the top

tablesvertical alignment

I have some issue with latex. My content is vertically aligned to the middle. How can I change it

my contents starts like

\onecolumn
\begin{table}
\caption{Topics found by LDA}
\label{table:topics}
\small
\begin{tabular}{|p{4cm}|p{4cm}|p{4cm}|p{4cm}|}
\hline
\hline
\textbf{Title} & \textbf{Title} & \textbf{Title} & \textbf{Title} \tabularnewline 
\hline

enter image description here

As you can see it's vertically aligned to the middle, how can I change it to top.

Best Answer

If the table is placed on a page with some other text, it should be possible to place it at the top of the page block by starting it off as follows:

\begin{table}[t!]

If, on the other hand, the table is on a floats-only page -- which is, by definition, the case if it's the only item on the page -- your options depend on which document class is in use. Assuming it's one of the "standard" LaTeX document classes (article, report, or book) or a class that's based on one of these classes, you can achieve your objective by inserting the following lines of code in the preamble:

\makeatletter
\setlength{\@fptop}{0\p@}   % top-alignment
\setlength{\@fpbot}{0\p@ \@plus 1fil}
\makeatother