on WriteLaTeX

(this post originally appeared in a slightly different form on bdnyc.org)

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 trying to modernize the process of writing scientific papers (a worthy goal, in my opinion) – <a href=”https://www.authorea.com/&#8221; title=”Authorea” target=”_blank”>Authorea</a> springs to mind. But one of the simpler options out there is actually pretty good: <a href=”https://www.writelatex.com/&#8221; title=”WriteLaTeX.com” target=”_blank”>WriteLaTeX</a>.
<!–more–>

writelatex

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.

<strong>AS AN EDITOR:</strong>
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

<strong>AS A LATEX INSTALLATION:</strong>
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, plus the more technically inclined .eps and .ps postscript formats (which aren’t advertised in the interface, but that’s probably because they’re less common… one of the founders of WriteLaTeX set me straight at bdnyc.org)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s