Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex Support #29

Open
Adam-Al-Rahman opened this issue Oct 2, 2021 · 4 comments
Open

Latex Support #29

Adam-Al-Rahman opened this issue Oct 2, 2021 · 4 comments

Comments

@Adam-Al-Rahman
Copy link

Latex Support

How to add the latex support.
I tried the following but this isn't working

{
      resolve: 'gatsby-theme-kb',
      options: {
        contentPath: path.resolve(__dirname, 'content'),
        rootNotes : 'readme',
        wikiLinkLabelTemplate: '[[{{ title }}]]',
        getPluginMdx(defaultPluginMdx) {
          defaultPluginMdx.options.gatsbyRemarkPlugins.push({
            resolve: 'gatsby-remark-prismjs',
            options: {
              noInlineHighlight: true,
            },
            resolve: `gatsby-remark-katex`,
            options: {
              // Add any KaTeX options from https://github.com/KaTeX/KaTeX/blob/master/docs/options.md here
              strict: `ignore`
            },
          })
          return defaultPluginMdx
        },
      },
    },

As I'm new to gatsby and gatsby shadowing. Please correct me, where am I wrong.
Thanks.

@hikerpig
Copy link
Owner

hikerpig commented Oct 3, 2021

@Adam-Al-Rahman I'm on vacation now and have no access to my laptop.
I will try to look at it three days later.

@Adam-Al-Rahman
Copy link
Author

@Adam-Al-Rahman I'm on vacation now and have no access to my laptop. I will try to look at it three days later.

Ok, enjoy your vacation.
Btw Thanks for replying.

@hikerpig
Copy link
Owner

hikerpig commented Oct 6, 2021

@Adam-Al-Rahman See this isuse and related commit, it is a working example in foam-template-gatsby-kb.

This requires both remark-math and rehype-katex, I got the solution from this article Adding math support to a Gatsby MDX blog

@Adam-Al-Rahman
Copy link
Author

Adam-Al-Rahman commented Oct 7, 2021

@Adam-Al-Rahman See this isuse and related commit, it is a working example in foam-template-gatsby-kb.

This requires both remark-math and rehype-katex, I got the solution from this article Adding math support to a Gatsby MDX blog

Thanks, I'll check it. and if it solves the problem I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants