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 (258)
Showing
with 1326 additions and 388 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:
branches:
- master
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 blindtext booktabs caption cleveref cm-unicode colortbl csquotes ctex dashundergaps diagbox emptypage enumitem everypage fancyhdr fancyvrb fandol floatrow 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 tabularray 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:
......@@ -25,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: |
......@@ -33,77 +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
- name: Upload PDF
uses: actions/upload-artifact@v2
with:
name: generated-pdf
path:
test/*.pdf
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@v2
- 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
tlmgr install ${{ env.TL_PACKAGES }}
tlmgr update --self --all --no-auto-install --repository=${{ env.CTAN_URL }}/systems/texlive/tlnet/
- name: Download njuvisual package
run: |
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual.dtx
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual-curves.dtx
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: 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
- name: Zip RELEASE 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
- uses: "marvinpinto/action-automatic-releases@latest"
- name: Upload CLS Files
uses: actions/upload-artifact@v4
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
njuthesis-v*.pdf
njuthesis-v*.zip
njuthesis-ctan-v*.zip
name: "njuthesis-cls-${{ github.sha }}"
path: |
build/unpacked/njuthesis.cls
build/unpacked/*.def
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
......@@ -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 语法实现清晰的实现逻辑、较高的可定制性以及友好的用户接口。
## 快速开始
对于普通用户,推荐使用下述的**南大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文件
#### 关于本地编译
请首先阅读[用户手册](http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf),其中详尽阐述了模板的特性和使用方法。
- 模板支持`latexmk``xelatex``lualatex`三种编译方式
- 如果使用`latexmk`,请务必使用完整的命令`latexmk -xelatex`以免产生不必要的问题
- 如果使用`xelatex``lualatex`,需要按照`xelatex/lualatex` -> `biber` -> `xelatex/lualatex` -> `xelatex/lualatex`的顺序编译四次
- 仓库中`.vscode`附带一份VScode的LaTeX WorkShop的配置文件,可根据需要使用
对于普通用户,首要推荐使用下述的**南大 TeX 编译方法**
### [南大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`以提取宏包内容
- 输入`latexmk 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 发行版,并更新所有宏包
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/)
......@@ -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
@ARTICLE{njuthesis,
title = {南京大学学士学位论文 LaTeX 模板},
AUTHOR = {NJU-LUG},
JOURNALTITLE = {Github},
YEAR = {2021}
}
@book{goossens93,
author = "Frank Mittelbach and Michel Goossens and Johannes Braams and David Carlisle and Chris Rowley",
title = "The {LaTeX} Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@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"
@article{preskill2018,
title = {Quantum {{Computing}} in the {{NISQ}} Era and Beyond},
author = {Preskill, John},
author+an = {1=thesisauthor},
date = {2018-08-06},
journaltitle = {Quantum},
volume = {2},
pages = {79},
publisher = {{Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften}},
doi = {10.22331/q-2018-08-06-79},
url = {https://quantum-journal.org/papers/q-2018-08-06-79/},
urldate = {2022-10-27},
langid = {british}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NJU Thesis
% 南京大学毕业论文LaTeX模板
% Version 0.12.0 (2021-11-30)
%
% 请关注项目地址以获取最新变化
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% njuthesis 示例模板 v1.4.2 2024-11-08
% https://github.com/nju-lug/NJUThesis
% https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis
% https://ctan.org/pkg/njuthesis
%
% 贡献者
% Yu XIONG @atxy-blip Yichen ZHAO @FengChendian
% Song GAO @myandeg Chang MA @glatavento
% Yu XIONG @atxy-blip Yichen ZHAO @FengChendian
% Song GAO @myandeg Chang MA @glatavento
% Yilun SUN @HermitSun Yinfeng LIN @linyinfeng
%
% Yukai Chou @Muzimuzhi
%
% 许可证
% LaTeX Project Public License(版本 1.3c 或更高)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------------
% 一些提使用体验的小技巧:
%---------------------------------------------------------------------
% 一些提使用体验的小技巧:
% 1. 请务必使用 UTF-8 编码编写和保存本文档
% 2. 请务必使用 XeLaTeX 或 LuaLaTeX 引擎进行编译
% 3. 不保证接口稳定,写作前一定要读一读说明文档
% 3. 不保证接口稳定,写作前一定要留意版本号
% 4. 以百分号(%)开头的内容为注释,可以随意删除
%-------------------------------------------------
%---------------------------------------------------------------------
%---------------------------------------------------------------------
% 请先阅读使用手册:
% http://mirrors.ctan.org/macros/unicodetex/latex/njuthesis/njuthesis.pdf
%---------------------------------------------------------------------
\documentclass[
% 模板选项:
% degree = ug|mg|mf|phd, % 学位类型,默认为本科
% type = thesis|design, % 文档类型,默认为毕业论文
% nlcover = true|false, % 是否需要国家图书馆封面,默认关闭
% 以下两项为字体设置,不改动则自动调用系统预装字体
% customlatinfont=windows|macos|linux|gyre|none,
% customchinesefont=windows|macos|linux|fandol|founder|noto|none,
]{njuthesis}
\njusetup {
% 设置参数
% 模板选项(注意右端逗号):
%
% 一些提醒:
% 1. 千万不要有空行
% 2. 使用英文半角逗号(,)分隔选项
% 3. 等于号(=)两侧的空格会被忽略
% 3.1. 为避免歧义,请用花括号({})包裹内容
% 4. 本科生无需填写的项目已被特别标注
% type = bachelor|master|doctor|postdoc, % 文档类型,默认为本科生
% degree = academic|professional, % 学位类型,默认为学术型
%
% info 类用于录入个人信息
% 带*号的为对应英文字段
info = {
titlea = {第一行标题},
titleb = {第二行标题},
titlec = {第三行标题},
% 中文题目
% 这里采取手动换行方式,三个选项依次对应三行
% 如果只有第一行,其余两个选项就留空,以此类推
%
title* = {My Title in English},
% 英文题目
%
author = {姓名},
% 作者姓名
%
author* = {Ming Xing},
% 作者英文姓名
% 一般使用拼音
%
keywords = {我,就是,充数的,关键词},
% 中文关键词列表
% 使用英文半角逗号(,)分隔
%
keywords* = {Dummy,Keywords,Here,{It Is}},
% 英文关键词
% 使用英文半角逗号(,)分隔
%
grade = {2018},
% 年级
%
student-id = {189114514},
% 学号
% 本模板会自动更正研究生学号的大小写
%
department = {化学化工学院},
department* = {School of Chemistry and Chemical Engineering},
% 院系
%
major = {化学},
major* = {Chemistry},
% 专业
%
supervisora = {导师},
supervisora*= {My Supervisor},
% 导师姓名
%
supervisora-title = {教授},
supervisora-title* = {Professor},
% 导师职称
%
supervisorb = {第二导师},
supervisorb* = {My Second Supervisor},
supervisorb-title = {副教授},
supervisorb-title* = {Associate professor},
% 第二导师
% 如果确实没有第二导师,留空即可
%
submit-date = {2021年8月10日},
% 提交日期
%
%
% 以下均为研究生项
field = {理论与计算化学},
field* = {Theoretical and Computational Chemistry},
% 研究领域
%
submit-date* = {Aug 10, 2021},
% 提交日期(英文)
%
defend-date = {2021年9月19日},
% 答辩日期
%
chairman = {某某某~教授},
% 答辩委员会主席
% 推荐使用波浪号(~)分隔姓名和职称
%
reviewer = {
某某某~教授,
某某某~教授
},
% 答辩委员会成员
% 一共四名,使用英文半角逗号(,)分隔
%
clc = {0175.2},
% 中图分类号
%
secret-level = {限制},
% 密级
%
udc = {004.72},
% UDC分类号
%
supervisor-contact = {
博士~
南京大学~
江苏省南京市栖霞区仙林大道163号
}
% 导师联系方式
}
}
% 自行使用所需宏包
\usepackage{siunitx} % 用于书写单位符号
\usepackage[version=4]{mhchem} % 用于绘制分子式
% 设置图片存储位置
\graphicspath{{figure/}}
% 导入参考文献数据
\addbibresource{njuthesis-sample.bib}
% nl-cover, % 是否需要国家图书馆封面,默认关闭
% decl-page, % 是否需要诚信承诺书或原创性声明,默认关闭
%
% 页面模式,详见手册说明
% draft, % 开启草稿模式
% anonymous, % 开启盲审模式
% minimal, % 开启最小化模式
%
% 单双面模式,默认为适合印刷的双面模式
% oneside, % 单面模式,无空白页
% twoside, % 双面模式,每一章从奇数页开始
%
% 字体设置,不填写则自动调用系统预装字体,详见手册
% fontset = win|mac|macoffice|fandol|none,
]{njuthesis}
% 模板选项设置,包括个人信息、外观样式等
% 较为冗长且一般不需要反复修改,我们把它放在单独的文件里
\input{njuthesis-setup.def}
% 自行载入所需宏包
% \usepackage{subcaption} % 嵌套小幅图像,比 subfig 和 subfigure 更新更好
% \usepackage{siunitx} % 标准单位符号
% \usepackage{physics} % 物理百宝箱
% \usepackage[version=4]{mhchem} % 绘制分子式
% \usepackage{listings} % 展示代码
% \usepackage{algorithm,algorithmic} % 展示算法伪代码
% 在导言区随意定制所需命令
% \DeclareMathOperator{\spn}{span}
% \NewDocumentCommand\mathbi{m}{\textbf{\em #1}}
% 开始编写论文
\begin{document}
%-------------------------------------------------
%---------------------------------------------------------------------
% 封面、摘要、前言和目录
%-------------------------------------------------
%---------------------------------------------------------------------
% 生成封面页
\maketitle
\maketitle
% 模板默认使用 \flushbottom,即底部平齐
% 效果更好,但可能出现 underfull \vbox 信息
% 以下命令用于抑制这些信息
\raggedbottom
\begin{abstract}
中文摘要
中文摘要
\end{abstract}
\begin{abstract*}
English abstract
English abstract
\end{abstract*}
\begin{preface}
前言
\end{preface}
% 生成目录
\tableofcontents
% 生成图片清单
\listoffigures
% \listoffigures
% 生成表格清单
\listoftables
% \listoftables
%-------------------------------------------------
%---------------------------------------------------------------------
% 正文部分
%-------------------------------------------------
%---------------------------------------------------------------------
\mainmatter
% 符号表
% 语法与 description 环境一致
% 两个可选参数依次为说明区域宽度、符号区域宽度
% 带星号的符号表(notation*)不会插入目录
% \begin{notation}[10cm]
% \item[DFT] 密度泛函理论 (Density functional theory)
% \item[DMRG] 密度矩阵重正化群 (Density-Matrix Reformation-Group)
% \end{notation}
% 建议将论文内容拆分为多个文件
% 即新建一个 chapters 文件夹
% 把每一章的内容单独放入一个 tex 文件
% 然后在这里用 \input{} 导入,例如
% \input{chapters/introduction}
% \input{chapters/environments}
% 把每一章的内容单独放入一个 .tex 文件
% 然后在这里用 \include 导入,例如
% \include{chapters/introduction}
% \include{chapters/environments}
\chapter{引言}
%-------------------------------------------------
\section{量子计算}
John Preskill 认为我们现在处于“含噪声的中型量子时代”。\cite{preskill2018}
量子位的不稳定性和有限的量子比特数量限制了量子计算机的复杂度和纠错能力。
%---------------------------------------------------------------------
% 参考文献
%-------------------------------------------------
%---------------------------------------------------------------------
\printbibliography[
heading=bibintoc,% 插入目录条目
title=参考文献]
% 生成参考文献页
\printbibliography
%-------------------------------------------------
%---------------------------------------------------------------------
% 致谢
%-------------------------------------------------
%---------------------------------------------------------------------
\begin{acknowledgement}
感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU Linux User Group}
感谢 \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{LUG@NJU}
\end{acknowledgement}
%-------------------------------------------------
%---------------------------------------------------------------------
% 学术简历
%---------------------------------------------------------------------
% 详见手册中“成果列表”一节
% \njuchapter{学术成果}
% \njupaperlist[攻读博士学位期间发表的学术论文]{preskill2018}
%---------------------------------------------------------------------
% 附录部分
%-------------------------------------------------
%---------------------------------------------------------------------
% 附录部分使用单独的字母序号
\appendix
% 可以在这里插入补充材料
\chapter{正文中涉及的数据及源代码}
\dots
% 完工
\end{document}