Collaborative latex editing with Dropbox and inotifywait

I’ve settled on this workflow for writing lab reports in a group:

  • We share a folder with Dropbox that holds the measurements and report files (graphs, latex source files).
  • To prevent collisions we use separate .tex files for different sections, and split the sections between group members.
  • To make sure the output is consistent, only one person compiles the PDF. Inspired by this blog post I wrote a short script to build the PDF whenever a file changes:
#!/bin/bash

while true
do
    echo Compiling
    pdflatex -interaction nonstopmode -file-line-error informe.tex &>salida.log
    inotifywait -e modify -r .
done

Previously I’d tried running

make

in a loop (it only compiles if one of the input files changed). However, this script automatically checks all files for changes, without having to add them to a Makefile.

Anuncios

Etiquetas: , , , , , , ,

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s


A %d blogueros les gusta esto: