Skip to content

Instantly share code, notes, and snippets.

@sotte
Created November 18, 2015 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sotte/504bec2434b9f73018c4 to your computer and use it in GitHub Desktop.
Save sotte/504bec2434b9f73018c4 to your computer and use it in GitHub Desktop.
Compile latex on file change
#!/bin/sh
# A simple script that builds the specified latex file when any *.tex
# file changes.
#
# Dependencies:
# - inotify-tools
# - pdflatex
if [ $# -eq 1 ]
then
while true; do inotifywait -e modify *.tex; pdflatex $1 ; done
else
echo "Usage: autolatex.sh TEX_FILE_TO_BUILD"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment