From 884afa037c06c93dd431271a2bb7777259d13ccf Mon Sep 17 00:00:00 2001 From: Sivecano <sivecano@gmail.com> Date: Wed, 30 Oct 2024 16:37:28 +0100 Subject: [PATCH] update typst Makefile --- spotlight_courses/HS24_NixOS/Makefile | 6 +++--- typst_example/Makefile | 6 +++--- typst_example/usage.md | 10 ++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 typst_example/usage.md diff --git a/spotlight_courses/HS24_NixOS/Makefile b/spotlight_courses/HS24_NixOS/Makefile index 27a60f8..226c362 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 2dfc4f0..72e6130 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 0000000..ff58781 --- /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 -- GitLab