Skip to content

Instantly share code, notes, and snippets.

@gudmundur
Last active December 16, 2015 20:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gudmundur/5494794 to your computer and use it in GitHub Desktop.
Save gudmundur/5494794 to your computer and use it in GitHub Desktop.
Gruntfile for re-running xelatex on any .tex change.
module.exports = function(grunt) {
grunt.initConfig({
watch: {
latex: {
files: ['**/*.tex'],
tasks: ['exec:xelatex']
}
},
exec: {
xelatex: {
cmd: function() {
return 'xelatex cv.tex';
}
}
},
open: {
pdf: {
path: 'cv.pdf'
}
}
});
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-open');
grunt.registerTask('compile', ['exec:xelatex'])
grunt.registerTask('default', ['compile', 'open:pdf', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment