Template Module Reference
Purpose: Detect and validate the university thesis template/class in use.
Template Detection Workflow
- Scan document class: Look for
\documentclass{thuthesis},\documentclass{pkuthss},\documentclass[...]{ctexbook}, etc. - Check package imports: Identify
ctex,xeCJK,fontspecand other template-specific packages. - Match template: Compare against known templates in
templates/(single authoritative source). - Report: Output detected template name, version (if available), and any config warnings.
Supported Templates
| Template | University | Document Class |
|---|---|---|
| thuthesis | 清华大学 | \documentclass{thuthesis} |
| pkuthss | 北京大学 | \documentclass{pkuthss} |
| ctexbook (generic) | Various | \documentclass[...]{ctexbook} |
Key Config Files
.latexmkrc— compiler settings*.cls— template class file*.cfg— template configurationrefs.bib/references.bib— bibliography database
After Detection
Once the template is identified, load the corresponding template snapshot from:
templates/{template}.md(thuthesis.md / pkuthss.md)for per-template constraintstemplates/generic.mdas fallback for unknown templates(ustcthesis / fduthesis 暂同)templates/yanshan.md为燕山大学规范获取指引(无可检测的 documentclass)
See
generic.md,thuthesis.md,pkuthss.md, andyanshan.mdfor the authoritative per-template snapshots.