History, GitHub and Overleaf

Version history

kTeX can keep a full Git history of each document. Every version you save is kept, and you can go back to any of them. You don't need to know Git.

  • History ▸ Save snapshot and upload: saves, records a version, and uploads it if the document is connected to GitHub or GitLab. If the upload fails, an Upload failed message explains why.
  • History ▸ View version history…:
    • The list shows every version, with a branch graph.
    • Click a version to see exactly what changed.
    • Restore this version brings the document back to that version.

Branches

A branch is a parallel version of the document, for example "submitted" and "revision". The current branch is shown in square brackets in the title bar.

File ▸ Version History ▸ Branches… lists every branch. From the branch bar you can:

  • create a new branch,
  • Switch to another one,
  • Delete a branch.

GitHub (off-site backup)

History ▸ Cloud ▸ GitHub… connects the document to GitHub.

  1. Click Make a sign-in token on GitHub…. Create the token on GitHub, then paste it into kTeX.
  2. Choose Publish to a new repository, or connect to an existing one.
  3. From then on, Upload now (or Save snapshot and upload) sends your versions to GitHub.

The same dialog has Open on GitHub, Open from GitHub… (to get a document onto another computer), Disconnect and Sign out.

  • File ▸ Share ▸ Download latest from cloud gets changes made on another computer.
  • Other cloud connections (GitLab…)… connects to GitLab or any Git URL instead.

Overleaf

The Overleaf commands are under Review ▸ Share and File ▸ Share. There are two ways to work with Overleaf.

On any Overleaf plan, including the free one:

  1. Download for Overleaf (.zip)… makes a zip of the LaTeX, images and styles.
  2. On Overleaf, choose New Project ▸ Upload Project and select the zip.

Two-way sync (an Overleaf plan with Git integration):

  1. On Overleaf, open Account Settings ▸ Git Integration and create a Git token.
  2. In kTeX, choose Send to Overleaf… and enter the project link and the token. The token is stored in your system's keychain, not in the document.
  3. Use Get changes from Overleaf… to bring your co-authors' edits back into kTeX.