Using WriteLaTeX for Collaborative Papers

Adric Riedel is a postdoctoral researcher at the College of Staten Island, working with the Brown Dwarf research in NYC (BDNYC)  group.

We all love Google Docs. It’s a functional and convenient way to share and collaboratively edit documents across platforms, time zones, and even continents. We in the BDNYC group use it extensively.

But what if you want to write a scientific paper? Google Docs, as awesome as it is, is not much more than a word processor. We want the internal hyperlinks for sections, figures, tables, and citations, elegant mathematical formulae, well-formatted tables, more control over where and how our components are arranged – in a word, LaTeX. Yes, LaTeX has its own host of problems, but it’s very good at what it does.

There are a number of collaborative editing projects out there – Authorea springs to mind. But one of the simpler options out there is actually pretty good: WriteLaTeX.

writelatex1

WriteLaTeX is a fairly simple site: On the left hand side, you have a live view of the raw LaTeX source; on the right, a frequently refreshed (there is a manual/auto switch) compiled view of your source generated by a LaTeX installation (probably PDFtex) running on their server. Much like Google Docs, you can have multiple separate documents owned by you, and either editable or viewable by others. This is accomplished by having two URLs for your document: One that allows editing, one that’s view-only. The different URLs are accessible from the “Share” tab.

AS AN EDITOR:
The collaborative editing feature works about as well as Google Docs’ does- I have had an entire classroom of high school students working on a document simultaneously, and it kept track of all of their cursor positions without problems. This was even as lines were added and deleted, and various LaTeX syntax elements were accidentally mangled and then fixed. You can watch other people typing while you type, and eventually the compiled view on the right will either catch up or warn you of an error. For instance, in the picture above, there’s a warning on line 29 (also accessible from the “warning” box in the top right corner).

That actually makes WriteLaTeX a pretty awesome improvement over a standalone LaTeX installation: You don’t have to comb through mountains of output to find the three errors you introduced at some point in the last two days of editing; you’ll know where the errors are as soon as you make them (unless there are other errors preventing the compiler from getting that far, but regular LaTeX is no help there either).

WriteLaTeX has three editing modes: emacs, vim, and default. They seem to differ by which keyboard shortcuts they use to do things like cut and paste. There are also undo and uncomment commands (which dutifully removes the % character from the beginning of the line) available in all modes by right clicking on the text, and on the toolbar in Default mode. Note that I can’t find a way to switch out of default mode once I switch in, except to reset ALL my projects.
The Rich Text mode is only a beta and only available as an option if you’re in default mode, and attempts to translate some latex commands into word processor style. It could be a nice way to ease someone in to writing LaTeX. Like Google Docs, WriteLaTeX auto-saves your work. You can restore to previous versions, too, but only if you explicitly saved them under the “Versions” tab.

writelatex2

AS A LATEX INSTALLATION:
If you click the “Project” tab on the top bar, you get a nice view of all the files in the project, and you can download and upload from there. In this example, I’ve added the aastex.cls, apj.bst, and emulateapj.cls files (plus my .bib file) to my project; I could then specify \documentclass[iop]{emulateapj} and write the document you see here complete with \citet{} commands and a fully functional deluxetable in the document later on. There are probably some things too complex to include that way, but WriteLaTeX does come with a pretty nice selection built in: natbib and amsmath worked out of the box. And, of course, you get the frequent server-side compilation and its instant error-catching benefits.

As for images, WriteLaTeX accepts .jpgs (like their froggy example image), .pngs, and .pdfs. I’m guessing it’s a PDFtex background, because that would explain the lack of .ps or .eps upload.

7 comments… add one
  • August Muench Jan 12, 2015 @ 10:02

    just a tiny side note on the lack of EPS upload support in WriteLatex: for AAS Journals (AJ/ApJ) this is not a problem since EPS figures are no longer a requirement. PDFs are fully supported, and since we’ve moved to an online only format as of 1 Jan 2015 we hope to improve on the graphics instructions/options presently.

    (Full disclosure: i work for the AAS Journals as a data scientist.)

  • Adric Riedel Jan 12, 2015 @ 11:25

    Three small updates:
    * It DOES support .eps images.
    * You can change the backend from PDFtex (default) to something else.
    * WriteLaTeX is now named Overleaf.

  • Emily R Jan 12, 2015 @ 14:25

    I just used Overleaf (as WriteLaTeX is now called) to update a CV for a proposal and wooooooow is it nice. I’m not sure I would write a whole paper in it (yet), but the double-panel TeX/PDF, quick refreshing, and error identifications are perfect for fiddling with formatting on a CV. I’m sold!

  • TMB Jan 13, 2015 @ 0:54

    I quite like sharelatex, which is a similar idea.

  • Alyssa Goodman Jan 15, 2015 @ 23:59

    Josh Peek & I & our collaborators recently wrote a proto-paper called “The ‘Paper’ of the Future,” using Authorea, online here: https://www.authorea.com/users/23/articles/8762/_show_article. It contains a table comparing the plusses & minuses of various online (collaborative) editing schemes… comments on that work are welcome.

  • Ciska Kemper Mar 3, 2015 @ 2:46

    I have recently used sharelatex, which is very similar to writelatex, as far as I can tell from this description. There is one feature of sharelatex though that I found very useful. Sharelatex can be linked with your dropbox account, which means that you can actually edit the latex file on your local dropbox folder, and it will sync automatically with the sharelatex online version. This means that you can use all your local tools (in my case: emacs/bibtex/auctex/reftex) in the way you are accustomed too. You also always have a local copy of the paper which can be edited offline. It will sync the next time you are online again through dropbox.

Leave a Reply

Your email address will not be published. Required fields are marked *