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

[错误]: MathJax 内联公式渲染中文出错 #1306

Closed
Self4215 opened this issue Feb 10, 2025 · 6 comments
Closed

[错误]: MathJax 内联公式渲染中文出错 #1306

Self4215 opened this issue Feb 10, 2025 · 6 comments
Labels
bug Something isn't working fixed Fixed and will be released in next version

Comments

@Self4215
Copy link

Self4215 commented Feb 10, 2025

平台

Windows

版本

v0.9.2.1

错误描述

消息设置 - 数学公式引擎选择 MathJax,使用$$内联公式时,渲染得到的中文重叠在一起,英文字母与数字正常显示。

此外还顺便发现,不支持渲染\fbox文字框。

重现步骤

  1. 随意选择一个对话,开启Markdown渲染输入消息,数学公式引擎选择 MathJax

  2. 输入框输入用$$包围的内联公式,再发送,示例如下:

$Abc123普通的示例文字Def456$

$boxed示例文字Def456:\boxed{\text{示例Abc123} 文字Def456 \text{文字Ghi789} 示例Jkl012}$

$fbox示例文字Def456:\fbox{\text{示例Abc123} 文字Def456 \text{文字Ghi789} 示例Jkl012}$

发送的文字:

Image

使用 MathJax 渲染:

Image

预期行为

预期应当与使用 KaTex 渲染得到的结果一样,中文正常显示,且支持渲染\fbox文字框:

Image

相关日志输出

附加信息

可能与 #1257 的问题相同,抱歉是我没提前查找过相似 issue

@Self4215 Self4215 added the bug Something isn't working label Feb 10, 2025
@zhudisha
Copy link

同公式渲染出错

Image

@Sigsawaii
Copy link

mac同

Image

Image

@kangfenmao
Copy link
Collaborator

楼主问的问题需要解决,下面两楼直接设置面板换公式引擎就能解决

@reidentify
Copy link

reidentify commented Feb 14, 2025

Image

Image
这个也会出问题,这是为啥呢?

2. **水位计算:**
   - 对于横截面积均匀的容器,水位上升高度可以由
     \[
     \Delta h = \frac{V_{\text{排开}}}{\text{容器底面积}}
     \]
     得出。如果原水深加上 \(\Delta h\) 超过容器高度,就会溢出。

@Self4215
Copy link
Author

Self4215 commented Feb 15, 2025

Image

Image 这个也会出问题,这是为啥呢?

  1. 水位计算:
    • 对于横截面积均匀的容器,水位上升高度可以由
      [
      \Delta h = \frac{V_{\text{排开}}}{\text{容器底面积}}
      ]
      得出。如果原水深加上 (\Delta h) 超过容器高度,就会溢出。

这个的问题是,在公式块$$ $$之后的行,如果开头有四个空格,就会把这一行变成这个我也不知道是什么的样式。这个问题两个公式引擎都有

$$
\beta
$$
   fjfjf
$$
\beta
$$
    fjfjf


    fjfjf

abcd
    fjfjf

Image

这是另一个bug,建议新开一个issue,然后附上我这个评论的链接

@ousugo ousugo added the fixed Fixed and will be released in next version label Feb 17, 2025
@ousugo
Copy link
Collaborator

ousugo commented Feb 17, 2025

#1810

@ousugo ousugo closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Fixed and will be released in next version
Projects
None yet
Development

No branches or pull requests

6 participants