You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I saw you recently added LaTeX support, which is awesome! However, I saw that it was not yet integrated with the Next plugin. I tried my hand at it myself a bit, but couldn't get it to work with the react loader for some reason.
Sorry about the lack of documentation, I am working on them right now. But I just tried on top of the next example. You don't have to tweak the next plugin for this. You just add it in the next.config.js file, like so:
constlatex=require('@orgajs/rehype-latex').defaultconstwithOrga=require('@orgajs/next').default({// other configs ...rehypePlugins: [latex],})
Remember to add the style in your layout component, or directly in the _app.tsx. Something similar to this:
<><Head> // 👈 this is next/head
<linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"integrity="sha384-zTROYFVGOfTw7JV7KUu8udsvW2fx4lWOsCEDqhBreBwlHI4ioVRtmIvEThzJHGET"crossOrigin="anonymous"/></Head>
...
</>
Let me know if it works on your project, I just tried it in the monorepo, not a standalone repo, there might be some issues.
Hi! I saw you recently added LaTeX support, which is awesome! However, I saw that it was not yet integrated with the Next plugin. I tried my hand at it myself a bit, but couldn't get it to work with the react loader for some reason.
What i tried
And some other things, such as adding
@orgajs/rehype-latex
to the package.json.Building the project and then trying to run the Next starter yields this error.
Let me know if I can do anything more to help!
The text was updated successfully, but these errors were encountered: