{"_id":"@chyi13/markdown-it-katex","_rev":"2-3303bb529e3bd43591fa2bdf4bc8a237","name":"@chyi13/markdown-it-katex","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@chyi13/markdown-it-katex","version":"1.1.0","keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@chyi13/markdown-it-katex@1.1.0","maintainers":[{"name":"chyi13","email":"rongshuxiacy@gmail.com"}],"homepage":"https://github.com/chyi13/vscode-markdown-it-katex#readme","bugs":{"url":"https://github.com/chyi13/vscode-markdown-it-katex/issues"},"dist":{"shasum":"54841865dbbe7582d36e70bd7c17de8e9c734580","tarball":"https://registry.npmjs.org/@chyi13/markdown-it-katex/-/markdown-it-katex-1.1.0.tgz","fileCount":5,"integrity":"sha512-4a8MZ266m83Egu08lYQolZXr8fKbkHGKiSfhKTTkBgAC74SXo1ltAF92CjEDusv/9MxQ8CVaZNOY0tV8tIQKKw==","signatures":[{"sig":"MEQCIBhKd6M7D/gzT+5d7pKSbiBSryQ3PzuWWMpmMI2dh7NyAiAaQ3GdG/behHrMaTIabAyxe4B1+4jdhp0edmfMkrZbgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28625},"main":"dist/index.js","types":"types.d.ts","gitHead":"3f2e87a24982b9c8464e363f3e6700c12b2c9428","scripts":{"test":"node test/all.js","watch":"tsc -p . -watch","compile":"tsc -p .","test-render":"node test/test-render.js test/test.md > test/out.html"},"_npmUser":{"name":"chyi13","email":"rongshuxiacy@gmail.com"},"repository":{"url":"git+https://github.com/chyi13/vscode-markdown-it-katex.git","type":"git"},"_npmVersion":"10.9.0","description":"Markdown-it plugin that provides VS Code's KaTeX support","directories":{},"_nodeVersion":"22.11.0","dependencies":{"katex":"^0.16.4"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.6.0","typescript":"^5.3.0","markdown-it":"^14.0.0","@types/katex":"^0.16.0","@types/markdown-it":"^12.2.3","markdown-it-testgen":"^0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/markdown-it-katex_1.1.0_1732589292591_0.2918454765051104","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@chyi13/markdown-it-katex","version":"1.1.1","keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@chyi13/markdown-it-katex@1.1.1","maintainers":[{"name":"chyi13","email":"rongshuxiacy@gmail.com"}],"homepage":"https://github.com/chyi13/vscode-markdown-it-katex#readme","bugs":{"url":"https://github.com/chyi13/vscode-markdown-it-katex/issues"},"dist":{"shasum":"a13a93a8a776e65280b24506b57ef643700f9486","tarball":"https://registry.npmjs.org/@chyi13/markdown-it-katex/-/markdown-it-katex-1.1.1.tgz","fileCount":5,"integrity":"sha512-RXE3EMfDG4jIj5nYgRGJAU8+0+7q1W81UOTvYJf01eY8EZQrT+Pyv6LRLSA9mrsZb5MHrejLf9kIhuE+wR7VgA==","signatures":[{"sig":"MEUCIQD6O55OsgjqLmnTXls2A2TV1haiFfGxfOS9lsIG0EKk7QIgHmVEd/mxFQKMfHtPUI7YFmiWYrLpbgK3TMmtBuHF2HA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29207},"main":"dist/index.js","types":"types.d.ts","gitHead":"8a42286f9e4ac0807963766d41777628e05a1f11","scripts":{"test":"node test/all.js","watch":"tsc -p . -watch","compile":"tsc -p .","test-render":"node test/test-render.js test/test.md > test/out.html"},"_npmUser":{"name":"chyi13","email":"rongshuxiacy@gmail.com"},"repository":{"url":"git+https://github.com/chyi13/vscode-markdown-it-katex.git","type":"git"},"_npmVersion":"10.9.0","description":"Markdown-it plugin that provides VS Code's KaTeX support, with square brackets and parentheses support","directories":{},"_nodeVersion":"22.11.0","dependencies":{"katex":"^0.16.4"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.6.0","typescript":"^5.3.0","markdown-it":"^14.0.0","@types/katex":"^0.16.0","@types/markdown-it":"^12.2.3","markdown-it-testgen":"^0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/markdown-it-katex_1.1.1_1732630070374_0.31494850295505805","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@chyi13/markdown-it-katex","version":"1.1.2","description":"Markdown-it plugin that provides VS Code's KaTeX support, with square brackets and parentheses support","main":"dist/index.js","types":"types.d.ts","scripts":{"compile":"tsc -p .","watch":"tsc -p . -watch","test":"node test/all.js","test-render":"node test/test-render.js test/test.md > test/out.html"},"repository":{"type":"git","url":"git+https://github.com/chyi13/vscode-markdown-it-katex.git"},"keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"author":{"name":"Microsoft Corporation"},"license":"MIT","dependencies":{"katex":"^0.16.4"},"devDependencies":{"@types/katex":"^0.16.0","@types/markdown-it":"^12.2.3","markdown-it":"^14.0.0","markdown-it-testgen":"^0.1.6","tape":"^5.6.0","typescript":"^5.3.0"},"_id":"@chyi13/markdown-it-katex@1.1.2","gitHead":"ac72957c572d58d2e5b26f51efc960adbaab1e1b","bugs":{"url":"https://github.com/chyi13/vscode-markdown-it-katex/issues"},"homepage":"https://github.com/chyi13/vscode-markdown-it-katex#readme","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-SIT9R6oYrnB0Q7JImbeNQdPYQQgcyyQ2Be8g/s9J4cuStKDRIVGgd7maH+DDTUDJsiUdFG8QYxA+Wa9YbFm+VA==","shasum":"6b4202e604efc7e1d1fe401cd389b532dd8f9b4f","tarball":"https://registry.npmjs.org/@chyi13/markdown-it-katex/-/markdown-it-katex-1.1.2.tgz","fileCount":5,"unpackedSize":29298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiBNOZ2ySkAwvc+o6SBiFexk6Zy3Ms2nktQw1ndaM4ZAiEA86zzXabTI/d5F0ZWZ909Y3L+p8/UQJC1z3q3OUVo9so="}]},"_npmUser":{"name":"chyi13","email":"rongshuxiacy@gmail.com"},"directories":{},"maintainers":[{"name":"chyi13","email":"rongshuxiacy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-katex_1.1.2_1732720679452_0.9656284120552834"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-26T02:48:12.430Z","modified":"2024-11-27T15:17:59.812Z","1.1.0":"2024-11-26T02:48:12.764Z","1.1.1":"2024-11-26T14:07:50.537Z","1.1.2":"2024-11-27T15:17:59.663Z"},"bugs":{"url":"https://github.com/chyi13/vscode-markdown-it-katex/issues"},"author":{"name":"Microsoft Corporation"},"license":"MIT","homepage":"https://github.com/chyi13/vscode-markdown-it-katex#readme","keywords":["markdown","KaTeX","math","LaTeX","markdown-it-plugin","markdown-it"],"repository":{"type":"git","url":"git+https://github.com/chyi13/vscode-markdown-it-katex.git"},"description":"Markdown-it plugin that provides VS Code's KaTeX support, with square brackets and parentheses support","maintainers":[{"name":"chyi13","email":"rongshuxiacy@gmail.com"}],"readme":"# Markdown-it Katex\n\n> Add square brackets \\\\[...\\\\] and parentheses \\\\(...\\\\) support\n\nMarkdown it plugin that adds [KaTeX](https://github.com/Khan/KaTeX) rendering. This is used by VS Code to render math in markdown.\n\nNeed convincing?\n\n* Check out the comparative benchmark: [KaTeX vs MathJax](https://jsperf.com/katex-vs-mathjax/42)\n\nOriginally forked from [@vscode/markdown-it-katex](https://github.com/microsoft/vscode-markdown-it-katex.git) and [@iktakahiro/markdown-it-katex](https://github.com/iktakahiro/markdown-it-katex)\n\n## Usage \n\nInstall markdown-it\n\n```bash\nnpm install markdown-it\n```\n\nInstall the plugin\n\n```bash\nnpm install @chyi13/markdown-it-katex\n```\n\nUse it in your javascript\n\n```javascript\nvar md = require('markdown-it')(),\n    mk = require('@chyi13/markdown-it-katex').default;\n\n// enableMathBlockLatex to enable square brackets \\\\[...\\\\] and parentheses \\\\(...\\\\) support\nmd.use(mk, { enableMathBlockLatex: true });\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// square brackets \\\\[...\\\\] and parentheses \\\\(...\\\\)\nvar result = md.render('\\\\[\\n\\\\nabla \\\\times \\\\mathbf{B} = \\\\mu_0 \\\\mathbf{j} + \\\\mu_0 \\\\varepsilon_0 \\\\frac{\\\\partial \\\\mathbf{E}}{\\\\partial t}\\n\\\\]');\n```\n\nInclude the KaTeX stylesheet in your html:\n\n```html\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/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\n```html\n<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css\"/>\n```\n\n`KaTeX` options can be supplied with the second argument to use.\n\n```javascript\nmd.use(mk, {\"throwOnError\" : false, \"errorColor\" : \" #cc0000\"});\n```\n\n## Examples\n\n### Inline\n\nSurround your LaTeX with a single `$` on each side for inline rendering.\n\n```latex\n$\\sqrt{3x-1}+(1+x)^2$\n```\n\n### Block\n\nUse two (`$$`) for block rendering. This mode uses bigger symbols and centers\nthe result.\n\n```latex\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[Things that KaTeX does not (yet) support](https://github.com/KaTeX/KaTeX/wiki/Things-that-KaTeX-does-not-%28yet%29-support)\n","readmeFilename":"README.md"}