KaTeX
KaTeX
Description
The KaTeX WordPress plugin enables you to use the fastest TeX math typesetting engine on your WordPress website. You can include TeX inside a [katex]...[/katex] shortcode or in a Gutenberg block. Either way the math will render beautifully on your website. When using Gutenberg blocks, the equations will render immediately inside your editor!
Equations in blocks or using the [katex display=true]...[/katex] shortcode will render on page in display mode–with bigger symbols–centered on their own line.
For compatibility with other LaTeX plugins, this plugin optionally supports [latex]...[/latex] shortcodes.
Assets
This plugin includes minified assets provided by the KaTeX project.
The source code is available in the KaTeX git repository on GitHub.
Installation
- Upload the
katexfolder to your/wp-content/plugins/directory or automatically download and install the plugin through WordPress’s plugin manager; - Activate the plugin in WordPress; and
- Use the
[latex]shortcode or KaTeX Gutenberg blocks in your posts and pages.
Faq
You should be able to replace any other LaTeX plugin using [latex] shortcodes without having to make changes to existing posts. Other plugins might handle display-mode latex other than [latex display=true]...[/latex], in which case old posts unfortunately have to be changed.
Reviews
Updates again
By gkoper on July 25, 2025
Thanks to Tom for reopening this plugin for updates. It must have been a chore to satisfy the "administrators" but the result is great. I have been using KaTeX all the time. WordPress complained about lack of updates where there was no real reason other than administrative. I am sure also in the future, updating only means adapting to new rules.
Ger
Rendering inline
By Difa (difawa) on March 31, 2024
Is it possible to render KaTeX for inline mode in a paragraph (Gutenberg preview)? Please consider this in next update.
RTL equation in RTL websites!
By مرتضی رستگار (qwerty13) on August 20, 2023
This plugin have no options at all! and sets its direction by global direction that means RTL equations in RTL websites!
Great plugiin
By macadk on September 12, 2022
Versatile
By mrezatavakol on March 13, 2022
Nice Plugin
By allabakash on September 26, 2021
Amazing support.
By barracuda1970 on September 11, 2021
Excellent plugin
By Bage (bagerathan) on August 29, 2021
Excellent Plugin
By examenmalin on November 1, 2020
Excellent support
By Jeff Starr (specialk) on August 7, 2020
Changelog
2.2.5
- As per WordPress’s guidelines, remove the ability to fetch KaTeX resources through jsDelivr’s CDN.
- Various internal improvements based on WordPress’s Plugin Check.
2.2.4
- Upgrade KaTeX resources to v0.16.22.
2.2.3
- More robustly render shortcodes (even more robustly than 2.2.2).
2.2.2
- More robustly render shortcodes.
- Fix undefined variable notice.
2.2.1
- Trigger rendering of KaTeX in more cases when the DOM is mutated (in 2.2.0, accidentally only a limited set of cases was checked).
2.2.0
- Trigger rendering of KaTeX when the DOM is mutated by inserting a
.katex-eqnode. This allows rendering KaTeX markup that is not present when the page is loaded. - Upgrade KaTeX resources to v0.13.13.
2.1.2
- Always load JavaScript and CSS assets by default. An option is introduced to switch to the old behavior of loading only when KaTeX is used on the page.
- Make it easier for other code to manually trigger rendering of KaTeX.
- Upgrade KaTeX resources to v0.13.0.
2.1.1
- Remove
<br>tags added by WordPress to shortcode output.
2.1.0
- Prevent WordPress from texturizing KaTeX (prior to this change, WordPress would sometimes change e.g. apostrophes to quotation marks).
- Fix issue where custom class names on the KaTeX block sometimes broke editor rendering.
- Add some keywords to allow searching for the KaTeX block in the editor’s block list.
- Update KaTeX resources to v0.12.0.
2.0.2
- Fix block editor variable scoping.
2.0.1
- Upgrade KaTeX resources to v0.11.1.
2.0.0
- Support adding CSS classes to KaTeX Gutenberg Blocks to help with styling. Backwards compatibility note: KaTeX Gutenberg Blocks are now rendered wrapped in a
divelement on which classeswp-block-katex-display-blockandkatex-eqare set. You can add more classes to thisdivthrough WordPress’s post editor. Previously, KaTeX Gutenberg Blocks were rendered wrapped in an unclassedspan. KaTeX shortcodes are still wrapped inside aspanwith only the classkatex-eqset. If you depend on old behavior for styling, you might need to update your styling rules.
1.0.5
- Fix 1.0.4 release issue: KaTeX resources were not committed correctly.
1.0.4
- Upgrade KaTeX resources to v0.10.2.
1.0.3
- Fix warnings related to plugin options that occurred on PHP 5.
- Clean up the plugin’s options on plugin deletion.
1.0.2
- Upgrade KaTeX resources to v0.10.1.
1.0.1
- Fix issue where KaTeX resources would not be loaded on the admin pages.
1.0.0
- Initial release.

