[Tex/LaTex] Dropbox & LaTeX compiling automation

automationcompilingmaconline

I'm in the middle of a "drop a file here and compile it using LaTeX" project. I have a Dropbox and I would like to drop a .tex file in a specific folder and have a script that compiles it for me. I'm on Mac OS X (Snow Leopard). Can you point me on a .sh script or an Automator one (a tutorial would be good too) that compiles my documents into a .pdf file using pdfLaTeX?

How could I handle the LaTeX document dependencies like .sty, images, whatever?

EDIT: I posted the question on SuperUser and I found a good suggestion about using latexmk+folderactions, so go to Dropbox + Latex: automated pdf compile [SU] for details.

Best Answer

You can add a Folder Action to your dropbox: when something new arrives it'll fire off an AppleScript to fire off the commands to compile the file.

In Finder, right click on the folder. Go to Services and then Folder Actions Setup. You can then select which action (you can add yours to show up in the options).

Related Question