The Julia to Typst interface
MIT License
Typstry.jl is the interface to convert the computational power of Julia into beautifully formatted Typst documents.
Typst is an open-source and relatively new typesetting system (written in Rust ), designed to improve upon the performance and usability of LaTeX. See also the Typst repository and documentation for examples and how to get started.
julia> using Pkg: add
julia> add("Typstry")
julia> using Typstry
julia> show_typst(IOContext(stdout, :mode => code), true)
true
julia> show(stdout, "text/typst", Typst([true 1; 1.0 [Any[true 1; 1.0 nothing]]]))
$mat(
"true", 1;
1.0, mat(
"true", 1;
1.0, #none
)
)$
julia> TypstString(1 // 2; block = true)
typst"$ 1 / 2 $"
julia> typst"$ \(1 + 2im; mode = math) $"
typst"$ (1 + 2i) $"
julia> TypstCommand(["help"])
typst`help`
julia> typst`compile input.typ output.pdf`
typst`compile input.typ output.pdf`
auto::Mode
?
Base
AbstractDict
AbstractIrrational
AbstractSet
Enum
Mode
Expr
Symbol
@typst(a * b) ==
TypstString(:(a * b)) ==
TypstString(TypstFunction(*, :a, :b)) ==
typst"(a b)"