Skip to content

Improve math block parsing #14561

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

Closed
3 tasks done
noenif opened this issue Apr 10, 2025 · 11 comments
Closed
3 tasks done

Improve math block parsing #14561

noenif opened this issue Apr 10, 2025 · 11 comments
Assignees
Milestone

Comments

@noenif
Copy link

noenif commented Apr 10, 2025

3.1.27 无法渲染公式

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

那一天你和我说了3.1.27 没问题.我今天升级了还是不行了.而且如果我已经有的文档还是无法渲染白屏.如果是新的粘贴就是failed

后面为了证明不是那天你说我装的插件问题,我又卸载重新装了一版,我是纯净的,没有选择老的工作目录,是新的创建的.还是这样无法渲染

Image

我赶紧卸载了3.1.27 装上3.1.25 他又恢复了正常.目前在我这里带公式的可以正常渲染是3.1.25,

Expected result

Image

Screenshot or screen recording presentation

No response

Version environment

- Version: 3.1.27
- Operating System: win11
- Browser (if used):

Log file

output (1).md

More information

No response

@TCOTC
Copy link
Contributor

TCOTC commented Apr 10, 2025

请试一下在文档树上导入 md 文档

Image

@noenif
Copy link
Author

noenif commented Apr 10, 2025

请试一下在文档树上导入 md 文档

Image

导入正常,复制不正常.

@noenif
Copy link
Author

noenif commented Apr 10, 2025

请试一下在文档树上导入 md 文档

Image

啥时候修复复制呢?

@TCOTC
Copy link
Contributor

TCOTC commented Apr 10, 2025

我这边复制粘贴也是正常的。你的电脑里有安装什么软件跟剪贴板有关吗?

或者换不同的编辑器打开 md 文件试试复制粘贴到思源

@noenif
Copy link
Author

noenif commented Apr 10, 2025

我这边复制粘贴也是正常的。你的电脑里有安装什么软件跟剪贴板有关吗?

或者换不同的编辑器打开 md 文件试试复制粘贴到思源

md 帮你处理了格式,如果我用typroa打开后的复制一下,我再粘贴到siyuan是可以的..我传给你一份txt的.

不过,.3.1.25是可以的.应该是某个特殊字符的问题.

新建 文本文档.txt

@TCOTC
Copy link
Contributor

TCOTC commented Apr 10, 2025

你新上传的这个可以重现公式块异常的问题,区别是在两个 $$ 之间前后分别多了一个空格:

Image

$$ 
\begin{cases}
x^2 + y^2 + z^2 = 1, \\
x + y + z = 0
\end{cases}
 $$

我试了一下多出空格之后在 VSCode 和 Obsidian 里都能解析为公式块,但在思源里会出问题:

Image

需要 @88250 看看

@noenif
Copy link
Author

noenif commented Apr 10, 2025

你新上传的这个可以重现公式块异常的问题,区别是在两个 $$ 之间前后分别多了一个空格:

Image

$$ 
\begin{cases}
x^2 + y^2 + z^2 = 1, \\
x + y + z = 0
\end{cases}
 $$

我试了一下多出空格之后在 VSCode 和 Obsidian 里都能解析为公式块,但在思源里会出问题:

Image

需要 @88250 看看

3.1.25也可以的.

@noenif
Copy link
Author

noenif commented Apr 10, 2025

你新上传的这个可以重现公式块异常的问题,区别是在两个 $$ 之间前后分别多了一个空格:

Image

$$ 
\begin{cases}
x^2 + y^2 + z^2 = 1, \\
x + y + z = 0
\end{cases}
 $$

我试了一下多出空格之后在 VSCode 和 Obsidian 里都能解析为公式块,但在思源里会出问题:

Image

需要 @88250 看看

Image
#11412

@88250 88250 self-assigned this Apr 10, 2025
@88250 88250 changed the title 3.1.27 无法渲染公式 Improve math block parsing Apr 10, 2025
@88250 88250 added this to the 3.1.28 milestone Apr 10, 2025
@88250
Copy link
Member

88250 commented Apr 10, 2025

下个版本改进公式解析。

#11412 不考虑哦,谢谢。

88250 added a commit to 88250/lute that referenced this issue Apr 10, 2025

Verified

This commit was signed with the committer’s verified signature.
88250 added a commit to 88250/lute that referenced this issue Apr 10, 2025

Verified

This commit was signed with the committer’s verified signature.
88250 added a commit that referenced this issue Apr 10, 2025
@88250 88250 closed this as completed Apr 10, 2025
@xy3xy3
Copy link

xy3xy3 commented Apr 21, 2025

下个版本改进公式解析。

#11412 不考虑哦,谢谢。

现在大模型输出基本上是用[ ]\和( )包围的,手动转有些麻烦(),katex好像本身也支持设置这两种标签的解析

@TCOTC
Copy link
Contributor

TCOTC commented Apr 21, 2025

让AI自己转换输出吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants