New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-math

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-math

Add MathJax support to hexo

1.0.2
Source
npm
Version published
Weekly downloads
471
0.86%
Maintainers
1
Weekly downloads
 
Created
Source

hexo-math

A hexo plugin that uses MathJax to render math equations. Features:

  • Automatcially deploy and add reference to MathJax
  • Provide support to both MathJax's inline math syntax and math tags

(See a Chinese version of this document here)

Install

npm install hexo-math --save

Initialize

  • Run in your blog project folder:

$ hexo math install

  • Edit _config.yml:
plugins:
- hexo-math

Usage

You can use MathJax's inline math syntax directly. But always remember to escape any special characters by adding a \ before it. LaTex equations usually contains tones of special characters like \, which makes it painful to escape them one by one. In such cases, you can use hexo-math's tags to make your life easier.

MathJax Inline:

Simple inline $a = b + c$.

MathJax Block:

$$\frac{\partial u}{\partial t}
= h^2 \left( \frac{\partial^2 u}{\partial x^2} +
\frac{\partial^2 u}{\partial y^2} +
\frac{\partial^2 u}{\partial z^2}\right)$$

Tag inline:

This equation {% math \cos 2\theta = \cos^2 \theta - \sin^2 \theta =  2 \cos^2 \theta - 1 %} is inline.

Tag Block:

{% math-block %}
\begin{aligned}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{aligned}
{% endmath-block %}

Keywords

website

FAQs

Package last updated on 19 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts