Typst

A Typst is a typesetting object that can be used to render math text with Typst.

Constructor

new Typst(source)

Creates a new Typst object from a source string.

Parameters:
NameTypeDescription
sourcestring

The source of the Typst object.

Classes

Typst

Members

source

Returns the source of the Typst object.

Methods

to_svg(font_facesopt) → {string}

Renders the Typst object to an SVG string.

Parameters:
NameTypeAttributesDescription
font_facesArray.<FontFace> | null<optional>

The font faces to use when rendering the Typst object.

Returns:

The SVG string.

Type: 
string

vector_object_builder(font_facesopt) → {VectorObjectBuilder}

Renders the Typst object to a VectorObjectBuilder.

Parameters:
NameTypeAttributesDescription
font_facesArray.<FontFace> | null<optional>

The FontFaces to use when rendering the Typst object, if any.

Returns:

A VectorObjectBuilder representing the typesetting object.

Type: 
VectorObjectBuilder