3

I am in the process of trying to compile a LaTeX document. I have a separate .bib file and am using BiBTex. I had put in eight figures, generally using the htbp placement option, and these compiled fine.

However when trying to compile to insert a 9th figure using the command:

\begin{figure}[htbp] 
\centering 
\includegraphics[width=\textwidth]{figures/Fig9-retry.png} 
\caption[A representation of an injector block.]{A representation of an injector block.} 
\label{fig:9} 
\end{figure} 

It does not compile and I get the following error messages:

<use figures/Fig8-storagemod.png> 
Package pdftex.def Info: figures/Fig8-storagemod.png used on input line 270. 
(pdftex.def) Requested size: 455.24411pt x 266.9888pt. 
[13 <C:/Users/jd7368/Documents/Lit review/figures/Fig8-storagemod.png>] [14] [ 
15] [16] [17] [18] 
! Undefined control sequence. 
<argument> ... \sf@size \z@ \selectfont \@currbox 
l.440 \begin{figure}[htbp] 
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 character: There is no ô in font cmr12! 
Missing character: There is no ó in font cmr12! 
Missing character: There is no ò in font cmr12! 
Missing character: There is no ñ in font cmr12! 
Missing character: There is no ð in font cmr12! 
Missing character: There is no ï in font cmr12! 
Missing character: There is no î in font cmr12! 
Missing character: There is no í in font cmr12! 
Missing character: There is no ì in font cmr12! 
Missing character: There is no ë in font cmr12! 
Missing character: There is no ü in font cmr12! 
Missing character: There is no û in font cmr12! 
Missing character: There is no ú in font cmr12! 
Missing character: There is no ù in font cmr12! 
Missing character: There is no ø in font cmr12! 
Missing character: There is no ÷ in font cmr12! 
Missing character: There is no ö in font cmr12! 
Missing character: There is no õ in font cmr12! 
! Undefined control sequence. 
\@xfloat ...a \@tempcntb \global \count \@currbox 
\@tempcnta }\@fltovf \fi \... 
l.440 \begin{figure}[htbp] 
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> 
} 
l.440 \begin{figure}[htbp] 
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.) 


! LaTeX Error: Too many unprocessed floats. 

See the LaTeX manual or LaTeX Companion for explanation. 
Type H <return> for immediate help. 
... 
l.440 \begin{figure}[htbp] 
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.440 \begin{figure}[htbp] 
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> 
\color@vbox 
l.440 \begin{figure}[htbp] 
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.) 

<figures/Fig9-retry.png, id=518, 642.14906pt x 331.99031pt> 
File: figures/Fig9-retry.png Graphic file (type png) 

<use figures/Fig9-retry.png> 
Package pdftex.def Info: figures/Fig9-retry.png used on input line 442. 
(pdftex.def) Requested size: 455.24411pt x 235.36522pt. 

! Undefined control sequence. 
\@largefloatcheck ->\ifdim \ht \@currbox 
>\textheight \@tempdima -\textheigh... 
l.445 \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> 
> 
l.445 \end{figure} 
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.) 

! Undefined control sequence. 
<argument> \@currbox 
l.445 \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. 

! Improper \prevdepth. 
<recently read> \prevdepth 
l.445 \end{figure} 
You can refer to \spacefactor only in horizontal mode; 
you can refer to \prevdepth only in vertical mode; and 
neither of these is meaningful inside \write. So 
I'm forgetting what you said and using zero instead. 

! You can't use `\prevdepth' in horizontal mode. 
\end@float ...pdima \prevdepth \vbox {}\prevdepth 
\@tempdima \penalty \@floa... 
l.445 \end{figure} 
Sorry, but I'm not programmed to handle this case; 
I'll just pretend that you didn't ask for it. 
If you're in the wrong mode, you might be able to 
return to the right one by typing `I}' or `I$' or `I\par'. 

! Missing number, treated as zero. 
<to be read again> 
\penalty 
l.445 \end{figure} 
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.) 

! Illegal unit of measure (pt inserted). 
<to be read again> 
\penalty 
l.445 \end{figure} 
Dimensions can be in units of em, ex, in, pt, pc, 
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one! 
I'll assume that you meant to say pt, for printer's points. 
To recover gracefully from this error, it's best to 
delete the erroneous units; e.g., type `2' to delete 
two letters. (See Chapter 27 of The TeXbook.) 

I have looked into a few previous forum answers relating to the “too many unprocessed floats” problem and I tried inserting the \clearpage command at the bottom of each page, and also tried using the morefloats package. Neither of these seemed to work and it is still not compiling. The problem seems linked with the 9th figure insert.

Does anyone have and suggestions on how I could get the file to compile? This would be much appreciated.

My pre-amble looks like:

\documentclass[a4paper,12pt]{report} 
\usepackage{graphicx} 
\usepackage[left=3.0cm, right=2.0cm, top=3.0cm, bottom=3.0cm]{geometry} 
\usepackage{amsmath} 
\usepackage{url} 
\usepackage[notlof, nottoc, notlot]{tocbibind} 
\usepackage{hyperref} 
\usepackage{siunitx} 
\usepackage{mathabx} 
\usepackage{morefloats} 
\usepackage{setspace} 
\linespread{1.6} 
\usepackage{cite} 
Torbjørn T.
  • 206,688
  • 1
    The "Undefined control sequence \begin{figure}" error sounds as if you have a syntax error in some command before the figure environment. You should try to make a complete example- – Ulrike Fischer Sep 04 '13 at 13:30
  • 2
    Undefined control sequence \begin{figure}[htbp] does not look like the way TeX sets an undefined command error (the undefined command is always the last thing on the following line) is this some "editor view" what is the first error in the log file. (Ignore all following errors they are often spurious) – David Carlisle Sep 04 '13 at 13:59
  • This is the first message in the log file: <use figures/Fig8-storagemod.png> Package pdftex.def Info: figures/Fig8-storagemod.png used on input line 272. (pdftex.def) Requested size: 455.24411pt x 266.9888pt. [13 <C:/Users/jd7368/Documents/Lit review/figures/Fig8-storagemod.png>] [14] [ 15] [16] [17] [18] ! Undefined control sequence. ... \sf@size \z@ \selectfont @currbox

    l.448 \begin{figure}[htbp]

    The control sequence at the end of the top line of your error message was never \def'ed.

    – James Champion Sep 05 '13 at 08:55
  • 1
    You should edit your question to include that part of the .log file. Why did you create a new question, by the way? – Torbjørn T. Sep 05 '13 at 09:49
  • A rather off-topic tip for you - your figure file names have the figure numbers in them. That's not very helpful for you - there's no guarantee they'll be placed in that sequence even if you don't rearrange your document. – Chris H Sep 05 '13 at 12:58
  • @ChrisH LaTeX doesn't rearrange the order of figure floats ... – Torbjørn T. Sep 05 '13 at 13:01
  • @TorbjørnT. Even if you have different placement specifiers, or vastly different sizes? I was under the impression that a huge figure called first with [hp] could be placed after a small figure inserted with [htb]. – Chris H Sep 05 '13 at 13:12
  • @ChrisH Quoting Frank Mittelbach: 'One important aspect of the float placement algorithm is that LaTeX never violates the order of placement within a class of floats. E.g., if you have figure1, table1, figure2 in a document, then figure1 will always be placed before figure2. However, table1 (belonging to a different float class) will be placed independently and hence can appear before, after, or between the figures.' – Torbjørn T. Sep 05 '13 at 13:15
  • @TorbjørnT. thanks - maybe the different classes what what I was thinking of - the text looks vaguely familiar. It's not something I've given much though to as my figures tend to be broadly similar in both size and placement specifiers. So 1 of my 2 reasons in my comment above is wrong - the other still holds I believe. – Chris H Sep 05 '13 at 13:16
  • @ChrisH apart from a bug in figure* (which can lose order with respect to figure) which is fixed if you load fix-ltx2e figures will always stay in order (however it is a bad idea to label them numerically as it gets confusing if you edit and change the order) – David Carlisle Sep 05 '13 at 16:03
  • @DavidCarlisle thanks, I had misremembered/misinterpreted, and Torbjørn T. corrected me. Logical rather than numerical figure naming is a big plus of LaTeX for me, which was my other reason for pointing it out above. – Chris H Sep 05 '13 at 16:09

1 Answers1

6
Missing character: There is no ô in font cmr12! 

you are using accented characters in the original (7bit) TeX encoding

Add

\usepackage[T1]{fontenc}

and use the 8bit encoded fonts. You probably also want

\usepackage[latin1]{inputenc}

to declare that you are using 8bit input.

Your other error is that \@currbox is undefined. That is an internal box register that plays a central part in figure/table placement. If it is undefined it means that some code that you have not shown has undefined it. Unless you show us the code there is not much more that can be said about that.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
David Carlisle
  • 757,742