Add julia support and example

This commit is contained in:
2026-01-30 23:48:20 +01:00
parent 9d3594a483
commit 752433a900
5 changed files with 1121 additions and 4 deletions

1096
Manifest.toml Normal file
View File

File diff suppressed because it is too large Load Diff

2
Project.toml Normal file
View File

@@ -0,0 +1,2 @@
[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

View File

@@ -10,12 +10,19 @@ setup:
test:
uv run python main.py
# Run code that generates output
output: ensure-build
julia --project=. main.jl
# Build document and open in zathura
build:
rm main.pdf
typst compile main.typ
zathura main.pdf >/dev/zero 2>&1 & disown
build: output
rm main.pdf || true
typst compile main.typ build/main.pdf
zathura build/main.pdf >/dev/zero 2>&1 & disown
# Format code in place
format:
typstyle -i main.typ
ensure-build:
mkdir -p build

5
main.jl Normal file
View File

@@ -0,0 +1,5 @@
using Plots
plot(sin)
savefig("build/sine.svg")
gui()

View File

@@ -16,3 +16,10 @@
)
Literate programming @knuth:1984 in typst after Knuth?
#figure(
image(
"build/sine.svg",
),
caption: [Einfacher Plot mit Julia],
)