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

公式随宽度缩放 #57

Open
66Leo66 opened this issue Jan 10, 2023 · 4 comments
Open

公式随宽度缩放 #57

66Leo66 opened this issue Jan 10, 2023 · 4 comments

Comments

@66Leo66
Copy link

66Leo66 commented Jan 10, 2023

我的文章正文使用hexo-renderer-pandoc+hexo-filter-mathjax渲染,公式在屏幕宽度不足时会溢出;
image

而同时我观察到Waline评论区的mathjax功能也使用了类似的方法在服务端渲染公式为svg,评论区的公式就可以自动缩小以匹配宽度。
image

折腾了好久,不知道如何解决,故询问一下

@stevenjoezhang
Copy link
Member

能提供一下这个网页的链接吗,我看看具体细节

@66Leo66
Copy link
Author

66Leo66 commented Jan 11, 2023

能提供一下这个网页的链接吗,我看看具体细节

(已下线)

@HiNinoJay
Copy link

HiNinoJay commented May 21, 2023

作者你好,我也遇到这个问题,如果能修复,万分感激

这是bug演示页面:https://ninojay.top/hexoplugin/hexo-filter-mathjax/

当页面尺寸调整为手机端时,数学公式的svg图片宽度溢出,经过我简单的调试,是公式渲染生成的svg图片css样式的width宽度固定造成的

@stevenjoezhang
Copy link
Member

@HiNinoJay 带编号的公式溢出是已知问题,因为 MathJax 不知道用户的屏幕尺寸,所以会按照默认宽度生成: https://github.com/next-theme/hexo-filter-mathjax#known-issues
这个确实不太好处理,如果换成不带编号的公式就可以解决

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