diff --git a/.gitignore b/.gitignore index 78604ad9..61a7e31b 100644 --- a/.gitignore +++ b/.gitignore @@ -254,3 +254,5 @@ main.pdf thesis-bot.yml build/ + +SJTUTeX-v1/ diff --git a/README.md b/README.md index db24df77..d11e17e5 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,15 @@ make wordcount # 论文字数统计 ### 成为贡献者 -这个仓库是面向用户的**示例模版**,如果你有很好的排版示例,可以提交到此仓库与大家分享。如果你想要为 SJTUThesis 文档类贡献代码,可移步 [SJTUTeX](https://github.com/sjtug/SJTUTeX)。在贡献之前,你可以从[这些问题](https://github.com/sjtug/SJTUThesis/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue)开始熟悉贡献代码的流程。除了提交 Pull Request 之外,还有以下方式可以进行贡献: +这个仓库是面向用户的**示例模版**,如果你有很好的排版示例,可以提交到此仓库与大家分享。如果你想要为 SJTUThesis 文档类贡献代码,可移步 [SJTUTeX (v1)](https://github.com/sjtug/SJTUTeX/tree/v1)。 + +我们正在开发基于 LaTeX3 的新文档类 SJTUTeX v2,本仓库的示例模版对应 SJTUTeX v1。 + +`texmf/tex/latex/sjtuthesis` 目录下的内容都是通过 SJTUTeX v1 的 `sjtuthesis.dtx` 文件自动生成的。如果您需要修改文档类的内容,应该修改 SJTUTeX 仓库中的 `sjtuthesis.dtx`,而非直接修改 cls 文件。您可以使用 `build_v1.sh` 一键搭建开发环境。这个脚本会下载 SJTUTeX v1 的代码,编译 `.dtx` 文件,并把生成的文件拷贝到 SJTUThesis 的 `texmf` 目录下。 + +因此,如果您修改了 `sjtuthesis` 模版类,应该先给 `SJTUTeX` 的 `v1` branch 发 PR,然后再将更新同步到本仓库。 + +在贡献之前,你可以从[这些问题](https://github.com/sjtug/SJTUThesis/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue)开始熟悉贡献代码的流程。除了提交 Pull Request 之外,还有以下方式可以进行贡献: * 帮助我们解答同学们的[问题](https://github.com/sjtug/SJTUThesis/discussions),这些问题你也可能遇到过并且知道如何解决; * 与我们一起维护项目的 [Wiki 文档](https://github.com/sjtug/SJTUThesis/wiki),Wiki 任何人都可以直接编辑; diff --git a/build_v1.sh b/build_v1.sh new file mode 100755 index 00000000..e104c4c7 --- /dev/null +++ b/build_v1.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +SJTUTEX_DIR="SJTUTeX-v1" + +if [ ! -d "${SJTUTEX_DIR}" ]; then + git clone https://github.com/sjtug/SJTUTeX -b v1 ${SJTUTEX_DIR} +fi + +cd ${SJTUTEX_DIR}/source +xetex -interaction=nonstopmode sjtuthesis.ins +cd ../../ + +rm -rf texmf/tex/latex/sjtuthesis +mkdir texmf/tex/latex/sjtuthesis + +RELEASE_DIR="texmf/tex/latex/sjtuthesis" + +cp ${SJTUTEX_DIR}/source/sjtuthesis.cls ${RELEASE_DIR} +cp ${SJTUTEX_DIR}/source/sjtuthesis-graduate.ltx ${RELEASE_DIR} +cp ${SJTUTEX_DIR}/source/sjtuthesis-undergraduate.ltx ${RELEASE_DIR} +cp -a ${SJTUTEX_DIR}/vi ${RELEASE_DIR} +mkdir -p ${RELEASE_DIR}/fd +cp ${SJTUTEX_DIR}/source/*-font-*.def ${RELEASE_DIR}/fd + +make main.pdf diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def index b392e07c..d73b38c5 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,adobe') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def index 12590879..eb08941e 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,fandol') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def index 2c3d7070..2f5350a3 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,founder') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def index c992baf2..63553b7c 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,mac') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def index b7efaf6a..c335537a 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,ubuntu') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def index d0546a6b..1843b376 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `cjkfont,windows') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def index 53467a6c..d0060cc1 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,cambria') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def index dacc4d12..8c7332ff 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,lm') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def index 315392f4..edf29e9a 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,newcm') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-pagella.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-pagella.def index cbd697f5..00b31aa3 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-pagella.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-pagella.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,pagella') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def index 62f01928..aebd7464 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,stixtwo') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-termes.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-termes.def index 448c9b60..ba4ae23c 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-termes.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-termes.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,termes') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def index 695c06f8..b5ab53a2 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `mathfont,xits') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def index ec824c4c..1c6632fe 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,cambria') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def index 1142eb26..0a8008ae 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,lm') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def index c6474889..52045790 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,newcm') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-pagella.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-pagella.def index 1bf2cffb..86839b57 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-pagella.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-pagella.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,pagella') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def index 23217b1d..5586f162 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,stixtwo') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-termes.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-termes.def index c5ae5bfc..2bd398e3 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-termes.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-termes.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,termes') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def index 991608af..fdb93760 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,times') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def index dcbdacd4..f3d5e8a9 100644 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def +++ b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `textfont,xits') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx b/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx index 7c2b0685..005d19f4 100644 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx +++ b/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `graduate') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -72,6 +72,7 @@ } } \renewcommand\cftchapfont{\bfseries\heiti} +\renewcommand\cftchapleader{\normalfont\cftdotfill{\cftdotsep}} \NewDocumentEnvironment{abstract}{}{% \sjtu@chapter*[\sjtu@name@abstract@zh]{% \sjtu@info@title@zh \vskip 2ex diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx b/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx index 1a4a30ec..6cba14b0 100644 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx +++ b/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `undergraduate') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -60,6 +60,8 @@ subsection/format = \zihao{-4}\normalfont, } \renewcommand\cftchapfont{\normalfont} +\renewcommand\cftchapleader{\normalfont\cftdotfill{\cftdotsep}} +\renewcommand\cftchappagefont{\normalfont} \ifsjtu@type@bachelor \sjtusetup{ style = { diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis.cls b/texmf/tex/latex/sjtuthesis/sjtuthesis.cls index e8072d8c..2c59818c 100644 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis.cls +++ b/texmf/tex/latex/sjtuthesis/sjtuthesis.cls @@ -7,7 +7,7 @@ %% sjtuthesis.dtx (with options: `class') %% %% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2021 by SJTUG +%% (C) 2018-2022 by SJTUG %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -837,9 +837,6 @@ \renewcommand\cftdot{\textperiodcentered} \fi \renewcommand\cftdotsep{1} -\setlength{\cftbeforechapskip}{0pt} -\renewcommand\cftchappagefont{\normalfont} -\renewcommand\cftchapleader{\normalfont\cftdotfill{\cftdotsep}} \renewcommand\cftfigpresnum{\sjtu@name@figure~} \renewcommand\cfttabpresnum{\sjtu@name@table~} \AtEndPreamble{%