Allow to live edit markdown with math (rendered by katex) and to render external markdown page containing math formulas.
There is no common solution to manage math in markdown. Several options
but none of them offer the elegance, practicality and ease of use
mathdown use marked for generating HTML from markdown. Thus
supports CommonMark and Github flavored markdown.
mathdown support mathematic formulas using katex.
Inline and math mode are supported.
Let's define the matrix `$A$`.
The projection then is: ```math $$p=A\hat x$$ ```
The advantage of this solution is that if the markdown engine does not
support math rendering, your equations remain readable as text enclosed in
Download the package through npm:
npm install mathdown
or through git
git clone https://github.com/jdmichaud/mathdown cd mathdown npm install
Create a config file:
cat > config.yml << EOF static_path: static/ port: 8000 template: static/template.mustache EOF
static_pathpoints to the static file path.
portis the web server port.
templateis the template used to render external markdown. A sample is provided in the
Launch the server:
node index.js -c config.yml
Go to the root page of your serveur, and a basic live editor can be used to test markdown with math.
Once you markdown file is hosted somewhere (github, gist, bitbucket, etc),
you can render it by passing a url to