Skip to content

refactor(template): 更新模板框架及 CI - #136

Merged
45gfg9 merged 27 commits into
yhwu-is:newfrom
45gfg9:fix/template-reliability
Oct 5, 2026
Merged

45gfg9 merged 27 commits into
yhwu-is:newfrom
45gfg9:fix/template-reliability

Conversation

@45gfg9

@45gfg9 45gfg9 commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

本 PR 集中修复讲义模板、答案生成和构建流程中的可靠性问题,同时保持正文调用方式和 PDF 可见结构基本不变。

主要修改

  • 重构章节与“未竟专题”的状态、计数器和 Hyperref 锚点,修复重复锚点及章节编号问题。
  • 集中整理定理、证明和 QED 标记的实现。
  • 改进类选项、页面尺寸、封面文件名和空白页处理。
  • 将主文档入口统一为 讲义/LALU.tex,并将类文件移至 讲义/。
  • 重构答案抽取与发布流程,使用带校验的 manifest 和 staging 构建。
  • 修复索引构建失败状态未正确传递的问题。
  • 自动处理中文环境下 \autoref 后的间距。
  • 修复答案中中文标点误放入数学模式导致的缺字警告。
  • 更新 Makefile 和 GitHub CI,使用显式的 xindy 构建、无 shell escape 的 latexmk 参数、actions/checkout@v7、actions/upload-artifact@v7 和 TL2025-historic 镜像。
  • 更新标题、作者信息及相关排版细节。

Forward standard document options to ctexbook, document reserved no-op options, remove conflicting geometry constraints, validate page presets, and keep inserted verso pages empty.
Scale the 16k cover to the paper width without multi-axis cropping, record the case-only filename correction, stop creating duplicate exercise-group anchors, and evaluate answer counters explicitly for both regular and unfinished chapters.
Disable imakeidx automatic shell-escape execution and let latexmk own both xindy rules. This preserves the currently empty symbol index while ensuring a nonzero xindy status fails the overall build.
Do not silently accept ctexbook paper-size or landscape options that are later overridden by the custom geometry setting. Report a class error and direct A4 users to geometry=a4; also clarify the current draft option semantics.
Record a staged design for replacing cross-chapter groups, hardening answer extraction, and consolidating theorem and proof semantics while preserving the regular-chapter and unfinished-topic numbering contract.
Map each incompatible refactor to its affected templates or chapter sources, record the intended replacement syntax, and add repository scans for migration work.
Replace ntheorem with amsthm's QED stack while retaining the tcolorbox presentation and the existing author-facing theorem, proof, and solution forms.
Declare theorem styling, label prefixes, and autoref/cleveref names from one table so the six boxed environments keep a single source of truth.
Move \\limits before the summation scripts so current MacTeX parses the three formulas without a nonzero recovery error while preserving their mathematical layout.
Keep amsthm's QED stack and math-mode placement while using the template's original fill glue for ordinary proof endings. This restores the existing page breaks and avoids changing the global amsthm \qed command.
Replace cross-chapter groups and counter aliases with an explicit phase/kind state machine while preserving normal and unfinished-topic semantics. Generate a versioned, strictly validated answer manifest, render it through an independent reader, and stage both PDFs until the complete build succeeds.
Record the accepted author-facing boundary, supporting-structure breaking changes, source migration locations, implemented chapter and answer designs, staged publication flow, and the completed MacTeX/PDF regression results.
将主讲义入口和正式产物统一为 LALU.tex/LALU.pdf,移除为 xindy 临时复制中文文件名的构建分支。同步收紧 CI 产物路径,并保留答案 manifest 的 LALU job 标识。
将 LALUbook.cls 移至两个入口文档所在目录,并删除依赖 LaTeX 内部 input@path 的全局搜索路径修改。标准 make、latexmk -cd 与编辑器从讲义目录构建时可直接解析文档类。
让 proof 的 QED 栈直接使用 amsthm 的 \qed,恢复其断行、分页、最小间距和 \qedhere 定位语义。solution 继续不产生 QED marker。
在 hyperref 的作者接口外层保留普通与星号形式,并用 xspace 自动处理后继正文间距;中文及西文标点、括号保持紧贴。保留现有手写空格以减少正文改动,同时修正一处标点前的错误空格。
在 27 个以展示公式结束的 proof 中使用 amsthm 的 \qedhere,使方块留在最后一行公式内;同时移除一处 proof 尾的空段落,避免自动 QED 被推到孤立的新行。列表结尾与空占位 proof 本轮不做机械改写。
更新封面标题、作者说明及 PDF 标题元数据。
使用 TeX Live 2025 historic 镜像,并将 checkout 与 artifact upload actions 更新至 v7;现有输入在新版本中保持兼容。
Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:53

This comment was marked as off-topic.

@45gfg9
45gfg9 requested a lite review from Copilot October 5, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Two moderate findings remain unresolved, along with one generated-file ignore nit.

Review effort: Lite
Findings: None

@45gfg9
45gfg9 merged commit be1b5de into yhwu-is:new Oct 5, 2026
1 check passed
@45gfg9
45gfg9 deleted the fix/template-reliability branch October 5, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants