Skip to content

Repository files navigation

北京大学学位论文与报告 LaTeX 模板

该模板由原北京大学学位论文模板 git 仓库和 paper-template git 仓库改进而来,保留中文/XeLaTeX 支持,并兼容 paper-template 的 Makefile 工作流。

可按需修改为以下用途:

  • 综合考试报告
  • 开题报告
  • 硕士毕业论文
  • 博士毕业论文

模板来源与改动

当前仓库保留了原北京大学学位论文模板的主体结构,包括封面信息、摘要、目录、章节、参考文献、致谢、原创性声明、答辩后材料等。

同时从 paper-template 迁移了以下内容:

  • Makefile 构建入口和 bin/latexrun 构建脚本。
  • bin/ 中的辅助脚本,例如 diff、拼写检查、代码高亮、svg/odg 转 pdf 等。
  • sty/ 中的 ACM/USENIX 等 paper 样式文件。
  • p.bibconf.bib 引用文件。
  • fig/code/data/ 等 paper-template 风格的辅助目录。

参考文献

主文件 main.tex 当前使用:

\bibliography{reference,p,conf}

其中:

  • reference.bib 用于当前学位论文模板中的本地示例引用。
  • p.bib 来自 paper-template,保留 paper 示例引用。
  • conf.bib 来自 paper-template,包含系统、网络、安全、体系结构、数据库等领域常用会议和期刊缩写。

如不需要 p.bibconf.bib,可在 main.tex 中删去对应文件名。

本地编译

默认编译 main.tex:

make

指定入口文件:

make MAIN=main

清理中间文件:

make clean

更彻底清理 paper-template 生成文件:

make distclean

Makefile 同时支持 fig/*.svgfig/*.odgdata/*.gpcode/* 等 paper-template 风格的辅助生成规则;不需要这些目录时可以留空。

.gitignore 说明

当前 .gitignore 已兼容 paper-template 的主要忽略规则,同时保留当前学位论文模板需要的规则。

它没有简单逐字照搬 paper-template,主要原因是:

  • 当前模板使用 latex.out/ 作为 latexrun 输出目录,需要显式忽略。
  • 当前仓库已有 main.pdf 被 git 跟踪;即使 .gitignore 中忽略 /*.pdf,已跟踪文件仍会继续显示修改,这是 git 的正常行为。
  • 当前 Makefile 使用 fig/,而 paper-template.gitignore 中还包含 figs/,因此这里同时兼容两种目录名。
  • 当前模板还会生成 *.lof*.lot_minted_*/ 等常见 LaTeX 产物,因此也一并忽略。

其他说明

  • TexLive 2021 以上的版本在替换带有二维码的版权声明或其他文件时,可能会报错,目前暂无解决方法。本地需使用 2020 及以下版本的 TexLive 编译,Overleaf 可以在左上角 Menu 中更改 TexLive 版本为 2020。
  • TexLive 2018 版本可能需要注释 pkuthss.cls 文件中的 \RequirePackage{chngcntr}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages