Why is my table/figure/... not centred?

You want a float whose contents are centred, but LaTeX ignores your center environment. Most likely, you have written:

\begin{center}
  \begin{figure}
    ...
  \end{figure}
\end{center}

In this case, LaTeX has «taken the figure away», and will typeset it at some location it fancies (it does the same with tables) the only thing we can say (for sure) about the location is that it won't be inside that center environment. As a result, the center environment is left with nothing to do … except to make a mess of your vertical spacing.

The solution is the same as that outlined in the same answer, noting that all control of an figure or table needs to be inside the environment. So the example's code should be converted to

\begin{figure}
  \centering
  ...
\end{figure}

(or something similar for a table).


Source: Why is my table/figure/… not centred?

composition/flottants/flottant_non_centre.txt · Dernière modification: 2019/02/03 08:33 par jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0