Length

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

Length

class Length

A Typst length such as 2pt or 1.2em.

Attributes

Name Description
unit
value

unit

Length.unit: builtins.str

value

Length.value: builtins.float

Methods

Name Description
__new__
__repr__
cm
em
inches
mm
pt

__new__

Length.__new__(value: builtins.float, unit: typing.Literal['pt', 'mm', 'cm', 'in', 'em']) -> Length

__repr__

Length.__repr__() -> builtins.str

cm

Length.cm(value: builtins.float) -> Length

em

Length.em(value: builtins.float) -> Length

inches

Length.inches(value: builtins.float) -> Length

mm

Length.mm(value: builtins.float) -> Length

pt

Length.pt(value: builtins.float) -> Length