-
Notifications
You must be signed in to change notification settings - Fork 23
LaTeX: Overleaf GIT TexStudio integration
This tutorial will guide through the process of having TexStudio able to push commits to the repository created by the Overleaf, the online LaTeX editor, having so the possibility of using an offline TeX editor and fully syncing your work.
You will need git installed on your system (to be able to use the git
command) and TexStudio.
Overleaf lets you git clone your projects using the "Share" button. Once you've cloned your repository you can commit and push from it and it will update your Overleaf project! To work locally and easily use git, you can configure TexStudio to make git commits using a dedicated button by following these steps:
- Add a .gitignore in your repository like this one (in Windows when you create the file you have to name it
.gitignore.
to be able to save it):
*.bat
*.gz
*.aux
*.log
*.bbl
*.blg
*.lot
*.tcp
*.toc
*.lof
- Add a gitcommit.bat file like this one:
git add .
git commit -am "Autosave %date%-%time:~0,8%"
git push
-
In TexStudio, under the preferences ("Configure TexStudio", check the Advanced Mode box), in the Build menu add a new user command as in the picture:
-
Then in the Toolbars menu, from the right dropdown list go to
Tools-->User
and select the gitcommit command. Then from the left dropdown list choose a menu where you'd like to put your command button and click the blue move arrow in the middle to add it. You can even assingn an icon like the one below.