A LaTeX Course.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 564B

123456789
  1. # This is buggy: it replaces *all* occurrences of documentclass
  2. # maybe this helps: https://stackoverflow.com/questions/6278057/replace-only-first-match-in-multiple-files-with-perl
  3. %-handout.pdf: %.tex
  4. cat $< | perl -0777 -p -e 's/^\\documentclass\[/\\documentclass\[handout,/' -e 's/^\\documentclass{/\\documentclass\[handout\]{/' | lualatex -jobname=$(basename $@)
  5. cat $< | perl -0777 -p -e 's/^\\documentclass\[/\\documentclass\[handout,/' -e 's/^\\documentclass{/\\documentclass\[handout\]{/' | lualatex -jobname=$(basename $@)
  6. clean:
  7. rm -f *-handout.pdf