MathJax Configuration
-
Create or extend
_includes/head_custom.html
with:{% assign math = page.math | default: layout.math | default: site.math %} {% case math %} {% when "mathjax" %} {% include mathjax.html %} {% endcase %}
-
Copy the following files to your website source repo:
-
To make MathJax available on all your web pages, add to
_config.yml
:math: mathjax
To restrict MathJax to pages that use it, add to the front matter either:
math: mathjax
or:
layout: mathjax
You can add a preamble of MathJax definitions of new commands and environments in
_layouts/mathjax.html
. It extends thedefault
layout.
MathJax options
You can customise MathJax by adding further options in _includes/mathjax.html
.