KaTeX Math Rendering

外掛說明

WordPress supports math out of the box: it writes standard MathML, which the browser renders. These renderings sometimes fall short, with oddly positioned strokes, thicker lines and the like, in the math fonts browsers ship with. This small plugin bundles KaTeX and uses its typesetting on the front end and in the editor, for the WordPress Math block and the inline math format. There are no separate blocks, it is an alternate rendering. To switch back to the WordPress rendering, deactivate the plugin and everything keeps working: Math blocks and inline math stay stored exactly as WordPress stores them, with both the LaTeX and the MathML in the post content.

  • On the front end, KaTeX is loaded only on pages that contain math.
  • A formula KaTeX cannot render is left to the browser’s MathML.
  • Formulas keep the text size the browser gives MathML rather than KaTeX’s default enlargement. A theme that wants math larger sets math and .katex alike.

Third-party code

The plugin bundles KaTeX 0.18.7, unmodified, in vendor/katex: the minified script and stylesheet and the fonts of its npm release, under the MIT license (see vendor/katex/LICENSE). Its source is at https://github.com/KaTeX/KaTeX. Development happens at https://github.com/ellatrix/katex-math.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

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

參與者

將〈KaTeX Math Rendering〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

0.1.0

  • Initial release.