The error:
comes when some "main" document feature is shut up somewhere it doesn't like.! LaTeX Error: Not in outer par mode.
The commonest occurrence is when the user wants a figure somewhere inside a table:
a construction that was supposed to put a frame around the diagram, but doesn't work, any more than:\begin{tabular}{|l|} \hline \begin{figure} \includegraphics{foo} \end{figure} \hline \end{tabular}
The problem is, that the\framebox{\begin{figure} \includegraphics{foo} \end{figure}% }
tabular
environment, and the
\
framebox
command restrain the figure
environment
from its natural métier, which is to float around the document.
The solution is simply not to use the figure
environment
here:
What was the float for? - as written in the first two examples, it serves no useful purpose; but perhaps you actually wanted a diagram and its caption framed, in a float.\begin{tabular}{|l|} \hline \includegraphics{foo} \hline \end{tabular}
It's simple to achieve this - just reverse the order of the
environments (or of the figure
environment and the
command):
The same goes for\begin{figure} \begin{tabular}{|l|} \hline \includegraphics{foo} \caption{A foo} \hline \end{tabular} \end{figure}
table
environments (or any other sort
of float you've defined for yourself) inside tabulars or box commands;
you must get the float environment out from inside, one way or
another.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ouparmd