网站功能建议
github-bot · 创建于 2026/05/31 11:53 · 最后活动 2026/05/31 12:01
TOPIC
反馈分类:网站 / 功能建议 补充说明: [GitHub Issue] #1 由 @wensimehrp (https://github.com/wensimehrp) 创建 标题:Use Typst instead of LaTeX and move diagram generation to frontend 正文: This is really nice work. There are, however, some parts that could be improved. I tried generating the rotation diagrams but I always get stuck. Looking into the code, the site currently uses LaTeX to generate rotation diagrams (which are 交路图 meh not quite 运行图). Although this is a stable choice, it is not a fast choice, nor a reliable choice. Using Typst via Typst.ts(https://github.com/Myriad-Dreamin/typst.ts) and moving the rendering to the client's machine would massively speed up this process, and allows for further and easier customization to the template. Typst also supports exporting to PDF, SVG, and PNG, which covers all of the export options currently available in the service. I am too lazy to file a PR, but I do have a working demo(https://github.com/wensimehrp/robosign) for using typst.ts on the client side; and basically the stuff that requires extra care are just: Rewriting the template (I have an example that outputs the 运行图(https://github.com/wensimehrp/Paiagram-typst)) Moving the logic (queries, rendering, etc.) from the server side to the client side Downloading the font, which could be self-hosted or streamed via a CDN The downside of this is that this would require downloading extra binary blob since the Typst compiler is quite heavy (a bit less than 20MB, if I recall correctly)
DISCUSSION
话题交流
显示全部回复
Considering the congestion of outbound bandwidth in Chinese Mainland, I don't think decentralizing Typst to the frontend is a good idea for users. I will consider switching the backend to Typst, but since I have no prior experience with Typst, it may take me some time to learn it. Thank you for your feedback!