binary-husky / binary-husky/gpt_academic

[Bug]: 模型输出同时包含代码和latex格式文本时,latex文本渲染失效

Open
#1,906 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
71.3k
Forks
8.3k
PR merge metrics
No merged PRs in 30d

Description

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

如果模型的输出中只有latex公式,那前端页面会把模型的输出分为上下两部分,上面一部分是包含latex公式源码的,下面一部分会把公式渲染出来。
但是如果模型的输出中同时有latex公式和代码,那前端页面就不会把模型的输出分为上下两部分,公式的渲染就会失效

### Screen Shot | 有帮助的截图

不正常的:![image](https://github.com/user-attachments/assets/7142c3b6-f5e8-4ebb-ba6a-1af2d05eaa75)
正常的:
![image](https://github.com/user-attachments/assets/4c02f74a-07c1-4bf4-9d01-3078651b5616)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named. Reproduce on Windows with the latest requirements.txt using model output that combines LaTeX and code, then compare it with LaTeX-only output and the attached screenshots. Done means both LaTeX and code render correctly in the frontend together.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, python
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.