question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gatsby-remark-katex doesn't work

See original GitHub issue

Description

Unable to produce latex output from md files

Steps to reproduce

Follow the instructions at https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-katex

Expected result

latex output should appear as an svg or similar

What should happen?

Actual result

the latex text is treated as plain text

What happened.

Environment

System: OS: Linux 4.17 openSUSE Tumbleweed 20180704 CPU: x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Shell: 4.4.23 - /bin/bash Binaries: Node: 10.6.0 - /usr/bin/node Yarn: 1.7.0 - /usr/bin/yarn npm: 6.1.0 - /usr/bin/npm Browsers: Chrome: 67.0.3396.99 Firefox: 61.0 npmPackages: gatsby: ^1.9.24 => 1.9.274 gatsby-link: ^1.6.16 => 1.6.46 gatsby-plugin-google-analytics: ^1.0.7 => 1.0.31 gatsby-plugin-manifest: ^1.0.7 => 1.0.27 gatsby-plugin-offline: ^1.0.9 => 1.0.18 gatsby-plugin-react-helmet: ^1.0.6 => 1.0.8 gatsby-plugin-sharp: ^1.6.7 => 1.6.48 gatsby-plugin-sitemap: ^1.2.5 => 1.2.25 gatsby-plugin-styled-components: ^1.0.5 => 1.0.5 gatsby-remark-copy-linked-files: ^1.5.7 => 1.5.37 gatsby-remark-images: ^1.5.11 => 1.5.67 gatsby-remark-katex: ^1.0.14 => 1.0.14 gatsby-remark-prismjs: ^1.2.7 => 1.2.24 gatsby-remark-responsive-iframe: ^1.4.7 => 1.4.20 gatsby-remark-smartypants: ^1.4.7 => 1.4.12 gatsby-source-filesystem: ^1.4.12 => 1.5.39 gatsby-transformer-remark: ^1.7.44 => 1.7.44 gatsby-transformer-sharp: ^1.6.5 => 1.6.27 npmGlobalPackages: gatsby-cli: 1.1.58

File contents (if changed)

gatsby-config.js: N/A package.json: N/A gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
wzardcommented, Jul 31, 2019

I ran into the same issue. Try this config instead. @miguelgondu @Jiang-Li

	{
			resolve: `gatsby-plugin-mdx`,
			options: {
				defaultLayouts: {
					default: require.resolve(`./src/components/mdxLayout.js`)
				}
				remarkPlugins: [ require('remark-math'), require('remark-html-katex') ]
			}
		}
1reaction
KyleAMathewscommented, Jul 21, 2018

Seems to be working here https://using-remark.gatsbyjs.org/katex/ perhaps check out the example site to see if you’re missing something?

Read more comments on GitHub >

github_iconTop Results From Across the Web

gatsby-remark-katex plugin in my Gatsby blog is not working ...
I want to be able to render Math equations in my Gatsy blog both in inline mode & display mode. I write my...
Read more >
Using KaTeX With Gatsby and MDX - Trevor Blades
It's important to install older versions of the two remark plugins since the newest versions are ESM only and Gatsby doesn't support ES...
Read more >
Gatsby Changelog | 5.3.0
gatsby-remark-images. There will be no API-breaking changes, your builds will continue to work. However, whenever you use the tracedSvg feature Gatsby ...
Read more >
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/.
Read more >
Migrating from GatsbyJS 2.16.2 to 3.9.0 - BobbyDreamer
Plugins : gatsby-remark-katex · Plugins : gatsby-remark-mathjax · User Sixian Li using the same starter pack has done it. Tried it out but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found