Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 1020 Bytes

FAQ-centre-flt.md

File metadata and controls

35 lines (32 loc) · 1020 Bytes
title category permalink
Why is my table/figure/… not centred?
errors
/FAQ-centre-flt

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).