v0.20.0
This version gives formula-heavy PDFs a way in.
Math formulas already render, speak, and quiz fine since v0.19. What was still broken was the source. A math PDF imported through the text layer arrives with mangled formulas, because the text layer of a PDF never had the formula in readable form to begin with.
This version adds an experimental switch. When it's on, importing a PDF scans each page's text for math signals, renders the math-dense pages to images, and has your vision model transcribe them into LaTeX. Those pages enter the course as real formulas, and the rest of the book keeps the fast text path. Folder imports and arXiv links both go through it.
The switch is off by default and needs a vision model configured in settings. Transcription spends that model's quota page by page, so it only touches pages where math is actually dense. Any failure, a page that won't render, a model that won't answer, a platform without the canvas binary such as Termux, falls back to the plain text layer with a note in the progress log, never a silent drop. Re-importing the same PDF doesn't call the model again, since results are cached per page.
The page renderer is a prebuilt native canvas module, so there is nothing new to compile. A new deterministic test suite guards the chain, and a live test runs a real vision model through it end to end.
这个版本解决的是公式密集 PDF 的入口问题。
数学公式从 v0.19 起显示、朗读、做题都顺了,卡住的是源头。数学 PDF 走文本层导入,公式进来就是乱的,因为 PDF 的文本层里本来就没有可读的公式。
这版加了一个实验开关。打开后,导入 PDF 会逐页扫文本层的数学信号,把公式密集的页整页渲染成图,交给你的视觉模型转写成 LaTeX。这些页以真公式的样子进课程,其余页面继续走快的文本路径。文件夹导入和 arXiv 链接都接了这条路。
开关默认关,要在设置里配好视觉模型才生效。转写按页消耗模型额度,所以只碰公式真正密集的页。任何一步失败,某一页渲染不出来,模型不回答,平台没有 canvas 预编译比如 Termux,都会退回纯文本层,进度日志里写明原因,不悄悄丢页。同一个 PDF 重复导入不再调模型,结果按页缓存。
整页渲染用的是预编译的原生 canvas 模块,没有新的编译负担。从检测到转写的每一步都有新的确定性测试套件守着,还有一个跑真视觉模型的 live 测试从端到端验证过。