99

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?

9
  • 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
    Commented Feb 1, 2012 at 12:55
  • 7
    I use Preview.app (the default PDF viewer which comes with OSX), and it reloads automatically the document.
    – morbusg
    Commented Feb 1, 2012 at 13:04
  • 3
    Skim is pretty good in this respect and has SyncTeX integration with Aquamacs out of the box.
    – egreg
    Commented Feb 1, 2012 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
    Commented Feb 1, 2012 at 13:43
  • 1
    Preview.app requires that you shift focus to it in order for it to reload the file. It won't do it if you keep typing in your editor, for example.
    – Mars
    Commented May 25, 2013 at 2:16

4 Answers 4

94

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.

12
  • 2
    Thanks - I haven't used Skim for a while and here everything works as expected. Thanks!
    – Eric
    Commented Feb 1, 2012 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
    Commented May 25, 2013 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
    Commented Oct 19, 2014 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". Commented Oct 8, 2015 at 22:56
  • 1
    @Daniel You are correct. I was looking at an outdated page, sorry.
    – a06e
    Commented Aug 9, 2017 at 16:12
26

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.

5
  • 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
    Commented Apr 5, 2014 at 21:35
  • 13
    @Rio, this can be done by typing defaults write TeXShop BringPdfFrontOnAutomaticUpdate NO in the terminal. Commented Jul 1, 2014 at 22:02
  • 1
    Thanks @Alexander Kachkaev! No idea how you knew it in 2014, because I was looking for a solution to this problem in 2021! Commented May 6, 2021 at 18:41
  • @AlexanderKachkaev haha, thanks a lot!
    – Descrates
    Commented Nov 26, 2021 at 22:15
  • 1
    Thanks to both @AlexanderKachkaev's! I did this in 2014 (or so) and needed to look it up again in 2021. (There are too many defaults to easily find the one you want.) Commented Dec 11, 2021 at 17:15
8

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

3
  • This is a good point, and is most apparent (to me) when using the animate package.
    – qubyte
    Commented Feb 1, 2012 at 13:22
  • 4
    @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
    Commented Feb 1, 2012 at 13:47
  • 4
    @Eric: It is like that and (I remember reading in some Apple forum that this is "by design"). Solution: Use Skim :-)
    – Daniel
    Commented Feb 1, 2012 at 14:53
8

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.

3
  • Nope, it doesn't.
    – Walter
    Commented May 26, 2018 at 21:39
  • 2
    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
    Commented May 27, 2018 at 9:10
  • 1
    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
    Commented Dec 29, 2018 at 22:51

You must log in to answer this question.

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