Skip to content

Instantly share code, notes, and snippets.

@seabre
Last active December 31, 2015 13:19
Show Gist options
  • Save seabre/7991764 to your computer and use it in GitHub Desktop.
Save seabre/7991764 to your computer and use it in GitHub Desktop.
LaTeX and Guard setup
# Guardfile to watch the LaTeX and automatically build it if it changes.
guard 'rake', :task => 'build' do
watch('mydocument.tex')
end
task :default => [:build]
task :build do
puts `/usr/bin/env pdflatex -interaction=nonstopmode -output-directory=build/ mydocument.tex`
end
task :clean do
puts `rm -v build/mydocument.aux build/mydocument.out build/mydocument.aux build/mydocument.pdf build/texput.log`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment