gatsby-remark-katex doesn't work

Created on 21 Jul 2018  路  7Comments  路  Source: gatsbyjs/gatsby

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(R) Core(TM) 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

stale? needs reproduction question or discussion

Most helpful comment

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') ]
            }
        }

All 7 comments

Not sure why it doesn't work - i've followed the steps and the md files are properly formatted.

I've been using TeX for 5 years now and heavily depend on it. Hope I can use LaTeX with Gatsby.

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

Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open!

This issue is being closed due to inactivity. Is this a mistake? Please re-open this issue or create a new issue.

I followed the instructions of gatsby-remark-katex but unable to see the latex formula. Did anyone observe this recently?

On my end I get a weird behavior, everything between dollar signs dissapears, but it isn't rendered as TeX.

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') ]
            }
        }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

totsteps picture totsteps  路  3Comments

KyleAMathews picture KyleAMathews  路  3Comments

theduke picture theduke  路  3Comments

andykais picture andykais  路  3Comments

timbrandin picture timbrandin  路  3Comments