Cloud Drive Sync

Cloud Drive Sync #

Cloud drive sync keeps a copy of your TeXPage project in your own cloud drive. Changes you make in TeXPage are sent to the drive automatically. Changes you make to files in the drive can be pulled back into TeXPage when you choose.

Supported drives: Dropbox, OneDrive, Google Drive, Baidu Cloud, and any drive or server that supports WebDAV.

Cloud drive sync is a premium feature. Upgrade your account to use it.

Get started #

  1. Link a drive. In the console, open Account → Cloud Drive Sync, pick a drive and click Link to authorize it. For WebDAV, enter the server URL, user name and password. You can link several drives.
  2. Turn on sync. Open the project, click Sync → Cloud Drive at the top, and turn on Cloud Drive Sync.
  3. Wait for the first sync. TeXPage uploads every version of the project to each linked drive. A large project can take a few minutes.

To turn on cloud drive sync for every new project, switch on Enable cloud drive sync by default under Account → Cloud Drive Sync.

Where the project is in your drive #

Each project is a folder named “Project name (project ID)”, with one subfolder per version. The sync dialog shows this name under Cloud Folder.

Drive Folder that holds your projects
Dropbox /Apps/TeXPage
OneDrive /Apps/TeXPage
Google Drive /TeXPage
Baidu Cloud /apps/TeXPage
WebDAV /texpage

For example, the main version of a project called “Thesis” is at this location in Dropbox:

/Apps/TeXPage/Thesis (project ID)/main/

Don’t rename the project folder or its version folders. TeXPage uses these names to find the project in your drive.

From TeXPage to the drive: automatic #

When you create, edit, delete or rename a file in TeXPage, or create or delete a version, the change reaches your drive within a few seconds. You don’t need to do anything.

Your changes in the drive are kept #

If you changed a file in the drive and haven’t pulled it yet, changes from TeXPage won’t overwrite it:

  • If the file is edited in TeXPage, the drive keeps its version.
  • If the file is deleted in TeXPage, the drive keeps the file.

The next pull lists these files as conflicts, so you can choose which side to keep.

From the drive to TeXPage: pull changes #

After you edit files in your drive, pull the changes into TeXPage:

  1. Open the project and click Sync → Cloud Drive.
  2. If you linked more than one drive, choose the drive to pull from.
  3. Click Pull Changes.

A pull updates only the version you have open. New files in the drive are added, edited files are updated, and files deleted in the drive are deleted in TeXPage too.

Conflicts #

If a file was changed both in TeXPage and in the drive since the last sync, TeXPage can’t tell which change to keep. The pull stops without changing anything and lists those files. You can:

  • Sort it out first. Copy the changes you want to keep to one side, then pull again.
  • Use the cloud drive content. Click Use the cloud drive content to replace the changes made in TeXPage with the files from the drive.

If both sides ended up with exactly the same content, it is not a conflict.

If a collaborator is editing a file in TeXPage while you pull, that file is left for the next pull. Their work is never overwritten.

Files that aren’t pulled #

These files are skipped, and the pull lists them when it finishes:

  • Names with characters TeXPage doesn’t allow, such as : * ? " < > |
  • Files larger than 200 MB
  • Text files that aren’t UTF-8 encoded (for example GBK or Latin-1). Save them as UTF-8 first.
  • Online documents such as Google Docs and OneNote notebooks, and shortcuts
  • Files with the same name as a folder in TeXPage, or placed “inside” a TeXPage file
  • Two files whose names differ only in case, such as Main.tex and main.tex

The .git folder and system files such as .DS_Store, Thumbs.db and desktop.ini are always ignored, without a message.

Your first pull: overwrite the drive first #

To pull, TeXPage needs to know what each file contained when the two sides last matched, so it can tell which side changed. Projects that turn on sync now record this when their first sync finishes.

Projects that had sync turned on before two-way sync was available don’t have this record. The first time you click Pull Changes, you’ll see:

To pull changes, first overwrite the cloud drive with the project here.

Click Overwrite to upload every version of the project to that drive again. Matching files in the drive are replaced with the content from TeXPage. After that, pulling works as described above.

  • If you have changes in the drive that aren’t in TeXPage yet, copy those files somewhere else before you click Overwrite.
  • If you don’t click it, the project keeps syncing one way: changes in TeXPage still reach the drive, but you can’t pull from it.
  • You can’t pull while the overwrite is running. Try again once it’s done.

Questions #

The pull says “The folder of this version does not exist in the cloud drive yet.”

This version hasn’t reached the drive yet. If you just turned on sync or created the version, wait a few minutes and try again.

I deleted the project folder from my drive by mistake. What happens?

The next time you change any file in TeXPage, TeXPage notices the folder is gone and uploads the whole project again. You can also turn cloud drive sync off and on again.

What happens to the files in my drive when I turn sync off?

Turning off cloud drive sync for a project deletes its folder from your drive. The project in TeXPage is not affected.

What happens if I link the drive again, or link a different account?

The previous sync record is cleared. Your next pull asks you to overwrite the drive first. See “Your first pull: overwrite the drive first” above.

Can collaborators sync to their own drives?

Yes. Each member can link drives to their own account and turn on cloud drive sync for the project, which then syncs to each person’s own drive. A pull reads only your own copy, and you need edit access to the project.

Why isn’t a file exactly as I uploaded it?

TeXPage stores text files as UTF-8 with LF line endings. Files pulled from Windows have their line endings converted. This doesn’t change the content or how it compiles.

Why is one drive slower to pull from than others?

Drives list files in different ways. OneDrive, Google Drive and WebDAV read one folder at a time, so a project with many folders pulls more slowly from them than from Dropbox or Baidu Cloud.