Hacker News new | past | comments | ask | show | jobs | submit login
Collaborating with LaTeX and git (sharelatex.com)
52 points by shrikant on Nov 24, 2012 | hide | past | favorite | 8 comments



While the article discusses using --word-diff to view changes by-word rather than by-line, which fixes the problem of paragraph reflows cluttering up the diff display, the bigger problem I've had is that it's not entirely obvious how to patch in that manner. As a result, if two patches touch the same paragraph, they usually conflict. You could avoid that by using the classic researcher approach to collaboration: taking locks on sections. But if you're going to do that, SVN is actually better, because you can break out the sections into separate files, and use SVN locking to do the edit-token bookkeeping, rather than having to pass around a "Mark is currently editing Section 2, pls don't touch" lock through email or in LaTeX comments.

Here's a StackExchange thread discussing possible solutions for finer-grained patching: http://stackoverflow.com/questions/5587626/git-merging-withi...


Isn't the usual solution to institute a one-sentence-per-line policy? The big win is, indeed, that this allows easy patching/merging/...


If you have collaborators that aren't fluent in latex, it can be useful to generate an output file (e.g., pdf) that contains marked changes.

I really like latexdiff[1] and a script[2] for making it easier to use with git. The generated pdfs have new text underlined with blue wavy lines and removed text struck through with red lines.

It doesn't properly show bibliography changes when using bibtex, but that's understandable.

[1] http://www.ctan.org/tex-archive/support/latexdiff/ [2] http://eothred.wordpress.com/2010/11/07/latexdiff-and-git/


There are some useful entries on stackexchange for using git with LaTeX. Also useful if you run into any problems: http://tex.stackexchange.com/search?q=git&submit=search


This link is just one of the reasons I keep jonesin for HN.

Thanks for posting, I'm in the middle of developing a course for academics about LaTeX, git and collaboration. Perfect hit.


As the author of this article I'm glad to hear you like it :). If you have a spare moment I'd love to chat to you about LaTeX and collaboration in academia, and what your experiences with git are in this context. The blog is hosted at ShareLaTeX, which is an online LaTeX editor we're developing to try to provide a simple solution to some of the problems that git has a bit too steep of a learning curve for.


This reminded me of http://www.scribtex.com/, where each LaTeX project is kept in a Git repo.


I wrote this article, and I also founded and run ScribTeX so that's no coincidence! I'm now working with Henry on ShareLaTeX, where this blog is hosted, and we're about half way along with our plans to get git integrated there as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: