-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
[Request] 增加Markdown数学公式渲染条件 #1609
Comments
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
🥰 Description of requirementsIt is hoped that mathematical formulas enclosed by ( ) and [ ] can also be rendered 🧐 SolutionWhen it comes to formulas, AI assistants often prefer to use 📝 Supplementary informationNo response |
确实是一个好建议,虽然我之前一直采用 prompt 的方式来提示它,但是还是有概率出现这种情况。 |
It is indeed a good suggestion. Although I have always used prompt to prompt it, there is still a probability that this situation will occur. |
不过有一说一,这个修改似乎和渲染方式有关,如果现在的解析是基于正则的,那非常好改,但是如果是基于成熟的 md AST 解析框架,可能就会比较难弄了(没看过代码 |
However, one thing to say is that this modification seems to be related to the rendering method. If the current parsing is based on regular expressions, it is very easy to modify, but if it is based on the mature md AST parsing framework, it may be more difficult to do (I have not seen the code) |
我不懂开发,所以技术困难什么的确实不清楚,只是使用过程中遇到了,试着提出来,希望对软件完善有所帮助。 我确实也是一直用prompt来解决这个问题的,但是在助手市场中很多助手都没有给这样的prompt,导致经常需要增加要求,并且修改以后AI助手还不一定能记住,所以这个也还是合理的,希望开发者们可以考虑吧 |
I don't know much about development, so I really don't know about technical difficulties. I just encountered them during use. I will try to raise them, hoping to help improve the software. I have indeed been using prompts to solve this problem, but many assistants in the assistant market do not give such prompts, which often requires adding requirements, and the AI assistant may not be able to remember them after modifications, so this is still reasonable. , I hope developers can consider it |
即使要做,我认为这也应该是一个附加的可选 docker 参数或者设置项,而非一个默认的配置项,因为我们不清楚是否存在别的输入/输出会有这样的格式,这种格式的确是 latex 的标准格式,但是不是 markdown 的标准格式。 |
Even if it is done, I think this should be an additional optional docker parameter or setting item, rather than a default configuration item, because we don't know if other input/output will have such a format. This format does It is the standard format of latex, but not the standard format of markdown. |
和 #1602 (comment) 一起考虑吧。后面搞一个专门的配置页用于设置各种 markdown 语法的渲染效果。 |
Consider this along with #1602 (comment). A special configuration page will be created later to set the rendering effects of various markdown syntaxes. |
其实我见过有同时支持选择 纯文本/Markdown/LaTeX 之一渲染的前端(逃 |
In fact, I have seen front-ends that support one of the rendering options of plain text/Markdown/LaTeX (escape |
嗯嗯,这样比较好! |
Hmm, this is better! |
是指三选一还是同时渲染? |
Does it mean to choose one of the three or render at the same time? |
三选一,选择一个渲染方式,好像可以在对话项旁边还是设置页切换来着,忘了是哪个项目了 |
Choose one from three |
应该是思源的三选一,这个没办法(也没必要)同时渲染。 |
It should be one of Siyuan's three choices. There is no way (and no need) to render these at the same time. |
#1620 这个问题也可以关联起来,属于同一类型反馈 |
#1620 This issue can also be related and belongs to the same type of feedback |
你好,我在使用的时候也遇到了类似的问题,方便问一下prompt应该如何编写吗,对于前端上数学表达式的渲染问题了解的不多 |
Hello, I also encountered similar problems when using it. Can I ask how to write the prompt? I don’t know much about the rendering of mathematical expressions on the front end. |
|
|
这个可以放到agent里面,如果agent偶尔出错再放到 text 里,这样会省下一些token,但是prompt是没错的 |
This can be placed in the agent. If the agent occasionally makes errors, put it in text. This will save some tokens, but the prompt is correct. |
临时解决方案:
正则替换:
|
Temporary solution:
Regular replacement:
|
感觉可以在助手设置里加一个配置项 |
I feel like I can add a configuration item to the assistant settings. |
Fixed in |
This issue is closed, If you have any questions, you can comment and reply. |
🥰 需求描述
希望
\( \)
和\[ \]
括住的数学公式也可以渲染🧐 解决方案
ai助手在涉及到公式时,经常首选利用
\[ \]
和\( \)
来将公式括住,而lobechat往往只把用$$
括住的公式渲染,因此经常会导致很多公式可读性很差,希望可以考虑调整📝 补充信息
No response
The text was updated successfully, but these errors were encountered: