Collaborative cross-platform writing
For several courses at the university, we’ve got projects going on (actually, 5 simultaneously…) and for most of them, we have to write fairly large documents. We also have to work in groups of 2, 3 or 5. So collaborative writing becomes a necessity. Finally, in the group of 5, we work on 4 different operating systems. So whichever solution we pick, it must seamlessly work on any platform as well.
We chose LyX.
- LyX is a WYSIWYM GUI to write LaTeX documents.
- LyX is written in Qt, a cross-platform GUI toolkit (the most awesome one, if you ask me!), which makes it possible to use it on Windows XP, Windows Vista, Mac OS X and Linux.
- To make LyX collaborative, we use the SVN version control system (which is also cross-platform).
This is how we started. But some problems emerged:
- Line endings are different
Linux/Mac OS X uses\n
line endings, Windows uses\r\n
. As a result, when a person on Windows made changes to one part of the document and a person on Linux made changes in a different part of the document, their changes would no longer merge! No more collaborative (simultaneous) writing!
After asking in #latex — where a nice guy hinted that SVN could enforce a certain line ending — the problem was quickly resolved.
Solution: go to your working copy’s root directory and execute the following command:svn propset -R svn:eol-style LF .
- Generated PDFs are not always screen-readable
The PDFs that LyX generates (through pdflatex) look okay-ish, but blurry, on both Mac OS X and Linux. They look like total crap on Windows — or at least in Adobe Reader.
Solution: Go to LyX → Preferences → Output → LaTeX → TeX encoding and enter “OT1” instead of “T1”. If you now export to PDF, the fonts will be much more readable on screen! - Cross-references as hyperlinks in PDFs
I think everybody likes links within documents, i.e. from the table of contents to the corresponding pages, from cross-references to the sections they reference. Since LyX 1.6, you can configure this from within LyX!
Solution Go to LyX → Document → Settings → PDF Properties and check the “Use hyperref support” checkbox.
In the optional “Additional options” input field, I entered this:linkcolor=blue, citecolor=black, urlcolor=blue, filecolor=blue, pdftex
.
The result of this is that you can work together on the same document, each working simultaneously but on different sections, from any OS and generate hyperlinked PDFs that look awesome both in print and on screen, again on any OS. Yay! :)
Comments
Sounds pretty awesome. Where
Sounds pretty awesome. Where does the repository live?
Also, why do you think Qt is the best cross-platform GUI toolkit?
Which repository? Qt
Which repository?
Qt supports native widgets, whereas GTK does not. GTK is a bitch to install under Mac OS X, so it’s not properly truly cross-platform in the original sense of the word. Finally, the code is clean, the documentation is the best I’ve ever seen (beats Drupal’s docs easily), has a very active community, development is very active and it’s got commercial backing.
The svn repository for your
The svn repository for your collaborative school project.
That's private
Sorry, school policy forbids me from sharing any work. If they find out, I’ll get a zero, because others might have taken inspiration from me then.
It’s in Dutch anyway :)
I just meant, where did you
I just meant, where did you choose for the repo to live? A machine you have that’s a server, a university server space you have, a host that you pay for, etc.
Pseudo-self-hosted SVN
Oh, it’s on a pseudo-self-hosted SVN: on a Dreamhost account I got for free. Most free SVN repositories limit the number of users to 3.
However, Springloops allows for unlimited people in their free account, so that might be an option for you. We needed more than 25 MB of space, so they weren’t an option for us.
Doesn't LyX mess up the
Doesn’t LyX mess up the formatting everytime, since it generates LaTeX? Or did you just put the LyX files in SVN?
We put the .lyx files in SVN
We put the .lyx files in SVN :)
LyX is – as far as I can tell at least – just plain LaTeX, but with additional markup (LaTeX is very extensible so that’s not too hard). While it’s possible to export to LaTeX, I haven’t had to do that yet. Why do you?
Well, we don't use Lyx, just plain old LaTeX and a good editor
Well, we don’t use Lyx, just plain old LaTeX and a good editor, and put the LaTeX files in SVN when we write papers. This causes issues as well though (e.g. I configured my editor to use hard line endings at 70 chars, while other people don’t break lines at all, other break lines at 80 chars, and so on).
A colleague of mine was thinking of using LyX to write a paper, but I could see lots of problems if some of us would be working on the exported LaTeX, and other ones on the LyX file directly. But indeed, if everyone uses LyX, that should be OK.
Might be good to just try it and see if it works :-) LyX also supports loading certain academic publisher’s templates (e.g. IEEE), which is nice.
Google Docs might also be an option, but its Word compatibility is not perfect, so some templates might not work.
Thanks for sharing!
Any experience with LaTeX for presentations?
You’re welcome :)
You don’t happen to have experience with LaTeX for presentations? I’d like to use that for my bachelor thesis but when I tried it (more than a month ago), I couldn’t get it working.
No, I never used LaTeX for presentations
No, I never used LaTeX for presentations. I think LyX has a slides template though. There is also the LaTeX Beamer class.
Thanks for the tip
I have just started with LyX (1.6.7) and am starting to like it already. I was trying to export to pdf, and using the manual and your advice above I got a really nice document, with the TOC and Bookmarks and links from the TOC to everywhere in the document. Great!