# Some strange errors when moving from MikTex on windows to Ubuntu TeX.

I have some tex code that I used to compile successfully (actually, with some 3 non-important warnings) on Windows using MikTex. When I try to compile it on Ubuntu using:

tex composition-body.tex


I get the following errors:

rafid@MyLaptop:~/Desktop/Composition$tex composition-body.tex This is TeX, Version 3.1415926 (TeX Live 2009/Debian) (./composition-body.tex ! Undefined control sequence. l.6 \title {SOME TITLE} ? ! Undefined control sequence. l.10 \author {SOME AUTHOR} ? ! Undefined control sequence. l.40 \begin {document} ? ! Undefined control sequence. l.42 \maketitle ?  Any idea why is that happening? By the way, I had to press "Enter" after every error for the compile to proceed! Just in case you need this, I am using the EuroGraphics template: http://www.eg.org/EG/Publications/guidelines UPDATE: I tried what was proposed by Lian, and now I am getting these errors: rafid@MyLaptop:~/Desktop/Composition$ pdflatex composition-body.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./composition-body.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
(./composition-body.aux)

! LaTeX Error: The font size command \normalsize is not defined:
there is probably something wrong with the class file.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.40 \begin{document}

?
! Undefined control sequence.
l.42 \maketitle

?

! LaTeX Error: Environment abstract undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.44 \begin{abstract}

?

! LaTeX Error: Environment classification undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.59 \begin{classification}
% according to http://www.acm.org/class/1998/
?

-
post the entire preamble section of your tex file. From the output, it doesn't look like your file has specified a documentclass. –  Willie Wong Dec 12 '10 at 14:18
It sounds like you have a latex file (the commands like maketitle, and environments like abstract), but it does not have a \documentclass specified on the top. Is it a part of a larger project? Do you also have a file like composition-header.tex or something like that? How do you usually compile the file in miktex? –  Jan Hlavacek Dec 12 '10 at 14:20

It seem that you're running LaTeX on a document which should be included. Run LaTeX on the main document instead.

On MiKTeX perhaps your editor used the main document automatically (project setting).

When I read the file name composition-body.tex it reads like a part but not the main document. Typeset the main or frame document which uses \include or \input to read in composition-body.tex.

I had a look at the your linked template. There's a file EGauthorGuidelines-body.inc which contains title, author, abstract, \begin{classification}... just like your body file. But this file is not compilable, even if you rename it to get the extension .tex. Instead, EGauthorGuidelines-cgf-fin.tex has to be compiled. This file uses \input{EGauthorGuidelines-body.inc} to include the body file.

-
Ops, you are right, how did I make this mistake? No, on Windows I am using MeWa editor which asks me about the main file. So I already know this, but it was a mistake. But I think Lian's answer below (using latex rather than tex) is correct also, because I must have tried it before on the main file (composition.txt rather than composition-body.txt) before, yet got some error. I still get some error, so I will re-edit the post and add the errors. It will be great if you can help me with them. –  Promather Dec 12 '10 at 15:02
@Rafid: since the warnings are a different subject, please open a separate question for that. This keeps the site readable and sorted (for each subject a question with appropriate tags, to be found by others who look for an existing solution). –  Stefan Kottwitz Dec 12 '10 at 15:14
yes, will do that. Thanks. –  Promather Dec 12 '10 at 17:51

Try running

latex composition-body.tex or pdflatex composition-body.tex

instead of plain tex, which won't recognise LaTeX commands such as \title etc.

-
I tried it. It seems better, but still got many errors. I updated my question for the new errors. –  Promather Dec 12 '10 at 13:57