[Tex/LaTex] Problems compiling arXiv LaTeX source files

arxivcompilingerrorsmiktextexworks

I use LaTeX to write papers. I'm using TeXworks/MiKTeX on a Windows XP computer. When I write the LaTeX code, I can compile it without any problems using "pdfLaTeX+MakeIndex+BibTeX".

But if I download LaTeX source code from arXiv and I try to compile it using "pdfLaTeX+MakeIndex+BibTeX" it won't work. I get the error "! Undefined control sequence".

However, I don't have any problems compiling LaTeX source code from arXiv if I use "pdfLaTeX" instead of "pdfLaTeX+MakeIndex+BibTeX".

Why is this happening? What's the difference between "pdfLaTeX+MakeIndex+BibTeX" and "pdfLaTeX"?

The reason why I ask these questions is that I'd like to make some minor changes to one of my arXiv papers, so I will download the LaTeX source code and make the changes there. I guess I'll have to use "pdfLaTeX" to compile the source code, but I want to make sure that no unwanted changes are made in the paper.

LaTeX source files downloaded from arXiv don't seem to have .tex extension. They seem to be of a different type (I guess this is due to arXiv processing), but anyway I can open them without any problems using TeXworks.

Best Answer

Try adding the .tex extension back on to the file. I'm not sure why arXiv would remove it, but many editors will assume that it's there when running compile sequences.

To see what I mean, compare the compilation for pdfLaTeX and BibTeX:

$ pdflatex myfile.tex
$ bibtex myfile

Note that bibtex doesn't need the file extension since it also looks at the files generated by the LaTeX run. Editors like TeXworks (and others, no doubt) will run these sequences for you automatically, but this requires that it knows where the extension is so that it can remove it. When there is no extension to remove, ambiguities will arise:

$ pdflatex myfile
$ bibtex myfile

It's likely that one of these programs picked up on the 'wrong' myfile, causing the error that you saw. (For example, take a look inside the aux file; running pdflatex directly on this file would certainly throw an error.)

Related Question