{"repo":"Xecades/markdown-it-typst","free":true,"listed":false,"github":"https://github.com/Xecades/markdown-it-typst","clone":"git clone https://github.com/Xecades/markdown-it-typst.git","description":"Plugin to transform Typst code to SVG image for markdown-it markdown parser.","language":"TypeScript","stars":18,"topics":["markdown","markdown-it","typst"],"license":"MIT","category":"productivity","readme_excerpt":"markdown-it-typst [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![bundle][bundle-src]][bundle-href] [![JSDocs][jsdocs-src]][jsdocs-href] [![License][license-src]][license-href] A simple typst.ts wrapper that adds Typst support to markdown-it . WARNING : It's NOT recommended to run this plugin on browser side, as it is not optimized for tree-shaking. (See typst.ts Documentation) However, utilizing the browser-side version of typst.ts is still possible, any PRs regarding this are welcome. --- Usage The code above will render the following web page (Without additional styling): --- Features - Able to import packages : md Normal Markdown code :-) - Able to import external files : md --- Options Default options: identifier - Type: string string[] - Default: \"typst\" The language identifier(s) of the Typst code block. Only code blocks with the specified identifiers will be processed. typstWrapper - Type: (code: string) = string - Default: (code: string) = \"#set page(width: auto, height: auto, margin: 5pt)\\n#set text(size: 18pt)\\n\" + code Typst code will be wrapped with this function before being compiled. svgWrapper - Type: (svg: string) = string - Default: (svg: string) = ' \\n' + svg + \"\\n \" The SVG output will be wrapped with this function during rendering. --- Examples The probably most handy application is to render CeTZ graphs in Markdown: md Electromagnetic waves are transverse waves: The option typstWrapper can ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Xecades","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Xecades/markdown-it-typst/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}