FormaTeX
FatalTypography & Layout

Float Used in Non-Outer-Par Mode

! LaTeX Error: Not in outer par mode.

What this error means

Figure, table, and other floating environments can only be used in 'outer paragraph mode' — the normal flow of text. They cannot appear inside boxes (\mbox, \fbox), minipages, or other constrained environments.

Common causes

  • A figure or table environment inside a minipage
  • A float inside \parbox{} or \makebox{}
  • Nested floating environments

How to fix it

Move the float outside the constraining environment. If you need an image inside a minipage, use \includegraphics{} directly without the figure wrapper. Use \captionof{figure}{} from the capt-of package for a caption outside a float.

Code examples

Causes the error
\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{minipage}{0.5\textwidth}
  \begin{figure}[h]  % Error: float inside minipage
    \includegraphics{image.png}
  \end{figure}
\end{minipage}

\end{document}
Fixed
\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{minipage}{0.5\textwidth}
  \includegraphics[width=\linewidth]{image.png}
\end{minipage}

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy