Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-remark-katex

Package Overview
Dependencies
Maintainers
22
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-katex

Transform math nodes to html markup

  • 7.5.0-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by12.77%
Maintainers
22
Weekly downloads
 
Created
Source

gatsby-remark-katex

gatsby-remark-katex adds math equation support to gatsby using remark-math and katex. Live example at using-remark.gatsbyjs.org/katex/.

Install

npm install gatsby-transformer-remark gatsby-remark-katex katex

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-katex`,
          options: {
            // Add any KaTeX options from https://github.com/KaTeX/KaTeX/blob/master/docs/options.md here
            strict: `ignore`
          }
        }
      ],
    },
  },
],

Add Katex CSS to your template: Katex's CSS file is required to render the formulas correctly. Include the CSS file in your template (example):

require(`katex/dist/katex.min.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
$$

Keywords

FAQs

Package last updated on 05 Jan 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc