-
-
Save bjensen/3049038 to your computer and use it in GitHub Desktop.
Cross-platform: recompile LaTeX documents using Ruby, Guard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with Ruby 1.9 | |
# Needs gem "guard" (https://github.com/guard/guard) | |
# Needs gem "guard-shell" (https://github.com/guard/guard-shell) | |
# Uses process "growlnotify" (http://growl.info/extras.php) | |
# Uses process "pdflatex" from standard TeXLive distribution | |
guard 'shell' do | |
watch(%r{(.+)\.tex}) do |m| | |
`growlnotify -m #{m[0]} Recompiling` | |
`pdflatex -interaction=batchmode #{m[0]} >/dev/null` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment