diff --git a/courses/01_beginners/.latexmkrc b/courses/01_beginners/.latexmkrc index 55126bd..de371e4 100644 --- a/courses/01_beginners/.latexmkrc +++ b/courses/01_beginners/.latexmkrc @@ -1 +1,4 @@ -$xelatex = 'xelatex -shell-escape %O %S' +$xelatex = 'xelatex -shell-escape %O %S'; + +# List of extension latexmk can safely clean (correspond to file created by the Beamer plug-in) +$clean_ext = "nav snm vrb"; diff --git a/courses/01_beginners/Makefile b/courses/01_beginners/Makefile index 4d6e713..d7a7468 100644 --- a/courses/01_beginners/Makefile +++ b/courses/01_beginners/Makefile @@ -1,11 +1,16 @@ -all: main +handout: + latexmk -pdfxe -shell-escape -jobname=handout $< -%: - latexmk -pdfxe $< +presentation: + latexmk -pdfxe -shell-escape -usepretex="\def\createHandout{}" -jobname=presentation $< + +all: handout presentation clean: - latexmk -c + latexmk -c -jobname=handout + latexmk -c -jobname=presentation cleanall: - latexmk -C + latexmk -C -jobname=handout + latexmk -C -jobname=presentation rm -rf _minted-* diff --git a/courses/01_beginners/main.tex b/courses/01_beginners/main.tex index 4f77d31..d5c8e42 100644 --- a/courses/01_beginners/main.tex +++ b/courses/01_beginners/main.tex @@ -1,9 +1,14 @@ % !TeX program = xelatex +% Create command `createHandout` only if it doesn't already exists. +% To compile in presentation mode, pass a command createHandout doing nothing. +\providecommand{\createHandout}{handout} + \documentclass[ aspectratio=169, - handout, + \createHandout ]{beamer} + \usepackage{minted} \usepackage{xcolor} \usepackage{tcolorbox}