as-com / wp-katex

Integrates the fast KaTeX LaTeX typesetter with WordPress
https://andrewsun.com/projects/wp-katex/
GNU General Public License v2.0
10 stars 5 forks source link

WP-KaTeX

Contributors: ascom
Donate link: https://andrewsun.com/donate/
Tags: katex, latex, mathjax, math, equation, equations, tex
Requires at least: 3.9
Tested up to: 5.2
Stable tag: 1.11.0
Requires PHP: 5.3
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Integrates the super-fast KaTeX LaTeX equation typesetting engine with WordPress. Create beautiful, yet performant math in your posts and pages.

Description

The KaTeX WordPress plugin integrates the super-fast KaTeX math typesetting engine with your WordPress website. The plugin allows you to put LaTeX in a [latex]...[/latex] shortcode, and beautiful math appears on your post or page.

The plugin also has an option to use the excellent jsDelivr CDN to load the KaTeX scripts, further increasing the performance of the plugin.

Equations in [latex display="true"]...[/latex] will be rendered in display mode (rather than inline mode) and centered on its own line.

Plugin Website

Installation

  1. Upload the katex folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Disable any plugins that may interfere with this plugin, such as Jetpack's Beautiful Math module
  4. Use the [latex] shortcode in your posts and pages

Frequently Asked Questions

Wait - I use MathJax and it's fine!

KaTeX is fast. It's really fast, compared to MathJax. In fact, it's a staggering 35 times faster than MathJax. Your page will load much faster with KaTeX, especially if it's heavy with equations.

How about Jetpack?

Jetpack has a LaTeX plugin that uses the WordPress.com service to render the equations. However, it uses images, which look ugly when zoomed in, or on high-DPI ("retina") displays. Also, it depends on WordPress.com's servers, and a lot of equations can make the page slow (too many requests).

Screenshots

1. Various equations rendered with WP-KaTeX

Various equations rendered with WP-KaTeX

Changelog

1.11.0

1.10.1

1.10.0

1.9.1

1.9.0

1.8.3

1.7.0

1.6.0+1

1.6.0

1.5.1+1

1.5.1

1.5.0

1.4.3

1.3.0.1

1.1.1

1.1.0

1.0.1

1.0

Upgrade Notice

1.8.3

Lots of commands and features now supported

1.7.0

New rendering method and a few new commands now supported

1.6.0

Add support for aligned, \gt, \lt, and \underline

1.5.1+1

Fixed issue with wptexturize causing syntax errors

1.5.0

Updated KaTeX library - adds support for more TeX commands

1.4.0

Updated KaTeX library - adds support for more TeX commands

1.3.0.1

Add support for a lot of LaTeX symbols