mathdown v0.1.0
A markdown live editor and renderer with math formulas
Allow to live edit markdown with math (rendered by katex) and to render external markdown page containing math formulas.
Live editor and renderer
There is no common solution to manage math in markdown. Several options
are available
but none of them offer the elegance, practicality and ease of use
that mathdown allows.
Markdown
mathdown use marked for generating HTML from markdown. Thus mathdown
supports CommonMark and Github flavored markdown.
Math
Additionally, mathdown support mathematic formulas using katex.
Inline and math mode are supported.
Inline mode:
Let's define the matrix `$A$`.Math mode:
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
<code> blocks.
Run the server
Download the package through npm:
npm install mathdownor through git
git clone https://github.com/jdmichaud/mathdown
cd mathdown
npm installCreate a config file:
cat > config.yml << EOF
static_path: static/
port: 8000
template: static/template.mustache
EOFstatic_pathpoints to the static file path.portis the web server port.templateis the template used to render external markdown. A sample is provided in thestaticfolder.
Launch the server:
node index.js -c config.ymlUse mathdown
As an editor
Go to the root page of your serveur, and a basic live editor can be used to test markdown with math.
As a renderer
Once you markdown file is hosted somewhere (github, gist, bitbucket, etc),
you can render it by passing a url to mathdown:
http://mathdown.com/toHtml?url=http://your.markdown/url