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

[BUG] 较长的行间公式出现遮挡 #442

Closed
2 of 3 tasks
Gypsophila-cx opened this issue Oct 18, 2024 · 3 comments
Closed
2 of 3 tasks

[BUG] 较长的行间公式出现遮挡 #442

Gypsophila-cx opened this issue Oct 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working dev finished Development in dev branch completed. Please wait for the new version to release

Comments

@Gypsophila-cx
Copy link

Gypsophila-cx commented Oct 18, 2024

提交 Issue 前检查清单

Bug 描述

MathJax配置:

mathjax:
  tags: none               # or 'ams' or 'all'
  single_dollars: true     # enable single dollar signs as in-line math delimiters
  cjk_width: 0.9           # relative CJK char width
  normal_width: 0.6        # relative normal (monospace) width
  append_css: true         # add CSS to every page
  every_page: false        # if true, every page will be rendered by mathjax regardless the `mathjax` setting in Front-matter of each article
  packages:                # additional packages to include
    -require
    -amscd   

使用默认"hexo-renderer-marked": "^6.0.0"进行渲染

Bug:在公式长度超出屏幕宽度时(尤其是在手机屏幕上容易发生),公式开头的一部分将被遮挡掉,尽管存在下方滑动条,但是无法滑动到能看出完整公式的地方,具体表现请查看示例图片。

复现方法

写一个足够长的公式,例如
$$
\int |K(x,y)f(y)| d \nu(y) \leqslant \left[ \int |K(x,y)|d \nu(y) \right]^{1 / q} \left[ \int |K(x,y)| |f(y)|^p \right]^{1 / p} \leqslant C^{1 / q} \left[ \int |K(x,y)| |f(y)|^p d \nu(y) \right]^{1 / p}\text{ i.e } \int \left[ \int |K(x,y)f(y)| d \nu(y) \right]^p d \mu(x) \leqslant C^{p / q} \iint |K(x,y)| |f(y)|^p d \nu(y) d \mu(x).
$$

预期结果

底部滑动条可以滑动到可以看到公式的最左端部分。

截图

normal

上述图片是在电脑端渲染得到的结果,配置文件中的content_max_width为1200px,在右侧目录展开时是正常的表现,滑动条可以左滑到看到公式最左端。当右侧目录收起时会出现轻微遮挡。

bad

上述图片是在较窄的屏幕上渲染的结果(这里是在电脑端直接把浏览器窗口缩小模拟出的结果,在手机上效果类似),可以看到尽管滑动条已经在最左侧了,但是公式的开头依然无法显示出来。

bad2

上图是在电脑端将配置文件中的content_max_width调小到默认的1000px之后的效果,此时即使是在电脑端也会出现遮挡。

电脑操作系统

Windows

浏览器

Chrome

版本

No response

移动端设备

小米

移动端操作系统

安卓

浏览器

No response

版本

No response

其他

No response

@Gypsophila-cx Gypsophila-cx added the bug Something isn't working label Oct 18, 2024
EvanNotFound added a commit that referenced this issue Oct 19, 2024
- Enhance MathJax container layout and responsiveness
- Center MathJax content and add horizontal scrolling for overflow
- Adjust scrollbar styling for better visibility and consistency
- Improve comments for clarity in basic.styl
@EvanNotFound EvanNotFound added the dev finished Development in dev branch completed. Please wait for the new version to release label Oct 19, 2024
@EvanNotFound
Copy link
Owner

Redefine v2.7.2 已更新 / 修复此功能,请前往 Release 页面 更新。

@Gypsophila-cx
Copy link
Author

Gypsophila-cx commented Oct 27, 2024

今天更新了新版本(v2.7.2),很遗憾情况变得更糟了:虽然公式的遮挡问题得到了解决,但是现在无论是移动端还是桌面端的所有的行内公式也全部变成了行间公式

屏幕截图 2024-10-27 231152

希望可以保留$ formula $为行内公式的特性。

@EvanNotFound
Copy link
Owner

非常抱歉,是 bug,目前已在 v2.7.3 版本修复,请更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev finished Development in dev branch completed. Please wait for the new version to release
Projects
None yet
Development

No branches or pull requests

2 participants