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 report]typst导出中Details块分割处理不正确 #75

Open
wen999di opened this issue May 27, 2024 · 9 comments · Fixed by OI-wiki/OI-wiki#5628
Open

[bug report]typst导出中Details块分割处理不正确 #75

wen999di opened this issue May 27, 2024 · 9 comments · Fixed by OI-wiki/OI-wiki#5628

Comments

@wen999di
Copy link

如图,红框部分应为上方子Details块的延续,错误识别为单独的代码块,Latex公式未渲染
屏幕截图 2024-05-27 225243

以下是oi-wiki web上的格式
屏幕截图 2024-05-27 225621

@Enter-tainer
Copy link
Member

发一下对应页面的链接?

@wen999di
Copy link
Author

@Enter-tainer 谢谢解决。
但是我注意到,该问题在不少地方均有出现。

例如:

P1023(/math/number-theory/sqrt-decomposition.md)
屏幕截图 2024-05-29 235229

P1429(/math/number-theory/sqrt-decomposition.md)
image

P2078(/graph/tree-centroid.md)
image

整个文档大约有几十处此种错误,但它们在web中都正常渲染。所以请问:是否应该修改remark-details以解决此问题,使pdf文档表现与web一致?

@Enter-tainer
Copy link
Member

@wen999di 欢迎开一个pr来做修改

@Enter-tainer
Copy link
Member

Enter-tainer commented May 29, 2024

这是一个持续很久的问题,同样影响主仓库里面的bot。这个之所以没有人动,好像是因为当时没有人能看懂pymarkdown里面的一坨奇怪的regex是在写啥

@Enter-tainer
Copy link
Member

尝试了一下mkdocs,他的行为好像是“进入块后,一直eat line,直到遇到第一个非空的,缩进层级与块相同的行”

@Enter-tainer
Copy link
Member

这个行为应该同样也会影响latex export,因为他俩下面是同样的details解析库

@Enter-tainer
Copy link
Member

我这几天尝试在修这个事情,但是遇到了一些奇怪&不好解决的问题。尝试在micromark社区里面求助但是也不太成功。最近还有别的事情要忙,所以就先搁置了。

maybe您有兴趣的话可以帮忙看一看这个要怎么做。

@wen999di
Copy link
Author

wen999di commented Jun 1, 2024

@Enter-tainer
thx a lot
我也在尝试解决

@Enter-tainer
Copy link
Member

我把我弄到一半的代码分支上传一下吧。 https://github.com/oi-wiki/remark-details/tree/mgt/attempt-to-fix

image

总之现在它能parse这样的东西。L41的空格是required。。。不然会把and的a吃掉,,

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

Successfully merging a pull request may close this issue.

2 participants