NodeBB Katex Parser
This NodeBB plugin is a parser that allows users to write posts containing maths formulas in tex format using Katex.
To customize options for the parser, please consult the "Katex" page in the administration panel, under the "Plugins" heading.
npm install nodebb-plugin-katex
Just wrap your
tex code inside your posts using these delimiters:
\\(This is \tex code\\)for inline display.
\\[This is \tex code\\]for block display.
$This is \tex code$for inline display(optional: disabled by default, must be set in the admin control panel).
$$This is \tex code$$for block display.
- Use katex in the server-side to display
texcode inside posts, summaries and composer preview.
- Adds a
$button to the composer toolbar to facilitate usage.
This plugin is compatible with nodebb v0.7.x and above and with the nodebb-plugin-markdown plugin.
When used in conjunction with the nodebb-plugin-markdown, you have to load katex plugin after markdown plugin to enable usage of all buttons of the composer.
Katex parsing errors are logged using
winston the default logger in nodebb at level
verbose, you need to run
nodebb dev to see these logs.
The code is greatly inspired by those others repositories: