Skip to content

Commit 885e36a

Browse files
authored
Update Typstry.jl to v0.3.0 (#55)
1 parent 68741e3 commit 885e36a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Makie = "0.21.2"
3535
Poppler_jll = "21.9, 22, 23"
3636
Rsvg = "1"
3737
julia = "1.9"
38-
Typstry = "0.2, 0.3"
38+
Typstry = "0.3"
3939
tectonic_jll = "0"
4040

4141
[extras]

docs/src/formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fig
6363
```@example main
6464
using MakieTeX, CairoMakie
6565
66-
typst_string = typst"$ integral_0^pi sin(x)^2 diff x $";
66+
typst_string = typst"$ integral_0^pi sin(x)^2 dif x $";
6767
typst_document = TypstDocument(typst_string);
6868
cached_typst = CachedTypst(typst_document);
6969

src/rendering/typst.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ Compile the given document as a String and return the resulting PDF (also as a S
1414
"""
1515
function compile_typst(document::AbstractString)
1616
#=
17-
Typst_jll v0.11+ supports compiling from `stdin`.
18-
It does not yet support compiling to `stdout`.
17+
Typst_jll v0.11+ supports reading from `stdin`.
18+
Typst_jll v0.12+ will likely support writing to `stdout`.
1919
2020
See also:
2121
https://github.com/typst/typst/issues/410
2222
https://github.com/typst/typst/pull/3339
23+
https://github.com/typst/typst/pull/3632
2324
=#
2425
return mktempdir() do dir
2526
cd(dir) do
@@ -39,7 +40,7 @@ function compile_typst(document::AbstractString)
3940
try
4041
# `pipeline` is not yet supported for `TypstCommand`
4142
redirect_stdio(stdout=out, stderr=err) do
42-
run(ignorestatus(typst`compile temp.typ`))
43+
run(ignorestatus(addenv(typst`compile temp.typ`, "TYPST_FONT_PATHS" => Typstry.julia_mono)))
4344
end
4445

4546
close(out.in)

0 commit comments

Comments
 (0)