typst_compile

janim.utils.typst_compile.set_use_external_typst(flag: bool) None

Sets whether to use an external Typst executable for compilation

janim.utils.typst_compile.compile_typst(text: str, shared_preamble: str, additional_preamble: str, vars: str, sys_inputs: dict[str, str]) str

Compiles a Typst document

janim.utils.typst_compile.get_sys_inputs_pairs(sys_inputs: dict[str, str]) list[str]

Converts the sys_inputs dictionary into a list of key-value pair strings

janim.utils.typst_compile.compute_hash_hex(text: str, shared_preamble: str, additional_preamble: str, vars: str, sys_inputs_pairs: list[str]) str

Computes the hash of the Typst document for caching purposes

janim.utils.typst_compile.get_typst_template() str