# Tools for collaborative paper-writing

I personally use a revision control system (git) to manage my own paper writing, back things up, and synchronize between different machines. However, I've found most programmer's revision control systems to require a bit too much training to try and push on a co-author for the purposes of working on a joint paper.

Are there any people out there using software tools to help handle joint writing? How successful have they been?

-
Stay with git, it is most advanced revision control system. –  psihodelia Mar 30 '10 at 12:45
the one thing currently really lacking from making git et al perfect is a diff algorithm that breaks up latex text into the correct "semantic" chunks for comparing different version of the same file. However, considering the relatively small number of folks typically collaboratively writing a paper, thats a nonissue overall. –  Carter Tazio Schonwald Apr 19 '10 at 2:16
@C.T.Schonwald: do you know about git diff --color-words? –  Federico Poloni Aug 25 '10 at 11:11
This discussion stackoverflow.com/questions/187064/graphical-diff-for-mac-os-x gives lots of graphical diff programs for the Mac, for people who do not love the command line. FileMerge/OpenDiff works well for me, even though it doesn't know anything about latex. –  Skip Sep 19 '10 at 23:58
–  Kaveh Jun 28 '13 at 3:49

I've been using Dropbox for a while. It works like this: You sign up at their webpage for free to get 2gb space which you can access via their webinterface. If you want (and this is the novel part) you can install their software, which sets up a folder on your computer which is automatically (and in the background) synchronized with their server. You can share folders with other dropbox users. Underlying their system is a modified version of svn (I think), and you can go back to revisions via their webinterface. I don't know how concurrent editing is handled.

There are some features missing (selective synching, branching, milestones) but overall it's an awesome free service. The software is very well done and not distracting, I am synching folders from my office computer (linux) with my home computer (windows xp) and it works like a charm.

-
Another vote for the remarkable Dropbox. –  JSE Nov 12 '09 at 13:20
Yes, dropbox is great. BUT it does not make the DIFFerence (you have to compare older files on your computer --- download both and use some DIFF-editor) –  Anton Petrunin Jan 10 '10 at 18:51
Lars: concurrent editing creates multiple copies upon synchronization. –  Robin Saunders Jun 23 '10 at 3:27
@DropBox users : Don't you think it is an issue to give all your research papers for free to a private company ? –  Lierre Feb 27 '12 at 10:03
@Lierre: way less of an issue than giving the paper copyright for free to publishers who put it behind a paywall, which is still the norm for most scientists :-( –  Beni Cherniavsky-Paskin Jun 28 '13 at 2:33

I've been using svn for all my papers for about a year, and I can't imagine not using some kind of version control now. I've had no problem with getting coauthors to use it, though I don't have any technophobe collaborators.

The disadvantage of Dropbox (much as I love it for other things) is that it's not so good for simultaneous editing; no easy way to merge commits. You also don't get to keep a complete revision history with comments.

I'm less convinced of the value of Google Wave so far; real time typing is almost a distraction, and if I want to discuss math in real time I'm usually best off using the phone, I find.

-
Yes -- I had no problem adapting when one of my collaborators suggested using svn. –  D. Savitt Oct 28 '09 at 17:45
svn is less attractive than distributed version control (DVC) for simultaneous editing: people shouldn't have to create branches to commit changes that haven't yet incorporated other people's edits. Generally authors and editors want to accept or reject other people's edits in a few at a time, while creating their own changes: DVC allows this, svn makes it hard. –  Charles Stewart Mar 30 '10 at 10:10
I'm also using svn, but it is installed internally in my office and cannot be accessed in any way by external collaborators. Do you know a free acces svn on the web (such as google code but without the open access ...) –  robin girard Jul 27 '10 at 6:50
xp-dev.com works for me. –  TSG Aug 18 '10 at 20:10
@TG: what is your protocol for convincing a collaborator to use SVN? Do you ask them to install TortoiseSVN or some other GUI? –  Federico Poloni Aug 25 '10 at 11:13

There is a tool that is very promising, it is called ScribTeX, The free collaborative LaTeX editor. Its description is giving

Welcome to ScribTeX, the online collaborative LaTeX editor. ScribTeX allows you to work on LaTeX documents from anywhere with internet access and share them with your friends and colleagues easily. You can:

* Create and edit LaTeX documents and automatically render them to PDFs;
* View a complete revision history of all your files;
* Keep your documents private, allow people of your choosing to view or edit them, or publish them to world;
* Use BibTeX to keep track of your references and include them in LaTeX documents;
* Create custom style files and use them in your LaTeX documents.


Hope this can help many of us doing better collaborative work.

-
Is it possible (and convenient) to use non-standard packages? –  jd.r Nov 11 '09 at 16:30
Yes, you can upload any style files you like. –  Rob J Hyndman Dec 27 '09 at 11:43
Thanks for the link. Definitely looks promising. –  Cam McLeman Jan 28 '10 at 17:21
I've found this extremely useful. I don't use it for collaboration, but it has allowed me to often leave my laptop at home and use the abundant campus computer clusters. –  Anthony Pulido Sep 20 '10 at 5:44
Moreover, in ScribTeX you can access your projects with git: support.scribtex.com/entries/… –  Piotr Migdal Aug 30 '12 at 18:29

One tool that works better than diff (in my opinion) is latexdiff http://www.ctan.org/tex-archive/support/latexdiff/ . The advantage is that the result is a tex file with the deleted text struck-out and the added text underlined. It also uses color. the reason this is nice is for collaborating with people that don't want to use your version control method. once you get the file back from them you simply commit it to the repository and then use latexdiff-vc to see the differences. One of my collaborators likes writing latex in one long line (one line per paragraph) so using regular diff is almost useless with him....

-
I have had good experiences using this in my editing work with clients. Latexdiff works well together with distributed version control, allowing two or more people to work on a document side-by-side. I'd love to see a latex3diff, to handle 3-way diffs. –  Charles Stewart Mar 30 '10 at 10:03

I use bzr (any particular reason why git, by the way?) and I've ended up using it for just about everything: papers, seminars, teaching, configuration files, my entire website, just about everything I do on a computer is in a bzr repository. Although I've yet to convince any collaborator to use it as well, I still find that it makes life easier since I can easily keep a record of when I sent something to someone else and merge in changes against that particular revision. I can also publish a repository and make it easy for a collaborator to have access to the files without needing to use bzr themselves.

Within a paper, I use the changes.sty package for sharing comments back and forth between myself and a collaborator.

Bzr has "nice" frontends so it might be possible to persuade a non-technologically minded person to use it (I'm a commandline junkie so have no experience of the available GUIs).

I also use a wiki (nlab, naturally) but that is (at the moment) for less focussed projects than a specific paper. However, when writing anything substantial there then I do it "offline" (even so far as to "compiling" and viewing it) and only sending it into the ether when I'm happy with it.

I find it completely incomprehensible that people want everything to be "in the cloud". I have access to several high-powered computers which are capable of running whatever software I'm using incredibly fast. Why would I swap that for a slow, crackly internet link which is guaranteed to be down the one time that I really need it? By using a DVCS (distributed version control system), I only need to be connected to the internet at the start of a given session and I can get my files off any one of a number of machines so it doesn't matter if one or other is down. In the worst case scenario that I can't connect, I can work offline on something and then merge my changes back again later. Indeed, my entire DVCS currently takes up a mere 71Mb (of which 25Mb consists of my local copies of Instiki and xournal) so I could easily carry it around with me on a memory stick (encrypted, of course).

If I really did want to do some "real time" collaboration, I would use either gobby (for working on files or papers) or jarnal (for working on maths). Gobby has real-time editing (and has had for quite some time) whilst with jarnal I can use my graphics tablet to actually write the mathematics for the other person to see just as if we were at a blackboard together. After all, if I'm doing real-time collaboration then I don't want to bother with getting the LaTeX syntax exactly right. I'm not bad at TeX, but if I'm in "Math Mode" then I don't want to be bothering with it.

-
I use git because I'm a commandline junkie myself, and it just happened to be what I found when I was looking for something that didn't require a centralized repository (it was the "new thing" at the time). It's fit well into my workflow so I've kept it. –  Tyler Lawson Oct 28 '09 at 19:45
Ah, exactly the same as bzr for me. –  Loop Space Oct 28 '09 at 20:25
@Andrew : I found this very helpful. Instiki was pleasantly easy to install. My one frustration with instiki is that it interprets < and > as MathML. Do you know how I can tell it to use <> as literal characters inside of equations? I am not in the habit of using \gt and \lt. [sorry to resurrect something so old] –  Sam Lisi May 6 '11 at 15:11
Sam, Instiki interprets < and > that way because it is allowed to put in literal XHTML in to the source. That makes it particularly easy to use SVG, for instance. I've actually written a program to convert simple LaTeX to iTeX+Markdown and it converts < and > to \lt and \gt (see my homepage for details, or send me an email). –  Loop Space May 6 '11 at 18:24
(Incidentally, Sam, notifications don't work on comments here as they do in SE, so feel free to continue this by email if you wish, or on the nForum.) –  Loop Space May 6 '11 at 18:32

If you like Google Docs there is something (currently still in development) called Latexlab which is

an open source implementation of a web based LaTeX editor for Google Docs

I haven't played too much with it, but it looks very nice, so I thought I'd point it out here. One can try it out on the website.

-

This may not be exactly what your looking for, but people are using wiki's to collaboratively write papers. Polymath collaborations are discussed on this blog. And recently a collaborative paper was posted on arXiv from people working on the polymath wiki. This is joint writing taken to the limit.

*New users can only post one link! Sorry, my links to the paper and blog were removed *

-
You can add the links back in as regular text. –  Charles Stewart Mar 30 '10 at 10:05

Every collaboration has its own personality, so I am sure there is no best-for-everyone solution to this question.

-

Google Wave does have a robot called watexy that can add maths into conversations. Once you've added it you put LaTeX commands inbetween double  signs and it automatically replaces it with an image.

Useful for a maths chat but by no means usable for hacking together a paper or a proof that you can later cut and paste into a proper LaTeX document.

It's a start though.

-

Just to add to Jon Awbrey's generous plug for my wiki website, MyWikiBiz... I am currently working behind the scenes with Dr. Martin Hepp who heads the e-business & web science research group at the Universitaet der Bundeswehr Muenchen, to implement the "GoodRelations" semantic properties to our site, which will hopefully organize and streamline a host of semantic data fields (attributes and relations). It will be geared more toward business information, but I'm just pointing out that I am actively willing to collaborate with research/university initiatives to make MyWikiBiz your academic workshop, even if for simply testing out ontologies or collaboration styles. -- Gregory Kohs

-

For joint collaboration I've used subversion. Having a central repository I think is a really good idea for a paper, although you can set up central repositories in bzr and git.

I would stay away from git for two reasons, however. First, Windows support doesn't seem to me that great. You have to either use something like Cygwin or the port, which is hardly optimal. Unfortunately many people use Windows. The second is that it's a bit harder to use git. I love git myself but subversion is straightforward: there's commit (and conflict), whereas with git you have a local repository you can commit to and then you can also push to a remote repository.

In the end I like subversion for collaborative efforts. The only downside is if you really like to branch your work, then subversion is horrible compared to git or bzr. Bzr and svn also have nice version numbers ;)

-
Isn't that an argument for staying away from Windows? –  Grétar Amazeen Nov 11 '09 at 20:41
If only git were a sufficient reason to convince people to stop using Windows. –  Jason Polak Nov 11 '09 at 20:46
do you use a web repository? or just your own personal one from your laptop/PC? –  Jose Capco Nov 13 '09 at 8:58
I used OpenSVN in the past but apparently that service was abused and now full so it's not an option now. If you're using SVN you can get your IT department to set up a server, but if I'm not mistaken if you use bzr you can just push to a remote branch without having a daemon running, so you can use your existing web space via sftp. –  Jason Polak Nov 13 '09 at 20:44
I've been using subversion with a co-author for a few years now. It's very nice, but I don't have anything to compare it to. It's certainly much easier than dealing with everything by e-mail. –  Ryan Budney Dec 5 '09 at 6:25

Sadly, I haven't collaborated yet.. but I would use svn for collaboration. If it's supposed to be a top-secret collaboration, then I'd go for a commercial web svn repository (lots out there that are very cheap). If you think no one could really steal the work from you or that it's ok for people to read it, I would use a free svn repository. The pain is when your partner isn't a techy person, you can't even ask him to merge new versions of works with some sort of merger.. you are supposed to do all the merging from his end.

As for myself, I would not use svn. I usually have papers 15 pages long or so, and I just keep backups everytime I make a milestone and then zip the whole thing (like every month or so).. in case something goes wrong I go back to the backup, it's like a small scale inefficient svn.. but you don't want to kill a bird with an atomic bomb. Always worked for me, I'm not sure for writing books.. probably an svn would become necessary, but I won't be suprised if my backup technique work as well.. it worked for my PhD dissertation anyway :p

EDIT: Most of us mathematician wouldn't have our entire .tex work exceeding 200Mb. For that I would recommend the svn web repositories like (these support closed source, i.e. private projects): XP-Dev and Unfuddle These two are free if you don't exceed 200Mb and you can choose to have the project (you are allowed max 2 or 1 projects for these free repositories.. but I would just keep them in one big folder and name them as 1 project). I like the look and feel of Unfuddle, but XP-Dev isn't that bad either. The advantage of SVN is that it caters for both windows and linux users (for windows I'd recommend TortoiseSVN Client). In case you exceed the 200Mb (which for our purpose is hardly believable.. unless you have lots of images in your LaTeX documents), then I would recommend Assembla because it's very cheap (like \$3/Month/user + \$0.3/100Mb/User) and reliable and you can buy as much space as you want.

-

There is a new project called Sharelatex the website is www.sharelatex.com

It is a web application where the collaborators can edit the text at the same time. We can get a free account to test the software.

-

People who like MediaWiki or Semantic MediaWiki might look into the facilities at MyWikiBiz. This is a "directory" site that operates on a 2-level model. There are mainspace pages that can be edited by anyone — these are supposed to be verifiable and so on. Then there are author-owned directory pages that only the author and sysops can edit — these are free to be anything within bounds of ethical and legal reason. Collaborative work is possible via the discussion pages and any number of user subpages that you want to create, where a group can hash out a draft and then have the principal or responsible author copy the latest authorized version to the directory page for the paper. I haven't used the Semantic MW and ASK Query features all that much, but they are there for the asking.

-

I use svn even for my papers with no coauthors. I have a repository at my department that gets backed up frequently, and I can have a copy of the repository on any machine in the world. It keeps track of changes and I know exactly which version was sent to the journal or arxive.org, etc. It allows for simultaneous edits by the collaborators. It is also easy to learn, at least the basics.

-

Crocodoc is a new site that has helped me collaborate on already-written papers.
For document generation, Etherpad is still my favorite collaborative text editor by far.

-

Gist is very useful for initial writeup of ideas. Allows to create a git repository for a small file instantly. Anyone can edit the file and save (commit) a new version. Does not allow branching -- only the newest version is editable. Registration is not necessary, but useful.

Feel free to edit this gist.

-

A (distributed) version control system which has a solid theoretical background, unlike most others, is darcs (originally written by a physicist). Unfortunately it does not have a nice user interface yet, so it may be not easy to "force" your coauthors to use it...

-
I'm using darcs to coauthor a paper at the moment. Perhaps I'm lucky to have a collaborator who's willing to learn new things outside the usual realm. –  Tom Ellis Apr 20 '11 at 12:21

One more vote for old trusted CVS here. Actually, I use OpenCVS since my OS of choice is OpenBSD.

I would like to bring to attention of SVN users the following package

http://www.ctan.org/tex-archive/macros/latex/contrib/svn-multi/

which allow you to create (TeX) log messages on the LaTeX document itself. There is another package for using SVN with LaTeX called svn. Disadvantage of svn is that is not playing well with the papers which are broken into multiple files. Here are couple very good articles from the PracTeX journal about SVN, LaTeX and even using it with TextMate

http://www.tug.org/pracjourn/2007-3/kalderon-svnmulti/

http://www.tug.org/pracjourn/2007-3/scharrer/

Another interesting reading from the same issue of PracTeX Journal

http://www.tug.org/pracjourn/2007-3/henningsen/

I am not a big fun of distributed revision control systems like Git. If I would have to pick one distributed system it would be Mercurial.

I would like to point another issue. Traditional revision control systems are intended to be used with text files (source codes). Most classical revision control systems like CVS, SVN have troubles dealing with binary files. TeX files are of course text files. However, illustrations in papers unless created with the programming languages like PSTricks, MetaPost, PGF/TikZ, or Asymtote are binary files. So they are not plying well with the revision control systems. That is one more reason for young mathematicians to start programming their illustrations instead of creating them with vector graphics editor like Xfig. My favorite is PSTricks because it is essentially the easiest way to use pure PostScript inside TeX documents. As we all know PostScript is THE page description language. Therefore, I also have strong preference for Powerdot (PSTricks) over Beamer(PGF/TikZ).

Unfortunately, there is a disturbing trend at least when it comes to grant proposals of using proprietary binary formats like doc. Those formats do not play well with revision control systems which makes collaboration on grant writing very painful. Hopefully, as the "new" docx format which is default format of MS Office 2007 becomes more wide spread this problem will slowly disappear (At least for the people that are familiar that docx is just bunch of XML files zipped together, only two of the files are actually important, one being XML version of document itself and another being Style Sheet file. People familiar with DocBook (apparently MS people were not one of them since they reinvented the wheel invented 1992) will know what I am talking about).

Cheers,

Predrag

-

The Online LaTeX Editor is a browser based LaTeX editor solution that supports collaboration. You can easily share projects with other users by simply choosing the project you want to share and enter the username of the collaborator.

Maybe an alternative to traditional tools like LED et al.

-
This actually looks amazingly good. First online LaTeX editor I can actually imagine using. –  Louigi Addario-Berry Apr 20 '11 at 15:45

WriteLaTeX.com is a service that lets you edit & compile latex in the browser, with real-time edit merging.
It's comparable to ShareLaTeX.com. Notable differences (as of Oct 2013):

• WriteLaTeX doesn't require signup => Less friction when convincing collaborators to try it, just send them the URL and they can edit.

• WriteLaTeX's embedded preview uses images (fast but blurry), ShareLaTeX uses PDF.js. Both allow PDF download, of course.

• ShareLaTeX has better history — shows diffs.

• ShareLaTeX has 2-way Dropbox sync allowing some offline/local editing (though only for one user; I tried it and wasn't impressed). WriteLaTeX only has 1-way backup to dropbox.

• ShareLaTeX has embedded chat.

• WriteLaTeX seems to work better on Android & iOS.

-

I've heard that the reason people like Google Wave is precisely because it makes collaboration easy. I don't have experience with it, though; perhaps somebody who has used it can comment?

-
I just started using it - envisioning mathematical collaboration as my main mode of usage. Not enough time put into it to be able to tell how good or bad it will turn out though. It sure feels promising at this point, though. –  Mikael Vejdemo-Johansson Oct 28 '09 at 15:06
Congratulations for getting in :) Is Latex support working, and if so, is it working well? –  Lars Oct 28 '09 at 16:21
I'm very excited about Google Wave, but it's certainly not at the point where I would want to write an entire paper in it. For the purpose of writing a paper, I don't think real-time collaboration is valuable enough to outweigh the advantages of the existing infrastructure (e.g., chances are you greatly prefer your favorite editor to the one in the Google's Wave client running in your browser). It could already be quite useful for talking about your paper while writing it, though. –  Reid Barton Oct 28 '09 at 19:11
I'm actively using google wave with several different people. It's fabuluous -- I don't think it makes any sense for actually writing papers at this point, but it seems to be uniformly better than IM for discussing maths. –  Scott Morrison Oct 29 '09 at 3:51
Agreed. I use it for collaboration, but only for bouncing ideas off of a collaborator and keeping a log of these ideas, not for the actual writing of the paper. (ScribTex above looks promising for that aspect). Think of it as half-way between instant messaging and email. –  Cam McLeman Jan 28 '10 at 17:24

On most papers it is far easier to coordinate your efforts by email than it is to learn svn or whatever. But I think the best is yet to come and it will be part of the class of tools being pioneered by scribtex.com verbosus.com and docs.latexlab.org. Take any of these and add -ftp or similarly convenient uploading, -some kind of guarantee of relative security/privacy, -inline preview like auctex and finally (fingers crossed), -compile with server or local TeX installations -offline mode. Those things combined will be very compelling with the added bonus of not having to install anything.

-

Authorea is an online social authoring platform for the collaborative writing of research articles. Its versioning control system is entirely based on Git (every article is a Git repository). But Git functions in the backend, so that users who are not familiar with (or do not care about) Git can just use it as an editor and still have all changes logged as commits. In other words, Authorea allows power users (who know Git) to easily write papers in collaboration with regular users (who don't know Git). Authorea's frontend allows you to enter text in LaTeX or Markdown, as well as figures, and equations (in LaTeX or MathML). Authorea renders and compiles everything to the web (HTML5), in addition to PDF (export to numerous journal formats is provided).

-

For years, I've used CVS to mediate collaborative writing of grant proposals and technical reports with others. I highly recommend this approach to anyone who is interested in collaborative work with faculty and student collaborators, whether they be local or distant.

Most of our writing has been in a LaTeX environment, which is a barrier to participation for folks who aren't used to that markup. I anticipate moving to Markdown or HTML to bring in collaborators who aren't LaTeX-savvy, provided I can find ways to author MathML when mathematical notation is necessary.

Looking ahead, I want to transition to Git as it will allow local commits for each author in their own copy of the repository. What I haven't figured out is how to manage the 'pushing' and 'merging' of changes made by each collaborator to each of the collaborator's local repository.

-
Authorea is close to what you want — it renders to html (but supports latex/pdf export), supports latex & markdown, and is git-based (not yet exposed in a friendly way). –  Beni Cherniavsky-Paskin Oct 15 '13 at 7:39