tinymist/crates/typlite
Myriad-Dreamin 483de6f00d
build: generate docs with internal links (#1831)
* build: generate docs with internal links

* build: detect link kind
2025-06-22 15:28:27 +08:00
..
src feat: export to tex by tasks (#1826) 2025-06-19 14:10:42 +08:00
Cargo.toml build: generate docs with internal links (#1831) 2025-06-22 15:28:27 +08:00
dist.toml build: enable typlite distribution in dist.toml (#1810) 2025-06-12 18:05:37 +08:00
README.md fix(docs): small typo in typlite README (#1819) 2025-06-16 19:47:41 +08:00

Typlite

Converts a subset of typst to markdown.

Installation

cargo install typlite

Usage

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

Supported format:

  • output.txt: Plain text
  • output.md: Markdown
  • output.tex: LaTeX
  • output.docx: Word

Todo: We may support custom format by typst scripting in future, like:

# specify output
typlite main.typ --post-process @preview/typlite-mdx output.mdx

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.

Typlite-Specific sys.inputs

The sys.input.x-target can be used distinguish with normal HTML export.

#let x-target = sys.inputs.at("x-target", default: "pdf")

#let my-function = if x-target == "md" {
  md-impl
} else {
  pdf-impl or html-impl
}