Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cloustile/njuthesis
  • GGbond/njuthesis
  • caomeng/njuthesis
  • yilye/njuthesis
  • kopanswer/njuthesis
  • Dansen/njuthesis
  • junjimy/njuthesis
  • wuqizuo123/njuthesis
  • zxlll-/njuthesis
  • Michael/njuthesis
  • bcbhfz/njuthesis
  • LingDu/njuthesis
  • jiejiangwu/njuthesis
  • Tilnel/njuthesisundergraduate
  • nju-lug/nju-latex-templates/njuthesis
15 results
Show changes
Commits on Source (261)
Showing
with 1265 additions and 260 deletions
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf
indent_style = space
[*.{dtx,tex,bib,def}]
indent_size = 2
# 贡献者公约
## 我们的承诺
身为项目成员、贡献者、负责人,我们保证参与此社区的每个人都不受骚扰,不论其年龄、体型、身体条件、民族、性征、性别认同与表现、经验水平、教育程度、社会地位、国籍、相貌、种族、宗教信仰及性取向如何。
我们承诺致力于建设开放、友善、多元、包容、健康的社区环境。
## 我们的准则
有助于促进本社区积极环境的行为包括但不限于:
* 与人为善、推己及人
* 尊重不同的主张、观点和经历
* 积极提出、耐心接受有益批评
* 面对过失,承担责任、认真道歉、从中学习
* 关注社区共同诉求,而非一己私利
不当行为包括但不限于:
* 发布与性有关的言论或图像,以及任何形式的献殷勤或勾引
* 挑衅行为、侮辱或贬损的言论、人身及政治攻击
* 公开或私下骚扰
* 未获明确授权擅自发布他人的资料,如地址、电子邮箱等
* 其他有理由认定为违反职业操守的不当行为
## 落实之义务
社区负责人有责任诠释何谓“妥当行为”,并据此准则,妥善公正地认定与处置不当、威胁、冒犯及有害的行为。
社区负责人有权利和义务删除、编辑、拒绝违背本公约的评论(comment)、提交(commit)、代码、维基(wiki)编辑、问题(issue)等贡献。如有必要,需告知采取措施之理由。
## 适用范围
此行为标准适用于本社区全部场合,以及在其他场合代表本社区的个人。
代表本社区的情形包括但不限于:使用官方电子邮件与社交平台、作为指定代表参与在线或线下活动。
## 贯彻落实
如遇滥用、骚扰等不当行为,请通过 [git+nju-lug-email-3104-issue-@yaoge123.cn](mailto:git+nju-lug-email-3104-issue-@yaoge123.cn) 向纪律检查委员举报。
纪委将迅速审议并调查全部投诉。
社区全体负责人有义务保密举报者信息。
## 指导方针
社区负责人将依据下列方案判断并处置违纪行为:
### 一、督促
**社区影响**:用语不当、举止不符合职业道德或不受社区欢迎。
**处理意见**:由社区负责人予以非公开的书面警告,阐明违纪事由、解释举止如何不妥。或将要求公开道歉。
### 二、警告
**社区影响**:一起或多起事件中的违纪行为。
**处理意见**:警告继续违纪之后果、违纪者在特定时间内禁止与当事人往来、不得擅自与社区执法者往来,禁令涵盖社区内外、社交网络在内的一切联络。如有违反,可致封禁乃至开除。
### 三、封禁
**社区影响**:严重违纪行为,包括屡教不改。
**处理意见**:违纪者在特定时间内禁止与社区的任何往来或公开联络,禁止任何与当事人公开或私下往来,不得擅自与社区执法者往来。如有违反,可致开除。
### 四、开除
**社区影响**:典型违纪行为,例如屡教不改、骚扰某个人、敌对或贬低某个群体。
**处理意见**:无限期禁止违纪者与项目社区的一切公开往来。
## 来源
本行为标准改编自[参与者公约][homepage]2.0版,可在此查阅:[https://www.contributor-covenant.org/zh-cn/version/2/0/code_of_conduct.html][v2.0]
指导方针借鉴自[Mozilla纪检分级][Mozilla CoC]
此行为标准常见问题请洽:[https://www.contributor-covenant.org/faq][FAQ]
另有诸译本:[https://www.contributor-covenant.org/translations][translations]
[homepage]:https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
name: 报告问题
description: 描述需要修复的问题
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
请使用此模板来报告*模板运行问题*,并尽可能多地提供信息。
- type: checkboxes
id: prerequisites
attributes:
label: 先决条件
options:
- label: |-
我已尝试更新[模板版本](https://github.com/nju-lug/NJUThesis/blob/master/CHANGELOG.md)
required: true
- label: |-
我已检索[模板手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf)
required: true
- label: |-
我已检索[项目 wiki](https://github.com/nju-lug/NJUThesis/wiki)
required: true
- label: |-
我已确认这个问题没有在[其他 issues](https://github.com/nju-lug/NJUThesis/issues) 中提出过。
required: true
- type: textarea
id: expected_behavior
attributes:
label: 期望的现象
placeholder: 本来应该是什么效果
validations:
required: true
- type: textarea
id: what_happened
attributes:
label: 发生了什么
placeholder: 实际发生了什么偏差,此处不妨拖拽上传截图
validations:
required: true
- type: textarea
id: minimal_working_example
attributes:
label: 最小工作示例
description: |
一段*完整的可供编译*的 LaTeX 代码,用来复现上述问题。这段代码应当从 `\documentclass` 开始,到 `\end{document}` 结束。请删除*所有不会引起该问题的内容*。譬如,对于正文格式出现的问题,不必添加 `\njusetup` `\tableofcontents` 等命令。删除无关内容是一个 debug 的过程,能帮助你我更准确地问题的根源 : D
placeholder: |
\documentclass[]{njuthesis}
...
\end{document}
render: TeX
validations:
required: true
- type: input
id: njuthesis_version
attributes:
label: njuthesis 模板版本
placeholder: v1.0.0
description: 模板版本可以在 `.log` 文件中搜索 `njuthesis` 得到。
validations:
required: true
- type: dropdown
id: source
attributes:
label: 模板获取途径
options:
- <https://tex.nju.edu.cn>
- 使用包管理器从 CTAN 安装
- 通过 GitHub Releases 或镜像站下载
- 从 Git 仓库下载
- type: dropdown
id: operating_system
attributes:
label: 操作系统
options:
- Windows
- macOS
- Linux
- type: input
id: tex_distribution
attributes:
label: TeX 发行版
placeholder: TeX Live 2022 / MiKTeX 22.1
- type: dropdown
id: compiler
attributes:
label: 编译程序
options:
- XeLaTeX
- LuaLaTeX
- type: textarea
id: more_info
attributes:
label: 额外信息
placeholder: 任何你认为有帮助的信息
- type: markdown
attributes:
value: |
-----
在提交这篇 issue 时,您将默认服从我们的[行为准则](https://github.com/nju-lug/NJUThesis/blob/master/.github/CODE_OF_CONDUCT.md)。
name: 请求新功能
description: 提出可以改进的要点
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: checkboxes
id: prerequisites
attributes:
label: 先决条件
options:
- label: |-
我已尝试更新模板版本
required: true
- label: |-
我已检索[模板手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf)
required: true
- label: |-
我已检索[项目 wiki](https://github.com/nju-lug/NJUThesis/wiki)
required: true
- label: |-
我已确认这个请求没有在[其他 issues](https://github.com/tuna/issues/issues)中提出过。
required: true
- type: textarea
id: inconvenience
attributes:
label: 现有模板的不便之处
placeholder: 你的请求是否来自于使用上有不好的体验?请简要进行描述。
- type: textarea
id: possible_solution
attributes:
label: 提出可能的解决方案
placeholder: 你认为需要采取什么措施,或者你希望改进后将呈现出什么效果。
validations:
required: true
- type: textarea
id: considerations
attributes:
label: 提出考虑过的方案
placeholder: 请描述你进行过的相关尝试。
- type: textarea
id: more_info
attributes:
label: 额外信息
placeholder: 任何你认为有帮助的信息
- type: markdown
attributes:
value: |
在提交这篇 issue 时,我们默认您服从我们的[行为准则](https://github.com/nju-lug/NJUThesis/blob/master/.github/CODE_OF_CONDUCT.md)。
blank_issues_enabled: true
contact_links:
- name: 讨论
url: https://github.com/nju-lug/NJUThesis/discussions/new
about: 使用上的疑惑可以发在论坛哦
name: Build LaTeX document name: Build
on:
on:
push: push:
branches: branches:
- master - master
tags:
- v*
pull_request: pull_request:
branches: branches:
- master - master
env:
CTAN_URL: https://mirrors.rit.edu/CTAN
PACKAGES: latexmk cleveref enumitem footmisc tex-gyre xits biblatex-gb7714-2015 biber
jobs: jobs:
build_test: build-on-ubuntu:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/v')" if: "!startsWith(github.ref, 'refs/tags/v')"
strategy: env:
matrix: SET_PATH: |
latex: [xelatex, lualatex] export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps: steps:
- name: Set up Git repository - name: Set up Git repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Download njuvisual package (1/2) - name: Install TeX Live
uses: wei/curl@master run: |
with: ${{ env.SET_PATH }}
args: -s -o "njuvisual.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual.dtx" wget ${{ env.CTAN_URL }}/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
- name: Download njuvisual package (2/2) cd install-tl-20* && ./install-tl --profile ../.github/workflows/texlive.profile
uses: wei/curl@master
with: - name: Install latest njuthesis
args: -s -o "njuvisual-curves.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual-curves.dtx" run: |
${{ env.SET_PATH }}
- name: Extract cls from njuthesis tlmgr option repository ${{ env.CTAN_URL }}/systems/texlive/tlnet/
uses: FengChendian/latex-dtx2cls-action@4.0.1 tlmgr install xetex l3build
with: l3build install
root_file: njuthesis.dtx cd scripts
working_directory: ./source/ bash download.sh ${{ env.CTAN_URL }}
cd data
- name: Extract sty from njuvisual wget https://raw.githubusercontent.com/stone-zeng/tl-depend-analysis/data/data/tl-depend.json
uses: FengChendian/latex-dtx2cls-action@4.0.1 cd ..
with: python3 main.py --pkg "${{ env.PACKAGES }}" --exclude "njuthesis-doc.cls"
root_file: njuvisual.dtx tlmgr update --self --all --no-auto-install
working_directory: ./
- name: Compile test file
- name: Copy files to test folder run: |
run: ${{ env.SET_PATH }}
cp ./njuvisual.sty source/njuthesis.cls test/ cd test
latexmk -xelatex -halt-on-error test-xetex-undergraduate
- name: Compile to PDF xelatex -halt-on-error test-xetex-graduate
uses: HermitSun/latex-action@v3 xelatex -halt-on-error test-xetex-graduate-nlcover
with: # latexmk -lualatex -halt-on-error test-luatex
root_file: test.tex
working_directory: ./test/ - name: Upload CLS Files
latexmk_use_${{ matrix.latex }}: true uses: actions/upload-artifact@v4
args: "-bibtex" with:
name: "njuthesis-cls-${{ github.sha }}"
- name: Upload PDF path: |
uses: actions/upload-artifact@v2 build/unpacked/njuthesis.cls
with: build/unpacked/*.def
name: PDF_${{ matrix.latex }}
path:
test/test.pdf
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Set Version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Download njuvisual package (1/2)
uses: wei/curl@master
with:
args: -s -o "njuvisual.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual.dtx"
- name: Download njuvisual package (2/2)
uses: wei/curl@master
with:
args: -s -o "njuvisual-curves.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual-curves.dtx"
- name: Extract cls from njuthesis
uses: FengChendian/latex-dtx2cls-action@4.0.1
with:
root_file: njuthesis.dtx
working_directory: ./source/
- name: Extract sty from njuvisual
uses: FengChendian/latex-dtx2cls-action@4.0.1
with:
root_file: njuvisual.dtx
working_directory: ./
- name: Compile class documentation
uses: HermitSun/latex-action@v3
with:
root_file: njuthesis.dtx
working_directory: ./source/
latexmk_use_xelatex: true
args: "-bibtex"
pre_compile: "xetex njuthesis.dtx"
post_compile: "mv njuthesis.pdf njuthesis-$VERSION.pdf"
- name: Zip RELEASE package
run:
zip -r njuthesis-$VERSION.zip .vscode docs/njuthesis-sample.bib docs/njuthesis-sample.tex source/njuthesis.cls njuvisual.sty conf.txsprofile LICENSE README.md
- name: Zip CTAN package
run:
mkdir -p njuthesis/
cp source/njuthesis-$VERSION.pdf njuthesis/njuthesis.pdf
cp source/README-CTAN.md njuthesis/README.md
cp source/njuthesis.dtx source/njuthesis.ins njuthesis/
zip -r njuthesis-ctan-$VERSION.zip njuthesis/
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files:
source/njuthesis-v*.pdf
njuthesis-v*.zip
njuthesis-ctan-v*.zip
name: Release
on:
push:
branches:
- master
tags:
- v*
env:
CTAN_URL: https://mirrors.rit.edu/CTAN
PACKAGES: cm-unicode tex-gyre tex-gyre-math lexend xits natbib makeindex
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
env:
SET_PATH: |
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Set Version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Install TeX Live
run: |
${{ env.SET_PATH }}
wget ${{ env.CTAN_URL }}/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-20* && ./install-tl --profile ../.github/workflows/texlive.profile
- name: Install latest njuthesis
run: |
${{ env.SET_PATH }}
tlmgr option repository ${{ env.CTAN_URL }}/systems/texlive/tlnet/
tlmgr install xetex l3build
l3build install
cd scripts
bash download.sh ${{ env.CTAN_URL }}
cd data
wget https://raw.githubusercontent.com/stone-zeng/tl-depend-analysis/data/data/tl-depend.json
cd ..
python3 main.py --pkg "${{ env.PACKAGES }}" --exclude "njuthesis.cls"
tlmgr update --self --all --no-auto-install
- name: Install latest ctex
run: |
${{ env.SET_PATH }}
git clone https://github.com/CTeX-org/ctex-kit.git
cd ctex-kit/ctex
l3build install
- name: Install fonts
run: |
mkdir fonts
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-SemiBold.otf
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-Bold.otf
wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SimplifiedChinese/SourceHanSerifSC-Heavy.otf
wget https://github.com/be5invis/Iosevka/releases/download/v15.6.3/ttf-iosevka-15.6.3.zip
unzip ttf-iosevka-15.6.3.zip
cp *.otf /usr/share/fonts/
cp iosevka-lightitalic.ttf /usr/share/fonts/
cp iosevka-light.ttf /usr/share/fonts/
cp iosevka-semibold.ttf /usr/share/fonts/
chmod -x /usr/share/fonts/*.otf
chmod -x /usr/share/fonts/*.ttf
fc-cache -fv
- name: Zip CTAN package
run: |
${{ env.SET_PATH }}
l3build ctan
mv njuthesis-ctan.zip njuthesis-ctan-$VERSION.zip
mv njuthesis.pdf njuthesis-$VERSION.pdf
- name: Zip USER package
run: |
${{ env.SET_PATH }}
mv docs/* .
mv build/unpacked/* .
zip -r njuthesis-user-$VERSION.zip *.def njuthesis-sample* njuthesis.cls nju-*.pdf LICENSE CHANGELOG.md README.md
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
njuthesis-v*.pdf
njuthesis-user-v*.zip
njuthesis-ctan-v*.zip
# From latex3
# https://github.com/latex3/latex3/blob/main/support/texlive.profile
selected_scheme scheme-infraonly
TEXDIR /tmp/texlive
TEXMFSYSCONFIG /tmp/texlive/texmf-config
TEXMFSYSVAR /tmp/texlive/texmf-var
TEXMFLOCAL /tmp/texlive/texmf-local
TEXMFHOME ~/texmf
TEXMFCONFIG ~/.texlive/texmf-config
TEXMFVAR ~/.texlive/texmf-var
option_doc 0
option_src 0
tlpdbopt_autobackup 0
...@@ -14,12 +14,18 @@ ...@@ -14,12 +14,18 @@
## DocStrip generated file ## DocStrip generated file
*.cls *.cls
*.sty *.def
*.ins *.ins
*.sty
!docs/njuthesis-setup.def
## Zip file ## Zip file
*.zip *.zip
## Fonts
*.ttf
*.otf
## Intermediate documents: ## Intermediate documents:
*.hd *.hd
*.dvi *.dvi
...@@ -29,15 +35,18 @@ ...@@ -29,15 +35,18 @@
# these rules might exclude image files for figures etc. # these rules might exclude image files for figures etc.
# *.ps # *.ps
# *.eps # *.eps
*.pdf njuthesis*.pdf
test*.pdf
# Folders # Folders
build/ build/
release/ release/
support/ support/
scripts/data
TDS/ TDS/
temp/ temp/
mythesis/ mythesis/
__pycache__/
## Bibliography auxiliary files (bibtex/biblatex/biber): ## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl *.bbl
......
{ {
"latex-workshop.latex.autoBuild.run": "never", // 禁止自动编译 "latex-workshop.latex.autoBuild.run": "never", // 禁止自动编译
"latex-workshop.latex.recipe.default": "lastUsed", // 使用前一次的编译方法
"latex-workshop.latex.tools": [ "latex-workshop.latex.tools": [
{ {
"name": "xelatex", "name": "xelatex",
...@@ -13,10 +14,23 @@ ...@@ -13,10 +14,23 @@
] ]
}, },
{ {
"name": "latexmk", "name": "latexmk-xe",
"command": "latexmk", "command": "latexmk",
"args": [ "args": [
"-xelatex" "-xelatex",
"-time",
"-interaction=nonstopmode",
"%DOCFILE%"
]
},
{
"name": "latexmk-lua",
"command": "latexmk",
"args": [
"-lualatex",
"-time",
"-interaction=nonstopmode",
"%DOCFILE%"
] ]
}, },
{ {
...@@ -30,15 +44,17 @@ ...@@ -30,15 +44,17 @@
"name": "lualatex", "name": "lualatex",
"command": "lualatex", "command": "lualatex",
"args": [ "args": [
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%" "%DOCFILE%"
] ]
}, },
], ],
"latex-workshop.latex.recipes": [ "latex-workshop.latex.recipes": [
{ {
"name": "latexmk 🔃", "name": "latexmk(xe)",
"tools": [ "tools": [
"latexmk" "latexmk-xe"
] ]
}, },
{ {
...@@ -56,6 +72,12 @@ ...@@ -56,6 +72,12 @@
"xelatex" "xelatex"
] ]
}, },
{
"name": "latexmk(lua)",
"tools": [
"latexmk-lua"
]
},
{ {
"name": "lualatex", "name": "lualatex",
"tools": [ "tools": [
......
# njuthesis 修订记录
本项目发生的变动均会记录于本文档。
本文档格式来自《[更新日志]》,本项目使用《[语义化版本]》标记版本号。
## [未发布]
### 新增
- 增加 cleveref 的复数引用名称 - [#266]
### 修复
- 修复 macoffice 选项下无法自动加载华文中宋问题 - [#269]
- 感谢 [@liudongmiao]!
- 提供新版 LaTeX2e 下兼容 cleveref 的补丁 - [#263]
### 杂项
- 手册匹配 `codehigh` 更新 - [lvjr/codehigh#12]
## [1.4.2] - 2024-11-08
### 新增
- 图表标题区分单行多行设置
- 软性规定标题和图表本身的位置关系 -[#253]
### 修复
- 修复 `macoffice` 配置的变量命名问题
### 变动
- `tableofcontents/toc-entry` 不再会影响插图清单和表格清单 -[#245]
## [1.4.1] - 2024-04-22
### 新增
- 匹配新版盲审模板 - [#185]
- 作者和导师姓名用占位符代替
- 默认显示学校信息
- 恢复显示摘要页的年级
- 成果列表中仅显示期刊和年份
- `anonymous` 选项不接受输入值
- 盲审模式可选择是否隐藏学校信息 - [#251]
- 新增 `anonymous-mode/no-nju` 选项
### 修复
- 修复成果列表中文姓名加粗的问题 - [#192]
- 修复 LuaLaTeX 下华文中宋的载入问题
- 修复 LuaLaTeX 下的摘要页多余换行 - [#248]
## [1.4.0] - 2024-03-19
### 新增
- 增加 `macoffice` 字体配置 - [#164],[#169]
- 感谢 [@liudongmiao]!
### 修复
- 修复定理类环境在共享计数器时的 `cleveref` 引用名问题 - [#234]
- 将部分 `hyperref` 默认设置项放在导言区前以便用户覆盖
- 修正 `tabularray` 默认标题间距
- 修复本科生诚信承诺书的换行问题
- 修复导师名和职称之间没有空格的问题 - [#243]
- 使用正确的变量类型 - [#240],[#243]
- 感谢 [@muzimuzhi]!
- 匹配 l3doc 的修改 - [CTeX-org/ctex-kit#700], [CTeX-org/ctex-kit#703]
- `draft` 选项不接受输入值
### 杂项
- 跟进 2024 届本科毕业论文规定
- 美化 issue template 样式 - [#241]
- 感谢 [@muzimuzhi]!
## [1.3.2] - 2023-12-05
### 变动
- 调整专业型学位封面的 `info/major` 项填写逻辑 - [#232]
- 感谢 [@liudongmiao]!
### 修复
- 修复双导师命令问题 - [#230]
## [1.3.1] - 2023-11-14
### 新增
- 整合表格环境字体设置 - [#94]
- 可以手动指定华文中宋文件位置 - [#229]
- 匹配 LaTeX3 的 e 型展开修改 - [CTeX-org/ctex-kit#678]
### 修复
- 修复英文标题超长引发的页面元素混乱 - [#217]
- 修复英文标题手动换行与摘要页的冲突 - [#227]
### 杂项
- 将 CI 上传的 PDF 更换为模板格式文件
## [1.3.0] - 2023-06-06
### 新增
- 新增定理类环境共享计数器选项 `theorem/share-counter` - [#207]
- 自动补全研究生专业型学位封面上的专业信息 - [#208]
- 增加 `info/major` 定义方式
### 修复
- 修复批量创建环境时缺少 `\crefname` 的问题 - [#206]
- 修复禁用 `unicode-math` 时仍会配置数学字体的问题 - [#216]
- 修复非研究生类型时调用 `nl-cover` 选项的错误
- 将本科生封面信息恢复至 v1.1 的宋体格式
- 修复研究生出版授权书的打勾机制 - [#223]
### 杂项
- 手册源码部分添加语法高亮
- 手册样式设置拆分为单独的 `njuthesis-doc.cls`
- 默认密级信息修改为“公开” - [#213]
- 使用 [`tl-depend-analysis`] 重构 CI 脚本
- 感谢 [@stone-zeng]!
## [1.2.1] - 2023-05-03
### 修复
- 修复国家图书馆封面学位丢失的学位名称 - [#204]
- 新增研究生中文学位名称选项 `info/degree` - [#200]
- 修复研究生封面上学号下划线长度不足的问题
### 杂项
- 提供紫色版本的校名校徽图片
## [1.2.0] - 2023-05-02
### 新增
- 跟进 2023 年研究生学位论文模板新设计 - [#204]
- 新增研究生英文学位名称选项 `info/degree*` - [#200]
- 新增研究生英文摘要条目内容下划线选项 `abstract/underline` - [#202]
### 修复
- 更正本科生模板封面和承诺书样式
- 盲审模式下隐藏年级和学校名称 - [#181]
- 修复章末参考文献表与成果列表的冲突问题 - [#191]
## [1.1.2] - 2023-01-15
### 修复
- 补回研究生英文摘要页的下划线 - [#166]
- 修复研究生封面上第二导师的显示问题 - [#172]
- 修复 `\njusetname` 的可选参数问题
### 变动
- 本科生模板封面校徽居中 - [#173]
### 杂项
- 跟进 2023 届本科毕业论文规定
- 跟进新版南大 TeX 网站
## [1.1.1] - 2022-12-04
### 修复
- 修复研究生封面上导师信息的居中问题 - [#165]
- 修复 macOS 下 Times New Roman 字体缺失字型的问题 - [#169]
- 感谢 [@AlphaZTX]!
- 修复国家图书馆封面的编译死循环问题 - [#170]
### 杂项
- 手册中暂时撤去关于南大 TeX 网站的内容
## [1.1.0] - 2022-10-23
### 新增
- 盲审模式下不显示致谢
- 新增脚注圈码选项 `footnote/circled``footnote/circled*` - [#129]
- 新增脚注的悬挂缩进选项 `hang` - [#129]
### 修复
- 修复国家图书馆封面的编译错误
- 修复研究生英文封面的学位信息
- 更正盲审模式隐藏的个人信息类别
- 修复 `\le``\ge` 的定义
### 变动
- 脚注默认进行悬挂缩进
### 杂项
- 手册中以黄色突出选项
## [1.0.0] - 2022-08-07
### 新增
- 新增博士后出站报告模板
- 新增数学字体选项 `math-font`
- 新增默认字号选项 `zihao`
- 新增行距选项 `linespread`
- 新增最小化模式选项 `minimal`
- 新增禁用若干内置宏包的选项
- `\njusetup` 提供更多选项输入模式
- 可为目录中的章标题添加引导线 - [#66]
- 新增编号连接符设置 `label-sep` - [#134]
- 适配 `tabularray` 的表格样式设置 - [#134]
- 新增一系列数学符号选项 `math` - [#142]
- 可使用 `\njusetlength` 修改下划线的宽度和偏移 - [#155]
- 可使用 `\njusetformat` 修改本科摘要标签格式 - [#155]
- 为页面对象添加书签属性
### 修复
- 修正元素对象的底部间距设置
### 变动
- 调整 `type``degree` 文档类选项的定义 - [#117]
- 移除毕业设计封面
- `nlcover` 选项更名为 `nl-cover`
- `blind` 选项更名为 `anonymous`
- 调整定理类环境选项 `theorem`
- 摘要、目录、页眉页脚设置项更名
- 调整研究生模板的封面布局 - [#144]
- 移除研究生英文摘要的下划线
- 移除内置的 `mathtools`
- 内部变量与函数重新命名
### 杂项
- 删除手册中的基础教学内容
- 在手册中以不同颜色指示不同模块
## [0.20.0] - 2022-06-10
### 新增
- 日期设置项可以通过留空生成空白的年月日字样 - [#150]
- 自动处理大于四的评审委员会人数 - [#150]
- 可使用 `\njusetformat` 修改页眉页脚样式
- 可使用 `\njusetformat` 修改内置校名校徽颜色
### 修复
- 修复 0.19.0 版本中错误的研究生英文封面日期
- 修复 0.19.0 版本中错误的本科生目录条目样式
- 修复英文关键词列表不整齐的缩进间距
- 更正本科模板部分字样
## [0.19.0] - 2022-05-23
### 新增
- 可使用 `\njusetformat` 修改默认页面样式
- 对封面上的超宽文字进行压缩
- 支持专硕封面的特殊标签格式 - [#147]
- 跟进新版本科生诚信承诺书样式
- 国家图书馆样式更新
- 添加学位授予日期设置项 `info/confer-date` - [#150]
- 添加底部日期设置项 `info/bottom-date`
### 修复
- 图表标题使用粗体 -[#139]
- 修复成果列表与章末参考文献表的冲突 -[#148]
### 变动
- 将国家图书馆封面的标题字样修改为“学位论文”
- 将国家图书馆封面的评审委员会人数分离为单独参数
- 更正研究生模板普通封面上学硕和专硕不同的专业名称字样
### 杂项
- 修正文档笔误 - [#137]
- 感谢 [@note286]!
## [0.18.0] - 2022-05-01
### 新增
- 新增内置定理环境的若干设置项 - [#50]
- 新增脚注设置项 - [#129]
- 编号可使用带圈数字
- 新增盲审模式 - [#130]
### 修复
- 正确生成出版授权书前后的空白页
- 删除出版授权书页的页眉 - [#130]
- 出版授权书内双导师姓名之间添加空格 - [#130]
- 设置4、5级标题的样式
### 变动
- 微调校名校徽尺寸
### 杂项
- 说明手册中补充数学符号格式说明
## [0.17.0] - 2022-04-09
### 新增
- 提供修改固定文本的接口 - [#111]
- 提供修改长度值的接口 - [#121]
- 提供修改默认样式的接口
- 提供研究生的学位论文出版授权书 - [#116]
### 优化
- 优化封面标题的断行方式 - [#121]
- PDF 书签中不显示额外空格
### 杂项
- 说明手册中补充扫描声明页的插入方法 - [#96]
- 说明手册中增加“额外定制”一节
- 说明手册中补充页眉说明 - [#119]
- 说明手册跟进 TeX Live 2022
## [0.16.1] - 2022-03-27
### 修复
- 修复国家图书馆封面的“UDC”名称格式
- 修复研究生摘要标题的断行问题 - [#98], [#105], [#107]
- 提供 `style/abstract-title` 设置项
- 为研究生摘要补上“摘要”小标题字样 - [#99]
## [0.16.0] - 2022-03-19
### 新增
- 将本科生和研究生模板定义分离为单独的 `.def` 文件 - [#46]
- 可以手动指定页眉页脚 - [#85]
- 新增 `style/header` 等若干设置项
### 修复
- 研究生模板的目录、摘要等页面也显示页眉 - [#99]
### 变动
- 取消对 `njuvisual` 宏包的强制依赖
- 简化自动安装脚本
### 杂项
- 说明手册中增加对 JabRef 软件的简介
- 感谢 [@zhoujian9410]!
- 说明手册中增加数学字体样式说明 - [#89], [#92]
- 感谢 [@zepinglee]!
- 说明手册中增加宏包依赖信息
## [0.15.0] - 2022-02-20
### 新增
- 新增符号表页面 `notation` - [#61]
- 可选择是否隐藏特定目录条目
- 新增选项 `style/abstract-in-toc` - [#66]
- 新增选项 `style/toc-in-toc`
- 可使用自定义的参考文献样式 - [#71]
- 修改选项 `bib/style`
- 可传入自定义 `biblatex` 设置
- 新增选项 `bib/option`
- 增加对章末参考文献表的支持 - [#79]
- 感谢 [@hushidong]!
### 修复
- 修复了单面模式下的 `fancyhdr` 宏包警告
- 修复研究生封面上第二导师无法正确显示的问题 - [#64]
### 变动
- 为关键词列表添加悬挂缩进
- 研究生模板页眉样式及内容变动
- 使用小号楷体
- 双面模式下奇数页右侧为节名,偶数页左侧为章名
- 单面模式下页眉同时显示章节名,特殊页面居中显示其名称
- 移除内部调用的宏包
- `url`
### 优化
- 使用 `xtemplate` 重新绘制封面 - [#46]
### 杂项
- 使用 GitHub 表单重构 issue 模板
- 将使用问题引导至项目论坛
## [0.14.0] - 2022-01-16
### 新增
- 新增单双面模式 `oneside``twoside` 选项
- 新增参考文献设置项 `bib`
- 提供设置文献表样式的 `bib/style` 选项 - [#44]
- 提供导入多个文献源的 `bib/resource` 选项
- 新增外观样式设置项 `style`
- 提供更改封面校徽图片的 `style/emblem-img` 选项
- 提供更改封面校名图片的 `style/name-img` 选项
- 新增 Adobe 思源宋体 `cjk-font=source` 选项
### 变动
- 选项名称变更
- 原创性声明页选项更名为 `decl-page`
- 导师姓名职称合并在 `info/supervisor` 填写 - [#60]
- 感谢 [@zepinglee]!
- 标题选项 `info/title` 使用 `\\` 进行手动换行 - [#60]
- 感谢 [@zepinglee]!
- 使用 ISO 格式统一标记提交日期 `info/submit-date`
- 感谢 [@zepinglee]!
- 交付用户的压缩包更名为 `njuthesis-user-v*.zip`
### 移除
- 移除封面个人信息设置项
- `info/supervisor-title`
- `info/supervisor-title*`
- `info/supervisor-ii-title`
- `info/supervisor-ii-title*`
- `info/submit-date*`
- 移除内部调用的宏包
- `hologo`
- `multirow`
- `subcaption`
- `wrapfig`
### 杂项
- 将本模板内嵌入[南大 TeX] 网站
- 编写修订记录
- 修改 GitHub issue 模板,添加行为准则
- 说明手册样式调整
- 封面标题使用粗体
## [0.13.1] - 2021-12-15
<!-- 这个版本有新增功能,本应合并到 v0.14.0 -->
### 新增
- 新增草稿模式 `draft` 选项
- `orig-decl` 选项可绘制本科生诚信承诺书页面
### 变动
- 摘要格式更正
### 杂项
- 在 CTAN 发布压缩包中添加许可证文件
- 在手册中使用南大标准色作为超链接颜色
## [0.13.0] - 2021-12-13
### 修复
- 修正数学字体
- 修复页眉字符重叠的问题
### 变动
- 选项名称变更
- 英文字体选项更名为 `latin-font`
- 中文字体选项更名为 `cjk-font`
- Windows 字库选项更名为 `win`
- macOS 字库选项更名为 `mac`
- 导师信息选项名称变更为:
- `info/supervisor`
- `info/supervisor*`
- `info/supervisor-title`
- `info/supervisor-title*`
- `info/supervisor-ii`
- `info/supervisor-ii*`
- `info/supervisor-ii-title`
- `info/supervisor-ii-title*`
### 优化
- 使用 `ntheorem` 重新定制定理环境
- 使用 `ctex` 提供的命令重新定制目录样式
- 使用 LaTeX3 语法重构封面绘制命令 - [#52]
- 使用 LaTeX3 语法重构摘要绘制命令 - [#52]
### 移除
- 移除封面个人信息设置项
- `info/titlea`
- `info/titleb`
- `info/titlec`
- 移除内部调用的宏包
- `amsthm`
- `listings`
- `microtype`
- `thmtools`
- `tocloft`
## [0.12.0] - 2021-11-30
### 变动
- 将内置的 `njuvisual` 分离为独立宏包 - [#44]
- 隐式加载 `xparse`
### 杂项
- 仿照 `fduthesis` 重新组织仓库的目录结构
### 杂项
- 优化 GitHub Actions 脚本
- 新增自动安装脚本
- 手册封面添加校徽水印
## [0.11.3] - 2021-11-23
### 杂项
- 仓库中提供 TeXstudio 配置文件
## [0.11.1] - 2021-10-23
### 新增
- 对依赖的宏包进行版本检测
## [0.11.0] - 2021-10-01
### 新增
- 新增成果列表命令 `\njupaperlist`
- 将文档信息写入 PDF 元数据
### 变动
- 使用小写字母加连字符的形式重命名个人信息选项
## [0.10.0] - 2021-09-24
### 新增
- 将校名校徽图片内置化
- 使用 `njuvisual.sty` 储存 Tikz 图形
### 修复
- 修复 LuaLaTeX 编译后 PDF 书签不正确的问题 - [#14]
### 变动
## [0.9.0] - 2021-09-15
### 新增
- 使用 DocStrip 合并项目源代码
### 变动
<!-- 以下版本较为陈旧,已被完全重构 -->
## 0.3.0 -> [0.8.4] - 2021-09-12
### 新增
- 以 [NJU Thesis 2021] 为基础构建了初步可用的模板。
- 实现了本科生毕业论文或设计模板
- 实现了研究生学位论文模板
### 杂项
- 通过 GitHub Actions 实现了自动测试和打包发布
- 模板上传至 CTAN
[未发布]: https://github.com/nju-lug/NJUThesis/compare/v1.4.2...HEAD
[1.4.2]: https://github.com/nju-lug/NJUThesis/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/nju-lug/NJUThesis/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/nju-lug/NJUThesis/compare/v1.3.2...v1.4.0
[1.3.2]: https://github.com/nju-lug/NJUThesis/compare/v1.3.1...v1.3.2
[1.3.1]: https://github.com/nju-lug/NJUThesis/compare/v1.3.0...v1.3.1
[1.3.0]: https://github.com/nju-lug/NJUThesis/compare/v1.2.1...v1.3.0
[1.2.1]: https://github.com/nju-lug/NJUThesis/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/nju-lug/NJUThesis/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/nju-lug/NJUThesis/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/nju-lug/NJUThesis/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/nju-lug/NJUThesis/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/nju-lug/NJUThesis/compare/v0.20.0...v1.0.0
[0.20.0]: https://github.com/nju-lug/NJUThesis/compare/v0.19.0...v0.20.0
[0.19.0]: https://github.com/nju-lug/NJUThesis/compare/v0.18.0...v0.19.0
[0.18.0]: https://github.com/nju-lug/NJUThesis/compare/v0.17.0...v0.18.0
[0.17.0]: https://github.com/nju-lug/NJUThesis/compare/v0.16.0...v0.17.0
[0.16.1]: https://github.com/nju-lug/NJUThesis/compare/v0.16.0...v0.16.1
[0.16.0]: https://github.com/nju-lug/NJUThesis/compare/v0.15.0...v0.16.0
[0.15.0]: https://github.com/nju-lug/NJUThesis/compare/v0.14.0...v0.15.0
[0.14.0]: https://github.com/nju-lug/NJUThesis/compare/v0.13.1...v0.14.0
[0.13.1]: https://github.com/nju-lug/NJUThesis/compare/v0.13.0...v0.13.1
[0.13.0]: https://github.com/nju-lug/NJUThesis/compare/v0.12.0...v0.13.0
[0.12.0]: https://github.com/nju-lug/NJUThesis/compare/v0.11.3...v0.12.0
[0.11.3]: https://github.com/nju-lug/NJUThesis/compare/v0.11.0...v0.11.3
[0.11.0]: https://github.com/nju-lug/NJUThesis/compare/v0.10.0...v0.11.0
[0.10.0]: https://github.com/nju-lug/NJUThesis/compare/v0.9.0...v0.10.0
[0.9.0]: https://github.com/nju-lug/NJUThesis/compare/v0.8.4...v0.9.0
[0.8.4]: https://github.com/nju-lug/NJUThesis/compare/v0.3.0...v0.8.4
[#14]: https://github.com/nju-lug/NJUThesis/issues/14
[#44]: https://github.com/nju-lug/NJUThesis/issues/44
[#46]: https://github.com/nju-lug/NJUThesis/issues/46
[#50]: https://github.com/nju-lug/NJUThesis/issues/50
[#52]: https://github.com/nju-lug/NJUThesis/issues/52
[#60]: https://github.com/nju-lug/NJUThesis/issues/60
[#61]: https://github.com/nju-lug/NJUThesis/issues/61
[#64]: https://github.com/nju-lug/NJUThesis/issues/64
[#66]: https://github.com/nju-lug/NJUThesis/issues/66
[#71]: https://github.com/nju-lug/NJUThesis/discussions/71
[#79]: https://github.com/nju-lug/NJUThesis/issues/79
[#85]: https://github.com/nju-lug/NJUThesis/discussions/85
[#89]: https://github.com/nju-lug/NJUThesis/discussions/89
[#92]: https://github.com/nju-lug/NJUThesis/issues/92
[#94]: https://github.com/nju-lug/NJUThesis/discussions/94
[#96]: https://github.com/nju-lug/NJUThesis/issues/96
[#98]: https://github.com/nju-lug/NJUThesis/issues/98
[#99]: https://github.com/nju-lug/NJUThesis/discussions/99
[#105]: https://github.com/nju-lug/NJUThesis/discussions/105
[#107]: https://github.com/nju-lug/NJUThesis/issues/107
[#111]: https://github.com/nju-lug/NJUThesis/issues/111
[#116]: https://github.com/nju-lug/NJUThesis/issues/116
[#117]: https://github.com/nju-lug/NJUThesis/issues/117
[#119]: https://github.com/nju-lug/NJUThesis/issues/119
[#121]: https://github.com/nju-lug/NJUThesis/issues/121
[#129]: https://github.com/nju-lug/NJUThesis/issues/129
[#130]: https://github.com/nju-lug/NJUThesis/issues/130
[#131]: https://github.com/nju-lug/NJUThesis/issues/131
[#134]: https://github.com/nju-lug/NJUThesis/discussions/134
[#137]: https://github.com/nju-lug/NJUThesis/issues/137
[#139]: https://github.com/nju-lug/NJUThesis/discussions/139
[#142]: https://github.com/nju-lug/NJUThesis/issues/142
[#144]: https://github.com/nju-lug/NJUThesis/issues/144
[#147]: https://github.com/nju-lug/NJUThesis/discussions/147
[#148]: https://github.com/nju-lug/NJUThesis/issues/148
[#150]: https://github.com/nju-lug/NJUThesis/discussions/150
[#155]: https://github.com/nju-lug/NJUThesis/discussions/155
[#164]: https://github.com/nju-lug/NJUThesis/issues/164
[#165]: https://github.com/nju-lug/NJUThesis/discussions/165
[#166]: https://github.com/nju-lug/NJUThesis/discussions/166
[#169]: https://github.com/nju-lug/NJUThesis/issues/169
[#170]: https://github.com/nju-lug/NJUThesis/issues/170
[#172]: https://github.com/nju-lug/NJUThesis/issues/172
[#173]: https://github.com/nju-lug/NJUThesis/issues/173
[#181]: https://github.com/nju-lug/NJUThesis/issues/181
[#191]: https://github.com/nju-lug/NJUThesis/issues/191
[#192]: https://github.com/nju-lug/NJUThesis/discussions/192
[#200]: https://github.com/nju-lug/NJUThesis/discussions/200
[#202]: https://github.com/nju-lug/NJUThesis/discussions/202
[#204]: https://github.com/nju-lug/NJUThesis/issues/204
[#206]: https://github.com/nju-lug/NJUThesis/issues/206
[#207]: https://github.com/nju-lug/NJUThesis/issues/207
[#208]: https://github.com/nju-lug/NJUThesis/issues/208
[#213]: https://github.com/nju-lug/NJUThesis/issues/213
[#216]: https://github.com/nju-lug/NJUThesis/issues/216
[#217]: https://github.com/nju-lug/NJUThesis/issues/217
[#223]: https://github.com/nju-lug/NJUThesis/issues/223
[#227]: https://github.com/nju-lug/NJUThesis/issues/227
[#229]: https://github.com/nju-lug/NJUThesis/discussions/229
[#230]: https://github.com/nju-lug/NJUThesis/issues/230
[#232]: https://github.com/nju-lug/NJUThesis/issues/232
[#234]: https://github.com/nju-lug/NJUThesis/issues/234
[#243]: https://github.com/nju-lug/NJUThesis/issues/243
[#245]: https://github.com/nju-lug/NJUThesis/discussions/245
[#248]: https://github.com/nju-lug/NJUThesis/issues/248
[#251]: https://github.com/nju-lug/NJUThesis/discussions/251
[#253]: https://github.com/nju-lug/NJUThesis/pull/253
[#263]: https://github.com/nju-lug/NJUThesis/issues/263
[#266]: https://github.com/nju-lug/NJUThesis/discussions/266
[#269]: https://github.com/nju-lug/NJUThesis/pull/269
[CTeX-org/ctex-kit#678]: https://github.com/CTeX-org/ctex-kit/pull/678
[CTeX-org/ctex-kit#700]: https://github.com/CTeX-org/ctex-kit/pull/700
[CTeX-org/ctex-kit#703]: https://github.com/CTeX-org/ctex-kit/pull/703
[lvjr/codehigh#12]: https://github.com/lvjr/codehigh/issues/12
[更新日志]: https://keepachangelog.com/zh-CN/1.0.0/
[语义化版本]: https://semver.org/lang/zh-CN/
[南大 TeX]: https://tex.nju.edu.cn/
[NJU Thesis 2021]: https://github.com/FengChendian/NJUThesis2021
[`tl-depend-analysis`]: https://github.com/stone-zeng/tl-depend-analysis/
[@zepinglee]: https://github.com/zepinglee
[@hushidong]: https://github.com/hushidong
[@zhoujian9410]: https://github.com/zhoujian9410
[@note286]: https://github.com/note286
[@AlphaZTX]: https://github.com/AlphaZTX
[@stone-zeng]: https://github.com/stone-zeng
[@liudongmiao]: https://github.com/liudongmiao
[@muzimuzhi]: https://github.com/muzimuzhi
###############################################################################
#
# Makefile for the user manual of njuthesis
#
# Copyright (C) 2013 Haixing Hu,
# Department of Computer Science and Technology, Nanjing University.
#
# Home Page of the Project: https://github.com/Haixing-Hu/nju-thesis
#
###############################################################################
PROJECT=njuthesis
TEXSOURCE=$(shell ls *.tex)
BIB=njuthesis.bib
.PHONY: all clean
all: $(PROJECT).pdf
$(PROJECT).pdf: $(PROJECT).tex $(BIB) $(TEXSOURCE)
xelatex $(PROJECT).tex
biber $(PROJECT)
xelatex $(PROJECT).tex
xelatex $(PROJECT).tex
###### clean
clean:
-@rm -f \
*.aux \
*.bak \
*.bbl \
*.bcf \
*.blg \
*.dvi \
*.glo \
*.gls \
*.idx \
*.ilg \
*.ind \
*.ist \
*.loe \
*.lof \
*.log \
*.lot \
*.out \
*.ps \
*.run.xml \
*.thm \
*.toc \
The `njuthesis` class The `njuthesis` class
===================== =====================
The `njuthesis` class is intended for typesetting Nanjing University dissertations with LaTeX, providing support for bachelor, masters, and doctoral thesis. Compilation of this class requires either `xelatex` or `lualatex` engine. The `njuthesis` class is intended for typesetting Nanjing University
dissertations with LaTeX, providing support for bachelor, master,
doctoral thesis and postdoctoral report. Compilation of this class
requires either `xelatex` or `lualatex` engine.
Usage
-----
A minimal example of this document class should look like
```LaTeX
\documentclass{njuthesis}
\njusetup{}
\begin{document}
\maketitle
\tableofcontents
\mainmatter
\chapter{Welcome}
Hello \LaTeX{}
\printbibliography
\end{document}
```
Contributing Contributing
------------ ------------
...@@ -13,7 +34,7 @@ are always welcome. ...@@ -13,7 +34,7 @@ are always welcome.
Wiki Wiki
---- ----
Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki) Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki).
License License
------- -------
...@@ -25,4 +46,4 @@ version. ...@@ -25,4 +46,4 @@ version.
----- -----
Copyright (C) 2021 by NJU LUG. Copyright (C) 2021 - 2025 by NJU LUG.
# NJU Thesis # NJU Thesis: 南京大学学位论文 LaTeX 模板
[![njuthesis](https://img.shields.io/badge/njuthesis-latex-blue)](https://git.nju.edu.cn/nju-lug/nju-latex-templates)
[![overleaf](https://img.shields.io/badge/overleaf-supported-brightgreen)](https://tex.nju.edu.cn)
![build status](https://github.com/nju-lug/NJUThesis/actions/workflows/build.yml/badge.svg) ![build status](https://github.com/nju-lug/NJUThesis/actions/workflows/build.yml/badge.svg)
[![CTAN](https://img.shields.io/ctan/v/njuthesis.svg)](https://www.ctan.org/pkg/njuthesis)
[![GitHub release](https://img.shields.io/github/release/nju-lug/NJUThesis/all.svg)](https://github.com/nju-lug/NJUThesis/releases/latest)
[![overleaf](https://img.shields.io/badge/online_editor-supported-brightgreen)](https://tex.nju.edu.cn/template)
[![nju-git](https://img.shields.io/gitlab/stars/nju-lug/nju-latex-templates/njuthesis?gitlab_url=https%3A%2F%2Fgit.nju.edu.cn&style=social)](https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis)
> 此项目是基于[NJU thesis 2021](https://github.com/FengChendian/NJUThesis2021)的重构版本,目前本科生及研究生版本**已经基本重构完成**。 `njuthesis` 是制作南京大学本科生毕业论文、研究生学位论文、博士后出站报告的 LaTeX 文档类。本模板基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学排版要求和相应的国家标准的学位论文,力求通过 LaTeX3 语法实现清晰的实现逻辑、较高的可定制性以及友好的用户接口。
> 然而,研究生院并未提供完善的规定,部分格式来自于本科生院。**如果院系另有要求,请提交issue**。
原来的[NJU thesis 2021](https://github.com/FengChendian/NJUThesis2021)模板太过古老并且不支持硕士、博士论文,目前难以维护,因此为了模板的可持续发展,现在将对该项目进行重构,项目挂载于[NJU-LUG](https://github.com/nju-lug)组织仓库下,目前已[发布在CTAN](https://ctan.org/pkg/njuthesis)
相关文档请参见[本项目wiki](https://github.com/nju-lug/NJUThesis/wiki)
## 快速开始 ## 快速开始
对于普通用户,推荐使用下述的**南大TeX编译方法** 请首先阅读[用户手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf),其中详尽阐述了模板的特性和使用方法。
### 本地编译
1. [从南大镜像站下载](https://mirror.nju.edu.cn/download/app/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F)并安装最新的TeX发行版(推荐MiKTeX),并更新所有宏包
2. 下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包`njuthesis.zip`
3. 根据需要更改`njuthesis-sample.tex`文件中的内容
4. 在模板根目录下运行`latexmk`运行编译,得到对应的PDF文件
#### 关于本地编译
- 模板支持`latexmk``xelatex``lualatex`三种编译方式 对于普通用户,首要推荐使用下述的**南大 TeX 编译方法**
- 如果使用`latexmk`,请务必使用完整的命令`latexmk -xelatex`以免产生不必要的问题
- 如果使用`xelatex``lualatex`,需要按照`xelatex/lualatex` -> `biber` -> `xelatex/lualatex` -> `xelatex/lualatex`的顺序编译四次
- 仓库中`.vscode`附带一份VScode的LaTeX WorkShop的配置文件,可根据需要使用
### [南大TeX](https://tex.nju.edu.cn)编译 ### 南大 TeX 编译
[南大TeX](https://tex.nju.edu.cn)eScience中心为南大在校师生提供的在线LaTeX编译平台,已*预置本模板*。只需参考`njuthesis-sample.tex`新建文档,在项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX``LuaLaTeX`即可编写论文,不必上传`.cls`等格式文件 [南大 TeX](https://tex.nju.edu.cn)[eScience 中心](https://sci.nju.edu.cn)为南大在校师生提供的在线 LaTeX 写作平台,已*安装有本模板的最新版*。注册登录后,只需在**创建新项目**菜单中选择**论文模板**即可开始写作
#### 上传模板的方法(不推荐) **使用本平台时,请积极备份自己的文稿。**
如果希望对模板格式进行修改,或者南大TeX安装的版本未及时更新错误补丁,也可以自行上传本模板进行在线写作。 ### 本地编译
1. 下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包`njuthesis.zip`
2. 登录[南大TeX](https://tex.nju.edu.cn),点击New Project -> Upload Project上传刚刚得到的压缩包,上传后`njuthesis-sample.tex``njuthesis.cls`等文件应在根目录,0.10.0以后的目录结构如下所示:
```shell
NJUThesis/
│ njuthesis-sample.bib
│ njuthesis-sample.tex
│ njuthesis.cls
│ njuvisual.sty
```
3. 在南大TeX项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX``LuaLaTeX`
4. 编写TeX文档
### 关于DocStrip文件
从0.9.0版以后,本模板以DocStrip(`.dtx`)格式进行维护。常规的`.cls``.sty`格式文件可从Releases页面下载或使用以下方法提取。我们只建议有经验的同学使用这一文件 推荐使用包管理器安装 `njuthesis``njuvisual` 的最新版
DocStrip格式合并了LaTeX源代码和说明文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端 新手同学不妨直接使用以下流程
- 输入`xetex njuthesis.dtx`以提取宏包内容 1. [从南大镜像站下载](https://mirror.nju.edu.cn/download/app/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F)并安装最新的 TeX 发行版,并更新所有宏包
- 输入`latexmk njuthesis.dtx`以生成并查看内置的文档 2. 下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包 `njuthesis-user-v*.zip`
3. 根据需要更改 `njuthesis-sample.tex` 文件中的内容
4. 在模板根目录下运行 `latexmk -xelatex` 运行编译,得到对应的 PDF 文件
请注意,由于文件重名原因,项目中的示例论文模板已被重命名为`njuthesis-sample.tex` ### 典型结构
### 其他 ```LaTeX
\documentclass{njuthesis}
\njusetup{}
\begin{document}
\maketitle
\tableofcontents
\mainmatter
\chapter{欢迎}
使用 \LaTeX{}
\printbibliography
\end{document}
```
更多内容请参见项目Wiki中的[使用说明](https://github.com/nju-lug/NJUThesis/wiki/%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E) ## 反馈
你也可以下载[Release](https://github.com/nju-lug/NJUThesis/releases/latest)中附带的`njuthesis.pdf`,里面详尽阐述了模板的特性和使用方法。 在你遇到模板问题时,请遵守以下步骤:
## 常见问题 1. 在《[修订记录](https://github.com/nju-lug/NJUThesis/blob/master/CHANGELOG.md)》查看该问题是否已经修复但未发布;
- 若是,则可以使用仓库中的开发版本解决问题
1.[GitHub Issues](https://github.com/nju-lug/NJUThesis/issues)[Discussions](https://github.com/nju-lug/NJUThesis/discussions) 中搜索该问题的关键词;
1. 浏览[本项目 Wiki](https://github.com/nju-lug/NJUThesis/wiki)[用户手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf)
1. 在你确定这是一个新问题时
- 对于模板 bug、请求新功能、文档笔误等提出[新 issue](https://github.com/nju-lug/NJUThesis/issues/new/choose)
- 对于用法的疑惑、格式上的斟酌等提出[新 discussion](https://github.com/nju-lug/NJUThesis/discussions/new)
- 两个划分不绝对,区别在于 issue 是解决即关闭的
- 如果确实重复了,会打上 duplicate 标签并将你引导至本问题首条提问
请参见[常见问题](https://github.com/nju-lug/NJUThesis/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) 如果导师或院系有额外要求,请一同附上要求原文或格式截图
## 贡献 ## 贡献
如果你发现了模板的问题,欢迎在Github中[提交issue](https://github.com/nju-lug/NJUThesis/issues)或者PR 欢迎提交 [PR](https://github.com/nju-lug/NJUThesis/pulls)
## 许可 ## 许可
本模板的发布遵守 [LaTeX Project Public License(版本 1.3c 或更高)](https://www.latex-project.org/lppl/lppl-1-3c/) 本模板的发布遵守 [LaTeX Project Public License(版本 1.3c 或更高)](https://www.latex-project.org/lppl/lppl-1-3c/)
...@@ -3,18 +3,20 @@ ...@@ -3,18 +3,20 @@
-- Build script for njuthesis. -- Build script for njuthesis.
-- run with `l3build` -- run with `l3build`
module = "njuthesis" module = "njuthesis"
checkengines = {"xetex", "luatex"} checkengines = {"xetex", "luatex"}
checkopts = "-interaction=batchmode" checkopts = "-interaction=batchmode"
ctanreadme = "README-CTAN.md" textfiles = {"LICENSE", "README*.md", "*.ins"}
ctanreadme = "README-CTAN.md"
sourcefiles = {"source/*.dtx"} sourcefiledir = "source"
installfiles = {"*.cls"} sourcefiles = {"*.dtx"}
installfiles = {"*.cls", "*.def"}
typesetexe = "xelatex" typesetexe = "xelatex"
typesetfiles = {"njuthesis.dtx"} typesetfiles = {"njuthesis.dtx"}
unpackfiles = {"njuthesis.dtx"} unpackexe = "xetex"
unpackexe = "xetex" unpackfiles = {"njuthesis.dtx"}
File added
File added
File added
File added
@ARTICLE{njuthesis, @article{preskill2018,
title = {南京大学学士学位论文 LaTeX 模板}, title = {Quantum {{Computing}} in the {{NISQ}} Era and Beyond},
AUTHOR = {NJU-LUG}, author = {Preskill, John},
JOURNALTITLE = {Github}, author+an = {1=thesisauthor},
YEAR = {2021} date = {2018-08-06},
} journaltitle = {Quantum},
@book{goossens93, volume = {2},
author = "Frank Mittelbach and Michel Goossens and Johannes Braams and David Carlisle and Chris Rowley", pages = {79},
title = "The {LaTeX} Companion", publisher = {{Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften}},
year = "1993", doi = {10.22331/q-2018-08-06-79},
publisher = "Addison-Wesley", url = {https://quantum-journal.org/papers/q-2018-08-06-79/},
address = "Reading, Massachusetts" urldate = {2022-10-27},
} langid = {british}
@ARTICLE{segl03,
AUTHOR = "Segletes, S. B. AND Walters, W. P.",
TITLE = {Extensions to the Exact Solution of the Long-Rod
Penetration/Erosion Equations},
JOURNAL = "IJIE",
YEAR = "2003",
VOLUME = "28",
PAGES = "363--376"
} }