Skip to content

Improve math block parsing #14561

Closed
Closed
@noenif

Description

@noenif

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

Activity

TCOTC

TCOTC commented on Apr 10, 2025

@TCOTC
Contributor

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

Image

noenif

noenif commented on Apr 10, 2025

@noenif
Author

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

Image

导入正常,复制不正常.

noenif

noenif commented on Apr 10, 2025

@noenif
Author

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

Image

啥时候修复复制呢?

TCOTC

TCOTC commented on Apr 10, 2025

@TCOTC
Contributor

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

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

noenif

noenif commented on Apr 10, 2025

@noenif
Author

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

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

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

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

新建 文本文档.txt

TCOTC

TCOTC commented on Apr 10, 2025

@TCOTC
Contributor

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

Image

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

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

Image

需要 @88250 看看

noenif

noenif commented on Apr 10, 2025

@noenif
Author

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

Image

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

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

Image

需要 @88250 看看

3.1.25也可以的.

noenif

noenif commented on Apr 10, 2025

@noenif
Author

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

Image

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

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

Image

需要 @88250 看看

Image
#11412

self-assigned this
on Apr 10, 2025
changed the title [-]3.1.27 无法渲染公式[/-] [+]Improve math block parsing[/+] on Apr 10, 2025
added this to the 3.1.28 milestone on Apr 10, 2025
88250

88250 commented on Apr 10, 2025

@88250
Member

下个版本改进公式解析。

#11412 不考虑哦,谢谢。

xy3xy3

xy3xy3 commented on Apr 21, 2025

@xy3xy3

下个版本改进公式解析。

#11412 不考虑哦,谢谢。

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

TCOTC

TCOTC commented on Apr 21, 2025

@TCOTC
Contributor

让AI自己转换输出吧

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@noenif@xy3xy3@TCOTC

      Issue actions

        Improve math block parsing · Issue #14561 · siyuan-note/siyuan