Skip to content

Commit 58a622b

Browse files
authored
Update to v2.2
1 parent 99909d7 commit 58a622b

File tree

10 files changed

+153
-122
lines changed

10 files changed

+153
-122
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Makefile for HITSZThesis
1+
# Makefile for hitszthesis
22

33
PACKAGE = hitszthesis
44
THESIS = main
@@ -62,7 +62,7 @@ test:
6262

6363
wordcount : $(THESIS).tex
6464
@texcount $< -inc -chinese
65-
65+
6666
clean:
6767
$(LATEXMK) -c $(PACKAGE).dtx $(THESIS) $(SPINE)
6868
-@$(RM) *~ main-survey.*

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
<!-- Author : Jingxuan Yang-->
22
<!-- Program Email: yanglatex2e@gmail.com -->
33

4-
![CTAN Version](https://img.shields.io/ctan/v/hitszthesis.svg)
5-
![Github Version](https://img.shields.io/github/release/YangLaTeX/hitszthesis.svg)
4+
![CTAN Version](https://img.shields.io/ctan/v/hitszthesis.svg)
5+
![Github Version](https://img.shields.io/github/release/YangLaTeX/hitszthesis.svg)
66
![Repo Size](https://img.shields.io/github/repo-size/YangLaTeX/hitszthesis.svg)
77
![License](https://img.shields.io/ctan/l/hitszthesis.svg)
88

99
[Github](https://github.com/YangLaTeX/hitszthesis) | [Download](https://github.com/YangLaTeX/hitszthesis/releases) | [Wiki](https://github.com/YangLaTeX/hitszthesis/wiki) | [CTAN](https://www.ctan.org/pkg/hitszthesis)
1010

1111
# Introduction to hitszthesis
1212

13-
HITSZThesis is a **bachelor dissertation** LaTeX template for **Harbin Institute of Technology, ShenZhen** (HITSZ). Current version is 2.1, updated on 2020/2/23.
13+
HITSZThesis is a **bachelor dissertation** LaTeX template for **Harbin Institute of Technology, ShenZhen** (HITSZ). Current version is 2.2, updated on 2020/03/05.
1414

1515
# Documentation
16+
1617
Download and unzip the template. Specific usage documentation and examples can be found in the files below. At present, these documents are **only available in Chinese**:
18+
1719
* Template usage (hitszthesis.pdf)
1820
* Template example (main.pdf)
1921

2022
# Downloads
23+
2124
* Published version: [CTAN](https://www.ctan.org/pkg/hitszthesis)
2225
* Developer version: [GitHub](https://github.com/YangLaTeX/hitszthesis)
2326

2427
# Updates
2528

2629
## Automatic
30+
2731
Get the most up-to-date published version with your TeX distribution from [CTAN](https://www.ctan.org/pkg/hitszthesis).
2832

2933
## Manual
34+
3035
Download the package from [GitHub](https://github.com/YangLaTeX/hitszthesis) to the root directory of your thesis, then execute the command (Windows users `Shift + right click` white area in the file window and click "Open command line window here" from the popup menu):
3136

3237
```shell
@@ -36,10 +41,10 @@ xetex hitszthesis.ins
3641
You'll get `hitszthesis.cls` along with other template files.
3742

3843
# Reporting Issues
44+
3945
Please follow the procedure below:
4046

4147
* QQ group: 1039392552
42-
* Check the [FAQ](https://github.com/YangLaTeX/hitszthesis/wiki/FAQ)
4348
* [GitHub Issues](https://github.com/YangLaTeX/hitszthesis/issues)
4449

4550
# Makefile Usage
@@ -49,6 +54,7 @@ make [{all|thesis|spine|doc|clean|cleanall|distclean}]
4954
```
5055

5156
## Targets
57+
5258
* `make thesis` generate thesis main.pdf;
5359
* `make spine` generate book spine for printing spine.pdf;
5460
* `make doc` generate template documentation hitszthesis.pdf;
@@ -72,4 +78,5 @@ compile.bat cleanall # delete all examples' files and all pdf file
7278
```
7379

7480
# License
81+
7582
This material is subject to the [LATEX Project Public License 1.3c](https://ctan.org/license/lppl1.3) or any later version.

compile.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if %flag%x == x (
1212

1313
if %flag%x == thesisx (
1414
call :cleanall
15-
call :thesis
15+
call :thesis
1616
if ERRORLEVEL 1 (
1717
echo Error! Please check the 'main.log' for more details...
1818
pause
@@ -72,7 +72,7 @@ goto :EOF
7272

7373
:thesis
7474
echo Compile...
75-
latexmk -xelatex -quiet -file-line-error -halt-on-error -interaction=nonstopmode main >nul 2>nul
75+
latexmk -xelatex -file-line-error -halt-on-error -interaction=nonstopmode main >nul 2>nul
7676
goto :EOF
7777

7878
:cls
@@ -82,7 +82,7 @@ goto :EOF
8282

8383
:spine
8484
echo Compile spine.tex file...
85-
latexmk -xelatex -quiet -file-line-error -halt-on-error -interaction=nonstopmode spine >nul 2>nul
85+
latexmk -xelatex -file-line-error -halt-on-error -interaction=nonstopmode spine >nul 2>nul
8686
goto :EOF
8787

8888
:all

hitszthesis.cls

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
%%
2424
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
2525
\ProvidesClass{hitszthesis}
26-
[2020/02/23 v2.1 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen
26+
[2020/03/05 v2.2 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen
2727
(HITSZ)]
2828
\RequirePackage{ifxetex}
2929
\ifxetex\else
@@ -47,7 +47,51 @@
4747
\ProcessKeyvalOptions*\relax
4848
\LoadClass[12pt,a4paper,openany,oneside]{book}
4949
\RequirePackage{etex}
50-
\RequirePackage[UTF8,space=auto,scheme=plain]{ctex}
50+
\RequirePackage[UTF8,scheme=chinese,zihao=-4,heading=true]{ctex}
51+
\ctexset{%
52+
space = auto,
53+
chapter={
54+
afterindent=true,
55+
number=\arabic{chapter},
56+
beforeskip={28.34658bp},%一个空行 1.57481 × 18
57+
afterskip={24.74658bp},%0.8应该不计算间距 0.8 × 18 + 0.57481×18
58+
aftername=\enspace,
59+
format={\centering\heiti\xiaoer[1.57481]},%\center 会影响之后全局
60+
nameformat=\relax,
61+
numberformat=\relax,
62+
fixskip=true, % 添加这一行去除默认间距
63+
%hang=true,
64+
},
65+
section={
66+
afterindent=true,
67+
beforeskip={12bp},%上下空0.5行
68+
afterskip={13.5bp},
69+
format={\heiti\fontsize{15bp}{21bp}\selectfont},
70+
aftername=\enspace,
71+
fixskip=true,
72+
break={},
73+
},
74+
subsection={
75+
afterindent=true,
76+
beforeskip={10bp},
77+
afterskip={11bp},
78+
format={\heiti\fontsize{14bp}{18bp}\selectfont},
79+
aftername=\enspace,
80+
fixskip=true,
81+
break={},
82+
},
83+
subsubsection={
84+
afterindent=true,
85+
beforeskip={9bp},
86+
afterskip={9bp},
87+
format={\heiti\normalsize},
88+
aftername=\enspace,
89+
fixskip=true,
90+
break={},
91+
},
92+
paragraph/afterindent=true,
93+
subparagraph/afterindent=true
94+
}
5195
\RequirePackage{amsmath}
5296
\RequirePackage[T1]{fontenc}
5397
\RequirePackage{newtxtext}
@@ -62,7 +106,6 @@
62106
\RequirePackage[scaled=0.92]{helvet}
63107
\RequirePackage{type1cm}
64108
\RequirePackage{lipsum}
65-
\RequirePackage{mathdesign}
66109
\setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf}
67110
\newcommand*{\kai}{\CJKfamily{kai}}
68111
\setCJKfamilyfont{song}[AutoFakeBold]{SimSun}
@@ -91,7 +134,7 @@
91134
\RequirePackage{calc}
92135
\RequirePackage{tikz}
93136
\RequirePackage{bm}
94-
\RequirePackage{cases}
137+
\RequirePackage{subeqnarray}
95138
\RequirePackage{siunitx}
96139
\RequirePackage{pdfpages}
97140
\includepdfset{fitpaper=true}
@@ -175,11 +218,6 @@
175218
\newcommand{\keywordsname}{关键词}
176219
\newcommand{\keywordsenname}{Keywords}
177220
\renewcommand{\contentsname}{目\quad 录}
178-
\renewcommand{\figurename}{图}
179-
\renewcommand{\tablename}{表}
180-
\renewcommand{\partname}{部分}
181-
\renewcommand{\bibname}{参考文献}
182-
\renewcommand{\appendixname}{附录~\thechapter}
183221
\renewcommand{\indexname}{索\quad 引}
184222
\newcommand{\notename}{笔记}
185223
\renewcommand*{\proofname}{证明}
@@ -254,20 +292,6 @@ pdfborder={0 0 0},
254292
\RequirePackage[pagestyles]{titlesec}
255293
\RequirePackage{apptools}
256294
\setcounter{secnumdepth}{3}
257-
\renewcommand{\chaptername}{第 \thechapter\;章}
258-
\titleformat{\chapter}[hang]{\centering\heiti}
259-
{\filcenter\xiaoer\enspace\heiti{%
260-
\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\xiaoer}
261-
\titleformat{\section}[hang]{\heiti}
262-
{\xiaosan\heiti{\thesection}\enspace}{1pt}{\xiaosan\heiti\filright}
263-
\titleformat{\subsection}[hang]{\heiti}
264-
{\sihao\heiti\thesubsection\enspace}{1pt}{\sihao\heiti\filright}
265-
\titleformat{\subsubsection}[hang]{\heiti}
266-
{\xiaosi\heiti\thesubsubsection\enspace}{1pt}{\xiaosi\heiti\filright}
267-
\titlespacing{\chapter}{0pt}{0bp}{14.4bp}
268-
\titlespacing{\section}{0pt}{7.5bp}{7.5bp}
269-
\titlespacing{\subsection}{0pt}{7bp}{7bp}
270-
\titlespacing{\subsubsection}{0pt}{6bp}{6bp}
271295
\RequirePackage[font=small,labelsep=quad]{caption}
272296
\captionsetup[table]{skip=3pt}
273297
\captionsetup[figure]{skip=10pt}
@@ -386,7 +410,7 @@ pdfborder={0 0 0},
386410
\end{center}
387411
% 日期
388412
\vspace{2.6cm}
389-
{\xiaosi[0]\song\textbf{2020年7月}}
413+
{\xiaosi[0]\song\textbf{2020年6月}}
390414
\end{center}
391415
%%----------------------------
392416
%% 第二页
@@ -505,6 +529,7 @@ pdfborder={0 0 0},
505529
{\settowidth\labelwidth{\@biblabel{#1}}%
506530
\leftmargin\labelwidth
507531
\advance\leftmargin\labelsep
532+
\addtolength{\itemsep}{-1.5ex}
508533
\@openbib@code
509534
\usecounter{enumiv}%
510535
\let\p@enumiv\@empty
@@ -518,7 +543,6 @@ pdfborder={0 0 0},
518543
{\@latex@warning{Empty `thebibliography' environment}}%
519544
\endlist}
520545
\RequirePackage{fancyhdr}
521-
\RequirePackage{lastpage}
522546
\pagestyle{fancy}
523547
\lhead{}
524548
\chead{\wuhao 哈尔滨工业大学(深圳)本科毕业设计(论文)}
@@ -533,12 +557,12 @@ pdfborder={0 0 0},
533557
{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%
534558
\makeheadrule}}
535559
\titlecontents{chapter}[0pt]{\vspace{1mm}\heiti}
536-
{\thecontentslabel\,\,\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
560+
{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage}
537561
\titlecontents{section}[25pt]{\songti}
538-
{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
562+
{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage}
539563
\titlecontents{subsection}[47pt]{\songti}
540-
{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
541-
\RequirePackage[title,titletoc]{appendix}
564+
{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage}
565+
\g@addto@macro\appendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}}
542566
\BeforeBeginEnvironment{tabular}{\wuhao}
543567
\AfterEndEnvironment{table}{\vspace{-1cm}}
544568
\newcounter{rowno}
@@ -642,6 +666,10 @@ text centered, draw=black]
642666
\makebox[\textheight]{本科毕业设计(论文)\hfill \hitsztitle \hfill \hitszauthor}
643667
}
644668
}
669+
\pdfstringdefDisableCommands{%
670+
\def\quad{}%
671+
\def\hskip#1{}%
672+
}
645673
\AtEndOfClass{\sloppy}
646674
\endinput
647675
%%

0 commit comments

Comments
 (0)