3

I was trying to include figures in my LaTeX file like this :

\begin{figure} 
\centering
 \includegraphics[scale =0.5]{graph/jm90-10/1.jpg}
   \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 10:90 (CPU:Disk)  }
 \end{figure}

\begin{figure}   
\centering
 \includegraphics[scale =0.5]{graph/jm90-10/2.jpg}
    \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 30:70 (CPU:Disk)  }
 \end{figure}

 \begin{figure}   
\centering
 \includegraphics[scale=0.5]{graph/jm90-10/3.jpg}
    \caption{ Job Mix 90:10 (CPU:Disk) Topology Mix 50:50 (CPU:Disk)  }
 \end{figure}

The figure 1.jpg gets inserted but not other two. The error comes at line 3 of second figure at \includegraphics... as follows

l.253 \centering
You've lost some text. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Undefined control sequence.
\@xfloat ...@fltovf \fi \global \setbox \@currbox
\color@vbox \normalcolor \...
l.253 \centering
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
\vbox
l.253 \centering
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
<graph/jm90-10/3.jpg, id=83, 783.92876pt x 458.71375pt>
File: graph/jm90-10/3.jpg Graphic file (type jpg)
<use graph/jm90-10/3.jpg>
Overfull \hbox (1.96342pt too wide) in paragraph at lines 254--255
[][]
[]
! Undefined control sequence.
\@largefloatcheck ->\ifdim \ht \@currbox
>\textheight \@tempdima -\textheigh...
l.256 \end{figure}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
>

Any help ?

Stefan Kottwitz
  • 231,401
arun
  • 31

1 Answers1

13

It looks very similar to a problem written on LaTeX-Community.org: Can't include the 19th figure. There we see the same error message

You've lost some text. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit
?
! Undefined control sequence.
\@xfloat ...@fltovf \fi \global \setbox \@currbox
\color@vbox \normalcolor \...

but before this came

! LaTeX Error: Too many unprocessed floats.

Perhaps you did not see that. Very probably you have too many floats stored.

Possible solutions:

  • Improve the figure (floats) placement by setting placement options, such as

    \begin{figure}[!htbp]
    

    See: How to use the placement options [t], [h] with figures

  • Take care that your figures would not be too big to fit in the text area
  • Issue a \clearpage to force the output of stored floats at some time
  • Use the morefloats package
Stefan Kottwitz
  • 231,401
  • 2
    @arun: If Stefan's answer solved your problem, don't forget to accept it by clicking the check mark below the vote count of this answer. – doncherry Feb 28 '12 at 10:43