Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

micromark-extension-math

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-math

micromark extension to support math (`$C_L$`)

  • 3.1.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
397K
decreased by-9.91%
Maintainers
1
Weekly downloads
 
Created

What is micromark-extension-math?

The micromark-extension-math package is an extension for micromark, a Markdown parser, that adds support for parsing and rendering mathematical expressions written in LaTeX. This package is particularly useful for developers who need to include mathematical notation in their Markdown documents.

What are micromark-extension-math's main functionalities?

Inline Math

This feature allows you to include inline mathematical expressions within your Markdown content using the $...$ syntax. The code sample demonstrates how to parse and render an inline math expression.

const micromark = require('micromark');
const math = require('micromark-extension-math');

const content = 'This is an inline math expression: $E=mc^2$';
const html = micromark(content, { extensions: [math()] });
console.log(html);

Display Math

This feature allows you to include display mathematical expressions using the $$...$$ syntax. Display math is typically rendered on its own line and centered. The code sample shows how to parse and render a display math expression.

const micromark = require('micromark');
const math = require('micromark-extension-math');

const content = 'This is a display math expression: $$\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$';
const html = micromark(content, { extensions: [math()] });
console.log(html);

Other packages similar to micromark-extension-math

Keywords

FAQs

Package last updated on 08 Jul 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc