marked-extended-latex

1.1.0 • Public • Published

marked-extended-latex

LaTex support to Marked

Usage

import Katex from "katex";
import Marked from "marked";
import extendedLatex from "marked-extended-latex";

const options = {
  render: (formula: string, displayMode: boolean) => Katex.renderToString(formula, { displayMode })
};

marked.use(extendedLatex(options));
marked("$a+b=c$");
// <p><span class="katex"><span ...

options

  • lazy, a boolean, whether to use lazy rendering, default false
  • render, a callback, LaTex renderer. When lazy is true, it can be an async function (returns Promise)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.0572latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.0572
1.0.02

Package Sidebar

Install

npm i marked-extended-latex

Weekly Downloads

574

Version

1.1.0

License

MIT

Unpacked Size

14.3 kB

Total Files

17

Last publish

Collaborators

  • yazi