Skip to content

janmarthedal/gatsby-remark-mathjax-ssr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-remark-mathjax-ssr

gatsby-remark-mathjax-ssr adds math equation support to gatsby using remark-math and mathjax.

It is inspired by the Gatsby plugin gatsby-remark-katex.

Install

npm install --save gatsby-transformer-remark gatsby-remark-mathjax-ssr

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-mathjax-ssr`,
          options: {
          }
        }
      ],
    },
  },
],

Add Mathjax CSS to your template: Mathjax's CSS file is required to render the formulas correctly. Include the CSS file in your template:

require(`gatsby-remark-mathjax-ssr/mathjax.css`)

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
$$

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published