diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile deleted file mode 100644 index 7fe37a3..0000000 --- a/.github/workflows/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -ARG TEXLIVE_TAG=latest -FROM texlive/texlive:${TEXLIVE_TAG} - -ENV DEBIAN_FRONTEND noninteractive - -RUN apt update && \ - apt install -y software-properties-common apt-utils && \ - DEBIAN_CODENAME=$(lsb_release -c | cut -f2) && \ - apt-add-repository "deb http://ftp.debian.org/debian $DEBIAN_CODENAME main contrib" && \ - apt update && \ - apt install -y ttf-mscorefonts-installer - -WORKDIR /docs diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index da2f446..3765236 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -5,27 +5,32 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - texlive: [TL2020-historic, TL2021-historic, latest] + texlive: [latest, TL2024-historic, TL2023-historic] # 多版本 TexLive 兼容性测试 # 版本号选自:https://hub.docker.com/r/texlive/texlive/tags + container: texlive/texlive:${{ matrix.texlive }} steps: - name: Set up Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: Tree All project - run: sudo apt install tree;tree - - - name: Build the Docker image run: | - docker build . --file .github/workflows/Dockerfile --tag sustechthesis --build-arg TEXLIVE_TAG=${{ matrix.texlive }} - docker run --rm -v "$(pwd)":/docs sustechthesis /bin/bash -c "make cleanall && make thesis slide" + apt update && apt install -y tree + tree + + - name: run texlive docker container + run: make cleanall && make thesis slide - name: Publish PDF as actions assets - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Example-PDFs-texlive-${{ matrix.texlive }} path: | main.pdf slides.pdf + + - name: look files + run: | + tree diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d4732a3..ef78905 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true @@ -19,12 +19,15 @@ jobs: - name: Branch name id: branch_name run: | - echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} - echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} - echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT + echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + - name: tag name output run: | - echo ${SOURCE_NAME};echo ${SOURCE_BRANCH};echo ${SOURCE_TAG} + echo SOURCE_NAME: ${SOURCE_NAME} + echo SOURCE_BRANCH: ${SOURCE_BRANCH} + echo SOURCE_TAG: ${SOURCE_TAG} env: SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} @@ -44,25 +47,24 @@ jobs: - name: zip the fonts run: zip -r fonts.zip ./fonts - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: PDF_files path: | main.pdf slides.pdf - - name: release - uses: "marvinpinto/action-automatic-releases@latest" + - name: release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "${{steps.branch_name.outputs.SOURCE_TAG}}" - prerelease: false - title: "${{steps.branch_name.outputs.SOURCE_TAG}}" files: | ./main.pdf ./slides.pdf ./fonts.zip ./sustechthesis.cls + prerelease: false + generate_release_notes: true - name: look files run: | diff --git a/.gitignore b/.gitignore index 5485e21..02ac6f9 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,10 @@ format/* *-blx.bib *.run.xml +*.bbl-* +*.bcf-* +*.blg-* + ## Build tool auxiliary files: *.fdb_latexmk *.synctex @@ -43,6 +47,10 @@ format/* *.synctex.gz(busy) *.pdfsync +## Build tool directories for auxiliary files +# latexrun +latex.out/ + ## Auxiliary and intermediate files from other packages: # algorithms *.alg @@ -63,6 +71,9 @@ acs-*.bib # changes *.soc +# comment +*.cut + # cprotect *.cpt @@ -105,12 +116,25 @@ acs-*.bib *.glo *.gls *.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table # gnuplottex *-gnuplottex-* # gregoriotex *.gaux +*.glog *.gtex # htlatex @@ -133,6 +157,9 @@ acs-*.bib # listings *.lol +# luatexja-ruby +*.ltjruby + # makeidx *.idx *.ilg @@ -155,6 +182,9 @@ _minted* # morewrites *.mw +# newpax +*.newpax + # nomencl *.nlg *.nlo @@ -174,6 +204,9 @@ _minted* # scrwfile *.wrt +# svg +svg-inkscape/ + # sympy *.sout *.sympy @@ -187,6 +220,9 @@ sympy-plots-for-*.tex/ *.pytxcode pythontex-files-*/ +# tcolorbox +*.listing + # thmtools *.loe @@ -195,20 +231,31 @@ pythontex-files-*/ *.md5 *.auxlock +# titletoc +*.ptc + # todonotes *.tdo +# vhistory +*.hst +*.ver + # easy-todo *.lod +# xcolor +*.xcp + # xmpincl *.xmpi # xindy *.xdy -# xypic precompiled matrices +# xypic precompiled matrices and outlines *.xyc +*.xyd # endfloat *.ttt @@ -225,12 +272,21 @@ TSWLatexianTemp* # Texpad .texpadtmp +# LyX +*.lyx~ + # Kile *.backup +# gummi +.*.swp + # KBibTeX *~[0-9]* +# TeXnicCenter +*.tps + # auto folder when using emacs and auctex ./auto/* *.el @@ -243,3 +299,14 @@ TSWLatexianTemp* # generated if using elsarticle.cls *.spl + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dad740..b417431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,18 +29,38 @@ Changelog 维护应保持最新版本在文件上面的原则,日期格式按 - 预发布版本使用形如 "`[1.0.2-rc.1] - 2021-06-11`" 作为二级标题, - 正式发布版本使用形如 "`[1.0.1] - 2020-07-25`" 作为二级标题。 -## [Unreleased](https://github.com/iydon/sustechthesis/compare/v1.3.2...HEAD) +## [Unreleased](https://github.com/iydon/sustechthesis/compare/v1.3.6...HEAD) + +## [1.3.6](https://github.com/iydon/sustechthesis/compare/v1.3.5...v1.3.6) - 2024-02-28 + +### Added +- 增加 Overleaf 编译指引([#45](https://github.com/iydon/sustechthesis/issues/45))。 +### Changed +- 更新参考文献配置([#44](https://github.com/iydon/sustechthesis/issues/44))。 + +## [1.3.5](https://github.com/iydon/sustechthesis/compare/v1.3.4...v1.3.5) - 2023-05-20 + +### Fixed +- 修复表格字体为五号([#42](https://github.com/iydon/sustechthesis/issues/42))。 +- 修复参考文献字体为五号([#43](https://github.com/iydon/sustechthesis/issues/43))。 + +## [1.3.4](https://github.com/iydon/sustechthesis/compare/v1.3.3...v1.3.4) - 2022-05-16 + +### Changed +- 修改行距,标题,段前缩进,目录标题距离([#35](https://github.com/iydon/sustechthesis/pull/35), [#36](https://github.com/iydon/sustechthesis/pull/36))。 +- 修改页边距,修改伪粗等级([#38](https://github.com/iydon/sustechthesis/pull/38))。 +- 添加了三线表与`\ref{}`的样例([#38](https://github.com/iydon/sustechthesis/pull/38))。 ## [1.3.3](https://github.com/iydon/sustechthesis/compare/v1.3.2...v1.3.3) - 2022-05-16 ### Added -- 加入 VScode 项目编译配置 -- 加入 pdf 元数据 -- 摘要和目录加入罗马页码([#31](https://github.com/iydon/sustechthesis/issues/31)) +- 加入 VScode 项目编译配置。 +- 加入 pdf 元数据。 +- 摘要和目录加入罗马页码([#31](https://github.com/iydon/sustechthesis/issues/31))。 ### Fixed -- 修复参考文献、附录、致谢的链接跳转位置错误([#32](https://github.com/iydon/sustechthesis/issues/32)) -- 修复英文封面教授职称顺序错误 +- 修复参考文献、附录、致谢的链接跳转位置错误([#32](https://github.com/iydon/sustechthesis/issues/32))。 +- 修复英文封面教授职称顺序错误。 ## [1.3.2](https://github.com/iydon/sustechthesis/compare/v1.3.1...v1.3.2) - 2022-04-21 diff --git a/README.md b/README.md index 7c3c4b1..9802c03 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Southern University of Science and Technology Thesis Template LaTeX Template for ## 下载 * 发布版:[GitHub Release](https://github.com/Iydon/sustechthesis/releases/latest) -* 开发版:直接 Git clone,或者点击绿色 `Code` 下载ZIP压缩包。此版本不保证稳定性,提供给有经验的 TeX 用户使用。 +* 开发版:直接 Git clone,或者点击绿色 `Code` 下载 ZIP 压缩包。此版本不保证稳定性,提供给有经验的 TeX 用户使用。 ## 模板使用 @@ -19,38 +19,52 @@ Southern University of Science and Technology Thesis Template LaTeX Template for ## 文档架构 -* `config/preamble.tex`: 导言区,导入宏包,宏定义 -* `config/info.tex`: 论文信息,例如:标题,作者,等 +* `config/preamble.tex`: 导言区,导入宏包,宏定义。 +* `config/info.tex`: 论文信息,例如:标题,作者,等。 * `main.tex`: 主文档,编排章节顺序。 * `slides.tex`: beamer 幻灯片模版。 -## 构建 -- 使用 Makefile: `make`, `make clean` ...... -- 或,使用 `latexmk` - - 构建: `latexmk main` - - 清理: `latexmk -c main` +## XeLaTeX 构建 -## 开发发布 +* 使用 Makefile: `make`, `make clean` ...... -使用 tag 发布版本。 +* 或,使用 `latexmk` + * 构建: `latexmk main` + * 清理: `latexmk -c main` -```git -#标记本地tag +## 使用 LaTeX 在线编辑器 + +* 使用 [Overleaf](https://www.overleaf.com/)(需要科学上网保证稳定使用),上传 zip 压缩包后,更改编译器为 `XeLaTeX` + * ⚠️ 由于 Overleaf 将免费账户的超时时间缩短到 20 秒,因此如果您在使用免费账户,可能无法成功完成项目的编译。[Overleaf 官方声明](https://www.overleaf.com/blog/changes-to-free-compile-timeouts-and-servers) +* 使用 [南科大 ShareLaTeX](https://sharelatex.cra.moe/),使用方式与 Overleaf 相同,上传 zip 压缩包后,更改编译器为 `XeLaTeX`。 +* 使用 [TeXPage](https://www.texpage.com/),使用方式与 Overleaf 类似,上传 zip 压缩包后,选择编译的主文档,并将编译选项设置为 `XeLaTeX`。 +* 使用 [LoongTeX](https://www.loongtex.com/),使用方式与 VS Code 类似,上传 zip 压缩包后,选择编译的主文档,并将编译选项设置为 `XeLaTeX`。 + +## 更新日志 + +每个版本的详细更新日志,请见 [CHANGELOG.md](CHANGELOG.md)。 + +## 正式版本发布流程 + +1. 手动更新 `CHANGELOG.md` +2. 手动更新 `sustechthesis.cls` 中定义的版本号 `\version` +3. 使用 git 命令行工具,打 tag 并推送到远端仓库 + + +```shell +# 标记本地 tag git tag v1.2.0 -#推送本地tag到远程 +# 推送本地 tag 到远程 git push origin v1.2.0 -#删除本地tag + +# 删除本地 tag git tag -d v1.2.0 -#删除远程tag +# 删除远程 tag git push --delete origin v1.2.0 ``` -## 更新日志 - -每个版本的详细更新日志,请见 [CHANGELOG.md](CHANGELOG.md)。 - ## 致谢 -* 本模版根据南方科技大学-教学工作部发布的相关 [《撰写规范》和《样例》](http://tao.sustech.edu.cn/studentService/graduation_project.html) 编写,如有冲突以官网规定为准。 +* 本模版根据南方科技大学-教学工作部发布的本科生毕业设计论文相关 [《撰写规范》和《样例》](https://tao.sustech.edu.cn/xueshengfuwu/biyelunwen/) 编写,如有冲突以官网规定为准。 * 如果《样例》中存在与《撰写规范》中的规定不符之处,以《撰写规范》中的文字叙述为准。 diff --git a/config/info.tex b/config/info.tex index 26cb03b..2dd428b 100644 --- a/config/info.tex +++ b/config/info.tex @@ -1,20 +1,34 @@ % !Mode:: "TeX:UTF-8" % !TEX program = xelatex + +% !!! 注意 !!! +% 关于封面部分,相关要求变动较为频繁,且想要用 LaTeX 1:1 还原 Word 版封面较为困难 +% 请多与所在专业教学秘书沟通,以官方要求和标准为准 + \设置信息{ - % 键 = {{中文值}, {英文值}}, - 分类号 = {{}, {}}, - 编号 = {{}, {}}, - UDC = {{}, {}}, - 密级 = {{}, {}}, - % 仅题目(不含副标题)、系别、专业,支持手动 \\ 换行,不支持自动换行。 - 题目 = {{南方科技大学毕业论文模板设计\\\hologo{LaTeX} 形式 v\version}, {Graduation Thesis Template\\\hologo{LaTeX} Format v\version}}, - % 如无需副标题,删除值内容即可,不可删除键定义。 - 副标题 = {{副标题}, {Sub-title}}, - 姓名 = {{梁钰栋}, {Iydon Liang}}, - 学号 = {{11711217}, {11711217}}, - 系别 = {{数学系}, {Department of Mathematics}}, - 专业 = {{信息与计算科学}, {Computatoinal Mathematics}}, - 指导老师 = {{高德纳}, {Donald~E.~Knuth}}, - 时间 = {{2019年12月8日}, {December 8, 2019}}, - 职称 = {{教授}, {Professor}}, + % 键 = {{中文值}, {英文值}}, + 分类号 = {{}, {}}, + 编号 = {{}, {}}, + UDC = {{}, {}}, + 密级 = {{}, {}}, + % 仅题目(不含副标题)、院系、专业,支持手动 \\ 换行,不支持自动换行。 + 题目 = {% + {南方科技大学毕业论文模板设计\\\hologo{LaTeX} 形式 v\version}, + {Undergraduate Thesis Template\\\hologo{LaTeX} Format v\version} + }, + % 如无需副标题,删除值内容即可,不可删除键定义。 + 副标题 = {{副标题}, {Sub-title}}, + 姓名 = {{梁钰栋}, {Iydon Liang}}, + 学号 = {{11711217}, {11711217}}, + 院系 = {{数学系}, {Department of Mathematics}}, + 专业 = {{信息与计算科学}, {Computatoinal Mathematics}}, + % 依照模板的要求,两个字的姓名,应在中间空一格,可使用 ~ 符号,比如:王~五 + 指导老师 = {{高德纳}, {Donald~E.~Knuth}}, + % ---------- 已弃用 ---------- + % 截至 2025.06,下面的字段已经弃用,保留此类字段仅为确保兼容性,且易于未来恢复使用 + % 2025.05,学校官方样例已要求无需填写指导老师职称 + 职称 = {{教授}, {Professor}}, + % 2025.06,据计算机系本科教秘确认,日期段不再需要, + % 教秘已和教工部沟通,未来将在样例中删除时间字段 + 时间 = {{2019年12月8日}, {December 8, 2019}}, } diff --git a/config/preamble.tex b/config/preamble.tex index a64efa5..f67522d 100644 --- a/config/preamble.tex +++ b/config/preamble.tex @@ -2,12 +2,12 @@ % !TEX program = xelatex % 数学符号与环境 -\usepackage{amsmath,amssymb} +\usepackage{amsmath,amssymb,amsthm} \newcommand{\dd}{\mathrm{d}} \newcommand{\RR}{\mathbb{R}} % 参考文献 -\usepackage[style=gb7714-2015]{biblatex} - \addbibresource{ref.bib} +\usepackage[style=gb7714-2015,gbpunctin=false]{biblatex} + \addbibresource{references.bib} % 无意义文本 \usepackage{zhlipsum,lipsum} % 列表环境设置 @@ -38,3 +38,4 @@ % LaTeX logo \usepackage{hologo} +\raggedbottom diff --git a/fonts/simsun.ttc b/fonts/simsun.ttc index 5f22ce3..e360db7 100644 Binary files a/fonts/simsun.ttc and b/fonts/simsun.ttc differ diff --git a/fonts/simsunb.ttf b/fonts/simsunb.ttf index 28d66b3..82161c8 100644 Binary files a/fonts/simsunb.ttf and b/fonts/simsunb.ttf differ diff --git a/main.tex b/main.tex index ce4ea99..a40b8c2 100644 --- a/main.tex +++ b/main.tex @@ -1,8 +1,13 @@ % !Mode:: "TeX:UTF-8" % !TEX program = xelatex % !BIB program = biber -\documentclass[AutoFakeBold,AutoFakeSlant,language=chinese,degree=bachelor,zihao=-4]{sustechthesis} -% 1. AutoFakeBold 与 AutoFakeSlant 为伪粗与伪斜,如果本机上有相应粗体与斜体字体,请使用 xeCJK 宏包进行设置,例如: +\documentclass[ + AutoFakeBold, + AutoFakeSlant, + language=chinese, +]{sustechthesis} +% 1. AutoFakeBold 与 AutoFakeSlant 为伪粗与伪斜, +% 如果本机上有相应粗体与斜体字体,请使用 xeCJK 宏包进行设置,例如: % \setCJKmainfont[ % UprightFont = * Light, % BoldFont = * Bold, @@ -10,11 +15,15 @@ % BoldItalicFont = Kaiti SC Bold, % ]{Songti SC} % -% 2. language=chinese 基于为 ctexart 文类提供的中文排版方案修改,如果使用英文进行论文创作,请使用 language=english 选项。 +% 2. language=chinese 基于为 ctexart 文类提供的中文排版方案修改, +% 如果使用英文进行论文创作,请使用 language=english 选项。 % -% 3. degree=bachelor 为 sustechthesis 文类提供的本科生毕业论文模板,其他可选项为 master 与 doctor,但是均未实现,如果您对此有兴趣,欢迎 PR。 +% 3. 此 sustechthesis 文类为本科生毕业论文模板,未实现的学位选项已弃用。 +% 如需研究生学位论文模板,可参考 https://github.com/SUSTech-CRA/sustech-master-thesis % -% 4. sustechthesis.cls 文类主要参考自去年完成使命的 sustechthesis.tex,在这一年的时间,作者的 TeX 风格与常用宏包发生许多变化,因为之前的思想为仅提供必要的格式修改相关代码,所以转换为文类形式所进行的修改较少,而近期的风格与常用宏包均体现在以下的例子文件中。 +% 4. sustechthesis.cls 文类主要参考自去年完成使命的 sustechthesis.tex, +% 在这一年的时间,作者的 TeX 风格与常用宏包发生许多变化,因为之前的思想为仅提供必要的格式修改相关代码, +% 所以转换为文类形式所进行的修改较少,而近期的风格与常用宏包均体现在以下的例子文件中。 % % 5. 示例文件均放置于相应目录的 examples 文件夹下,构建自己论文时可暂时保留,用以检索接口与使用方法。 % @@ -28,26 +37,25 @@ \中文标题页\英文标题页 -\中文诚信承诺书 -\英文诚信承诺书 +\诚信承诺书 \前序格式化 \摘要标题 \input{sections/examples/abstract.tex} % 论文摘要 -\目录\clearpage % 目录及换页 +\目录\cleardoublepage % 目录及换页 \正文格式化 \input{sections/examples/disclaimer.tex} \input{sections/examples/interface.tex} \input{sections/examples/details.tex} \input{sections/examples/figures.tex} -\input{sections/examples/tutorial.tex}\clearpage +\input{sections/examples/tutorial.tex}\cleardoublepage \参考文献 - \printbibliography[heading=none]\clearpage + \printbibliography[heading=none]\cleardoublepage \附录 - \input{sections/examples/appendix.tex}\clearpage + \input{sections/examples/appendix.tex}\cleardoublepage \致谢 - \input{sections/examples/thanks.tex} + \input{sections/examples/acknowledgments.tex} \end{document} diff --git a/ref.bib b/references.bib similarity index 52% rename from ref.bib rename to references.bib index 5caf0fc..60184f3 100644 --- a/ref.bib +++ b/references.bib @@ -4,4 +4,12 @@ @book{Nicholas1998Handbook publisher={Society for Industrial and Applied Mathematics}, year={1998}, address={Philadelphia}, -} \ No newline at end of file +} + +@book{goossens1994latex, + title={The LATEX companion}, + author={Goossens, Michel and Mittelbach, Frank and Samarin, Alexander}, + volume={1}, + year={1994}, + publisher={Addison-Wesley Reading} +} diff --git a/sections/examples/abstract.tex b/sections/examples/abstract.tex index 6ee94e6..c015cf4 100644 --- a/sections/examples/abstract.tex +++ b/sections/examples/abstract.tex @@ -1,9 +1,27 @@ % !Mode:: "TeX:UTF-8" % !TEX program = xelatex + +% 摘要通常不分段,实际写作中请顶第一行开始接连书写文字,中间不要有空行 \begin{中文摘要}{\LaTeX ;接口} - 笔者见到的毕业论文模板,大多是以文类的形式,少部分以宏包的形式,并且在模板中大多掺杂着各式各样的例子(除了维护频率高的模板),导致模板文件使用了大部分与形式格式不相关的内容,代码量巨大文档欠缺且不容易修改,出现问题需要查看宏包或者文类的源代码。于是,秉着仅提供实现最基本要求的理念,重构了之前所写的 \TeX\ 形式。由于第二年使用该模板,所以设计出的模板接口不能保证以后不发生重大变动,一切以文档为主。毕竟学校在发展初期,各类文件都在日渐完善,前几年时,学校标志及名称还发生变化,同时毕业论文的样式也发生了重大变化。但是可以保证的是,模板提供的接口均为中文形式\footnote{使用 \hologo{XeLaTeX} 特性,一方面增加辨识度,另一方面不拘泥于英文命名的规则。当然此举也有些许弊端,在此就不过多展开。},并且至少更新到 2021 年,也就是笔者毕业。模板这种东西不能保证一劳永逸,一方面学校的标准制度都在发生着改变,另一方面 \hologo{LaTeX} 的宏包也在发生着改变,早先流行的宏包可能几年后就被“淘汰”掉。因此,您的使用与反馈是我不断更新的动力,希望各位不吝赐教。 + 如用英文写作,则英文摘要在前,中文摘要在后。 + + 笔者见到的毕业论文模板,大多是以文类的形式,少部分以宏包的形式,并且在模板中大多掺杂着各式各样的例子(除了维护频率高的模板), + 导致模板文件使用了大部分与形式格式不相关的内容,代码量巨大文档欠缺且不容易修改,出现问题需要查看宏包或者文类的源代码。 + 于是,秉着仅提供实现最基本要求的理念,重构了之前所写的 \TeX\ 形式。 + 由于第二年使用该模板,所以设计出的模板接口不能保证以后不发生重大变动,一切以文档为主。 + 毕竟学校在发展初期,各类文件都在日渐完善,前几年时,学校标志及名称还发生变化,同时毕业论文的样式也发生了重大变化。 + 但是可以保证的是,模板提供的接口均为中文形式\footnote{ + 使用 \hologo{XeLaTeX} 特性,一方面增加辨识度,另一方面不拘泥于英文命名的规则。 + 当然此举也有些许弊端,在此就不过多展开。 + },并且至少更新到 2021 年,也就是笔者毕业。 + 模板这种东西不能保证一劳永逸,一方面学校的标准制度都在发生着改变, + 另一方面 \hologo{LaTeX} 的宏包也在发生着改变,早先流行的宏包可能几年后就被“淘汰”掉。 + 因此,您的使用与反馈是我不断更新的动力,希望各位不吝赐教。 \end{中文摘要} \begin{英文摘要}{LaTeX, Interface} + For theses written in English, the English abstract should be placed before the Chinese abstract. + \lipsum[1] \end{英文摘要} +\cleardoublepage diff --git a/sections/examples/acknowledgments.tex b/sections/examples/acknowledgments.tex new file mode 100644 index 0000000..bb02abd --- /dev/null +++ b/sections/examples/acknowledgments.tex @@ -0,0 +1,17 @@ +% !Mode:: "TeX:UTF-8" +% !TEX program = xelatex +\sustechthesis\ 目前版本为 \version, \LaTeX\ 毕业论文模板项目从提出到现在已有两年了。 +感谢为本项目贡献代码的开发人员们: +\begin{itemize} + \item 梁钰栋(南方科技大学,本科 17 级); + \item 张志炅(南方科技大学,本科 17 级)。 +\end{itemize} +以及使用本项目,并提出诸多宝贵的修改意见的使用人员们: +\begin{itemize} + \item 李未晏(南方科技大学,本科 15 级); + \item 张尔聪(南方科技大学,本科 15 级)。 +\end{itemize} + +此外,目前的维护者并非计算机系,可能存在对协议等的错误使用,如果你在本模板中发现任何问题, +请在 GitHub 中提出 \href{https://github.com/Iydon/sustechthesis/issues}{Issues}, +同时也非常欢迎对代码的贡献! diff --git a/sections/examples/details.tex b/sections/examples/details.tex index 7d05aeb..324f3fb 100644 --- a/sections/examples/details.tex +++ b/sections/examples/details.tex @@ -5,25 +5,56 @@ \section{一些样例} \subsection{表格} +表格与图片可以直接通过 \verbbox{\ref{}} 来引用,例如表 \ref{table2}、图 \ref{F:test-a}、图 \ref{F:test-b-sub-b}。 + \begin{table}[htb] -% h-here,t-top,b-bottom,优先级依次下降 - \begin{center} - % 居中 - \caption{表格的标题应该放在上方}\label{table} - \begin{tabular}{lc} % 三线表不能有竖线,l-left,c-center,r-right - \toprule - %三线表-top 线 - Example & Result \\ - \midrule - %三线表-middle 线 - Example1 & 0.25 \\ - Example2 & 0.36 \\ - \bottomrule - %三线表-底线 - \end{tabular} - \end{center} + % h-here, t-top, b-bottom,优先级依次下降 + % 居中,模版已设定表格浮动体居中 + \centering + \caption{表格的标题应该放在上方} + \label{table} + \begin{tabular}{lc} % 三线表不能有竖线,l-left, c-center, r-right + \toprule + % 三线表-top 线 + Example & Result \\ + \midrule + % 三线表-middle 线 + Example1 & 0.25 \\ + Example2 & 0.36 \\ + \bottomrule + % 三线表-底线 + \end{tabular} \end{table} +\begin{table}[htb] + \centering + \caption{带表注的表格的标题} + \label{table2} + \begin{threeparttable} + \setlength{\tabcolsep}{0.6cm}{ % 调节表格长度 + \begin{tabular}{lc} % 三线表不能有竖线,l-left, c-center, r-right + \toprule + % 三线表-top 线 + Example & Result \\ + \midrule + % 三线表-middle 线 + Example1 & 0.25\tnote{1} \\ + Example2 & 0.36 \\ + \bottomrule + % 三线表-底线 + \end{tabular} + } + \begin{tablenotes} + \item[1] 数据来源:南方科技大学 \LaTeX 模版 % 增加表格数据来源注释 + \end{tablenotes} + \end{threeparttable} +\end{table} + +\begin{proof} + 这是一个证明符号的示例。 +\end{proof} + \subsection{参考文献} -参考文献如是\cite{Nicholas1998Handbook}。 +参考文献一般使用 \verbbox{\cite{}} 命令,效果如是\cite{Nicholas1998Handbook}; +引用作者使用 \verbbox{\citeauthor{}},效果如是“\citeauthor{goossens1994latex}”。 diff --git a/sections/examples/disclaimer.tex b/sections/examples/disclaimer.tex index 91ee316..7a85c34 100644 --- a/sections/examples/disclaimer.tex +++ b/sections/examples/disclaimer.tex @@ -2,7 +2,11 @@ % !TEX program = xelatex \section{免责声明} \begin{enumerate}[label={\alph*)}] - \item 本模板的发布遵守 \LaTeX\ Project Public License,使用前请认真阅读协议内容。 - \item 南方科技大学教学工作部只提供毕业论文写作指南,不提供官方模板,也不会授权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师不提意见. 任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。 - \item 任何个人或组织以本模板为基础进行修改,扩展而生成的新的专用模板,请严格遵守 \LaTeX\ Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与本模板作者无关。 +\item 本模板的发布遵守 \LaTeX\ Project Public License,使用前请认真阅读协议内容。 +\item 南方科技大学教学工作部只提供毕业论文写作指南,不提供官方模板,也不会授权第三方模板为官方模板, + 所以此模板仅为写作指南的参考实现,不保证格式审查老师不提意见。 + 任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。 +\item 任何个人或组织以本模板为基础进行修改,扩展而生成的新的专用模板, + 请严格遵守 \LaTeX\ Project Public License 协议。 + 由于违犯协议而引起的任何纠纷争端均与本模板作者无关。 \end{enumerate} diff --git a/sections/examples/figures.tex b/sections/examples/figures.tex index 363ed5a..b082ec1 100644 --- a/sections/examples/figures.tex +++ b/sections/examples/figures.tex @@ -1,21 +1,21 @@ \begin{figure}[htb] - \centering - \includegraphics[width=.5\textwidth]{example-image-a} - \caption{自带测试图片---Test image}\label{F:test-a} - % 图片的标题应该在下方 + \centering + \includegraphics[width=.5\textwidth]{example-image-a} + \caption{自带测试图片---Test image}\label{F:test-a} + % 图片的标题应该在下方 \end{figure} \begin{figure}[htb] + \centering + \begin{subfigure}[t]{.45\linewidth} + \centering + \includegraphics[width=1\textwidth]{example-image-a} + \caption{子图-自带测试图片---Test image}\label{F:test-b-sub-a} + \end{subfigure} + \begin{subfigure}[t]{.45\linewidth} \centering - \begin{subfigure}[t]{.45\linewidth} - \centering - \includegraphics[width=1\textwidth]{example-image-a} - \caption{子图-自带测试图片---Test image}\label{F:test-b-sub-a} - \end{subfigure} - \begin{subfigure}[t]{.45\linewidth} - \centering - \includegraphics[width=1\textwidth]{example-image-a} - \caption{子图-自带测试图片---Test image}\label{F:test-b-sub-b} - \end{subfigure} - \caption{自带测试图片---Test image}\label{F:test-b} -\end{figure} \ No newline at end of file + \includegraphics[width=1\textwidth]{example-image-a} + \caption{子图-自带测试图片---Test image}\label{F:test-b-sub-b} + \end{subfigure} + \caption{自带测试图片---Test image}\label{F:test-b} +\end{figure} diff --git a/sections/examples/interface.tex b/sections/examples/interface.tex index 1dcc65f..c40a743 100644 --- a/sections/examples/interface.tex +++ b/sections/examples/interface.tex @@ -1,19 +1,20 @@ % !Mode:: "TeX:UTF-8" % !TEX program = xelatex \section{文类接口} -文类的接口的命名均为汉字,意思为字面意思,如有疑问,欢迎在 GitHub 提出 \href{https://github.com/Iydon/sustechthesis/issues}{Issues}。 +文类的接口的命名均为汉字,意思为字面意思, +如有疑问,欢迎在 GitHub 提出 \href{https://github.com/Iydon/sustechthesis/issues}{Issues}。 \subsection{汉化字号接口} 本接口主要使用 \texttt{ctex} 宏包。 -\verbbox{\初号},\verbbox{\小初},\verbbox{\一号},\verbbox{\小一},\verbbox{\二号},\verbbox{\小二},\verbbox{\三号},\verbbox{\小三},\verbbox{\四号},\verbbox{\小四},\verbbox{\五号},\verbbox{\小五},\verbbox{\六号},\verbbox{\小六},\verbbox{\七号},\verbbox{\八号}。 - +\verbbox{\初号},\verbbox{\小初},\verbbox{\一号},\verbbox{\小一},\verbbox{\二号},\verbbox{\小二},\verbbox{\三号},\verbbox{\小三}, +\verbbox{\四号},\verbbox{\小四},\verbbox{\五号},\verbbox{\小五},\verbbox{\六号},\verbbox{\小六},\verbbox{\七号},\verbbox{\八号}。 \subsection{汉化字体接口} 可能本机上部分字体不存在,导致部分字体无法使用。 -\verbbox{\宋体},\verbbox{\黑体},\verbbox{\仿宋},\verbbox{\楷书},\verbbox{\隶书},\verbbox{\幼圆},\verbbox{\雅黑},\verbbox{\苹方}。 - +\verbbox{\宋体},\verbbox{\黑体},\verbbox{\仿宋},\verbbox{\楷书}, +\verbbox{\隶书},\verbbox{\幼圆},\verbbox{\雅黑},\verbbox{\苹方}。 \subsection{字体效果接口} @@ -23,12 +24,12 @@ \subsection{字体效果接口} \verbbox{\粗体},\verbbox{\斜体}。 - \subsection{格式相关接口} \subsubsection{命令} 例子请参考前文,在写论文初期,可以注释掉标题页等不必要信息,以加快编译速度。 -\verbbox{\设置信息},\verbbox{\目录},\verbbox{\下划线},\verbbox{\中文标题页},\verbbox{\英文标题页},\verbbox{\中文诚信承诺书},\verbbox{\英文诚信承诺书},\verbbox{\摘要标题},\verbbox{\参考文献},\verbbox{\附录},\verbbox{\致谢}。 +\verbbox{\设置信息},\verbbox{\目录},\verbbox{\下划线},\verbbox{\中文标题页},\verbbox{\英文标题页}, +\verbbox{\中文诚信承诺书},\verbbox{\英文诚信承诺书},\verbbox{\摘要标题},\verbbox{\参考文献},\verbbox{\附录},\verbbox{\致谢}。 \subsubsection{环境} 摘要环境均需一个参数,为关键词:\verb|\begin{}{}...\end{}|。 diff --git a/sections/examples/thanks.tex b/sections/examples/thanks.tex deleted file mode 100644 index 6674dde..0000000 --- a/sections/examples/thanks.tex +++ /dev/null @@ -1,14 +0,0 @@ -% !Mode:: "TeX:UTF-8" -% !TEX program = xelatex -\sustechthesis\ 目前版本为 \version, \LaTeX\ 毕业论文模板项目从提出到现在已有两年了。感谢为本项目贡献代码的开发人员们: -\begin{itemize} - \item 梁钰栋(南方科技大学,本科 17 级); - \item 张志炅(南方科技大学,本科 17 级)。 -\end{itemize} -以及使用本项目,并提出诸多宝贵的修改意见的使用人员们: -\begin{itemize} - \item 李未晏(南方科技大学,本科 15 级); - \item 张尔聪(南方科技大学,本科 15 级)。 -\end{itemize} - -此外,目前的维护者并非计算机系,可能存在对协议等的错误使用,如果你在本模板中发现任何问题,请在 GitHub 中提出 \href{https://github.com/Iydon/sustechthesis/issues}{Issues},同时也非常欢迎对代码的贡献! diff --git a/sections/examples/tutorial.tex b/sections/examples/tutorial.tex index bea0c5d..397e882 100644 --- a/sections/examples/tutorial.tex +++ b/sections/examples/tutorial.tex @@ -1,4 +1,5 @@ % !Mode:: "TeX:UTF-8" % !TEX program = xelatex \section{\LaTeX\ 入门} -请参考 \href{https://tex.readthedocs.io/zh_CN/latest/}{在线文档},包括学习资源及学习路径。欢迎在 GitHub 上提出 \href{https://github.com/Iydon/tex/issues}{Issues}。 +请参考 \href{https://tex.readthedocs.io/zh_CN/latest/}{在线文档},包括学习资源及学习路径。 +欢迎在 GitHub 上提出 \href{https://github.com/Iydon/tex/issues}{Issues}。 diff --git a/sustechthesis.cls b/sustechthesis.cls index 5d842f6..b508466 100644 --- a/sustechthesis.cls +++ b/sustechthesis.cls @@ -10,22 +10,25 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{sustechthesis} - [2022/05/16 v1.3.3 SUSTech Thesis Template] + [2024/02/28 v1.3.6 SUSTech Thesis Template] \RequirePackage{ifxetex,ifluatex,ifthen} \ifthenelse{\boolean{xetex}\OR\boolean{luatex}}{}{ \ClassError{sustechthesis}{You Should Use XeLaTeX or LuaLaTeX To Compile.}} \hyphenation{SUSTech-Thesis} \newcommand{\sustechthesis}{SUSTechThesis} -\newcommand{\version}{1.3.3} +\newcommand{\version}{1.3.6} + \RequirePackage{kvoptions} \SetupKeyvalOptions{ family=sustech, prefix=sustech@, setkeys=\kvsetkeys} -\DeclareStringOption[bachelor]{degree}[bachelor] \DeclareStringOption[chinese]{language}[chinese] \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexart}} + +\LoadClass[a4paper,UTF8,scheme=chinese,zihao=-4,twoside]{ctexart} + \ProcessKeyvalOptions* \newcommand\sustech@validate@key[1]{% \@ifundefined{sustech@\csname sustech@#1\endcsname true}{% @@ -34,17 +37,6 @@ \csname sustech@\csname sustech@#1\endcsname true\endcsname }% } -\newif\ifsustech@bachelor -\newif\ifsustech@master -\newif\ifsustech@doctor -\sustech@validate@key{degree} -\LoadClass[a4paper,UTF8,scheme=chinese,zihao=-4]{ctexart} -\ifsustech@master - \ClassError{sustechthesis}{NotImplementedError} -\fi -\ifsustech@doctor - \ClassError{sustechthesis}{NotImplementedError} -\fi \newif\ifsustech@chinese \newif\ifsustech@english @@ -55,6 +47,10 @@ \RequirePackage{hologo} \RequirePackage{etoolbox} +% 添加绘制三线表的必要依赖 +\RequirePackage{multirow} +\RequirePackage{threeparttable} + \setmainfont[ Path=fonts/times/, Extension = .ttf, @@ -62,10 +58,16 @@ BoldFont = *bd , ItalicFont = *i , BoldItalicFont = *bi -]{times} %英文默认为Times New Roman +]{times} % 英文默认为 Times New Roman + +% 取消标题空行 +\RequirePackage{titlesec} +% 第一层标题段前空一行 +\titlespacing{\section}{0pt}{15.6pt}{.3ex plus .0ex} +\titlespacing{\subsection}{0pt}{1.2ex plus .0ex minus .0ex}{.3ex plus .0ex} \RequirePackage{geometry} - \geometry{a4paper,top=2.5cm,bottom=2.0cm,left=3.0cm,right=2.5cm} + \geometry{a4paper,top=27mm,bottom=31mm,left=25mm,right=25mm,bindingoffset=5mm} \RequirePackage{amssymb} \RequirePackage{setspace} \RequirePackage{graphicx} @@ -89,12 +91,16 @@ \newcommand{\七号}{\zihao {7}} \newcommand{\八号}{\zihao {8}} % 字体汉化设置 - \renewcommand{\songti}{\CJKfontspec[Path=fonts/,FallBack=simsunb.ttf]{simsun.ttc}} - \setCJKmainfont[Path=fonts/,FallBack=simsunb.ttf]{simsun.ttc} % 中文默认为宋体,小四在\documentclass处设置 + \xeCJKsetup{EmboldenFactor=3} % 伪粗体等级 + % 宋体 + \renewcommand{\songti}{\CJKfontspec[Path=fonts/,FallBack=simsunb.ttf,AutoFakeBold]{simsun.ttc}} + \setCJKmainfont[Path=fonts/,FallBack=simsunb.ttf,AutoFakeBold]{simsun.ttc} % 中文默认为宋体,小四在 \documentclass 处设置 \newcommand{\宋体}{\songti} + % 黑体 \renewcommand{\heiti}{\CJKfontspec[Path=fonts/]{simhei.ttf}} \setCJKsansfont[Path=fonts/]{simhei.ttf} \newcommand{\黑体}{\heiti} + % 其他 \newcommand{\仿宋}{\fangsong} \newcommand{\楷书}{\kaishu} \newcommand{\隶书}{\lishu} @@ -106,10 +112,10 @@ \newcommand{\斜体}{\itshape} % 设置章节样式 \ctexset{ - % 需要使用ctexart文类,否则报错键不存在 + % 需要使用 ctexart 文类,否则报错键不存在 section = { name={{},.}, - format={\hspace*{-1.5em}\黑体\三号}, + format={\黑体\三号}, }, subsection = { format={\黑体\四号}, @@ -119,18 +125,47 @@ }, } \RequirePackage{caption} - \renewcommand{\captionfont}{\bfseries\songti\zihao{5}} %表题,图题用五号宋体加黑 + \renewcommand{\captionfont}{\粗体\黑体\五号} % 表题、图题用五号黑体加黑 \DeclareCaptionLabelSeparator{enspace}{\enspace} \DeclareCaptionLabelFormat{rightBracket}{#2)} - \captionsetup[table]{labelsep=enspace} %表序表题之间没有标点,而是一个空格,默认前缀为表 - \captionsetup[figure]{labelsep=enspace} %图序图题之间没有标点,而是一个空格,默认前缀为图 + \captionsetup[table]{labelsep=enspace} % 表序表题之间没有标点,而是一个空格,默认前缀为表 + \captionsetup[figure]{labelsep=enspace} % 图序图题之间没有标点,而是一个空格,默认前缀为图 + \captionsetup[subfigure]{labelformat=rightBracket, labelsep=enspace} % 子图 a, b, c 外没有括号 \ifsustech@chinese - \ctexset{figurename = {图}, tablename = {表},}% + \ctexset{ + figurename = {图}, + tablename = {表}, + listfigurename = {插图}, + listtablename = {表格}, + proofname = {证明}, + }% \else - \ctexset{figurename = {Figure}, tablename = {Table},}% + \ctexset{ + figurename = {Figure}, + tablename = {Table}, + listfigurename = {List of Figures}, + listtablename = {List of Tables}, + proofname = {Proof}, + }% \fi - \captionsetup[subfigure]{labelformat=rightBracket, labelsep=enspace}% 子图a,b,c外没有括号 +% 设定浮动体内字体大小 +\RequirePackage{floatrow} +\DeclareFloatFont{floatfont}{\五号} +\floatsetup[table]{% + capposition = top, + objectset = centering, + margins = centering, + font = floatfont, +} +\floatsetup[figure]{% + capposition = bottom, + objectset = centering, + margins = centering, + font = floatfont, +} + +\renewcommand{\baselinestretch}{1.72} % 调整正文为 1.5 倍行距 \RequirePackage[MSWordLineSpacingMultiple=1.5]{zhlineskip} % 行距设置 \newenvironment{行距}[1]% @@ -148,6 +183,8 @@ \renewcommand\cftsubsubsecfont{\宋体\四号} \renewcommand\cftsubsubsecpagefont{\宋体\四号} \setlength\cftparskip{7pt} + % 修改目录标题之间的距离 + \setlength\cftbeforesecskip{0bp} \setlength\cftsubsecindent{0bp} \setlength\cftsubsubsecindent{0bp} \RequirePackage{xkeyval} @@ -167,7 +204,7 @@ \信息中英键{副标题} \信息中英键{姓名} \信息中英键{学号} - \信息中英键{系别} + \信息中英键{院系} \信息中英键{专业} \信息中英键{指导老师} \信息中英键{时间} @@ -183,20 +220,38 @@ \setcounter{page}{1} \pagenumbering{arabic} } +% 定义中英文常量 +\ifsustech@chinese + \def\contentsname{目录}% + \def\bibname{参考文献}% + \def\appendixname{附录}% + \def\sustech@acknowledgments@name{致谢}% + \def\sustech@abstract@name{摘要}% + \def\sustech@honesty@name{诚信承诺}% +\else + \def\contentsname{Table of Contents}% + \def\bibname{References}% + \def\appendixname{Appendix}% + \def\sustech@acknowledgments@name{Acknowledgments}% + \def\sustech@abstract@name{Abstract}% + \def\sustech@honesty@name{COMMITMENT OF HONESTY}% +\fi +\setcounter{tocdepth}{3} % 目录 % 无论是撰写规范还是样例都没有提到页码位置 % 已确认页码应在正文处开始 \newcommand{\目录}{ + \pdfbookmark[1]{\contentsname}{toc} \tableofcontents \clearpage } \RequirePackage{fancyhdr} \pagestyle{fancy} - \lhead{}\chead{}\rhead{}\lfoot{}\rfoot{}%除了页脚页码之外,什么也没有 - \cfoot{\五号\thepage} %页脚居中、阿拉伯数字(五号新罗马体)连续编码 - \renewcommand{\headrulewidth}{0bp} %改为0bp即可去掉页眉下面的横线 - \renewcommand{\footrulewidth}{0bp} %改为0bp即可去掉页脚上面的横线 + \lhead{}\chead{}\rhead{}\lfoot{}\rfoot{} % 除了页脚页码之外,什么也没有 + \cfoot{\五号\thepage} % 页脚居中、阿拉伯数字(五号新罗马体)连续编码 + \renewcommand{\headrulewidth}{0bp} % 改为 0bp 即可去掉页眉下面的横线 + \renewcommand{\footrulewidth}{0bp} % 改为 0bp 即可去掉页脚上面的横线 % 设置标题页 \RequirePackage{listofitems} \RequirePackage{xeCJKfntef} @@ -217,12 +272,12 @@ % \renewcommand\arraystretch{1.3} % 应该只是对可能会换行的英文 item 生效。 \bfseries \IfBooleanTF{#1} - {%有星号 + {% 有星号 \IfValueTF{#4} {\sustech@info@multiline[#4]{#5}} {\sustech@info@multiline[15em]{#5}} } - {%没星号 + {% 没星号 \IfValueTF{#4} {\sustech@info@singleline[#4]{#5}} {\sustech@info@singleline[15em]{#5}} @@ -257,35 +312,37 @@ \thispagestyle{empty} \begin{center} \begin{tabular}{llr} - 分类号 \下划线[2.3cm]{\分类号@中} \hspace{0.45\textwidth} & 编号\下划线[2.3cm]{\编号@中} \\[5pt] + 分类号 \下划线[2.3cm]{\分类号@中} \hspace{0.45\textwidth} & 编号\下划线[2.3cm]{\编号@中} \\[15pt] U\hfill D\hfill C\下划线[2.3cm]{\UDC@中} \hspace{0.45\textwidth} & 密级\下划线[2.3cm]{\密级@中} \end{tabular} - \vskip 1.35cm - \includegraphics[width=0.85\textwidth]{figures/logo/SUSTech-zh.pdf} - \vskip 0.5cm + \vskip 1.05cm + \begin{figure}[h] + \centering + \includegraphics[width=0.75\textwidth]{figures/logo/SUSTech-zh.pdf} + \end{figure} + \vskip 1.05cm {\粗体\宋体\小初 \thesis@subject} - \vskip 3.5cm + \vskip 2.25cm {\粗体\宋体\三号 - \begin{tabular}{lc} - \sustech@info@item*[5em]{题目:}[9cm]{\题目@中}\\[9pt] + \begin{tabular}{rl} + \sustech@info@item*[5em]{题目:}[9cm]{\题目@中}\\[6pt] \ifdefempty{\副标题@中}% {% empty - \relax + \\[20pt] % 按照最新模板,题目的 2 行和姓名之间还有 1 个空行, }{% not empty - \sustech@info@item[5em]{}[9cm]{\副标题@中}\\[9pt] + \sustech@info@item[5em]{}[9cm]{\副标题@中}\\[20pt] }% - \end{tabular} - \vfill - \begin{tabular}{lc} - \sustech@info@item[5em]{姓名:}[9cm]{\姓名@中}\\[9pt] - \sustech@info@item[5em]{学号:}[9cm]{\学号@中}\\[9pt] - \sustech@info@item*[5em]{系别:}[9cm]{\系别@中}\\[9pt] - \sustech@info@item*[5em]{专业:}[9cm]{\专业@中}\\[9pt] - \sustech@info@item[5em]{指导教师:}[9cm]{\指导老师@中 \space \职称@中}\\[9pt] + + \sustech@info@item[5em]{姓名:}[9cm]{\姓名@中}\\[16pt] + \sustech@info@item[5em]{学号:}[9cm]{\学号@中}\\[16pt] + \sustech@info@item*[5em]{院系:}[9cm]{\院系@中}\\[16pt] + \sustech@info@item*[5em]{专业:}[9cm]{\专业@中}\\[16pt] + \sustech@info@item[5em]{指导教师:}[9cm]{\指导老师@中}\\[16pt] \end{tabular} } - \vskip 3.14cm - {\宋体\三号\时间@中} + % 2025.06 消息,封面的时间字段将删除 + % \vskip 3.14cm + % {\宋体\三号\时间@中} \end{center} \clearpage \restoregeometry @@ -304,26 +361,23 @@ {\小初 \thesis@subject@en} \vskip 2.7cm {\粗体\三号 - \begin{tabular}{rr} - \sustech@info@item*{Thesis Title:}[9cm]{\题目@英}\\[9pt] + \begin{tabular}{rl} + \sustech@info@item*{Thesis Title:}[9cm]{\题目@英}\\[12pt] \ifdefempty{\副标题@英}% {% empty - \relax + \\[15pt] % 按照最新模板,题目的 2 行和姓名之间还有 1 个空行, }{% not empty - \sustech@info@item{}[9cm]{\副标题@英}\\[9pt] + \sustech@info@item{}[9cm]{\副标题@英}\\[15pt] }% - \end{tabular} - \vfill - \begin{tabular}{lc} - \sustech@info@item{Student Name:}[9cm]{\姓名@英}\\[9pt] - \sustech@info@item{Student ID:}[9cm]{\学号@英}\\[9pt] - \sustech@info@item*{Department:}[9cm]{\系别@英}\\[9pt] - \sustech@info@item*{Program:}[9cm]{\专业@英}\\[9pt] - \sustech@info@item{Thesis Advisor:}[9cm]{\职称@英 \space \指导老师@英}\\[10pt] + \sustech@info@item{Student Name:}[9cm]{\姓名@英}\\[12pt] + \sustech@info@item{Student ID:}[9cm]{\学号@英}\\[12pt] + \sustech@info@item*{Department:}[9cm]{\院系@英}\\[12pt] + \sustech@info@item*{Program:}[9cm]{\专业@英}\\[12pt] + \sustech@info@item{Thesis Advisor:}[9cm]{\指导老师@英}\\[12pt] \end{tabular} } - \vskip 2.1cm - \三号 Date: \时间@英 + % \vskip 2.1cm + % \三号 Date: \时间@英 \end{center} \clearpage\restoregeometry } @@ -334,18 +388,19 @@ left=3.17cm,right=3.17cm} \thispagestyle{empty} \begin{center} - {\黑体\二号 \bfseries 诚信承诺书} + {\bfseries\黑体\二号 \sustech@honesty@name} \end{center} \vskip 1.65cm \begin{spacing}{1.85}\宋体\四号 1.本人郑重承诺所呈交的毕业设计(论文),是在导师的指导下,独立进行研究工作所取得的成果,所有数据、图片资料均真实可靠。\par - 2.除文中已经注明引用的内容外,本论文不包含任何其他人或集体已经发表或撰写过的作品或成果。对本论文的研究作出重要贡献的个人和集体,均已在文中以明确的方式标明。\par + 2.除文中已经注明引用的内容外,本论文不包含任何其他人或集体已经发表或撰写过的作品或成果。 + 对本论文的研究作出重要贡献的个人和集体,均已在文中以明确的方式标明。\par 3.本人承诺在毕业论文(设计)选题和研究内容过程中没有抄袭他人研究成果和伪造相关数据等行为。\par 4.在毕业论文(设计)中对侵犯任何方面知识产权的行为,由本人承担相应的法律责任。 \vskip 4.55cm \begin{flushright} - \makebox[10em][l]{作者签名:}\\ + \makebox[11em][l]{作者签名:}\\ \makebox[11em][l]{\下划线[2cm]{}年\下划线[1cm]{}月\下划线[1cm]{}日} \end{flushright} \end{spacing} @@ -357,16 +412,27 @@ left=3.16cm,right=3.10cm} \thispagestyle{empty} \begin{center} - {\fontsize{22bp}{22bp}\selectfont COMMITMENT OF HONESTY} + {\fontsize{22bp}{22bp}\selectfont \sustech@honesty@name} \end{center} \vskip 0.5cm \begin{spacing}{2.24} {\fontsize{14bp}{14bp} \selectfont \begin{enumerate}[wide, labelwidth=!, labelindent=0pt, nolistsep] - \item I solemnly promise that the paper presented comes from my \linebreak independent research work under my supervisor's supervision. All \linebreak statistics and images are real and reliable. - \item Except for the annotated reference, the paper contents no other \linebreak published work or achievement by person or group. All people making \linebreak important contributions to the study of the paper have been indicated \linebreak clearly in the paper. - \item I promise that I did not plagiarize other people's research achievement \linebreak or forge related data in the process of designing topic and research \linebreak content. - \item If there is violation of any intellectual property right, I will take legal \linebreak responsibility myself. + \item I solemnly promise that the paper presented comes from my \linebreak + independent research work under my supervisor's supervision. All \linebreak + statistics and images are real and reliable. + + \item Except for the annotated reference, the paper contents no other \linebreak + published work or achievement by person or group. All people making \linebreak + important contributions to the study of the paper have been indicated \linebreak + clearly in the paper. + + \item I promise that I did not plagiarize other people's research achievement \linebreak + or forge related data in the process of designing topic and research \linebreak + content. + + \item If there is violation of any intellectual property right, I will take legal \linebreak + responsibility myself. \end{enumerate} \vskip 3.25cm \begin{flushright} @@ -377,27 +443,48 @@ \end{spacing} \clearpage\restoregeometry } +\newcommand\诚信承诺书{ + \pdfbookmark[1]{\sustech@honesty@name}{coh} + \ifsustech@chinese + \中文诚信承诺书 + \else + \英文诚信承诺书 + \fi +} % 摘要 \RequirePackage{listofitems} \newcommand\摘要标题{ + \pdfbookmark[1]{\sustech@abstract@name}{abstract} \begin{center} - \黑体\二号\题目@中\\ + \ifsustech@chinese + \黑体\二号\题目@中 + \else + \二号\题目@英 + \fi + \\ \ifdefempty{\副标题@中}% {% empty \relax }{% not empty - \hspace*{\fill} \小二 ——\副标题@中\\ + \ifsustech@chinese + \hspace*{\fill} \黑体\小二 ——\副标题@中\\ + \else + % 按需使用英文副标题 + \hspace*{\fill} \小二 ---\副标题@英\\ + \fi }% - \vskip 1cm - \宋体\四号\姓名@中 \\[9pt] - (\楷书\小四{\系别@中 \quad 指导教师: \指导老师@中}) + \ifsustech@chinese + \vskip 1cm + \宋体\四号\姓名@中 \\[9pt] + (\楷书\小四{\院系@中 \quad 指导教师: \指导老师@中}) + \fi \end{center} \vskip 1.5cm } \newenvironment{中文摘要}[1]% {\setsepchar{;}\readlist\args{#1} \begin{spacing}{1.45} - \noindent\黑体\三号[摘要]: + \noindent\黑体\三号 [摘要]: \宋体\四号}% {\vfill \noindent\黑体\三号 [关键词]: @@ -413,10 +500,10 @@ \newenvironment{英文摘要}[1]% {\setsepchar{{, }}\readlist\args{#1} \begin{spacing}{1.45} - \noindent\三号 [\textbf{ABSTRACT}]: + \noindent\三号 [ABSTRACT]: \四号}% {\vfill - \noindent\三号 [\textbf{Key words}]: + \noindent\三号 [Keywords]: \四号 \foreachitem\word\in\args{ \word @@ -428,30 +515,47 @@ \vfill\clearpage} % 参考文献 \newcommand{\参考文献}{ - % 或者可以将refname置空, 按照附录的样式修改. + % 或者可以将 refname 置空,按照附录的样式修改 \phantomsection - \addcontentsline{toc}{section}{参考文献} - \sectionmark{参考文献} - \section*{\centerline{参考文献}} + \addcontentsline{toc}{section}{\bibname} + \sectionmark{\bibname} + \section*{\centerline{\bibname}} } +\ifsustech@chinese + \AtBeginDocument{% + % 本地化 \citeauthor{} 的输出,避免出现 et al. + \DefineBibliographyStrings{english}{ + andincite = {和}, + andincitecn = {和}, + andothersincitecn = {等人}, + andothersincite = {等人}, % adddot 才能避开标点追踪 + } + } +\fi +\AtEndPreamble{% + \@ifpackageloaded{biblatex}{% + \renewcommand{\bibfont}{\五号}% + }{} +} + % 附录 \newcommand{\附录}{ \phantomsection \clearpage - \addcontentsline{toc}{section}{附录} \addtocounter{section}{1} - \sectionmark{附录} + \addcontentsline{toc}{section}{\appendixname} + \sectionmark{\appendixname} \begin{center} - \黑体\三号 附录 + \黑体\三号 \appendixname \end{center} \appendix } % 致谢 \newcommand{\致谢}{ \phantomsection - \addcontentsline{toc}{section}{致谢} - \sectionmark{致谢} - \section*{\centerline{致谢}} + \addcontentsline{toc}{section}{\sustech@acknowledgments@name} + \sectionmark{\sustech@acknowledgments@name} + \section*{\centerline{\sustech@acknowledgments@name}} } % 设定元数据 \ifsustech@chinese