Discussion:
Undefined control sequence??
(too old to reply)
mark
2009-08-05 20:49:33 UTC
Permalink
Hi

I'm a new TEX user. I have some problems with my installation and I don't
understand why.

To test my installation, I've written a very simple TEX file:

\documentstyle{article}
\begin{document}
This is my first document with \LaTeX{}.
\end{document}

and then my log file looks like this:

This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2000.10.3) 05 AUG
2009 15:37
**testfile
(testfile.tex
! Undefined control sequence.
l.1 \documentclass
{article}
? R
OK, entering \nonstopmode...
! Undefined control sequence.
l.2 \begin
{document}
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.

! Undefined control sequence.
l.3 This is my first document with \LaTeX
{}.
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.

in fact it seems that my system doesn't know where to look for
the different TEX control sequences... but if I ignore this (by typing
'R') I have a dvi file with all my unformatted text...

Has anyone else experienced this problem?

Thanks.
Joris
2009-08-05 20:57:29 UTC
Permalink
Post by mark
Hi
I'm a new TEX user. I have some problems with my installation and I don't
understand why.
\documentstyle{article}  
\begin{document}
This is my first document with \LaTeX{}.
\end{document}
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2000.10.3)  05 AUG
2009 15:37
**testfile
(testfile.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
? R
OK, entering \nonstopmode...
! Undefined control sequence.
l.2 \begin
          {document}
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.
! Undefined control sequence.
l.3 This is my first document with \LaTeX
                                          {}.
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.
in fact it seems that my system doesn't know where to look for
the different TEX control sequences... but if I ignore this (by typing
'R') I have a dvi file with all my unformatted text...
Has anyone else experienced this problem?
Thanks.
Try the command latex instead of tex, or if you're using a gui, choose
the latex compile option instead of the tex one.
jon
2009-08-05 21:37:39 UTC
Permalink
Post by mark
Hi
I'm a new TEX user. I have some problems with my installation and I don't
understand why.
\documentstyle{article}  
\begin{document}
This is my first document with \LaTeX{}.
\end{document}
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2000.10.3)  05 AUG
2009 15:37
**testfile
(testfile.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
? R
OK, entering \nonstopmode...
! Undefined control sequence.
l.2 \begin
          {document}
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.
! Undefined control sequence.
l.3 This is my first document with \LaTeX
                                          {}.
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.
in fact it seems that my system doesn't know where to look for
the different TEX control sequences... but if I ignore this (by typing
'R') I have a dvi file with all my unformatted text...
Has anyone else experienced this problem?
Thanks.
also: \documentstyle is old. you should use \documentclass{article}
nowadays....
(though that simple a document will work if you latex it.)

cheers,
jon.
Falling Angel
2009-08-05 22:34:23 UTC
Permalink
Post by mark
\documentstyle{article}
\begin{document}
This is my first document with \LaTeX{}.
\end{document}
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2000.10.3) 05 AUG
2009 15:37
**testfile
(testfile.tex
! Undefined control sequence.
The simplest way to stop these error messages is to insert a line
\batchmode
at the start of your file, before the \documentstyle line. You should
find it will then compile cleanly.

You could also try using a version of tex less than 9 years old.

HTH.
Dan
2009-08-06 03:12:25 UTC
Permalink
Post by Falling Angel
Post by mark
\documentstyle{article}  
\begin{document}
This is my first document with \LaTeX{}.
\end{document}
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2000.10.3)  05 AUG
2009 15:37
**testfile
(testfile.tex
! Undefined control sequence.
The simplest way to stop these error messages is to insert a line
\batchmode
at the start of your file, before the \documentstyle line. You should
find it will then compile cleanly.
If by "cleanly" you mean "without visible messages", then yes,
that will do it. However, every "undefined control sequence"
message means some command is not having its intended
effect. In the OP's example, he will get a document that says:

" article document This is my first document with ."

with no indication of what went wrong.


Dan

Loading...