6

I had several figures included in my .tex file with the use of \usepackage{graphicx} written like the following:

\begin{figure}[ht]
\center
\includegraphics{compton.jpg}
\caption{Compton scattering}
\end{figure}

They were all compiling fine yet after writing some basic text elsewhere on the page, when I tried to compile it said:

\begin{figure}[ht]
You've lost some text. Try typing return to proceed

Can anyone shed light as to what may have occured?

Evan
  • 61

1 Answers1

6

You've lost some text. Try typing return to proceed is the help text that you get if you respond to an error with h. most likely the error was Float(s) lost although that help text is used in other places so it is hard to be sure given the information you posted.

Using [ht] restricts the places where LaTeX can place floats so makes this error more likely, try to always include p in the optional argument (if you use it at all), then normally if too many floats build up, LaTeX can make float pages to flush them out. Otherwise as a last resort you can use \clearpage to force the floats to appear.

David Carlisle
  • 757,742
  • Sorry I am new to latex and didn't tell you the correct error. It says 'Error: Not in outer par mode.' A quick look online suggests that this is usually due to attempting to put figures in tables and things like that. The problem here is they were working and I didn't change them. – Evan Mar 22 '12 at 15:29
  • 2
    @Evan: You should never put the figure-environment inside another environment. It doesn't make sense: figure wants to float. But you can use without problem the \includegraphics inside tabulars etc. – Ulrike Fischer Mar 22 '12 at 15:42
  • If they were working and now they are not, someone has changed something:-) As @UlrikeFischer says you have a figure inside a table or a box or something. The solution is not to do that, but without seeing an example it is hard to say exactly what to change. – David Carlisle Mar 22 '12 at 15:46
  • Hey guys thanks for the help. I found the issue. I hadn't closed off my abstract with \end{abstract} – Evan Mar 22 '12 at 15:50