typst_compile

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

设置是否使用外部 Typst 可执行程序进行编译

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

编译 Typst 文档

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

sys_inputs 字典转换为键值对字符串列表

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

计算 Typst 文档的哈希值,用于缓存

janim.utils.typst_compile.get_typst_template() str