Rules / Build

LaTeX Error: Not in outer par mode — Float inside a box

A figure, table or margin note is placed inside a minipage, parbox or another float.

Fix

Move the float out, or use \captionof inside a minipage.

Example

Reproduced on TeX Live 2026 by CI · pdflatex · corpus/figure-in-minipage

Float inside a minipage

Fails: main.tex
\documentclass{article}
\begin{document}
\begin{minipage}{0.45\linewidth}
  \begin{figure}
    \centering
    \rule{3cm}{2cm}
    \caption{A placeholder.}
  \end{figure}
\end{minipage}
\end{document}
What TeX prints in main.log
! LaTeX Error: Not in outer par mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5     \centering
                  
You've lost some text.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Undefined control sequence.
…