UK TeX FAQ -- question label parmoderr

### Not in outer par mode

For example:

>     *\mbox{\marginpar{foo}}

>     ! LaTeX Error: Not in outer par mode.

The error comes when you try to build something movable inside a box. Movable things, in this context, are floating environments (`figure` and `table`, for example), and `\``marginpar`s. LaTeX simply doesn’t have the mechanisms for floating out of boxes. In fact, floats and `\``marginpar`s themselves are built out of boxes, so that they can’t be nested.

If your error arises from `\``marginpar`, you simply have to think of an alternative way of placing the command; there is no slick solution.

If a floating environment is the culprit, it may be possible to use the “`H`” placement option, provided (for example) by the float package:

>     \parbox{25cm}{%
>       \begin{figure}[H]
>       ...
>       \caption{Apparently floating...}
>       \end{figure}%
>     }

This example makes little sense as it stands; however, it is conceivable that sane uses could be found (for example, using a package such as algorithm2e to place two algorithms side-by-side).

`algorithm2e.sty`
  macros/latex/contrib/algorithm2e (or browse the directory); catalogue entry
`float.sty`
  macros/latex/contrib/float (or browse the directory); catalogue entry

This answer last edited: 2013-09-09

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=parmoderr