Skip to content

Commit

Permalink
feat: add v1 develop script (sjtug#762)
Browse files Browse the repository at this point in the history
* feat: add v1 develop script

Signed-off-by: Alex Chi <[email protected]>

* update docs

Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh authored Feb 5, 2022
1 parent b412799 commit cf896c4
Show file tree
Hide file tree
Showing 27 changed files with 64 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,5 @@ main.pdf
thesis-bot.yml

build/

SJTUTeX-v1/
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 任何人都可以直接编辑;
Expand Down
26 changes: 26 additions & 0 deletions build_v1.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,adobe')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,fandol')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,founder')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,mac')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,ubuntu')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `cjkfont,windows')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,cambria')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,lm')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,newcm')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-pagella.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,pagella')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,stixtwo')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-termes.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,termes')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `mathfont,xits')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,cambria')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,lm')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,newcm')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-pagella.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,pagella')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,stixtwo')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-termes.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,termes')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,times')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `textfont,xits')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down
3 changes: 2 additions & 1 deletion texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `graduate')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `undergraduate')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down Expand Up @@ -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 = {
Expand Down
5 changes: 1 addition & 4 deletions texmf/tex/latex/sjtuthesis/sjtuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%% sjtuthesis.dtx (with options: `class')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (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
Expand Down Expand Up @@ -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{%
Expand Down

0 comments on commit cf896c4

Please sign in to comment.