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.

When we make a file, we write a tex file, run it, check the pdf file, fix the tex file, rerun it, and check the pdf file again. Whenever I rerun the file without closing previous version of pdf file, it occurs an error. If I close the pdf file, it works well. But it is bothering to close the pdf file every time. How can I fix it? I am using Adobe X reader in Windows XP

share|improve this question
9  
Adobe Reader X doesn't allow the refresh of the opened files. So it is its fault if you get an error. The only way to achieve what you ask, I think, is to change the pdf reader. Try SumatraPDF. It is for Windows and it can be set up even for direct/inverse search –  Spike Jun 14 '12 at 21:26
    
@cmhughes Done! Thanks –  Spike Jun 15 '12 at 7:14
    
@Spike There is another (slightly more difficult) way: If the editor supports DDE commands, the editor could close the Adobe Reader and re-open it after compilation. TXC for example supports DDE commands (another hint: search for acroviewR10). –  matth Jun 15 '12 at 7:36
    
possible duplicate of TeXnicCenter on Windows: Building Problems –  egreg Jun 15 '12 at 19:52

1 Answer 1

Adobe Reader X locks the file after opening it, so no other program is allowed to edit the PDF while open. This is why pdflatex gives you an error trying to overwrite the file. Depending on how you compile your document (interactive or non interactive way), you could specify a new file for the resulting PDF, but this is quite annoyng. The best way to achieve this is to change the PDF viewer while you are working with LaTeX. SumatraPDF is a possibility on Windows (and allows direct/inverse search).
Alternatively, you could use a LaTeX editor equipped with an embedded reader, such as TeXworks, Texmaker or TeXstudio, which allow what you asked for, out of the box.

share|improve this answer

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.