node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



Package that compiles AsciiMath-HTML to complete, searchable websites. (with SVG-graphics)

Disclaimer: This package ain't your all purpose, general package. This is niched against a fixed folder structure and fixed document structures. Be aware, and look at the examples for success.

This package exposes a function and a CLI.

module usage

npm i matte-engine

async function main(){
    var compile = require('matte-engine').compile
    await compile('matte/flervariabelanalys')


npm i -g matte-engine

matte-engine init matte/flervariabelanalys
# Created empty boilerplate in matte/flervariabelanalys 
matte-engine matte/flervariabelanalys


Note: You don't really have to care about the folder structure if you're using the CLI to init your projects, and then dumping the root-folder at a web server. Just sayin

Uncompiled file structure:

├── src
│   ├── boilerplate.html
│   ├── fl1.html
└── style.css

Note the convention of namespacing the files src/fl*.html. The boilerplate is there for practical reasons only, in case you need to take notes quickly (ie cp boilerplate.html fl4.html && vim fl4.html).

Compiled file structure:

├── data.js
├── fl1.html
├── index.html
├── src
│   ├── boilerplate.html
│   ├── fl1.html
└── style.css

The package should create these files after compilation: data.js: File containing search information about files fl*.html: src/fl*.html but with pre-rendered SVG graphics instead of AsciiMath index.html: Index for site


<!DOCTYPE html>
    <script src=""></script> 
    <link rel="stylesheet" href="../style.css">
        Your stuff here `x = 0`
        These divs are seperated by a tiny amount, making readable "pages"

This setup ensures that you are able to use live-server to live preview your changes to this file.