mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-09 02:54:52 +00:00
|
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| dist.toml | ||
| README.md | ||
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 textoutput.md: Markdownoutput.tex: LaTeXoutput.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
contextkeyword will be rendered as svg output. The svg output will be embedded inline in the output file as base64 by default, if the--assets-pathparameter 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
}