More Premium Hugo Themes Premium Jekyll Themes

Jekyll Katex

[DEPRECATED] Jekyll plugin for easy server-side math rendering via KaTeX

Jekyll Katex

[DEPRECATED] Jekyll plugin for easy server-side math rendering via KaTeX

Author Avatar Theme by linjer
Github Stars Github Stars: 95
Last Commit Last Commit: Jun 28, 2021 -
First Commit Created: Dec 18, 2023 -
Jekyll Katex screenshot

Overview

The jekyll-katex plugin is a Jekyll plugin that allows for compile-time math rendering using the KaTeX library. KaTeX is a library for rendering math on the web using LaTeX. It offers faster rendering speed and renders equations to pure HTML instead of PNGs, setting it apart from MathJax. This plugin comes packaged with KaTeX 0.11.1, but users have the option to specify a different version in their Jekyll _config.yml file.

Features

  • Compile-time math rendering using KaTeX library
  • Faster rendering speed compared to MathJax
  • Renders equations to pure HTML instead of PNGs

Installation

To install the jekyll-katex plugin, follow these steps:

  1. Add the plugin to your Jekyll _config.yml file:
plugins:
  - jekyll-katex
  1. Execute bundle install to install the plugin.
  2. Add KaTeX CSS and Fonts by following the installation instructions provided in the KaTeX README. Note that including the .js file is optional unless you require client-side in-browser rendering.
  3. Adjust the following code snippet to your version and add it to your page headers:
<!-- Adjust for your version -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" integrity="sha512-************" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js" integrity="sha512-************" crossorigin="anonymous"></script>

Summary

The jekyll-katex plugin is a powerful tool for Jekyll users who want to perform compile-time math rendering using the KaTeX library. With its faster rendering speed and ability to generate pure HTML equations, it offers a strong alternative to MathJax. By following the installation instructions and using the provided liquid tags, users can easily incorporate mathematical equations into their Jekyll websites.