mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
|
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
Further fix and refactor may base on this pr. also refactor: centralize CommonMark spacing and fix inline custom node handling - add `FormatPolicy` to manage trailing newline / blank-line rules and expose prepare_block_sequence - route document, blockquote, and list content through the policy so nested blocks get consistent spacing - adjust `Node::is_block` / `is_inline` to respect `CustomNode::is_block`, preventing inline custom nodes from forcing HTML fallbacks - ensure table rendering stays in Markdown by recognizing inline custom cells correctly --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| dist.toml | ||
| README.md | ||
Typlite
Converts a subset of typst to markdown.
Installation
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.13.26-rc1/typlite-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.13.26-rc1/typlite-installer.ps1 | iex"
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
}