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 (247)
Showing
with 1160 additions and 206 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: 新功能需求
about: 提出可以改进的要点
title: "[FEATURE]"
labels: enhancement
assignees: ''
---
**现有模板的不便之处**
你的请求是否来自于使用上有不好的体验?请简要进行描述。
**提出可能的解决方案**
你认为需要采取什么措施,或者你希望改进后将呈现出什么效果。
**提出考虑过的方案**
请描述你进行过的相关尝试。
**额外信息**
任何你认为有帮助的信息。
---
name: 问题报告
about: 提出需要修复的问题
title: "[BUG]"
labels: bug
assignees: ''
---
**描述**
简要说明问题的症状。
**最小工作示例**
一段完整的可供编译的 TeX 代码,用来复现上述问题。请删除所有不会引起该问题的内容。譬如,对于正文格式出现的问题,不必添加 `\njusetup` `\tableofcontents` 等命令。
```
\documentclass[]{njuthesis}
......
\end{document}
```
**截图**
加上图片也许能更好地呈现出问题状况。
**平台信息**
在发生编译问题时提供。
- 操作系统:[e.g. Windows 10]
- TeX 发行版:[e.g. TeX Live 2021]
- 编译命令:[e.g. xelatex]
**额外信息**
任何你认为有帮助的信息。
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
on:
on:
push:
branches:
- master
......@@ -11,7 +11,7 @@ on:
env:
CTAN_URL: https://mirrors.rit.edu/CTAN
TL_PACKAGES: algorithms alphalph auxhook background biber biblatex biblatex-gb7714-2015 bibtex blindtext booktabs caption cleveref cm-unicode colortbl csquotes ctex dashundergaps diagbox emptypage enumitem everypage fancyhdr fancyvrb fandol float footmisc gbt7714 hologo hycolor hypdoc hyperref l3build latexmk libertinus-fonts listings lm-math lua-ul lualatex-math luatex85 makecell makeindex mathtools mhchem microtype multirow natbib ninecolors njuvisual ntheorem pict2e preview psnfss setspace siunitx standalone symbol tex-gyre tex-gyre-math thmtools threeparttable tocloft translator underscore unicode-math url wrapfig xits xstring zhlipsum zref
PACKAGES: latexmk cleveref enumitem footmisc tex-gyre xits biblatex-gb7714-2015 biber
jobs:
build-on-ubuntu:
......@@ -22,7 +22,7 @@ jobs:
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps:
- name: Set up Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install TeX Live
run: |
......@@ -30,24 +30,34 @@ jobs:
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
tlmgr install ${{ env.TL_PACKAGES }}
tlmgr update --self --all --no-auto-install --repository=${{ env.CTAN_URL }}/systems/texlive/tlnet/
- 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-doc.cls"
tlmgr update --self --all --no-auto-install
- name: Compile test file
run: |
${{ env.SET_PATH }}
cd test
latexmk -halt-on-error -time -pdfxe -jobname=test-xetex test.tex
latexmk -halt-on-error -time -pdflua -jobname=test-luatex test.tex
latexmk -xelatex -halt-on-error test-xetex-undergraduate
xelatex -halt-on-error test-xetex-graduate
xelatex -halt-on-error test-xetex-graduate-nlcover
# latexmk -lualatex -halt-on-error test-luatex
- name: Upload PDF
uses: actions/upload-artifact@v2
- name: Upload CLS Files
uses: actions/upload-artifact@v4
with:
name: generated-pdf
path:
test/*.pdf
name: "njuthesis-cls-${{ github.sha }}"
path: |
build/unpacked/njuthesis.cls
build/unpacked/*.def
name: Release
on:
on:
push:
branches:
- master
......@@ -8,13 +8,9 @@ on:
tags:
- v*
pull_request:
branches:
- master
env:
CTAN_URL: https://mirrors.rit.edu/CTAN
TL_PACKAGES: alphalph auxhook background biber biblatex biblatex-gb7714-2015 bibtex booktabs caption cm-unicode colortbl csquotes ctex dashundergaps diagbox enumitem everypage fancyhdr fancyvrb fandol footmisc gbt7714 hologo hycolor hypdoc hyperref l3build latexmk libertinus-fonts listings lm-math makecell makeindex microtype multirow natbib ninecolors njuvisual pict2e preview psnfss setspace siunitx symbol tabularray tex-gyre tex-gyre-math thmtools threeparttable translator underscore unicode-math url xits xstring zref
PACKAGES: cm-unicode tex-gyre tex-gyre-math lexend xits natbib makeindex
jobs:
release:
......@@ -25,7 +21,7 @@ jobs:
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps:
- name: Set up Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set Version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
......@@ -36,35 +32,63 @@ jobs:
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
tlmgr install ${{ env.TL_PACKAGES }}
tlmgr update --self --all --no-auto-install --repository=${{ env.CTAN_URL }}/systems/texlive/tlnet/
- name: Download njuvisual package
- 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: |
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual.dtx
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual-curves.dtx
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
cp build/doc/njuthesis.pdf njuthesis-$VERSION.pdf
mv njuthesis.pdf njuthesis-$VERSION.pdf
- name: Zip RELEASE package
- name: Zip USER package
run: |
${{ env.SET_PATH }}
xetex njuvisual.dtx
mv build/unpacked/njuthesis.cls njuthesis.cls
mv docs/njuthesis-sample.bib njuthesis-sample.bib
mv docs/njuthesis-sample.tex njuthesis-sample.tex
zip -r njuthesis-$VERSION.zip .vscode njuthesis-sample.tex njuthesis-sample.bib njuthesis.cls njuvisual.sty conf.txsprofile LICENSE README.md
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: false
prerelease: true
files: |
njuthesis-v*.pdf
njuthesis-v*.zip
njuthesis-user-v*.zip
njuthesis-ctan-v*.zip
......@@ -14,12 +14,18 @@
## DocStrip generated file
*.cls
*.sty
*.def
*.ins
*.sty
!docs/njuthesis-setup.def
## Zip file
*.zip
## Fonts
*.ttf
*.otf
## Intermediate documents:
*.hd
*.dvi
......@@ -29,15 +35,18 @@
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
*.pdf
njuthesis*.pdf
test*.pdf
# Folders
build/
release/
support/
scripts/data
TDS/
temp/
mythesis/
__pycache__/
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
......
{
"latex-workshop.latex.autoBuild.run": "never", // 禁止自动编译
"latex-workshop.latex.recipe.default": "lastUsed", // 使用前一次的编译方法
"latex-workshop.latex.tools": [
{
"name": "xelatex",
......@@ -13,10 +14,23 @@
]
},
{
"name": "latexmk",
"name": "latexmk-xe",
"command": "latexmk",
"args": [
"-xelatex"
"-xelatex",
"-time",
"-interaction=nonstopmode",
"%DOCFILE%"
]
},
{
"name": "latexmk-lua",
"command": "latexmk",
"args": [
"-lualatex",
"-time",
"-interaction=nonstopmode",
"%DOCFILE%"
]
},
{
......@@ -30,15 +44,17 @@
"name": "lualatex",
"command": "lualatex",
"args": [
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
],
"latex-workshop.latex.recipes": [
{
"name": "latexmk 🔃",
"name": "latexmk(xe)",
"tools": [
"latexmk"
"latexmk-xe"
]
},
{
......@@ -56,6 +72,12 @@
"xelatex"
]
},
{
"name": "latexmk(lua)",
"tools": [
"latexmk-lua"
]
},
{
"name": "lualatex",
"tools": [
......
This diff is collapsed.
###############################################################################
#
# 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 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
------------
......@@ -13,7 +34,7 @@ are always welcome.
Wiki
----
Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki)
Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki).
License
-------
......@@ -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)
[![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)的重构版本,目前本科生及研究生版本**已经基本重构完成**。
> 然而,研究生院并未提供完善的规定,部分格式来自于本科生院。**如果院系另有要求,请提交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)
`njuthesis` 是制作南京大学本科生毕业论文、研究生学位论文、博士后出站报告的 LaTeX 文档类。本模板基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、博士学位材料包,用于生成符合南京大学排版要求和相应的国家标准的学位论文,力求通过 LaTeX3 语法实现清晰的实现逻辑、较高的可定制性以及友好的用户接口。
## 快速开始
请首先阅读 [Releases](https://github.com/nju-lug/NJUThesis/releases/latest) 中附带的 `njuthesis.pdf` ,这份说明文档详尽阐述了模板的特性和使用方法。
对于普通用户,推荐使用下述的**南大TeX编译方法**
### 本地编译
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`三种编译方式
- 如果使用`latexmk`,请务必使用完整的命令`latexmk -xelatex`以免产生不必要的问题
- 如果使用`xelatex``lualatex`,需要按照`xelatex/lualatex` -> `biber` -> `xelatex/lualatex` -> `xelatex/lualatex`的顺序编译四次
- 仓库中`.vscode`附带一份VScode的LaTeX WorkShop的配置文件,可根据需要使用
请首先阅读[用户手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf),其中详尽阐述了模板的特性和使用方法。
### [南大TeX](https://tex.nju.edu.cn)编译
对于普通用户,首要推荐使用下述的**南大 TeX 编译方法**
[南大TeX](https://tex.nju.edu.cn)是eScience中心为南大在校师生提供的在线LaTeX编译平台,已*预置本模板*。只需参考`njuthesis-sample.tex`新建文档,在项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX``LuaLaTeX`即可编写论文,不必上传`.cls`等格式文件。
### 南大 TeX 编译
#### 上传模板的方法(不推荐)
[南大 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
```
推荐使用包管理器安装 `njuthesis``njuvisual` 的最新版。
3. 在南大TeX项目内页面左上角的`Menu`中,将编译器改为`XeLaTeX``LuaLaTeX`
4. 编写TeX文档
新手同学不妨直接使用以下流程:
### 关于DocStrip文件
1. [从南大镜像站下载](https://mirror.nju.edu.cn/download/app/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F)并安装最新的 TeX 发行版,并更新所有宏包
2. 下载包含[模板全部文件](https://github.com/nju-lug/NJUThesis/releases/latest)的压缩包 `njuthesis-user-v*.zip`
3. 根据需要更改 `njuthesis-sample.tex` 文件中的内容
4. 在模板根目录下运行 `latexmk -xelatex` 运行编译,得到对应的 PDF 文件
从0.9.0版以后,本模板以DocStrip(`.dtx`)格式进行维护。常规的`.cls``.sty`格式文件可从Releases页面下载或使用以下方法提取。我们只建议有经验的同学使用这一文件。
### 典型结构
DocStrip格式合并了LaTeX源代码和说明文档,更有利于宏包的发布。要使用该文件,请在当前工作目录下打开终端:
```LaTeX
\documentclass{njuthesis}
\njusetup{}
\begin{document}
\maketitle
\tableofcontents
\mainmatter
\chapter{欢迎}
使用 \LaTeX{}
\printbibliography
\end{document}
```
- 输入`xetex njuthesis.dtx`以提取宏包内容
- 输入`latexmk njuthesis.dtx`以生成并查看内置的文档
## 反馈
请注意,由于文件重名原因,项目中的示例论文模板已被重命名为`njuthesis-sample.tex`
在你遇到模板问题时,请遵守以下步骤:
## 常见问题
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](https://github.com/nju-lug/NJUThesis/pulls。
欢迎提交 [PR](https://github.com/nju-lug/NJUThesis/pulls)
## 许可
本模板的发布遵守 [LaTeX Project Public License(版本 1.3c 或更高)](https://www.latex-project.org/lppl/lppl-1-3c/)
......@@ -3,18 +3,20 @@
-- Build script for njuthesis.
-- run with `l3build`
module = "njuthesis"
module = "njuthesis"
checkengines = {"xetex", "luatex"}
checkopts = "-interaction=batchmode"
checkengines = {"xetex", "luatex"}
checkopts = "-interaction=batchmode"
ctanreadme = "README-CTAN.md"
textfiles = {"LICENSE", "README*.md", "*.ins"}
ctanreadme = "README-CTAN.md"
sourcefiles = {"source/*.dtx"}
installfiles = {"*.cls"}
sourcefiledir = "source"
sourcefiles = {"*.dtx"}
installfiles = {"*.cls", "*.def"}
typesetexe = "xelatex"
typesetfiles = {"njuthesis.dtx"}
typesetexe = "xelatex"
typesetfiles = {"njuthesis.dtx"}
unpackfiles = {"njuthesis.dtx"}
unpackexe = "xetex"
unpackexe = "xetex"
unpackfiles = {"njuthesis.dtx"}
File added
File added
File added
File added