All Projects → next-theme → hexo-filter-mathjax

next-theme / hexo-filter-mathjax

Licence: MIT license
💯 Server side MathJax renderer plugin for Hexo.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to hexo-filter-mathjax

hexo-netlify-cms
☕ A cup of coffee time to enable Netlify CMS
Stars: ✭ 29 (-61.84%)
Mutual labels:  hexo, hexo-plugin
hexo-douban-card
在hexo文章中插入豆瓣读书,豆瓣电影,豆瓣音乐组件
Stars: ✭ 56 (-26.32%)
Mutual labels:  hexo, hexo-plugin
Rich Text Editor
Math editor (http://digabi.github.io/rich-text-editor/)
Stars: ✭ 45 (-40.79%)
Mutual labels:  math, mathjax
arabic-mathjax
Beautiful Arabic Math on all browsers. An extension for MathJax v2.
Stars: ✭ 12 (-84.21%)
Mutual labels:  math, mathjax
hexo-directory-category
Automatically add category to Hexo article according to the article file directory.
Stars: ✭ 35 (-53.95%)
Mutual labels:  hexo, hexo-plugin
python-markdown-math
Math extension for Python-Markdown
Stars: ✭ 98 (+28.95%)
Mutual labels:  math, mathjax
hexo-reading-time
Plugin for Hexo CMS to display reading time for article
Stars: ✭ 28 (-63.16%)
Mutual labels:  hexo, hexo-plugin
hexo-include-markdown
Easily load markdownfiles in Markdown .
Stars: ✭ 16 (-78.95%)
Mutual labels:  hexo, hexo-plugin
hexo-bilibili-bangumi
hexo 番剧页面插件,可选数据源:Bilibili, Bangumi
Stars: ✭ 252 (+231.58%)
Mutual labels:  hexo, hexo-plugin
react-native-math-view
Math view for react native! No WebView!
Stars: ✭ 49 (-35.53%)
Mutual labels:  math, mathjax
Hexo Theme Arknights
明日方舟罗德岛阵营的 Hexo 主题,支持数学公式、Valine评论系统、Mermaid图表
Stars: ✭ 154 (+102.63%)
Mutual labels:  hexo, mathjax
mathjax-node-cli
CLI tools for mathjax-node
Stars: ✭ 27 (-64.47%)
Mutual labels:  math, mathjax
Hexo Theme Chic
An elegant, powerful, easy-to-read Hexo theme.
Stars: ✭ 539 (+609.21%)
Mutual labels:  hexo, mathjax
Texme
Self-rendering Markdown + LaTeX documents
Stars: ✭ 1,970 (+2492.11%)
Mutual labels:  math, mathjax
hexo-tag-xvideos
🔞 Embed xvideos player in your Hexo posts/pages
Stars: ✭ 17 (-77.63%)
Mutual labels:  hexo, hexo-plugin
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+157.89%)
Mutual labels:  math, mathjax
hexo-tag-hint
A Hexo tag plugin to display text hint/spoiler tooltip.
Stars: ✭ 26 (-65.79%)
Mutual labels:  hexo, hexo-plugin
hexo-instagram-wall
Displays up to 18 most recent images from your Instagram account
Stars: ✭ 12 (-84.21%)
Mutual labels:  hexo, hexo-plugin
hexo-tag-instagram
Embed instagram photo and movie tag plugin for Hexo.
Stars: ✭ 23 (-69.74%)
Mutual labels:  hexo, hexo-plugin
hexo-filter-optimize
A Hexo plugin that optimize the pages loading speed.
Stars: ✭ 41 (-46.05%)
Mutual labels:  hexo, hexo-plugin

Hexo Filter MathJax

npm-image lic-image

Server side MathJax Renderer Plugin for Hexo.

WARNING: This plugin is a server-side math rendering plugin, which does not depend on any front-end scripts. If you have already enabled other math rendering methods before installing this plugin, please do the following to avoid conflicts:

  • Remove all other Hexo math plugins
  • Disable front-end math renderer in Hexo theme settings (For theme NexT, you need to set both math.mathjax.enable and math.katax.enable to false)
  • Delete front-end scripts related to math rendering

Installation

size-image dm-image dt-image

$ npm install hexo-filter-mathjax
$ hexo clean

Options

You can configure this plugin in Hexo _config.yml. Default options:

mathjax:
  tags: none # or 'ams' or 'all'
  single_dollars: true # enable single dollar signs as in-line math delimiters
  cjk_width: 0.9 # relative CJK char width
  normal_width: 0.6 # relative normal (monospace) width
  append_css: true # add CSS to pages rendered by MathJax
  every_page: false # if true, every page will be rendered by MathJax regardless the `mathjax` setting in Front-matter
  packages: # extra packages to load
  extension_options: {}
    # you can put your extension options here
    # see http://docs.mathjax.org/en/latest/options/input/tex.html#tex-extension-options for more detail

Usage

Set mathjax: true in Front-matter of each article (post / page) that you would like to enable MathJax. For example:

---
title: On the Electrodynamics of Moving Bodies
categories: Physics
date: 1905-06-30 12:00:00
mathjax: true
---

Then you can use the LaTeX syntax in the article.

Renderer

hexo-renderer-pandoc is recommended because it can handle mathematical formulas in markdown documents perfectly. But you need to be aware that inline Math (..$...$) must not have white spaces after the opening $ and before the ending $. For example:

-$ \epsilon_0 $
+$\epsilon_0$
-$ \frac{\partial}{\partial t} $
+$\frac{\partial}{\partial t}$

If you are using other renderers, such as hexo-renderer-marked, you need to be aware of the conflict between LaTeX and Markdown syntax. For example, an underscore (_) may be interpreted as the start of italic text in Markdown, or subscripted mark in TeX. Use \ to escape if necessary:

-$\epsilon_0$
+$\epsilon\_0$
-\begin{eqnarray*}
+\begin{eqnarray\*}
-\\
+\\\\

Sample

Write the following LaTeX code:

$$
i\hbar\frac{\partial}{\partial t}\psi=-\frac{\hbar^2}{2m}\nabla^2\psi+V\psi
$$
\begin{eqnarray\*}
\nabla\cdot\vec{E}&=&\frac{\rho}{\epsilon_0}\\\\
\nabla\cdot\vec{B}&=&0\\\\
\nabla\times\vec{E}&=&-\frac{\partial B}{\partial t}\\\\
\nabla\times\vec{B}&=&\mu_0\left(\vec{J}+\epsilon_0\frac{\partial E}{\partial t}\right)\\\\
\end{eqnarray\*}

Then you will get:

Known Issues

Long equations with labels may cause horizontal overflow, because a min-width CSS property will be added to mjx-container elements by MathJax.

License

Released under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].