nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Support LaTeX

Open robbear opened this issue 2 years ago • 9 comments

Fixes #416

Screen Shot 2022-11-23 at 2 21 10 PM

Could we do something like this? We might want a theme flag to avoid the download of katex.min.css if a theme-user is not interested in math rendering.

By the way, please note that I had to pin "flexsearch": "0.7.21" on a clean rebuild of the pnpm-lock.yaml to get around a failure in pnpm install.

robbear avatar Nov 22 '22 00:11 robbear

⚠️ No Changeset found

Latest commit: 6e6c90b7c5bbeb09402b207a7558621ccdad3271

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 22 '22 00:11 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nextra-theme-docs-dev ✅ Ready (Inspect) Visit Preview Dec 7, 2022 at 10:45AM (UTC)
nextra-v2 ❌ Failed (Inspect) Dec 7, 2022 at 10:45AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
nextra ⬜️ Ignored (Inspect) Dec 7, 2022 at 10:45AM (UTC)

vercel[bot] avatar Nov 22 '22 00:11 vercel[bot]

@robbear Sir, does this work with yarn?

Subham-Maity avatar Nov 29 '22 23:11 Subham-Maity

does this work with yarn?

@Subham-Maity I have not built with yarn, only pnpm, but if the project has otherwise been working for you with yarn, I don't see any reason why these changes would not.

robbear avatar Nov 30 '22 01:11 robbear

I think for this to land, we need to find a way to inject the KaTeX CSS dynamically instead of relying on a CDN. Thanks for opening this!!

shuding avatar Dec 04 '22 01:12 shuding

Someone is attempting to deploy a commit to a Personal Account owned by @shuding on Vercel.

@shuding first needs to authorize it.

vercel[bot] avatar Dec 05 '22 15:12 vercel[bot]

I think for this to land, we need to find a way to inject the KaTeX CSS dynamically instead of relying on a CDN.

@shuding I replaced the CDN reference with import "katex/dist/katex.min.css" in swr-site/pages/_app.js. It was helpful to discover that katex.min.css is bundled with katex.

robbear avatar Dec 05 '22 15:12 robbear

Someone is attempting to deploy a commit to a Personal Account owned by @shuding on Vercel. @shuding first needs to authorize it.

This sounds scary, and was most likely me. Do I have something configured improperly with regard to my fork?

robbear avatar Dec 05 '22 15:12 robbear

Ah @robbear not because of your fork, it was me misconfigured the Git Fork Protection option on Vercel - resolved now! Sorry for the inconvenience!

shuding avatar Dec 07 '22 10:12 shuding

Implemented by #1143, also appreciate your input here! 🙌

shuding avatar Dec 30 '22 01:12 shuding