Discussion:
"Undefined control sequence" error
(too old to reply)
Ricardo S.
2007-05-05 00:59:45 UTC
Permalink
Right, so I haven't gotten anywhere in the LaTeX user group with this
question, so let's try the friendly folks here. =)

I'm using the following commands to place a floating boxedminipage in
the text of my report:

\begin{figure}[t]
\centering
\begin{boxedminipage}{.9\textwidth}
Text in a box \\
text in a box! \\
OMG!!
\end{boxedminipage}
\end{figure}

When I go to compile, I get the error:

! Undefinedcontrol sequence.
\@newbaseline -> \***@baselineskip


\baselineskip \baselinestretch \baseli...

1.417 \begin{figure}[t]

Utterly marvelous. So I understand that it has a problem with
\begin{figure}[t], I just don't understand why. The boxedminipage and
graphicx packages are all loaded, so am I missing anything in
particular?

-Ricardo-
Scott Pakin
2007-05-05 02:47:13 UTC
Permalink
Post by Ricardo S.
I'm using the following commands to place a floating boxedminipage in
\begin{figure}[t]
\centering
\begin{boxedminipage}{.9\textwidth}
Text in a box \\
text in a box! \\
OMG!!
\end{boxedminipage}
\end{figure}
! Undefinedcontrol sequence.
\baselineskip \baselinestretch \baseli...
1.417 \begin{figure}[t]
Utterly marvelous. So I understand that it has a problem with
\begin{figure}[t], I just don't understand why. The boxedminipage and
graphicx packages are all loaded, so am I missing anything in
particular?
Yes; a minimal example (cf. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl). ;-)

The following document works for me:

\documentclass{article}
\usepackage{boxedminipage}

\begin{document}

\begin{figure}[t]
\centering
\begin{boxedminipage}{.9\textwidth}
Text in a box \\
text in a box! \\
OMG!!
\end{boxedminipage}
\end{figure}

\end{document}

Hence, the problem is caused by something in your document other than
what you posted. Try posting a short but complete document that causes
the "undefined control sequence" error to appear and someone here should
be able to suggest a solution.

-- Scott
Ricardo S.
2007-05-05 13:22:34 UTC
Permalink
Ok, so I think I found the source of the problem. A simplified
example that leads to the error is:

\documentclass[11pt]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{boxedminipage}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{portland}
\usepackage{rotating}
\usepackage{sw20mitt}
\usepackage{ulem}

\begin{document}

\begin{figure}[t]
\centering
\begin{boxedminipage}{\textwidth}
TEXT \\
TEXT \\
TEXT \\
TEXT
\end{boxedminipage}
\end{figure}

\end{document}

It turns out that the inclusion of the style file sw20mitt is to
blame, and that once it's put in errors are thrown at the
\being{figure} declaration. sw20mitt is necessary for me, though,
since it is a macro that creates the standard thesis title pages. The
style file itself depends on the other files mitthesi.sty and
thmsupp.tex. All three of these files may be found at the website:

http://ftp.itam.mx/pub/academico/investig/latex/LaTeXWin/base/MACROS/

However, none of these three files contain the command \@newbaseline
or \***@baselineskip. Any help would be appreciated.

-Ricardo-
Ulrike Fischer
2007-05-05 13:38:59 UTC
Permalink
Post by Ricardo S.
Ok, so I think I found the source of the problem. A simplified
\documentclass[11pt]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{boxedminipage}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{portland}
\usepackage{rotating}
\usepackage{sw20mitt}
\usepackage{ulem}
\begin{document}
\begin{figure}[t]
\centering
\begin{boxedminipage}{\textwidth}
TEXT \\
TEXT \\
TEXT \\
TEXT
\end{boxedminipage}
\end{figure}
\end{document}
It turns out that the inclusion of the style file sw20mitt is to
blame, and that once it's put in errors are thrown at the
\being{figure} declaration. sw20mitt is necessary for me, though,
since it is a macro that creates the standard thesis title pages. The
style file itself depends on the other files mitthesi.sty and
http://ftp.itam.mx/pub/academico/investig/latex/LaTeXWin/base/MACROS/
The culprit is doublespace.sty.

If you search google for \***@baselineskip you can find newer
version that don't use the command any more e.g. this one:

http://www.anu.edu.au/Physics/honours/downloads/thesis/doublespace.sty

If you need only small parts of your sty it is perhaps a better idea
to copy only the relevant macros to a new style. doublespace e.g. is
not recommanded anymore. setspace is much better.
--
Ulrike Fischer
Ricardo S.
2007-05-06 14:34:40 UTC
Permalink
Post by Ulrike Fischer
The culprit is doublespace.sty.
http://www.anu.edu.au/Physics/honours/downloads/thesis/doublespace.sty
If you need only small parts of your sty it is perhaps a better idea
to copy only the relevant macros to a new style. doublespace e.g. is
not recommanded anymore. setspace is much better.
--
Ulrike Fischer
doublespace.sty? I don't have it included in any \usepackage
statement, what is using it?

-Ricardo-
Ulrike Fischer
2007-05-06 15:23:34 UTC
Permalink
Post by Ricardo S.
Post by Ulrike Fischer
The culprit is doublespace.sty.
http://www.anu.edu.au/Physics/honours/downloads/thesis/doublespace.sty
If you need only small parts of your sty it is perhaps a better idea
to copy only the relevant macros to a new style. doublespace e.g. is
not recommanded anymore. setspace is much better.
--
Ulrike Fischer
doublespace.sty? I don't have it included in any \usepackage
statement, what is using it?
Look in the log-file. Then you can see when (and by which sty) it is
loaded. (And files can also be loaded by other commands than
\usepackage.
--
Ulrike Fischer
Pete Becker
2007-05-05 11:22:47 UTC
Permalink
Post by Ricardo S.
Utterly marvelous. So I understand that it has a problem with
\begin{figure}[t], I just don't understand why. The boxedminipage and
graphicx packages are all loaded, so am I missing anything in
particular?
I don't know the answer here, but I do have a tip: keep in mind that TeX
reports an error at the point where it finds that things don't make
sense, which can often be far after the point where the source file had
something that wasn't right. In my work, the most common culprit is a
missing }, which leads to an obscure error message thirty lines later
complaining about something that has no obvious connection to the actual
error. Sometimes the only way to find the problem is to cut your source
way back, to something that works, then gradually add things back, in
very small steps, until the error comes back. If the last step was small
enough, you've found the problem.

My guess is that that's what you're seeing: something went astray before
\begin{figure}[t], but everything made sense to TeX until it got into
the middle of setting up the figure.
--
-- Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (www.petebecker.com/tr1book)
Loading...