tinymist/crates/typlite
2025-03-28 17:42:03 +08:00
..
src feat: support --feature and --pdf-standard. (#1596) 2025-03-28 17:42:03 +08:00
Cargo.toml fix: expose and default to no-content-hint in typlite (#1381) 2025-02-24 10:28:25 +08:00
dist.toml build: bump version to 0.12.14-rc1 (#1060) 2024-12-23 21:15:15 +08:00
README.md docs(typlite): add examples for --assets-path and --assets-src-path (#1396) 2025-02-25 15:30:46 +08:00

Typlite

Converts a subset of typst to markdown.

Basic Usage

# default output is main.md
typlite main.typ
# specify output
typlite main.typ output.md

Feature

  • Contexual Content Rendering: Contents begin with context keyword will be rendered as svg output. The svg output will be embedded inline in the output file as base64 by default, if the --assets-path parameter is not specified. Otherwise, the svg output will be saved in the specified folder and the path will be embedded in the output file. By specify the --assets-src-path parameter, the source code of the context will also be saved in the specified folder.

    For example, the following folder structure is generated by the following command:

    typlite main.typ --assets-path assets --assets-src-path assets-src
    
    .
    ├── assets # when --assets-path is specified
    │   ├── 1_Dark.svg
    │   └── 1_Light.svg
    ├── assets-src # when --assets-src-path is specified
    │   └── 1.typ # 1 is the numbering of the context block
    ├── main.md # output file
    └── main.typ # input file
    
  • Raw Output: Raw codes with typlite language will be directly output into the Markdown result.