While compiling a LateX file I keep on getting the following error message:
! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
l.400 \end{document}
?
I get this error from a text containing this sentence:
In Yang the authors review the application of process mining
If I remove from the text above the word "mining" the error disappears. I am using MikTeX 2.9 and the editor TexWorks 0.6.1. This looks to me as a bug but reinstallation of MikTeX did not fix the problem.
I think I need a methodological approach to spot the source of the error. Any suggestion on what I could do?
Further details
As suggested below by egreg I have removed all \marginpar instruction but that did not fix the error. Then I removed all embedded figures and this fixed the error. It looks like the offending block of code is the following:
\afterpage{
\begin{figure}[h]
\caption{Time elapsed for critical activities}
\centering
\includegraphics[scale=0.6]{Triage-FibrinolysisElapsedTime}
\label{fig:tfet}
\end{figure}
\clearpage
}
I do not know what is wrong in this block of code, but if I comment it the error disappears. What I do also not know is why this is block of code, that is at the end of the document, makes an error appear when I add the a single word at the beginning of the document.
figureortable) and\marginpar. – egreg Aug 21 '16 at 07:53\afterpage? I see none. You just want\begin{figure}[p]. – egreg Aug 22 '16 at 07:18