Graphics, Figures & TablesMove table text from under to over table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ferdisss
Posts: 4
Joined: Wed Feb 23, 2022 7:46 pm

Move table text from under to over table

Post by ferdisss »

Hi!
Usually when I create a table in LateX, the table text is placed over the table, which is the way I like it. However, now it came under the table and I don't know how to move it up.

Any ideas? Thanks!

Code: Select all

\begin{table}[H]
\centering
\begin{tabular}{lllll}
\hline
\multicolumn{1}{|l|}{Kommune} & \multicolumn{1}{l|}{$s_{k,0} [kN/m]$} & \multicolumn{1}{l|}{$H_{g}[m]$} & \multicolumn{1}{l|}{$\Delta s_{k} [kN/m]$} & \multicolumn{1}{l|}{$s_{k max} [kN/m]$} \\ \hline
\multicolumn{1}{|l|}{Alta}    & \multicolumn{1}{l|}{4,5}                                          & \multicolumn{1}{l|}{150}              & \multicolumn{1}{l|}{1,0}                                                              & \multicolumn{1}{l|}{-}                                              \\ \hline                    

\end{tabular}
\label{Tab:Karakteristisk snølast i Alta}
\caption{Karakteristisk snølast i Alta}
\end{table}
Last edited by Stefan Kottwitz on Sat Feb 26, 2022 1:37 pm, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Move table text from under to over table

Post by Ijon Tichy »

If you want the table caption above the tabular you should move \caption above the tabular. And please note: The \label should always be behind the \caption, because usually the \caption increases the table counter and set it as new reference. So a \label before \caption usually references something different, e.g., the current section.

An if you want the caption above the tabular, you should also use a package like caption. Otherwise the spacing would be wrong.

But maybe you are using a package or class with which all my suggestions are wrong. So it would be very useful to show a correct as code marked Infominimal working example instead of a not marked code snippet.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply