8 ms·
Collaborating with LaTeX and git
- mjn 14y agoWhile 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-within-a-line http://stackoverflow.com/questions/5587626/git-merging-withi...
- JoachimSchipper 14y agoIsn't the usual solution to institute a one-sentence-per-line policy? The big win is, indeed, that this allows easy patching/merging/...
- morpher 14y agoIf 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/ http://www.ctan.org/tex-archive/support/latexdiff/ [2] http://eothred.wordpress.com/2010/11/07/latexdiff-and-git/ http://eothred.wordpress.com/2010/11/07/latexdiff-and-git/
- fudged71 14y agoThere 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 http://tex.stackexchange.com/search?q=git&submit=search
- forkrulassail 14y agoThis 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.
- jpallen 14y agoAs 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.
- gsf 14y agoThis reminded me of http://www.scribtex.com/ http://www.scribtex.com/, where each LaTeX project is kept in a Git repo.
- jpallen 14y agoI 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.