views:

212

answers:

4

Hi, I've hit an annoying problem in LaTeX. I've got a tex file of about 1000 lines. I've already got a few figures, but when I try to add another figure, It barfs with:

! Undefined control sequence.
<argument> ... \sf@size \z@ \selectfont \@currbox

l.937 \begin{figure}[t]

If I move the figure to other parts of the file, I can get similar errors on different lines:

! Undefined control sequence.
<argument> ... \sf@size \z@ \selectfont \@currbox

l.657 \paragraph
                {A Centering Algorithm}

If I comment out the figure, all is ok.

%\begin{figure}[t]
% \caption{Example decision tree, from Reiter and Dale [2000]}
% \label{fig:relation-decision-tree}
% \centering
% \includegraphics[keepaspectratio=true]{./relation-decision-tree.eps}
%\end{figure}

If I keep just the begin and end like:

\begin{figure}%[t]
% \caption{Example decision tree, from Reiter and Dale [2000]}
% \label{fig:relation-decision-tree}
% \centering
% \includegraphics[keepaspectratio=true]{./relation-decision-tree.eps}
\end{figure}

I get:

! Undefined control sequence.
<argument> ... \sf@size \z@ \selectfont \@currbox

l.942 \end
          {figure}

At first, I thought maybe LaTeX has hit some limit, and I tried playing with the ulimits, but that didn't help. Any ideas?

i've got other figures with graphics already. my preamble looks like:

\documentclass[acmcsur,acmnow]{acmtrans2n}
\usepackage{array}
\usepackage{lastpage}
\usepackage{pict2e}
\usepackage{amsmath}
\usepackage{varioref}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{qtree}
\usepackage{rotating}
\usepackage{tree-dvips}
\usepackage{mdwlist}
\makecompactlist{quote*}{quote}
\usepackage{verbatim}
\usepackage{ulem}
A: 

If I Google for "latex undefined control sequence" I get this.

I've successfully included a graphic into LaTeX using something like this:

\usepackage{amsmath,amsthm,graphicx}

...

I just wanted to test adding an image to a \LaTeX file:

\includegraphics[scale=0.60]{basic-info.png} 

I typeset an entire dissertation of 200 pages with lots of figures in LaTeX and didn't run into a limit like that. I'd bet on a syntax problem first before I'd assume a size issue.

duffymo
i assumed a syntax problem, but i can't imagine moving the figure to change the syntax error, nor can i imagine scale being the problem, either. but something is wrong, somewhere.
Jayen
Hah! Graduate studies jinx.
dmckee
A: 
Norman Ramsey
+2  A: 

I found, not that it's a problem with \textsuperscript, but that it's with a ^ def I picked up from http://anthony.liekens.net/index.php/LaTeX/SubscriptAndSuperscriptInTextMode . The fix is to put the use of ^ in {}, as in I've put entire sections where I use lots of ^ and _ in {}. Hurrah!

Jayen
Thanks for reporting back. May I suggest that a change of question title could make this more searchable for latter users. Best if you could get some keywords from the error message *and* a reference to the "^"/"_" in there.
dmckee
done. hopefully searchable by people who made the same assumption i did, as well as people who have successfully identified the cause.
Jayen
A: 

Dear Jayen,

Please receive the thanks of a (formerly) utterly-confounded graduate student. Quick clarification for other users:

{The quickest ^{way} to put this solution into practice is to bracket all sections of text involving the character ``\^'' as shown here.}

Aaron