1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Typst → LaTeX via the `tylax` crate.
//!
//! Pure delegation today: tylax does all the heavy lifting. The
//! one inkhaven-specific tweak is to prepend a minimal LaTeX
//! preamble when the converter's output doesn't already include
//! `\documentclass`, so the resulting `.tex` compiles standalone
//! under `pdflatex` / `xelatex` without further editing.
/// Best-effort Typst → LaTeX conversion. Returns whatever tylax
/// emits, wrapped in a minimal preamble if missing. Never panics:
/// tylax itself returns String on every code path; the only
/// failure mode is "tylax couldn't translate part of the
/// document", which surfaces as inline comments inside the
/// emitted LaTeX (tylax's own behaviour).