Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanai/gatsby-remark-mathjax
Transform math nodes to html markup for MathJax
https://github.com/hanai/gatsby-remark-mathjax
gatsby gatsbyjs math mathjax remark
Last synced: 3 months ago
JSON representation
Transform math nodes to html markup for MathJax
- Host: GitHub
- URL: https://github.com/hanai/gatsby-remark-mathjax
- Owner: hanai
- Created: 2018-08-26T09:17:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T18:01:09.000Z (about 5 years ago)
- Last Synced: 2024-10-01T15:59:51.395Z (3 months ago)
- Topics: gatsby, gatsbyjs, math, mathjax, remark
- Language: JavaScript
- Size: 2.93 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-remark-mathjax
## :pushpin: Notice
This plugin is **not** for Mathjax Server-Side render or inject js/css. It is used for keeping Latex snippets as raw when `gatsby-transformer-remark` convert markdown to html.
## Introduction
[gatsby-remark-mathjax][1] adds mathjax support to gatsby using [remark-math][2].
## Install
`npm install --save gatsby-transformer-remark gatsby-remark-mathjax`
## How to use
```javascript
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
`gatsby-remark-mathjax`,
],
},
},
],
```**Add MathJax to your template:** MathJax is required to render the formulas correctly. [MathJax: Getting Started](http://docs.mathjax.org/en/latest/start.html)
``` html
```
### Math Equations in Inline Mode
Surround your equation with `$` to generate a math equation in inline mode.
**Example markdown:**
```
$a^2 + b^2 = c^2$
```### Math Equations in Display Mode
Surround your equation with `$$` and new-lines to generate a math equation in
display mode.**Example markdown:**
```
$$
a^2 + b^2 = c^2
$$
```[1]: https://github.com/hanai/gatsby-remark-mathjax
[2]: https://github.com/Rokt33r/remark-math