这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@PrinOrange
Copy link
Contributor

For example, we have the origin webpage, with formulas

53f10b1155fa56826911f2204fb9b3e

But if I want to translate them into another language(for example, Korean-language) with Chrome translating-tools, the irrelevant Latin character symbols in KaTeX formulas would also be recognized and translated by mistake, and it would breaks the article layouts.

image

So I use the plugin rehype-katex-notranslate, which could tell apart symbols from formulas and sentences and add translate="no" property for formula blocks, so as to prevent formula symbols to be wrongly translated.

After effect:

b89deb0d4f2f01074e2dc85ea878b6e

@vercel
Copy link

vercel bot commented Nov 1, 2024

@PrinOrange is attempting to deploy a commit to the timlrx's projects Team on Vercel.

A member of the Team first needs to authorize it.

@timlrx
Copy link
Owner

timlrx commented Nov 3, 2024

Fix looks good to me, thanks.

@timlrx timlrx merged commit 6289f94 into timlrx:main Nov 3, 2024
1 check failed
@vercel
Copy link

vercel bot commented Nov 3, 2024

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

Name Status Preview Comments Updated (UTC)
tailwind-nextjs-starter-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 3, 2024 8:55am

bhiwagade-rahul pushed a commit to bhiwagade-rahul/tailwind-nextjs-starter-blog that referenced this pull request Sep 22, 2025
… formulas to be translated by browser translate-tools. (timlrx#1049)

* fix(format): format the codes

* fix(format): format the code

* feat: add rehype-katex-notranslate plugin to prevent symbol in formulas to be translated.

* update(dep): update `rehype-katex-notranslate` version
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

Successfully merging this pull request may close these issues.

2 participants