76

Is there a PDF viewer out there for MacOSX that support automatic reload of (in my case LaTex generated) PDFs when they're modified by another application?

  • 2
    TeXShop can be configured to use an external editor. This effectively slaves its auto-updating viewer to whatever editor you like. Does this fit the bill? – qubyte Feb 1 '12 at 12:55
  • I'm currently using AquaMacs + latexmk to produce my PDFs, so I'm afraid no ;) Okular under Linux e.g. works just perfect, reloads the file and jumps automatically to the same position of the document I'd been before. Adobe Acrobat (Pro) just breaks and spills error messages when scrolling in a modified document... – Eric Feb 1 '12 at 12:59
  • 7
    I use Preview.app (the default PDF viewer which comes with OSX), and it reloads automatically the document. – morbusg Feb 1 '12 at 13:04
  • 3
    Skim is pretty good in this respect and has SyncTeX integration with Aquamacs out of the box. – egreg Feb 1 '12 at 13:05
  • 2
    @MarkS.Everitt: yes, I think I really misunderstood. Thanks for your effort. I'm trying different things at the moment and will also have a go on TeXShop. – Eric Feb 1 '12 at 13:43
74

Skim provides this feature. It also provides pdfsync synchronization, so I would consider it as the favorite PDF viewer for LaTeX!

To turn on the feature, go to Preferences in the main Skim menu, then find the Sync tab and from there select Check for file changes and Reload automatically.

Preferences to enable automatic reload

One nuisance about Skim is that on the first change it asks you if you really want to reload the document. There is, however, a hidden preference to disable this behavior:

defaults write -app Skim SKAutoReloadFileUpdate -boolean true 

Another potential nuisance: If you compile very large (that is, computation-intensive) documents, Skim sometimes gets out of sync with the file system or even crashes; for details look into this answer.

  • 2
    Thanks - I haven't used Skim for a while and here everything works as expected. Thanks! – Eric Feb 1 '12 at 13:45
  • 3
    Skim is great. Overall. But if you ask for any additional features, there's a good chance that you'll get a rude response from the programmers. I will be happy when someone creates a PDF reader as good as Skim with additional features such as the ability to change pages with a single key, and vertical split. Sigh. – Mars May 25 '13 at 2:12
  • 2
    Skim is a great program but ever since Yosemite, text rendered by Skim is very ugly (fuzzy and unclear), while Acrobat is crisp and clear. Somebody should definitely find a way to make Acrobat reload automatically… – yannis Oct 19 '14 at 17:13
  • 3
    For those who considered not using Skim due to @oarfish's comment, this feature seems to have been added since. However, it seems you need to enable autoupdating by checking a box in "Skim > Preferences > Sync". – Brian McCutchon Oct 8 '15 at 22:56
  • 1
    @Daniel You are correct. I was looking at an outdated page, sorry. – becko Aug 9 '17 at 16:12
24

This is simple with TeXShop installed. First launch TeXShop, and go into the preferences. In the second tab there is a tick box title called Automatic Preview Update. Make sure it's ticked.

enter image description here

Now ok that, and quit TeXShop (you need to quit and reopen to make it honour the preference). Now all you need to do is open the pdf you're working on with TeXShop, and the TeX file in your editor of choice. Any changes to the pdf will make the viewer refresh.

As you're using AquaMacs, you'll probably need to enable SyncTeX (if you want it) in the AucTeX options. There are more instructions on that here.

  • 9
    TexShop viewer will steal focus when autoload. Is there any way to make it stay in the background? I don't want to manually switch back to my editor for changes. – Rio Apr 5 '14 at 21:35
  • 11
    @Rio, this can be done by typing defaults write TeXShop BringPdfFrontOnAutomaticUpdate NO in the terminal. – Alexander Kachkaev Jul 1 '14 at 22:02
7

As OS X has built-in capability of displaying PDF, there are several application based on it. Preview.app is shipped with OS X, Skim is a sourceforge project and TeXShop (mentioned in another answer) is shipped with MacTeX. All of these support automatic reloading. Note that these viewers have a few limitations compared to the Adobe Reader, for example they cannot display layers (OCGs) selectively, they do not execute JavaScript and have a few other problems (see for example the recent question about hyphenation and searchable pdf).

  • This is a good point, and is most apparent (to me) when using the animate package. – qubyte Feb 1 '12 at 13:22
  • 1
    @Patrick: as far as Preview.app is concerned there appears to be a bug; there's no need to manually reload the file but one hast to switch processes first in order to get Preview to notice, that a file modification occurred. Can somebody please verify this behavior? – Eric Feb 1 '12 at 13:47
  • 3
    @Eric: It is like that and (I remember reading in some Apple forum that this is "by design"). Solution: Use Skim :-) – Daniel Feb 1 '12 at 14:53
4

The Mac default viewer preview does this. As long as you make some other application active, when you bring preview to the front, the reload occurs.

For me, I use LaTeX to generate the new pdf in one application and when I bring the preview version back up, the changes have been reloaded.

  • Nope, it doesn't. – Walter May 26 '18 at 21:39
  • 1
    Preview 10.0 on OSX 10.13.3 (High Sierra) does. So has every other version I've tried over the years. What are you running? – Joel May 27 '18 at 9:10
  • I can confirm that preview version 10.0 running on macOS High Sierra 10.13.6 automatically reloads the file content when switching between an editor and viewer using +tab. – breandan Dec 29 '18 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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