3

When files are stored locally in Google Drive, and sync is turned on, problems can occur when compiling a TeX file.

For example, using Texmaker with MiKTeX on Windows 10 to build Thesis.tex, I get the following error when building using latex:

SyncTeX: Can't remove Thesis.synctex.gz (file is open or read only)

Is there a TeX-based solution to this problem that maintains sync functionality?

  • Why not stop the sync and compile as normal? And when you are done, just sync to Google Drive. – azetina May 17 '16 at 15:40
  • 3
    Turning sync on and off is a sure way to find you haven't got your files when and where you need them (or so I have found). – ChrisSampson87 May 17 '16 at 15:44
  • An alternative is to get a sync software like goodsync or synctoy and synchronize from a local folder to Google Drive by using a scheduled task. – azetina May 17 '16 at 15:47
  • Try renaming your .tex file. Delete all prior files related to the old tex file and then compile. Related: tex.stackexchange.com/questions/168324/… – A Feldman May 24 '16 at 14:26
4

Solution 1

As GoogleDrive does not support (yet) exclude patterns, but does support exclude folders, one option is to dump all output files to a separate folder (in the case of MikTeX you can alternatively specify this for all the output files except the PDF) and make sure that GoogleDrive doesn't sync that folder specifically.

(And temporary and generated files do not need to be synced anyway. This way you get the bonus of maximizing your GoogleDrive space.)

Solution 2

Use Dropbox instead. Or use a real VCS.

  • A real VCS might help, but it depends what you're trying to achieve. I've used git for version control, with dropbox to sync across multiple boxes (Google drive wasn't an option for me due to a lack of a working Linux client). As for solution 1, the working/temporary files aren't large compared to source images and output pdfs. – Chris H May 24 '16 at 14:49
  • 1
    @ChrisH: Please note that the space savings (a) is a bonus [since it is not the point of the original question] and (b) can be significant if your images are built using something like asymptote or TikZ where the source is much smaller than the image itself. Also, do you really mean you ran git on top of dropbox? Or do you mean you run them separately for different use cases? – Willie Wong May 24 '16 at 18:15
  • Different use cases, though the git folder structure ended up on Dropbox because of an ill-thought-out symlink. It was very much a case of a primary machine with a local git setup, and Dropbox to allow working on other machines, plus as a means of transporting to one of my offsite backups. All my tikz ever would fit in 100kB so that didn't occur to me. Anyway solution 1 gets my vote. – Chris H May 24 '16 at 18:30
  • Ah, for working on different machines, I just use GitLab (pull; work; push). I use dropbox for TeX only when collaborating with colleagues who don't know how to use either git or svn. // Off-topic: I had once tried to put an svn repo on top of Dropbox. What happened was not pretty. // In terms of solution 1, I am still waiting for the official GoogleDrive linux client and filename based exclude patterns. – Willie Wong May 24 '16 at 18:42
  • I tried insync (it was free in beta). Deleting all the duplicates it filled my gdrive with was a day's work. – Chris H May 24 '16 at 19:05

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.