fix(export): 裁剪超出范围的曲线并修正 PDF 纵轴标签

- 共享几何将曲线裁剪到绘图矩形,避免超出显式 range 的曲线覆盖 PDF 其他内容
- PDF 纵轴标签改为组内局部坐标 + 先平移后旋转,标签边界落回 Drawing 范围内
- 更新 pdf.py 模块说明:function_plot 已内嵌矢量图
- 新增曲线裁剪与纵轴标签边界回归测试

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
yxx
2026-09-06 22:28:09 +08:00
co-authored by Claude Code
parent f1ac414866
commit edc41fdade
4 changed files with 138 additions and 8 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
"""PdfExporterDocument AST → PDFreportlab platypus)。
v1 为文本优先:标题/段落/行内强调与链接/列表/引用/表格/代码块/数学文本均可导出;
function_plot mermaid 保留源码占位并记 warning。中文字体用 reportlab 内置
STSong-Light CID 字体,避免外部字体依赖。CID 字体无独立 bold/italic 字重,
故行内强调退化为普通文本(内容不丢、样式简化),标题靠字号区分层级。
function_plot 内嵌为矢量图(reportlab Drawing),mermaid 保留源码占位并记 warning。
中文字体用 reportlab 内置 STSong-Light CID 字体,避免外部字体依赖。CID 字体无独立
bold/italic 字重,故行内强调退化为普通文本(内容不丢、样式简化),标题靠字号区分层级。
"""
from __future__ import annotations