{"_id":"@byronwan/markdown-it-katex","name":"@byronwan/markdown-it-katex","dist-tags":{"latest":"3.3.0"},"versions":{"3.3.0":{"name":"@byronwan/markdown-it-katex","version":"3.3.0","description":"Fast math support for markdown-it with KaTeX","main":"index.js","scripts":{"watch":"watchify browser.js -o bundle.js -v","test":"node test/all.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/byronwanbl/markdown-it-katex.git"},"keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"author":{"name":"Abreto Fu"},"license":"MIT","dependencies":{"katex":"^0.16.7"},"devDependencies":{"markdown-it":"^10.0.0","markdown-it-testgen":"^0.1.4","tape":"^4.9.0"},"gitHead":"43cc7f2ff482764ca4ea72217d363f7d80b8bf68","bugs":{"url":"https://github.com/byronwanbl/markdown-it-katex/issues"},"homepage":"https://github.com/byronwanbl/markdown-it-katex#readme","_id":"@byronwan/markdown-it-katex@3.3.0","_nodeVersion":"19.9.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-cTE9iRYOPF2PZOUDbuWXCj1ndDRZSTj6NRxRc5RHU1x2XjDJdTb443A+jU7S6hsjtQnrUTztPAdaNgnfTT/i/A==","shasum":"1a1e5a645eaf62af392daaa0da0bb3dd34d92666","tarball":"https://registry.npmjs.org/@byronwan/markdown-it-katex/-/markdown-it-katex-3.3.0.tgz","fileCount":9,"unpackedSize":19067,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWexcQm/LvIGZybt3YO+E4h8IEipQiIkKTmK5nmZqI7AIhAKclBF4sfEoEge+1uvAhg4wTuHvSfbM+djEz9Vyx0qN9"}]},"_npmUser":{"name":"byronwan","email":"byronwan@outlook.com"},"directories":{},"maintainers":[{"name":"byronwan","email":"byronwan@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-katex_3.3.0_1683858121346_0.025226036030181698"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-12T02:22:01.294Z","3.3.0":"2023-05-12T02:22:01.549Z","modified":"2023-05-12T02:22:01.711Z"},"maintainers":[{"name":"byronwan","email":"byronwan@outlook.com"}],"description":"Fast math support for markdown-it with KaTeX","homepage":"https://github.com/byronwanbl/markdown-it-katex#readme","keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"repository":{"type":"git","url":"git+ssh://git@github.com/byronwanbl/markdown-it-katex.git"},"author":{"name":"Abreto Fu"},"bugs":{"url":"https://github.com/byronwanbl/markdown-it-katex/issues"},"license":"MIT","readme":"# markdown-it-katex\n\nAdd Math to your Markdown\n\n[KaTeX](https://github.com/Khan/KaTeX) is a faster alternative to MathJax. This plugin makes it easy to support in your markdown.\n\nNeed convincing?\n\n* Check out the comparative benchmark: [KaTeX vs MathJax](https://jsperf.com/katex-vs-mathjax/42)\n\n## Usage\nInstall markdown-it\n```\nnpm install markdown-it\n```\n\nInstall the plugin\n\n```\nnpm install @abreto/markdown-it-katex\n```\n\nUse it in your javascript\n\n```javascript\nvar md = require('markdown-it')(),\n    mk = require('@abreto/markdown-it-katex');\n\nmd.use(mk);\n\n// double backslash is required for javascript strings, but not html input\nvar result = md.render('# Math Rulez! \\n  $\\\\sqrt{3x-1}+(1+x)^2$');\n```\n\nInclude the KaTeX stylesheet in your html:\n```html\n<link rel=\"stylesheet\" href=\"https://cdn.bootcss.com/KaTeX/0.11.1/katex.min.css\">\n```\n\nIf you're using the default markdown-it parser, I also recommend the [github stylesheet](https://github.com/sindresorhus/github-markdown-css):\n```html\n<link rel=\"stylesheet\" href=\"https://cdn.bootcss.com/github-markdown-css/3.0.1/github-markdown.min.css\"/>\n```\n\n`KaTeX` options can be supplied with the second argument to use.\n```javascript\nmd.use(mk, {\"throwOnError\" : false, \"errorColor\" : \" #cc0000\"});\n```\n\n## Examples\n\n### Inline\nSurround your LaTeX with a single `$` on each side for inline rendering.\n```\n$\\sqrt{3x-1}+(1+x)^2$\n```\n\n### Block\nUse two (`$$`) for block rendering. This mode uses bigger symbols and centers\nthe result.\n\n```\n$$\\begin{array}{c}\n\n\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} &\n= \\frac{4\\pi}{c}\\vec{\\mathbf{j}}    \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n\n\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n\n\\nabla \\cdot \\vec{\\mathbf{B}} & = 0\n\n\\end{array}$$\n```\n\n## Syntax\n\nMath parsing in markdown is designed to agree with the conventions set by pandoc:\n\n    Anything between two $ characters will be treated as TeX math. The opening $ must\n    have a non-space character immediately to its right, while the closing $ must\n    have a non-space character immediately to its left, and must not be followed\n    immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math. If for some\n    reason you need to enclose text in literal $ characters, backslash-escape them and\n    they won’t be treated as math delimiters.\n\n## Math Syntax Support\n\nKaTeX is based on TeX and LaTeX. Support for both is growing. Here's a list of\ncurrently supported functions:\n\n[Function Support in KaTeX](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)\n","readmeFilename":"README.md"}