Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Sync not working?

Hello, I just installed Sumatra on a new PC (Win10) and my pdf files do not sync automatically when I am using MikTeX. Similarly, when I am changing the file on my other PC it syncs there but not on the new one (Dropbox). It is loading the current version when I am closing and then reopening the file.

TeX editor syncing rules for baseline testing.
Avoid separate locations i.e. compile the TeX file in the same local folder where the PDF will be constructed.

Said project folder e.g. c:\synctest\test1 should ideally
not be under a username not be a system sync folder such as a Dropbox folder nor have odd characters or spaces etc.

Using cloud or network drives can be the root of syncing issues

for an example see Google: Drive File Stream breaks ReloadModifiedDocuments

Run a simple MWE.tex to produces MWE.synctex with MWE.pdf. If the synctex and pdf files differ greatly in time then suspect a failure in compilation and look for error message in log files, then try again.
That should prove MiKTeX editor sync compiling works. Then check 2 way syncing. Any failure at this stage is down to configuration of editor or SumatraPDF or both.

It helps to have a known working set of three files to test them working in reverse with or without a TeX system. These are a couple of years old but should still function
Note the zip includes a 5 page TLDR discussion on configuring for synctex that is still generally valid.

I don’t have a TeX system active, so for me, a double click in SumatraPDF opens the TeX file in notepad, proving the files are correctly synced and SumatraPDF is working.

There is little that can go wrong in SumatraPDF since the TeX synctex component creates the synctex.(gz) file and SumatraPDF very simply uses those supplied indexed links to recall the last configured editor with the stored file location (which itself was stored by the editor) handing back the nearest line number to go to.

The files are in the same folder and working on my other computers. The pdf file doesn’t refresh while open - I have to close the file and then reopen to see the changed pdf output.

Visually, I can’t see the blue updating spiral in the top right.

Not refreshing whilst open thus requiring close and reopen

Is normally tied to the file lock limit which in older version 3.1.2 was 10 MB but was increased in 3.2 to 32 MB so check what size the PDF has grown to (is it now near to one of those boundaries ?)

Other factors can cause the same problem such as file location. What are the folder functions e.g. is it a SIMPLE LOCAL c:\data directory (NOT a synced / dropbox folder)

If the files work perfectly on one (or more) machines then either it is not a similar enough installation of SumatraPDF or there is some other syncing interference at play on that pc?

I got Dropbox to work - the files have to be local/offline.

I can’t get it to run with Google’s Drive File Stream (G:\My Drive\folder\file vs. Sumatra in C:)- neither online nor offline. It compiles with MiKTeX but the Sumatra viewer does not refresh. My other machines have the previous Google Drive version, which looks discontinued.

I saw another post regarding Drive File Stream - I can refresh manually with “r.”

To provide some background.

For automatic refresh Sumatra relies on Windows functionality to efficiently notify about changes to files.

This functionality doesn’t work for network drives. We detect network drives and instead manually and periodically check for changes.

I’m guessing that systems like Dropbox and Google Drive, that are neither network files system nor physical drives, might fool Sumatra.

So my recommendation is that if you’re using latex -> pdf and want automatic refresh, make sure to generate .pdf to a physical drive, like C:.

Manual refresh with r should work always.

1 Like