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

katex如何渲染公式 #7

Open
Compassen opened this issue Jul 13, 2023 · 2 comments
Open

katex如何渲染公式 #7

Compassen opened this issue Jul 13, 2023 · 2 comments

Comments

@Compassen
Copy link

网上关于katex讨论较少
我用vue3框架如何用katex渲染html里的公式

@ionic666
Copy link

网上关于katex讨论了 我用vue3框架如何使用katex渲染html里的公式

你解决了吗,我也遇到了这问题

@806512500
Copy link

@ionic666 @Compassen
其中 data-value 就是 LateX 格式的值,可使用第三方工具把 渲染成公式卡片,如 KateX

用dom操作:

content.querySelectorAll('[data-w-e-type="formula"]').forEach(e=>{
          katex.render(e.getAttribute('data-value'), e, {
            throwOnError: false,
          })
        })

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

3 participants