Internals
This reference documents non-public utilities.
A Dates.jl package extension would currently print warnings during precompilation. See also the Julia issue #52511
Typstry.examples — Constant
examplesA constant Vector of Julia values and their corresponding Types implemented for show_typst.
Contexts
Typstry.default_context — Constant
default_contextUtilities
Typstry.compile_workload — Function
compile_workload(examples)Typstry.enclose — Function
enclose(f, io, x, left, right = reverse(left); kwargs...)Call f(io, x; kwargs...) between printing left and right, respectfully.
Examples
julia> Typstry.enclose((io, i; x) -> print(io, i, x), stdout, 1, "\$ "; x = "x")
$ 1x $Typstry.join_with — Function
join_with(callback, io, values, delimeter; keyword_parameters...)Similar to join, except printing with callback(io, value; keyword_parameters...).
Examples
julia> Typstry.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, ", "; x = "x")
-1x, -2x, -3x, -4xTypstry.unwrap — Function
unwrap(x, key::Symbol, default)
unwrap(x, type::Type, key)Strings
Typstry.code_mode — Function
Typstry.escape — Function
escape(io::IO, count::Int)Print \ to io count times.
Examples
julia> Typstry.escape(stdout, 1)
\
julia> Typstry.escape(stdout, 2)
\\Typstry.format — Function
format(::Union{
MIME"application/pdf",
MIME"image/gif",
MIME"image/jpg",
MIME"image/png",
MIME"image/svg+xml",
MIME"image/webp"
})Return the image format acronym corresponding to the given MIME.
Examples
julia> Typstry.format(MIME"application/pdf"())
"pdf"
julia> Typstry.format(MIME"image/png"())
"png"
julia> Typstry.format(MIME"image/svg+xml"())
"svg"Typstry.indent — Function
indent(tc)Typstry.math_mode — Function
math_mode(f, io, tc, x; kwargs...)Typstry.math_pad — Function
math_pad(tc)Return "", "\$", or "\$ " depending on the block and mode settings.