# Simultaneous collaborative editing of a LaTeX file

Are there any tools for simultaneous collaborative editing of a .tex file?

The practices I know (and practice) in writing scientific papers are:

• e-mailing each new version to the collaborators,
• working in a same Dropbox folder.

However, both are not meant for simultaneous editing, and are somewhat annoying.

EDIT:

A list is also here:
http://en.wikibooks.org/wiki/LaTeX/Collaborative_Writing_of_LaTeX_Documents

-
You could use version control to track changes. –  N.N. Sep 5 '11 at 13:59
Welcome to TeX.sx! I was going to suggest this as a duplicate of tex.stackexchange.com/q/4489 or tex.stackexchange.com/q/232. Then I noticed that you're asking about simultaneous editing, which brings up an aspect that hasn't been discussed before. I edited your question a bit to get this part to stand out more. –  doncherry Sep 5 '11 at 14:02
@N.N. (The tag would've been revision-control [tag:revision-control]) –  doncherry Sep 5 '11 at 14:04
Probably the Google Docs based solution here Compiling documents online is the best you can get. –  Alan Munn Sep 5 '11 at 14:11
–  Faheem Mitha Sep 5 '11 at 17:14

I tend to use a version control system. My current setup is a (private) repository at Bitbucket, which uses Mercurial for version control. Access to the repository is then provided to other members of the team. This is as close as you can get to simultaneous editing, IMO.

It helps to divide the project into several separate files using e.g. \input or the subfiles package, as this minimizes the number of merge conflicts one encounters.

For actual simultaneous editing, you should use an editor created for this purpose, such as SubEthaEdit.

-

## writeLaTeX - writelatex.com

Features:

• no need to register
• collaboration possible, by means of sharing the URL
• documents can be saved, actually everything is saved automatically
• instant compilation on-the-fly
• possibility to upload files (pdf, png, sty, tex, bib, etc.) up to 10 MiB
• syntax highlighting in the included editor

Screenshot:

-
There is a new option that allows to send a watchonly link maybe this could be added to the answer –  Dominic Michaelis Sep 17 at 20:31
The downside of this is method is the lack of a revision history. –  Gabriel Nov 15 at 21:12

I don't have much experience with these, but they look like they might do the trick:

Gobby collaborative editor (has built-in chat features)

Or maybe:

-
I had a look at Gobby and thought it looked good. I haven't had the opportunity to try it out, though, but if I ever had to do this then Gobby would be the first I'd try. I believe that it has LaTeX syntax highlighting as well. –  Andrew Stacey Sep 5 '11 at 16:30

Collaborative editing has been implemented in various text editors. I believe I've seen it done with gedit, vim and emacs, but for a large LaTeX document, your best bet is probably to put everything in some kind of version control and split it into multiple files with a single master document that does \input or \include on the individual files.

-
floobits.com are a promising service with interoperating plugins for several editors (Vim, Sublime, upcoming emacs) AND web editor AND simply sync with a directory. –  Beni Cherniavsky-Paskin May 26 at 9:03

Sagemath Cloud allows you to do all kind of stuff -- one of them is to have a two pane view of the source and a rendered view of the latex document. All edits can be done collaboratively in real-time; it uses the differential sync algorithm.

Bonus on top of similar solutions: You have a Linux environment, which allows you to not only store and process files, but also to write your own scripts to generate content and whatnot ...

It also have inverse and forward search, scales well to large documents (100+ pages), and takes frequent snapshots of all files.

-
Welcome to TeX.SX! –  Heiko Oberdiek Nov 4 at 20:57

You could all ssh to the same server and use screen or tmux in order for simultaneous access to the entire development environment, allowing you to switch among editors, control versions and run scripts to edit files.

This is different from the other answers (at the time of this writing) because it provides simultaneous access to the whole environment, whereas the other options are just editors (like Gobby) or distributed version control systems (like Mercurial).

If you do this, you'll want some way of viewing the output. One option is just using scp, since you'd be using ssh anyway. If the server is running a web server, you could also just move the files there. When I'm working like this, I tend to run this line a lot.

\$ pdflatex foo; bibtex foo; pdflatex foo; pdflatex foo; sudo cp foo.pdf /var/www

-
cloud.sagemath.com now provides full shell access combined with a LaTeX editor, which is a powerful combination. –  William Stein Nov 7 at 19:12

Another browser based solution can be found at Online LaTeX Editor which also provides a native Android application called VerbTeX. Both support collaboration and code merging in case of conflicts while working simultaneously on the same document.

-

For real simultaneous work, you might consider any of the etherpad clones (e.g. titanpad). It even has history replay so you can go back and see what you had before. You can even have your own installation. The downside is that it can only do text, and to see the TeX output you would have to compile it somewhere else.

I would definitely recommend some sort of version control. (Even if you were the only author.)

-

I would suggest https://www.sharelatex.com/.

The part which you would find interesting part is below:

[...ShareLaTeX..]

A LaTeX Editor for smooth collaboration

Keep your LaTeX collaborators up to date by letting everyone access and edit the same LaTeX document.

The days of making sure everyone has access to the latest version are over; the latest version is always available online. You can even work on the document at the same time as your collaborators with our real-time editor, and our built in chat will help you communicate while you're editing.

-

ShareLaTeX is what you are looking for.

-