Add local typst packages
All checks were successful
CI / Typst formatting (push) Successful in 10s
CI / Typos (push) Successful in 19s
CI / Build (push) Successful in 12m17s

Co-authored-by: Mark <mark@betalupi.com>
Co-committed-by: Mark <mark@betalupi.com>
This commit is contained in:
Mark 2025-01-22 21:46:31 -08:00 committed by Mark
parent ed3339829d
commit 8d3e38937b
9 changed files with 22 additions and 9 deletions

View File

@ -1,4 +1,5 @@
{ {
"latex-workshop.latex.recipe.default": "latexmk (xelatex)", "latex-workshop.latex.recipe.default": "latexmk (xelatex)",
"tinymist.formatterPrintWidth": 80 "tinymist.formatterPrintWidth": 80,
"tinymist.typstExtraArgs": ["--package-path=./lib/typst"]
} }

View File

@ -1,3 +1,5 @@
/// Typst handout library, used for all documents in this repository.
/// If false, hide instructor info. /// If false, hide instructor info.
/// ///
@ -238,8 +240,8 @@
set page( set page(
margin: 20mm, margin: 20mm,
width: 8.5in, width: 8in,
height: 11in, height: 11.5in,
footer: align( footer: align(
center, center,
context counter(page).display(), context counter(page).display(),

View File

@ -0,0 +1,6 @@
[package]
name = "handout"
version = "0.1.0"
entrypoint = "handout.typ"
authors = []
license = "GPL"

View File

@ -1,4 +1,4 @@
#import "./handout.typ": * #import "@local/handout:0.1.0": *
#import "@preview/cetz:0.3.1" #import "@preview/cetz:0.3.1"

View File

@ -1,4 +1,4 @@
#import "./handout.typ": * #import "@local/handout:0.1.0": *
#show: doc => handout( #show: doc => handout(
doc, doc,

View File

@ -1,4 +1,4 @@
#import "../handout.typ": * #import "@local/handout:0.1.0": *
#import "../macros.typ": * #import "../macros.typ": *
= Tropical Arithmetic = Tropical Arithmetic

View File

@ -1,4 +1,4 @@
#import "../handout.typ": * #import "@local/handout:0.1.0": *
#import "../macros.typ": * #import "../macros.typ": *
#import "@preview/cetz:0.3.1" #import "@preview/cetz:0.3.1"

View File

@ -1,4 +1,4 @@
#import "../handout.typ": * #import "@local/handout:0.1.0": *
#import "../macros.typ": * #import "../macros.typ": *
#import "@preview/cetz:0.3.1" #import "@preview/cetz:0.3.1"

View File

@ -143,10 +143,12 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None:
[ [
TYPST_PATH, TYPST_PATH,
"compile", "compile",
"--package-path",
f"{ROOT}/lib/typst",
"--ignore-system-fonts", "--ignore-system-fonts",
"main.typ",
"--input", "--input",
"show_solutions=false", "show_solutions=false",
"main.typ",
f"{out}/{handout_file}", f"{out}/{handout_file}",
], ],
cwd=source_dir, cwd=source_dir,
@ -164,6 +166,8 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None:
[ [
TYPST_PATH, TYPST_PATH,
"compile", "compile",
"--package-path",
f"{ROOT}/lib/typst",
"--ignore-system-fonts", "--ignore-system-fonts",
"main.typ", "main.typ",
f"{out}/{solutions_file}", f"{out}/{solutions_file}",