Internals

This reference documents non-public utilities.

Info

A Dates.jl package extension would currently print warnings during precompilation. See also the Julia issue #52511

Contexts

Utilities

Typstry.encloseFunction
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 $
source
Typstry.join_withFunction
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, -4x
source

Strings

Typstry.escapeFunction
escape(io::IO, count::Int)

Print \ to io count times.

Examples

julia> Typstry.escape(stdout, 1)
\

julia> Typstry.escape(stdout, 2)
\\
source
Typstry.formatFunction
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"
source
Typstry.math_padFunction
math_pad(tc)

Return "", "\$", or "\$ " depending on the block and mode settings.

source