Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Speravir Mar 23 at 3:46
1  
Do not mix up TeX editor and TeX distribution: Yo use the editor TeXworks, which is included in the TeX distribution MiKTeX. And could you give a link to an arXiv resource, please? –  Speravir Mar 23 at 3:48
    
Thank you for your comment. I actually have the problem with any arXiv LaTeX source file. –  User X Mar 23 at 4:10
    
And a link to such a file is necessary I think. –  Speravir Mar 23 at 4:14
1  
arXiv papers have the following form: YYMM.NNNNvV (arxiv.org/help/arxiv_identifier). I noticed that when you download a LaTeX source file with the idenfier YYMM.NNNNvV, the file appears on your computer (at least in Windows) as YYMM. If you make Windows show the extensions for known file types, then the downloaded file appears as YYMM.NNNNvV. This probably means that TeXworks is thinking that the extension of the file is .NNNNvV, and this is probably what causes the problem. So, by changing .NNNNvV to .tex (or by adding .tex at the end of the file name) the problem is fixed. –  User X Mar 23 at 4:50

1 Answer 1

up vote 2 down vote accepted

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.)

share|improve this answer
    
Thank you again. The problem was simply fixed by adding the .tex extension! –  User X Mar 23 at 4:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.