[Tex/LaTex] Why is the table before the section title


I would like to change the position of my table so that it is not before the title of the current section as show in my screenshot enter image description here

Here is what I've tried so far:

\subsection{Cinétique d'oxydation des joints de grains avec teneur nominale en chrome}

La cinétique blah blah blah

\caption{Données utilisées pour la calibration de la cinétique d'oxydation des joints de grains présentant une teneur nominale en chrome à 320/325°C}
\textbf{Repère} & \textbf{Échantillon} & \textbf{pox max (nm)} &     \textbf{Température (°C)} & \textbf{Temps (h)} \\
B356 (TT 1h x 720°C) & 1816-22 & 10 & 325 & 0,16 \\
T265 & 1866-20 & 307 & 325 & 100 \\
B356 SA & 1866-187 & 847 & 320 & 1000 \\

Sur la Figure

I have no idea why LaTeX always prints the table before the title, as I have enough place after (this is the beginning of the page). I've tried to use as for image the [H] to force the positionning, and also the FloatBarrier to force the cache of floating objects to be released (it would work if the table is printed ways after, which is not the case here).

Best Answer

I know that it is not a popular solution on this site but I like it anyway.

  • The float package offers an additional placement parameter/option called H. If you use it then the float object (figure or table) is exactly placed where you put it in the code.
  • Normally you want floating objects to float and let LaTeX decide where to put it.
  • But with the following approach that I describe here, you have full manual control of the float position if you want to.
  • You can still combine this approach with the other solutions mentioned here (flafter package and !htb placement parameter). Just decide from table to table (or figure and figure) what is best.

\usepackage{float} % here for H placement parameter


Text before table.    

\begin{table}[H] % placement parameter H
    \centering % if you want to center the table
    \caption{Table showing \ldots}
    % Code for table

Text after table.      


By the way, normally you want to have a little unbreakable space between the number and the unit: 720\,°C or 720~°C. Where \, is a half space and ~ a full space. See here and here for further information. But this is not related to the question at all.

Related Question