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.
- Click Make a sign-in token on GitHub…. Create the token on GitHub, then paste it into kTeX.
- Choose Publish to a new repository, or connect to an existing one.
- 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:
- Download for Overleaf (.zip)… makes a zip of the LaTeX, images and styles.
- On Overleaf, choose New Project ▸ Upload Project and select the zip.
Two-way sync (an Overleaf plan with Git integration):
- On Overleaf, open Account Settings ▸ Git Integration and create a Git token.
- 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.
- Use Get changes from Overleaf… to bring your co-authors' edits back into kTeX.