Wednesday, December 14, 2011

Allow me to recommend latex-diff and latexbatchdiff

I do almost all of my technical writing in LaTeX, and I do revision control on everything with git. Unfortunately, tracking changes in revisions is very difficult in LaTeX. Maybe I make a change to a single word in a paragraph: a naive diff on the .tex file shows the entire line as being changed, and, even worse, then I just have the diff as plaintext, not something I could show a non-LaTeX user.

latexdiff is able to overcome this, automatically generating indications of changes, like Word’s change tracking system: new words show up as blue and underlined, deleted text is red and crossed-out. (How the changes are indicated is configurable, with several default styles to try.) latexdiff has two shortcomings, though. First, if I’m using version control to manage revisions, I have to manually save old .tex files off to the side so that latexdiff can find them. Second, latexdiff only works on single-file LaTeX documents. I like to put each section in its own file.

latexbatchdiff fixes both of these things. I just typed,

latexdiff-git 1ca0 head.tex abstract.tex acknowledgments.tex\
    introduction.tex methods.tex results.tex conclusion.tex

and it generated a marked-up PDF. (1ca0 is the start of a SHA for a previous revision.) It’s fantastic.

Friday, April 1, 2011

On “Antedisciplinary” Science

In PLoS Computational Biology, Sean R. Eddy wrote a Perspective, ["Antedisciplinary" Science](http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.0010006), on how to think about emerging interdisciplinary fields in science. In particular, he is concerned with the rising expectation that research groups have members from distinct disciplines, say a team with a biologist, a computer scientist, and a physicist. He contends that, in many cases, it is more effective to have teams of generalists. This is important to me because I feel like my job is a combination of numerical analysis, mechanics, computer programming, and biology: I think this is awesome. I get bored easily, and I'm delighted that I have a job in which I get to do a lot of complementary things.
Blog Widget by LinkWithin