I am using texstudio on mac os x. Each time I change some sentences in my .tex file and I need to see the results, I have to close the previous .pdf (if it is already opened) and regenerate the .pdf. Is it possible to update the pdf automatically without doing each time close open.thanks.

  • 2
    Which PDF viewer are you using? Commented Mar 4, 2014 at 22:11
  • @PaulGessler I use Acrobat professional reader Commented Mar 4, 2014 at 22:18
  • 1
    I don't use texstudio, so I can't test this or help much further, but this may help. The problem is that Adobe software locks the PDF file, so nothing can open it for writing while it's open in any Adobe software. The workaround described in the link (and others for other IDEs I've seen) uses dynamic data exchange (DDE) commands for interprocess communication. The idea is to have the IDE/editor tell Adobe to close the file, then run pdf(La)TeX/whatever else, and then signal Adobe to re-open the file. Commented Mar 4, 2014 at 22:39
  • 1
    The alternative, of course, is to switch PDF viewers to one which doesn't lock the file. Commented Mar 4, 2014 at 22:45
  • @PaulGessler thanks! how can I change the viewer on latex studio. May be I can use preview on mac os. Commented Mar 4, 2014 at 22:54

3 Answers 3


I'd recommend you to use the internal PDF viewer because it allows more accurate synchronization between PDF and source. Also, it does not have the closing issue. Check that you have the following settings internal PDF Viewer configuration

If you have a good reason to stay with Adobe Acrobat, here is a description how to setup DDE to automatically close the PDF before compilation: https://sourceforge.net/p/texstudio/feature-requests/650/


If it works the same as on Windows, it's Options -> Configure TeX Studio -> Build -> PDF Viewer, and also ... -> \Build -> Default Viewer. For both, you have the choice between Internal PDF Viewer (Embedded), Internal PDF Viewer (Windowed) and External PDF Viewer.

  • I changed the three values. But It did not works. Commented Mar 5, 2014 at 1:48
  • I modified slightly my answer; there's also a Default Vieweritem to check. Did you save the new settings?
    – Bernard
    Commented Mar 5, 2014 at 2:25

Have a small script in python which does the following:

import time
import os
while (True):
        os.system("xelatex yourOptionsHere youfile.tex")

But I can tell you, doing so sucks the processor !!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .