Socket
Socket
Sign inDemoInstall

markdown-it-mathjax

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    markdown-it-mathjax

[![Build Status](https://img.shields.io/travis/classeur/markdown-it-mathjax/master.svg?style=flat)](https://travis-ci.org/classeur/markdown-it-mathjax) [![NPM version](https://img.shields.io/npm/v/markdown-it-mathjax.svg?style=flat)](https://www.npmjs.org


Version published
Maintainers
1
Install size
10.8 kB
Created

Readme

Source

markdown-it-mathjax

Build Status NPM version

Markdown-it plugin to bypass LaTeX math for mathjax processing.

Processes TeX displayed math

$$1 *2* 3$$ => \[1 *2* 3\]

Processes TeX in-line math

$1 *2* 3$ => \(1 *2* 3\)

Skips in-line math if numbers are around (according to pandoc math)

$1 *2* 3$5 => $1 <em>2</em> 3$5

Also processes LaTeX delimiters (double backslashed)

\\(1 *2* 3\\) => \(1 *2* 3\)

\\[1 *2* 3\\] => \[1 *2* 3\]

And sections

\begin{abc}1 *2* 3\end{abc} => \begin{abc}1 *2* 3\end{abc}

Install

npm install markdown-it-mathjax --save

Use

var md = require('markdown-it')()
            .use(require('markdown-it-mathjax')());

md.render('$1 *2* 3$') // => '<p>\(1 *2* 3\)</p>'

Differences in browser. If you load script directly into the page, without package system, module will add itself globally as window.markdownitMathjax.

License

MIT

FAQs

Last updated on 04 Dec 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc