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've compiled a LaTeX document successfully by typing

latex documentname.tex

into terminal when in the correct working directory. The document successfully compiles. I'm using TexLive.

I then make changes to the document. For some reason, when I type latex documentname.tex again, it compiles very quickly and gives me the previous version of the document out.

I've tried deleting the output file and log file and typing latex documentname.tex yet again, but it still somehow outputs the old version of the document. Same for the pdflatex command - what is going wrong here? Is there some other command I should be using or extra arguments I can pass in? Even changing the filename of the document does not cause the new version to be compiled - I still get the old one out.

share|improve this question

closed as too localized by Stefan Kottwitz Jan 14 '12 at 19:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Martin Scharrer Dec 26 '11 at 13:25
3  
What do you mean by getting the old one, do you mean opening in Acrobat Reader or something else? Also, TeX does not have a memory so if you delete a file there is no cache to bring it back. It must be a forgotten file somewhere. –  percusse Dec 26 '11 at 13:37
3  
Was a new file "documentname.log" created? Looking into log-file might help diagnose the problem. (If the output file was locked for writing by the viewer, or another application, I think you would get an error during the compilation, so this is probably not the problem.) –  Martin Dec 26 '11 at 13:48
    
Isn't your tex file open in Acrobat Reader or something like that? If yes, close it and then try running your tex file again. –  Vahid Damanafshan Dec 26 '11 at 22:13
1  
I closed the question, as the information is insufficient and the comments have not been answered. If substantial information would be added to the question, it could be reopened. –  Stefan Kottwitz Jan 14 '12 at 19:42

1 Answer 1

Could you post little bit more info? Based upon the fact that you are using TeX Live it looks like that you are using some kind a Unix or Unix-like system? Which editor do you use? If you just run

latex filename.tex

the default output file is a dvi file. I would expect that dvi-viewer program (xdvi?) is not locking already open dvi file and that it does automatic update. The safest thing would be to close dvi file and reopen it.

Running

pdflatex 

will by default produce pdf file. Some pdf viewers like Adobe Reader (not available on most Unix-es) will lock the file so you will have to close and re-open it to see the changes. Some programs like xpdf will not lock pdf file but might not update automatically.

Nobody previously mentioned the last two possibilities:

  1. You have a multi pass job so running latex once is not enough to change the document (not at least as much as you want)

  2. Something went terribly wrong with the last latex-ing so no new dvi file is produced.

share|improve this answer

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