Math Equations
Mathematical equations can be rendered using KaTeX.
#
UsagePlease read KaTeX documentation for more details.
#
InlineWrite inline math equations by wrapping LaTeX equations between $
:
Let be Riemann integrable. Let be . Then is continuous, and at all such that is continuous at , is differentiable at with .
#
BlocksFor equation block or display mode, use line breaks and $$
:
#
ConfigurationTo enable KaTeX, you need to install remark-math
and rehype-katex
plugins.
- npm
- Yarn
caution
Use the exact same versions. The latest versions are incompatible with Docusaurus 2.
Import the plugins in docusaurus.config.js
:
Add them to your content plugin or preset options (usually @docusaurus/preset-classic
docs options):
Include the KaTeX CSS in your config under stylesheets
:
Overall the changes look like:
docusaurus.config.js