Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 904 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 904 Bytes

This script acts like auto-render for KaTeX and render mathmatical text in Typst form based on wypst.

Build

git clone https://github.com/Lambdaris/typst-auto-render.git
cd typst-auto-render
npm install
npm run build

Usage

<script src="typst-auto-render.js"></script>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        renderMathInElement(document.body, {
            throwOnError: false
        });
    });
</script>

It has same interface with KaTeX auto render and the options is much like.

Note customization for delimeters is not supported and mathmatical expressions are wrapped in same way as Typst. Users could write "\$" to type an literal "$" (might be "\\$" in markdown being converted to html).