diff --git a/spotlight_courses/HS24_NixOS/Makefile b/spotlight_courses/HS24_NixOS/Makefile index 27a60f84e22ad56519810f4bf2f987234308c95d..226c3624ca59ff8d71f0839a2eae3ee8e30a95f7 100644 --- a/spotlight_courses/HS24_NixOS/Makefile +++ b/spotlight_courses/HS24_NixOS/Makefile @@ -1,11 +1,11 @@ TYPST_ROOT!=git rev-parse --show-toplevel -WATCH=main.typ +TARGETS=main.pdf -all : main.pdf +all : $(TARGETS) .PHONY: watch watch: - typst w --root $(TYPST_ROOT) $(WATCH) + typst w --root $(TYPST_ROOT) $(shell echo $(TARGETS) | sed "s/\.pdf/\.typ/g") %.pdf : %.typ typst c --root $(TYPST_ROOT) $< diff --git a/typst_example/Makefile b/typst_example/Makefile index 2dfc4f0666452a06822fd5dce3d67f3366f3167a..72e6130d24bf854312197353dcd79d9849359c19 100644 --- a/typst_example/Makefile +++ b/typst_example/Makefile @@ -1,11 +1,11 @@ TYPST_ROOT!=git rev-parse --show-toplevel -WATCH=example.typ +TARGETS=example.pdf -all : example.pdf +all : $(TARGETS) .PHONY: watch watch: - typst w --root $(TYPST_ROOT) $(WATCH) + typst w --root $(TYPST_ROOT) $(shell echo $(TARGETS) | sed "s/\.pdf/\.typ/g") %.pdf : %.typ typst c --root $(TYPST_ROOT) $< diff --git a/typst_example/usage.md b/typst_example/usage.md new file mode 100644 index 0000000000000000000000000000000000000000..ff587813cff943ca9fe0c33f0cabe1250e7df90c --- /dev/null +++ b/typst_example/usage.md @@ -0,0 +1,10 @@ +# instantiate project +copy the Makefile and example.typ to a subdirectory + +# output pdf +use `m̀ake` to build +use `make watch` to start watching and continuously compiling the file + +# change the file being compiled / add more + +modify the Makefile put all targets in the TARGET variable