print_markdown
Print GitHub-flavored markdown directly on a thermal receipt printer with built-in ticket styling. Handles code, Mermaid diagrams, LaTeX math, tables, and task lists for notes, lists, or receipts.
Instructions
Render markdown with the built-in ticket style and print it on the thermal printer. Quick path for notes/lists/receipts; use print_html for custom design.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | No | "ticket" (default): standalone ticket with margins and trailing paper feed. "continuous": typewriter/log mode — zero top/bottom margins, NO trailing feed, so chunks printed across separate calls join seamlessly into one document; send one complete markdown block per call (incomplete chunks are rejected before printing); press the printer's FEED button after tearing to restore a margin. | |
| size | No | type size tier. "medium" (19px) is the RECOMMENDED default — use it for almost everything. "large" (24px) for headlines / very short notes. "small" (14px) ONLY for genuinely dense or long content (it is noticeably harder to read on thermal paper) — do NOT default to small. | |
| markdown | Yes | GitHub-flavored markdown with advanced features: syntax-highlighted code fences (monochrome: bold keywords, italic strings/comments), ```mermaid diagrams, LaTeX math ($inline$ and $$block$$), checkbox task lists, tables, remote images (auto-dithered). Rendered with a built-in minimalist high-contrast stylesheet (h1 = white-on-black rounded banner, bordered rounded blockquotes/code, dashed hr). Fastest way to print; use the html tools for full custom design. Call design_guide first for size/style guidance. | |
| feed_lines | No | blank lines fed after the ticket for tearing (default 4; forced 0 in continuous flow unless set) |