通过KaTeX WordPress插件,您可以在WordPress网站上使用最快的TeX数学排版引擎 。 您可以在 [katex]...[/katex]简码内或古腾堡区块中包含TeX。 无论哪种方式,数学公式符号都会在您的网站上完美呈现。 使用古腾堡(Gutenberg)区块时,方程将立即在编辑器中呈现!

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.

为了与其他LaTeX插件兼容,该插件可以选择支持 [latex]...[/latex]短代码。

您可以选择自己提供服务或通过第三方 jsDelivr CDN提供服务。



  • 在编辑器中预览TeX。
  • TeX呈现在访问者的浏览器中。



  • KaTeX


  1. katex文件夹上传到您的/wp-content/plugins/目录,或者通过WordPress的插件管理器自动下载并安装插件;
  2. 在WordPress中激活插件; 和
  3. 在您的帖子和页面中使用[latex]简码或KaTeX 古藤堡块。



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.


2023年8月20日 1 回复
This plugin have no options at all! and sets its direction by global direction that means RTL equations in RTL websites!
This is a great plugin for everyone who wants to use the power of LaTeX or KaTeX to display properly typeset math on their site. My favourite aspect of this plugin is how the Ka block displays a preview of the formatted text. While you can insert KaTeX statements using the shortcode block, if you do that, then the equations will be left justified, and there is little to do about it. Using the KaTeX block, the calculations will be properly centred between the margins set by your theme. Great job by the developer! I hope that the plugin will continue to be maintained so that we don't lose compatibility with the latest versions of WordPress, as there are very few options otherwise.
2021年9月26日 1 回复
Veny nice plugin. Able to use very easily and without any issues. A cakewalk if you know latex syntax. Rendering is very fast too. There is lot of accounting related math content on my site (eduxir.com) which requires to use math equations. Was able to achieve very easily. One request to the author is that the font and related files are downloaded even on the pages that do not use katex. We need to modify the plugin to disable this option. If a configuration option that could be provided which would retain the configuration even after updating the file, would be of great help.
I am writing a lot of equations these days and I am in love with this plugin.


“KaTeX” 是开源软件。 以下人员对此插件做出了贡献。


“KaTeX”插件已被翻译至7种本地话语言。 感谢所有译者为本插件所做的贡献。






  • More robustly render shortcodes (even more robustly than 2.2.2).


  • More robustly render shortcodes.
  • Fix undefined variable notice.


  • 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).


  • Trigger rendering of KaTeX when the DOM is mutated by inserting a .katex-eq node. This allows rendering KaTeX markup that is not present when the page is loaded.
  • Upgrade KaTeX resources to v0.13.13.


  • 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.


  • Remove <br> tags added by WordPress to shortcode output.


  • 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.


  • Fix block editor variable scoping.


  • Upgrade KaTeX resources to v0.11.1.


  • Support adding CSS classes to KaTeX Gutenberg Blocks to help with styling. Backwards compatibility note: KaTeX Gutenberg Blocks are now rendered wrapped in a div element on which classes wp-block-katex-display-block and katex-eq are set. You can add more classes to this div through WordPress’s post editor. Previously, KaTeX Gutenberg Blocks were rendered wrapped in an unclassed span. KaTeX shortcodes are still wrapped inside a span with only the class katex-eq set. If you depend on old behavior for styling, you might need to update your styling rules.


  • Fix 1.0.4 release issue: KaTeX resources were not committed correctly.


  • Upgrade KaTeX resources to v0.10.2.


  • Fix warnings related to plugin options that occurred on PHP 5.
  • Clean up the plugin’s options on plugin deletion.


  • Upgrade KaTeX resources to v0.10.1.


  • Fix issue where KaTeX resources would not be loaded on the admin pages.


  • Initial release.