Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose whether to compile handout or presentation with flags in Makefile #21

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion courses/01_beginners/.latexmkrc
Original file line number Diff line number Diff line change
@@ -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";
15 changes: 10 additions & 5 deletions courses/01_beginners/Makefile
Original file line number Diff line number Diff line change
@@ -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-*
7 changes: 6 additions & 1 deletion courses/01_beginners/main.tex
Original file line number Diff line number Diff line change
@@ -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}
Expand Down