MathML Block


A MathML block for the WordPress block editor (Gutenberg).
Requires PHP 5.4+ and WordPress 5.0+.

Development takes place on the GitHub repository:


What is MathML?

Mathematical Markup Language is a mathematical markup language, an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web pages and other documents.

The MathML block uses MathJax to render MathML formulas in the editor and on the front end of a website. MathJax ( is A JavaScript display engine for mathematics that works in all browsers.

To test a MathML block and enter a formula, for example: \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\].

To test using math formulas inline, type an formula into a block of text, select it and hit the ‘M’ icon in the control bar. For example: \( \cos(θ+φ)=\cos(θ)\cos(φ)−\sin(θ)\sin(φ) \). Note: if you are copying and pasting formulas into the rich text editor, switching to HTML/code editor mode is less likely to reformat your pasted formula.

This plugin is compatible with the official AMP plugin by rendering amp-mathml on AMP pages.

Technical Notes

  • Requires PHP 5.6+.
  • Requires WordPress 5.0+.
  • Issues and Pull requests welcome on the GitHub repository:


  • Example of adding a MathML block.


這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

MathML block


  1. Install the plugin via the plugin installer, either by searching for it or uploading a .zip file.
  2. Activate the plugin.
  3. Use the MathML block!


2019 年 10 月 10 日
The best way I have found to write math formulas on the web. I just need to remember the LaTex syntax I haven't used in 15 years!
2019 年 5 月 21 日
Really too greedy the MathJax js files are loaded everywhere, even outside the editor and pages, it makes the website too heavy, but it is very clean visually and very simple certainly one of the easiest to use!
閱讀全部 2 則使用者評論


以下人員參與了開源軟體〈MathML Block〉的開發相關工作。


MathML Block 外掛目前已有 3 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 MathML Block 外掛本地化為台灣繁體中文版


任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄



  • Add AMP compatibility, props @westonruter. Leverages the amp-mathml component.


  • Make JavaScript translatable, take 2.


  • Improve translations, make JavaScript translatable.
  • Update all packages.


  • Add support for inline formulas.


  • Initial plugin release