diff --git a/.vscode/settings.json b/.vscode/settings.json index 75ed45d..e66cbb6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "latex-workshop.latex.recipe.default": "latexmk (xelatex)", - "tinymist.formatterPrintWidth": 80 + "tinymist.formatterPrintWidth": 80, + "tinymist.typstExtraArgs": ["--package-path=./lib/typst"] } diff --git a/src/Advanced/Tropical Polynomials/handout.typ b/lib/typst/local/handout/0.1.0/handout.typ similarity index 97% rename from src/Advanced/Tropical Polynomials/handout.typ rename to lib/typst/local/handout/0.1.0/handout.typ index 723e6c6..63dd031 100755 --- a/src/Advanced/Tropical Polynomials/handout.typ +++ b/lib/typst/local/handout/0.1.0/handout.typ @@ -1,3 +1,5 @@ +/// Typst handout library, used for all documents in this repository. + /// If false, hide instructor info. /// @@ -238,8 +240,8 @@ set page( margin: 20mm, - width: 8.5in, - height: 11in, + width: 8in, + height: 11.5in, footer: align( center, context counter(page).display(), diff --git a/lib/typst/local/handout/0.1.0/typst.toml b/lib/typst/local/handout/0.1.0/typst.toml new file mode 100644 index 0000000..ed110b7 --- /dev/null +++ b/lib/typst/local/handout/0.1.0/typst.toml @@ -0,0 +1,6 @@ +[package] +name = "handout" +version = "0.1.0" +entrypoint = "handout.typ" +authors = [] +license = "GPL" \ No newline at end of file diff --git a/src/Advanced/Tropical Polynomials/macros.typ b/src/Advanced/Tropical Polynomials/macros.typ index 7b40215..5220f82 100644 --- a/src/Advanced/Tropical Polynomials/macros.typ +++ b/src/Advanced/Tropical Polynomials/macros.typ @@ -1,4 +1,4 @@ -#import "./handout.typ": * +#import "@local/handout:0.1.0": * #import "@preview/cetz:0.3.1" diff --git a/src/Advanced/Tropical Polynomials/main.typ b/src/Advanced/Tropical Polynomials/main.typ index f4e750d..0c707f0 100644 --- a/src/Advanced/Tropical Polynomials/main.typ +++ b/src/Advanced/Tropical Polynomials/main.typ @@ -1,4 +1,4 @@ -#import "./handout.typ": * +#import "@local/handout:0.1.0": * #show: doc => handout( doc, diff --git a/src/Advanced/Tropical Polynomials/parts/00 arithmetic.typ b/src/Advanced/Tropical Polynomials/parts/00 arithmetic.typ index 7f813a8..3c89898 100644 --- a/src/Advanced/Tropical Polynomials/parts/00 arithmetic.typ +++ b/src/Advanced/Tropical Polynomials/parts/00 arithmetic.typ @@ -1,4 +1,4 @@ -#import "../handout.typ": * +#import "@local/handout:0.1.0": * #import "../macros.typ": * = Tropical Arithmetic diff --git a/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ b/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ index b75c454..1a809f8 100644 --- a/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ +++ b/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ @@ -1,4 +1,4 @@ -#import "../handout.typ": * +#import "@local/handout:0.1.0": * #import "../macros.typ": * #import "@preview/cetz:0.3.1" diff --git a/src/Advanced/Tropical Polynomials/parts/02 cubic.typ b/src/Advanced/Tropical Polynomials/parts/02 cubic.typ index 0ff3385..a63bec0 100644 --- a/src/Advanced/Tropical Polynomials/parts/02 cubic.typ +++ b/src/Advanced/Tropical Polynomials/parts/02 cubic.typ @@ -1,4 +1,4 @@ -#import "../handout.typ": * +#import "@local/handout:0.1.0": * #import "../macros.typ": * #import "@preview/cetz:0.3.1" diff --git a/tools/scripts/build.py b/tools/scripts/build.py index 5dcc981..3056289 100644 --- a/tools/scripts/build.py +++ b/tools/scripts/build.py @@ -143,10 +143,12 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None: [ TYPST_PATH, "compile", + "--package-path", + f"{ROOT}/lib/typst", "--ignore-system-fonts", - "main.typ", "--input", "show_solutions=false", + "main.typ", f"{out}/{handout_file}", ], cwd=source_dir, @@ -164,6 +166,8 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None: [ TYPST_PATH, "compile", + "--package-path", + f"{ROOT}/lib/typst", "--ignore-system-fonts", "main.typ", f"{out}/{solutions_file}",