summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hitszthesis/hitszthesis.dtx
blob: ffb6069343b8b5f32c5a5be7238a8d790b460868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
% \iffalse meta-comment
%
% Copyright (C) 2019-2020 by Jingxuan Yang <yanglatex2e@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%      http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{hitszthesis.dtx}[2020/02/18 v2.0 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen (HITSZ) ]
\documentclass{ltxdoc}
\usepackage{dtx-style}

\EnableCrossrefs
\CodelineIndex
\RecordChanges

\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{\jobname.dtx}
%
% \DoNotIndex{\newenvironment,\@bsphack,\@empty,\@esphack,\sfcode}
% \DoNotIndex{\addtocounter,\label,\let,\linewidth,\newcounter}
% \DoNotIndex{\noindent,\normalfont,\par,\parskip,\phantomsection}
% \DoNotIndex{\providecommand,\ProvidesPackage,\refstepcounter}
% \DoNotIndex{\RequirePackage,\setcounter,\setlength,\string,\strut}
% \DoNotIndex{\textbackslash,\texttt,\ttfamily,\usepackage}
% \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\}
% \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi}
% \DoNotIndex{\let,\def,\xdef,\edef,\newcommand,\renewcommand}
% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect}
% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize}
% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny}
% \DoNotIndex{\normalfont,\bfseries,\slshape,\sffamily,\interlinepenalty}
% \DoNotIndex{\textbf,\textit,\textsf,\textsc}
% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad}
% \DoNotIndex{\centering,\raggedright,\ref}
% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize}
% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne}
% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass}
% \DoNotIndex{\AtBeginDocument,\AtEndDocument}
% \DoNotIndex{\widowpenalty,\vfill,\usetikzlibrary,\usecounter}
% \DoNotIndex{\underline,\to,\text,\textsuperscript,\textwidth}
% \DoNotIndex{\thanks,\subsubsection,\subsection,\sloppy,\rule}
% \DoNotIndex{\ProvidesClass,\makebox,\makeatletter,\makeatother}
% \DoNotIndex{\,,\.,\;}
%
% \changes{v1.0}{2019/9/26}{Initial creation}
% \changes{v1.1}{2019/10/30}{Fix loading \pkg{mtpro2} bug, add \pkg{etex} package}
% \changes{v1.2}{2020/02/15}{Add two options: onerow or tworow, infoleft or infocenter, migrate settings file into cls file, initial commit on ctan}
% \changes{v2.0}{2020/02/18}{Format cls file to dtx file, regulate thesis template for HITSZ}
%
% \def\indexname{索引}
% \def\glossaryname{修改记录}
% \IndexPrologue{\section{\indexname}}
% \GlossaryPrologue{\section{\glossaryname}}
% 
% \definecolor{hitcolor}{RGB}{21,95,130}
% \title{\bfseries\color{hitcolor}\hitszthesis:哈尔滨工业大学(深圳)\\ 本科毕业设计(论文)模板}
% \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{yanglatex2e@gmail.com}\\[5pt]\texttt{yangjingxuan@stu.hit.edu.cn}}
% \date{\fileversion\ (\filedate)}
% \maketitle\thispagestyle{empty}
%
% \vskip0.5cm
%
% \def\abstractname{\Large 摘要}
% \begin{abstract}\normalsize\vskip0.5cm
%   \hitszthesis 宏包旨在建立一个规格严格、功夫到家的哈尔滨工业大学(深圳)学位论文模板,目前只包含本科毕业设计(论文)模板。模板的构建基于 \pkg{hitszthesis.dtx} 与 \pkg{hitszthesis.ins},在使用本模板之前,请仔细阅读\file{hitszthesis.pdf}(本文件)、\file{main.tex}(撰写示例)及\file{main.pdf}(撰写效果)。
% \end{abstract}
%
% \vskip1.5cm
% \def\abstractname{\Large 免责声明}
% \begin{abstract}
% \normalsize\noindent
% \begin{enumerate}
% \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License},使用前请认真阅读协议内
%   容。
% \item 本模板为作者根据哈尔滨工业大学(深圳)教务处颁发的《本科毕业设计(论文)撰写规范》、《书写范例》
%   编写而成,旨在供哈尔滨工业大学(深圳)本科毕业生撰写学位论文使用。
% \item 哈尔滨工业大学(深圳)教务处只提供毕业论文写作指南,不提供官方模板,也不会授
%   权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师
%   不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
%   守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License} 协议。由于违犯协议而引起的任何纠纷争端均与
%   本模板作者无关。
% \end{enumerate}
% \end{abstract}
%
%
% \clearpage
% \pagestyle{fancy}
% \begin{multicols}{2}[
%   \setlength{\columnseprule}{.4pt}
%   \setlength{\columnsep}{18pt}]
%   \large
%   \tableofcontents
% \end{multicols}
% \clearpage
%
% \section{模板介绍}
% \hitszthesis\ (\textbf{H}arbin \textbf{I}nstitute of \textbf{T}echnology, 
% \textbf{S}hen\textbf{Z}hen \LaTeX\
% \textbf{Thesis} Template) 是为了帮助哈尔滨工业大学(深圳)本科毕业生撰写毕业论文而编写
% 的 \LaTeX\ 论文模板。
%
% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据
% 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎窝工学子对本代码作出贡献。
%
% \note[注意:]{模板的作用在于减少论文写作过程中格式调整的时间。前提是遵守模板的
% 用法,否则即便用了 \textup{\hitszthesis}\ 也难以保证输出的论文符合学校规范。}
%
%
% \section{安装}
% \label{sec:installation}
%
% \hitszthesis\ 已经上传CTAN,将包含在2020年主要的 \TeX\ 发行版中。% 安装方法:打开命令行,输入以下命令即可
% \begin{shell}
% $ tlmgr install hitszthesis
% \end{shell}
% 阅读本说明文档可以使用以下命令:
% \begin{shell}
% $ texdoc hitszthesis
% \end{shell}
%
% 如果要使用开发版,需自己下载,\hitszthesis\ 相关链接:
% \begin{itemize}
% \item 主页:\href{https://github.com/YangLaTeX/hitszthesis}{GitHub}
% \item 下载:\href{http://www.ctan.org/pkg/hitszthesis}{CTAN}
% \end{itemize}
%
% \subsection{模板的组成}
% 下表列出了 \hitszthesis\ 的主要文件及其功能介绍:
%
% \begin{longtable}{l|p{8cm}}
% \toprule
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
% \endfirsthead
% \midrule
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
% \endhead
% \endfoot
% \endlastfoot
% hitszthesis.ins & \textsc{DocStrip} 驱动文件(开发用) \\
% hitszthesis.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule
% hitszthesis.cls & 模板类文件(由上述两个文件生成)\\\midrule
% main.tex & 示例文档主文件\\
% spine.tex & 书脊示例文档\\
% figure/ & 示例文档插图路径\\
% front/ & 示例文档封面插图路径\\
% hitszthesis.sty & 为示例文档加载其它宏包\\\midrule
% Makefile & Makefile\\
% latexmkrc & latexmk 配置文件 \\
% README.md & Readme\\
% \textbf{hitszthesis.pdf} & 用户手册(本文档)\\\bottomrule
% \end{longtable}
%
% 几点说明:
% \begin{itemize}
% \item \file{hitszthesis.cls} 可由 \file{hitszthesis.ins}
%   和 \file{hitszthesis.dtx} 生成,但为了降低同学们的使用难度,故
%   将 \file{hitszthesis.cls} 文件一起发布。
% \item 使用前请一定阅读文档:\file{hitszthesis.pdf}。
% \end{itemize}
%
% \subsection{生成模板}
% \label{sec:generate-cls}
% \note[提示:]{若使用 \TeX 发行版自带的 \textup{\hitszthesis}\ 或 Github 上发布的版本,可忽
% 略此节,直接阅读第~\ref{sec:generate-thesis} 节。若下载 CTAN 包或者 Github 开发
% 代码,请阅读本节了解生成模板文件的步骤。}
%
% 模板解压缩后生成文件夹 \file{hitszthesis-vX.Y}\footnote{\texttt{vX.Y} 为版本
% 号。},其中包括:模板源文件(\file{hitszthesis.ins} 和 \file{hitszthesis.dtx}),示例文档
% (\file{main.tex},\file{spine.tex},\file{hitszthesis.sty}\footnote{可能用到的包
% 以及一些命令定义都放在这里,以免 \file{hitszthesis.cls} 过分臃
% 肿。},文件夹\file{figure/} 和 \file{front/} 。在使用之前需要先生成模
% 板文件和配置文件(具体命令细节请参考 \file{README.md} 和 \file{Makefile}):
%
% \begin{shell}
% $ cd hitszthesis-vX.Y
% # 生成 hitszthesis.cls 与 dtx-style.sty
% $ xetex hitszthesis.ins
%
% # 下面的命令用来生成用户手册,首先生成索引
% $ xelatex hitszthesis.dtx
% $ makeindex -s gind.ist -o hitszthesis.ind hitszthesis.idx
% $ makeindex -s gglo.ist -o hitszthesis.gls hitszthesis.glo
%
% # 最后两次编译生成说明文档 hitszthesis.pdf
% $ xelatex hitszthesis.dtx
% $ xelatex hitszthesis.dtx  
% \end{shell}
%
% \subsection{生成论文}
% \label{sec:generate-thesis}
% 本节介绍几种常见的生成论文的方法。用户可根据自己的情况选择。
%
% \subsubsection{\XeLaTeX}
% \label{sec:xelatex}
% 很多用户对 \LaTeX\ 命令执行的次数不太清楚。一个基本的原则是多次运行 \LaTeX\ 命
% 令直至不再出现警告。下面给出生成示例文档的详细过程(\texttt{\#} 开头的行为注
% 释),首先来看推荐的 \texttt{xelatex} 方式:
% \begin{shell}
% # 1. 发现里面的引用关系,文件后缀 .tex 可以省略
% $ xelatex main
%
% # 2. 编译参考文件源文件,生成 bbl 文件
% $ bibtex main
%
% # 3. 下面解决引用
% $ xelatex main
% $ xelatex main   # 此时生成完整的 pdf 文件
% \end{shell}
%
% \subsubsection{latexmk}
% \label{sec:latexmk}
% \texttt{latexmk} 命令支持全自动生成 \LaTeX\ 编写的文档,并且支持使用不同的工具
% 链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用
% \texttt{latexmk} 调用 \texttt{xelatex} 生成最终文档的示例:
% \begin{shell}
%   $ latexmk main.tex       # 生成论文 main.pdf
%   $ latexmk spine.tex      # 生成书脊 spine.pdf
%   $ latexmk hitszthesis.dtx  # 生成说明文档 hitszthesis.pdf
%   $ latexmk -c             # 清理编译生成的辅助文件
% \end{shell}
%
% \subsubsection{GNU make}
% \label{sec:make}
% \note[提示:]{若要使用 \texttt{make} 编译,需自行下载模板。因为 \TeX\ 发行版中
% 的 \file{Makefile} 不在当前目录。}
%
% 上面的方法虽然不困难,但是每次都输入还是非常麻烦,所以 \hitszthesis\ 提供了一
% 个 \file{Makefile}。如果可以使用 GNU make 工具,
% 则使用 \texttt{make} 生成文件是最方便的办法。
%
% \begin{shell}
% $ make clean   # 清理辅助文件
% $ make cls       # 生成 hitszthesis.cls
% $ make doc       # 生成说明文档 hitszthesis.pdf
% $ make thesis    # 生成示例文档 main.pdf
% $ make spine     # 生成书脊 spine.pdf
% \end{shell}
%
% \hitszthesis\ 的 \file{Makefile} 默认用 \texttt{latexmk} 调用\texttt{xelatex} 编
% 译。如有需要可修
% 改 \file{Makefile} 开头的参数或通过命令行传递参数(请参看 \file{README.md}),
% 进一步还可以修改 \file{latexmkrc} 进行定制。
%
% \subsection{升级}
% \label{sec:updgrade}
% \hitszthesis\ 升级非常简单,可以通过 \TeX\ 发行版的包管理工具自动更新发行版,
% \begin{shell}
% # 更新 hitszthesis 宏包
% $ tlmgr update hitszthesis
% # 或者直接更新全部宏包至最新版
% $ tlmgr update --all
% \end{shell}
% 
% 也可以下载最新的开发版,将 \file{hitszthesis.ins},\file{hitszthesis.dtx},拷贝至工作目录覆盖相应的文件,然后运行:
% \begin{shell}
% $ xetex hitszthesis.ins
% \end{shell}
% 生成新的类文件和配置文件即可。
%
% 还可以直接拷贝 \file{hitszthesis.cls}替换原有文件,避免执行上面的命令行。
%
% \section{使用说明}
% \label{sec:usage}
% 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果
% 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。
%
% \subsection{关于提问}
% \label{sec:howtoask}
% 按照优先级推荐提问的位置如下:
%
% \begin{itemize}
% \item Github Issues: \href{http://github.com/YangLaTeX/hitszthesis/issues}{http://github.com/YangLaTeX/hitszthesis/issues}
% \item QQ group: 1039392552
% \item Email: \href{mailto:yanglatex2e@gmail.com}{yanglatex2e@gmail.com}, \href{mailto:yangjingxuan@stu.hit.edu.cn}{yangjingxuan@stu.hit.edu.cn}
% \end{itemize}
%
% \subsection{示例文件}
% \label{sec:userguide}
%
% 模板核心文件为:\file{hitszthesis.cls},
% 但如果没有示例文档会很难下手,所以推荐从模板自带的示例文档入手,其中包括了论文
% 写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。对于不清
% 楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示例文档,
% 具体内容可以参考模板附带的 \file{main.tex}。
%
% \lstinputlisting[style=lstStyleLaTeX]{main.tex}
%
% \subsection{论文选项}
% \label{sec:option}
%
% \DescribeOption{covertitle}
%   选择论文类型,当前支持:\option{onerow},\option{tworow},其中
%   \option{onerow}为默认选项。
% \begin{latex}
% % 封面标题两行
% \documentclass[covertitle=tworow]{hitszthesis}
% \end{latex}
%
% \DescribeOption{infoalign}
% 论文封面第二页下划线部分内容对齐方式。可选:\option{infoleft},\option{infocenter},其中\option{infocenter}为默认选项。
% \begin{latex}
% % 封面第二页信息居左对齐
% \documentclass[infoalign=infoleft]{hitszthesis}
% \end{latex}
%
% \subsection{引用方式}
% \label{sec:citestyle}
%
% \myentry{引用}
% \DescribeMacro{\upcite}
% 学校要求的参考文献引用有两种模式:(1)上标模式。比如“同样的工作有很
% 多$^{[1,2]}$\ldots”。(2)正文模式。比如“文[3] 中详细说明了\ldots”。其中上标
% 模式采用 \cs{upcite}\marg{key},而 \cs{cite}\marg{key} 则用来生成正文模式。
%
% 关于参考文献表推荐使用 \cs{thebibliography} 环境,虽然有些麻烦,
% 但是避免了使用 \BibTeX 带来的很多格式设置问题。
% 有余力者可以尝试使用 \BibTeX,
%  \BibTeX 默认情况下可以自动识别文献语言,
% 并自动处理文献类型和载体类型标识,也可以手动指定,如:
% \begin{latex}
% @misc{citekey,
%   language = {japanese},
%   mark     = {Z},
%   medium   = {DK},
%   ...
% \end{latex}
% 可选的语言有 english, chinese, japanese, russian。
%
% \subsection{中文字体}
% \label{sec:chinese-fonts}
%
% \subsubsection{字体配置}
% \label{sec:font-config}
% 模板默认使用 \CTeX\ 的字体配置。关于中文字体安装、配置的所有问题不在本模板讨论
% 范围。
%
% \subsubsection{字体命令}
% \label{sec:fontcmds}
% \myentry{字体}
% \DescribeMacro{\songti}
% \DescribeMacro{\fangsong}
% \DescribeMacro{\heiti}
% \DescribeMacro{\kaishu}
% 用来切换宋体、仿宋、黑体、楷体四种基本字体。
%
% \begin{latex}
% {\songti 乾:元,亨,利贞}
% {\fangsong 初九,潜龙勿用}
% {\heiti 九二,见龙在田,利见大人}
% {\kaishu 九三,君子终日乾乾,夕惕若,厉,无咎}
% \end{latex}
%
% \myentry{字号}
% \DescribeMacro{\chuhao}
% \DescribeMacro{\xiaochu}
% \DescribeMacro{\yihao}
% \DescribeMacro{\xiaoyi}
% \DescribeMacro{\bahao}
% 定义字体大小,分别为:
%
% \begin{center}
% \begin{tabular}{llllll}
% \toprule
% \cs{chuhao} & \cs{xiaochu} & \cs{yihao}  & \cs{xiaoyi}    & \cs{erhao}  & \cs{xiaoer}\\
% \cs{sanhao} & \cs{xiaosan} & \cs{sihao}   & \cs{xiaosi} & \cs{wuhao}  & \cs{xiaowu}\\
%   \cs{liuhao} & \cs{xiaoliu}   & \cs{qihao}  & \cs{bahao}\\\bottomrule
% \end{tabular}
% \end{center}
%
% 使用方法为:\cs{command}\oarg{num},其中 \cs{command} 为字号命令,\meta{num} 为行距。比
% 如 \cs{xiaosi}[1.5] 表示选择小四字体,行距 1.5 倍。
%
% \begin{latex}
% {\erhao 二号}
% {\sanhao[1.5] 三号,一点五倍行距}
% {\sihao 四号}
% {\qihao[2] 七号,两倍行距}
% \end{latex}
%
% 也可以使用 \CTeX\ 定义的 \cs{zihao}\marg{num} 来切换字号,具体用法参看其文
% 档。
%
% \subsection{封面信息}
% \label{sec:titlepage}
% 封面信息配置方法:每个信息利用命令独立设置,大多数命令的使用方法都是 \cs{command}\marg{arg},例外者将具体指出。
% 
% \myentry{封面信息}
% \DescribeMacro{\thesistitle}
% \cs{thesistitle}\marg{arg},输入论文标题
%
% \DescribeMacro{\titleone}
% \cs{titleone}\marg{arg},输入论文标题第一行
%
% \DescribeMacro{\titletwo}
% \cs{titletwo}\marg{arg},输入论文标题第二行
%
% \DescribeMacro{\schoolname}
% \cs{schoolname}\marg{arg},输入学校名称
%
% \DescribeMacro{\departname}
% \cs{departname}\marg{arg},输入学院名称
%
% \DescribeMacro{\majorin}
% \cs{majorin}\marg{arg},输入专业
%
% \DescribeMacro{\authorname}
% \cs{authorname}\marg{arg},输入姓名
%
% \DescribeMacro{\studentID}
% \cs{studentID}\marg{arg},输入学号
%
% \DescribeMacro{\dateinput}
% \cs{dateinput}\marg{arg},输入答辩日期
%
% \DescribeMacro{\instructor}
% \cs{instructor}\marg{arg},输入指导教师
%
% \subsubsection{摘要}
% \myentry{摘要关键词}
% \DescribeEnv{abstract}
% \DescribeEnv{abstracten}
% \DescribeMacro{\keywords}
% \DescribeMacro{\keywordsen}
% \begin{latex}
% \begin{abstract}
%  摘要请写在这里...
% \keywords{xxx}
% \end{abstract}
%
% \begin{abstracten}
%  Here comes the abstract in English...
% \keywordsen{xxx}
% \end{abstracten}
% \end{latex}
%
% \subsection{目录和索引表}
% 目录、插图和表格等索引命令分别如下,
% 将其插入到期望的位置即可
% (带星号的命令表示对应的索引表不会出现在目录中):
%
% \myentry{目录索引}
% \DescribeMacro{\tableofcontents}
% \DescribeMacro{\listoffigures}
% \DescribeMacro{\listoffigures*}
% \DescribeMacro{\listoftables}
% \DescribeMacro{\listoftables*}
% \begin{longtable}{ll}
% \toprule
%   {\heiti 用途} & {\heiti 命令} \\\midrule
% 目录     & \cs{tableofcontents} \\\midrule
% 插图索引 & \cs{listoffigures}   \\
%          & \cs{listoffigures*}  \\\midrule
% 表格索引 & \cs{listoftables}    \\
%          & \cs{listoftables*}   \\\bottomrule
% \end{longtable}
%
% \LaTeX\ 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出
% 现在浮动环境中,否则不被计数。
%
% 如果不想让某个表格或者图片出现在索引里面,那么请使用命令 \cs{caption*},这
% 个命令不会给表格编号,也就是出来的只有标题文字而没有“表~xx”,“图~xx”,
%
% \subsection{封底部分}
%
% \subsubsection{原创性声明}
% \myentry{声明}
% \DescribeMacro{\declaration}
% \cs{declaration}会自动生成原创性声明的全部内容,其中签字部分需要打印后手签。
%
% \subsubsection{附录}
% \myentry{附录}
% \DescribeMacro{\appendix}
% 附录里主要是外文资料以及翻译,放置在 |\appendix| 后面即可。
%
% \subsection{自定义}
% \label{sec:othercmd}
%
% \subsubsection{数学环境}
% \label{sec:math}
% \hitszthesis\ 定义了常用的数学环境:
%
% \begin{center}
% \begin{tabular}{*{8}{l}}\toprule
%   axiom & theorem & definition & proposition & lemma & postulate &note& conclusion\\
%   公理 & 定理 & 定义 & 命题 & 引理 & 公设 &笔记& 结论\\\midrule
%   proof & corollary & example & exercise & assumption & remark & problem & property\\
%   证明 & 推论 & 例& 练习 & 假设 & 注 & 问题 & 性质\\\bottomrule
% \end{tabular}
% \end{center}
%
% 比如:
% \begin{latex}
% \begin{definition}
%   道千乘之国,敬事而信,节用而爱人,使民以时。
% \end{definition}
% \end{latex}
% 产生(自动编号):
% \medskip
%
% \noindent\framebox[\linewidth][l]{{\heiti 定义~1.1~~~} % {道千乘之国,敬事而信,节用而爱人,使民以时。}}
%
% \smallskip
% 列举出来的数学环境毕竟是有限的,如果想用\emph{胡说}这样的数学环境,那么可以定义:
% \begin{latex}
% \theoremstyle{ydefstyle}
% \newtheorem{ydefinition}{nonsense}[chapter]
% \end{latex}
%
% 然后这样使用:
% \begin{latex}
% \begin{nonsense}
%   契丹武士要来中原夺武林秘笈。—— 慕容博
% \end{nonsense}
% \end{latex}
% 产生(自动编号):
%
% \medskip
% \noindent\framebox[\linewidth][l]{{\heiti 胡说~1.1~~~} % {契丹武士要来中原夺武林秘笈。—— 慕容博}}
%
% \subsubsection{列表环境}
% \myentry{列表}
% \DescribeEnv{itemize}
% \DescribeEnv{enumerate}
% \DescribeEnv{description}
% 为了适合中文习惯,模板将这三个常用的列表环境用 \pkg{enumitem} 进行了纵向间距压
% 缩。一方面清除了多余空间,另一方面用户可以自己指定列表环境的样式(如标签符号,
% 缩进等)。细节请参看 \pkg{enumitem} 文档,此处不再赘述。
%
% \subsection{书脊}
% \myentry{书脊}
% \DescribeMacro{\spine}
% 生成装订的书脊,为竖排格式,命令格式:\cs{spine}\oarg{标题}\oarg{作者}。默认参
% 数为论文中文题目和中文作者。如果中文题目中没有英文字母,那么直接调用此命令即可。
% 否则,可参考参看模板示例文件 \file{spine.tex} 进行微调:
%
% \lstinputlisting[style=lstStyleLaTeX]{spine.tex}
%
% \section{致谢}
% \label{sec:thanks}
% 感谢|thuthesis|、|hithesis|、|elegantbook|模板的作者,本模板基于他们改编而来!
%
% 欢迎各位到 \href{http://github.com/YangLaTeX/hitszthesis/}{\hitszthesis\ Github 主页}贡献!
%
% \StopEventually{\PrintChanges\PrintIndex}
% \clearpage
%
% \section{实现细节}
%
% \subsection{基本信息}
% 设置需要的 \LaTeX 版本,定义提供的类文件名称以及说明文字
%    \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{hitszthesis}
%<cls>[2020/02/18 v2.0 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen
%<cls> (HITSZ)]
%    \end{macrocode}
%
% 检查编译引擎,要求使用 \XeLaTeX,否则提示错误
%    \begin{macrocode}
\RequirePackage{ifxetex}
\ifxetex\else
  \ClassError{hitszthesis}{Please use XeLaTeX to compile the file}{}
  \end{document}
\fi
%    \end{macrocode}
%
% \subsection{定义选项}
% 加载键值对设置宏包
%    \begin{macrocode}
%<*cls>
\RequirePackage{kvoptions}
%    \end{macrocode}
%
% 加载对宏包、环境、命令进行操作的强大宏包
%    \begin{macrocode}
\RequirePackage{etoolbox}
%    \end{macrocode}
%
% 设置关键词:|hitsz|
%    \begin{macrocode}
\SetupKeyvalOptions{family=hitsz, prefix=hitsz@, setkeys=\kvsetkeys}
%    \end{macrocode}
%
% \begin{macro}{\ykv}
% 定义设置关键词命令 \cs{ykv}
%    \begin{macrocode}
\newcommand{\ykv}[1]{\kvsetkeys{hitsz}{#1}}
%    \end{macrocode}
% \end{macro}
%
% 表格信息对齐
%    \begin{macrocode}
\DeclareStringOption[infocenter]{infoalign}
\DeclareVoidOption{infocenter}{\ykv{infoalign = infocenter}}
\DeclareVoidOption{infoleft}{\ykv{infoalign = infoleft}}
%    \end{macrocode}
%
% 封面标题行数
%    \begin{macrocode}
\DeclareStringOption[onerow]{covertitle}
\DeclareVoidOption{onerow}{\ykv{covertitle = onerow}}
\DeclareVoidOption{tworow}{\ykv{covertitle = tworow}}
%    \end{macrocode}
%
% 数学字体选择
%    \begin{macrocode}
\DeclareStringOption[newtxmath]{mathfont}
\DeclareVoidOption{newtxmath}{\ykv{mathfont = newtxmath}}
\DeclareVoidOption{mtpro2}{\ykv{mathfont = mtpro2}}
%    \end{macrocode}
%
% 默认选项
%    \begin{macrocode}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}}
%    \end{macrocode}
%
% 禁用键值对操作
%    \begin{macrocode}
\ProcessKeyvalOptions*\relax
%    \end{macrocode}
%
% 加载 |book| 类,A4大小,正文12磅,单面打印
%    \begin{macrocode}
\LoadClass[12pt,a4paper,openany,oneside]{book}
%    \end{macrocode}
%
% \subsection{加载宏包}
% 使用 \XeLaTeX 编译 \pkg{mtpro2} 宏包必须加载此宏包
%    \begin{macrocode}
\RequirePackage{etex}
%    \end{macrocode}
%
% 加载支持中文的 \pkg{ctex} 宏包
%    \begin{macrocode}
\RequirePackage[UTF8,space=auto,scheme=plain]{ctex}
%    \end{macrocode}
%
% 正文和数学字体设置
%    \begin{macrocode}
\RequirePackage{amsmath}
\RequirePackage[T1]{fontenc}
\RequirePackage{newtxtext}
\ifdefstring{\hitsz@mathfont}{mtpro2}{
\RequirePackage[mtphrb,mtpcal,zswash,uprightGreek]{mtpro2}
}{\relax}
\ifdefstring{\hitsz@mathfont}{newtxmath}{
\RequirePackage{newtxmath}
\let\openbox\relax
}{\relax}
\renewcommand{\rmdefault}{ptm}
\RequirePackage[scaled=0.92]{helvet}
\RequirePackage{type1cm}
\RequirePackage{lipsum}
%    \end{macrocode}
%
% 使字体设置生效,排除其他干扰,不一定起作用,但为防万一需要保留
%    \begin{macrocode}
\RequirePackage{mathdesign}
%    \end{macrocode}
%
% \begin{macro}{\kai}
% \begin{macro}{\song}
% 设置中文加粗字体
%    \begin{macrocode}
\setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf}
\newcommand*{\kai}{\CJKfamily{kai}}
\setCJKfamilyfont{song}[AutoFakeBold]{SimSun}
\newcommand*{\song}{\CJKfamily{song}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\linespread}
% 行间距,设为1.3,due to 12pt与小四号字的大小微差
%    \begin{macrocode}
\linespread{1.3}
%    \end{macrocode}
% \end{macro}
%
% 加载常用宏包
% 在一页上可以使用单栏和多栏样式
%    \begin{macrocode}
\RequirePackage{multicol}
%    \end{macrocode}
%
% 排版代码
%    \begin{macrocode}
\RequirePackage{fancyvrb}
%    \end{macrocode}
%
% 自定义目录格式
%    \begin{macrocode}
\RequirePackage{titletoc}
%    \end{macrocode}
%
% 设置颜色
%    \begin{macrocode}
\RequirePackage{xcolor}
%    \end{macrocode}
%
% 插入图片
%    \begin{macrocode}
\RequirePackage{graphicx}
%    \end{macrocode}
%
% 表格
%    \begin{macrocode}
\RequirePackage{array}
%    \end{macrocode}
%
% 长表格
%    \begin{macrocode}
\RequirePackage{longtable}
%    \end{macrocode}
%
% \pkg{booktabs} 提供了\cs{toprule} 等命令
%    \begin{macrocode}
\RequirePackage{booktabs}
%    \end{macrocode}
%
% \pkg{multirow} 支持在表格中跨行
%    \begin{macrocode}
\RequirePackage{multirow}
%    \end{macrocode}
%
% 调整间隔, 让表格更好看些
%    \begin{macrocode}
\RequirePackage{bigstrut}
%    \end{macrocode}
%
% 在跨行表格中输入定界符
%    \begin{macrocode}
\RequirePackage{bigdelim}
%    \end{macrocode}
%
% 保护脆落命令
%    \begin{macrocode}
\RequirePackage{cprotect}
%    \end{macrocode}
%
% 定制列表环境
%    \begin{macrocode}
\RequirePackage{enumitem}
%    \end{macrocode}
%
% 设置代码环境
%    \begin{macrocode}
\RequirePackage{listings}
%    \end{macrocode}
%
% 超链接格式设置
%    \begin{macrocode}
\RequirePackage{hyperref}
%    \end{macrocode}
%
% \begin{macro}{\parindent}
% 首行缩进
%    \begin{macrocode}
\RequirePackage{indentfirst}
\setlength\parindent{2em}
%    \end{macrocode}
% \end{macro}
%
% 设置浮动体的标题
%    \begin{macrocode}
\RequirePackage{caption}
%    \end{macrocode}
%
% 浮动环境
%    \begin{macrocode}
\RequirePackage{float}
%    \end{macrocode}
%
% 下划线
%    \begin{macrocode}
\RequirePackage{ulem}
%    \end{macrocode}
%
% 尺寸计算
%    \begin{macrocode}
\RequirePackage{calc}
%    \end{macrocode}
%
% \pkg{tikz} 绘图
%    \begin{macrocode}
\RequirePackage{tikz}
%    \end{macrocode}
%
% 公式字母加粗
%    \begin{macrocode}
\RequirePackage{bm}
%    \end{macrocode}
%
% 子公式编号
%    \begin{macrocode}
\RequirePackage{cases}
%    \end{macrocode}
%
% 书写单位
%    \begin{macrocode}
\RequirePackage{siunitx}
%    \end{macrocode}
%
% \pkg{pdfpages} 宏包便于我们插入扫描后的授权页和声明页 PDF 文档。
%    \begin{macrocode}
\RequirePackage{pdfpages}
\includepdfset{fitpaper=true}
%    \end{macrocode}
%
% \begin{macro}{\ttdefault}
% 排版代码
%    \begin{macrocode}
\RequirePackage{listings}
\renewcommand{\ttdefault}{cmtt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\lstdefinestyle}
% 定义 |ystyle| 样式
%    \begin{macrocode}
\lstdefinestyle{ystyle}{
  basicstyle=%
    \ttfamily
    \lst@ifdisplaystyle\small\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\lstset}
% 使用 |ystyle| 样式
%    \begin{macrocode}
\lstset{basicstyle = \ttfamily, style = ystyle, breaklines = true}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\definecolor}
% 定义代码颜色
%    \begin{macrocode}
\definecolor{lightgrey}{rgb}{0.9,0.9,0.9}
\definecolor{frenchplum}{RGB}{190,20,83}
\definecolor{winered}{rgb}{0.5,0,0}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\lstset}
% 设置 \LaTeX 代码排版样式
%    \begin{macrocode}
\lstset{language = [LaTeX]TeX,
  texcsstyle = *\color{winered},
  numbers = none,
  mathescape,
  breaklines = true,
  keywordstyle = \color{winered},
  commentstyle = \color{gray},
  emph = {hitszpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,
   figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,
   ctex, microtype,description,times,newtx,booktabs,tabular,
   PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,
   amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings,base,
   subnumcases},
  emphstyle = {\color{frenchplum}},
  morekeywords = {DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,
   institute,version,includegraphics,setmainfont,setsansfont,
   setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,
   RequirePackage,figref, tabref,email,maketitle,keywords,definecolor,
   extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,
   mainmatter,frontmatter,tableofcontents, hitszpar,heiti,kaishu,lstset,
   pagecolor,zhnumber,marginpar,part, equote,marginnote},
  frame = single,
  tabsize = 2,
  rulecolor = \color{black},
  framerule = 0.2pt,
  columns = flexible,
  % backgroundcolor = \color{lightgrey}
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{输入信息}
% \subsubsection{定义输入常量}
% \begin{macro}{\hitsz@tokens@thesistitle}
% 论文标题
%    \begin{macrocode}
\newcommand\hitsz@tokens@thesistitle{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@keywords}
% 关键词,中文
%    \begin{macrocode}
\newcommand\hitsz@tokens@keywords{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@keywordsen}
% 关键词,英文
%    \begin{macrocode}
\newcommand\hitsz@tokens@keywordsen{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@papercategory}
% 论文类别
%    \begin{macrocode}
\newcommand*\hitsz@tokens@papercategory{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@schoolname}
% 学校名称
%    \begin{macrocode}
\newcommand*\hitsz@tokens@schoolname{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@departname}
% 院系
%    \begin{macrocode}
\newcommand*\hitsz@tokens@departname{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@dateinput}
% 日期
%    \begin{macrocode}
\newcommand*\hitsz@tokens@dateinput{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@authorname}
% 姓名
%    \begin{macrocode}
\newcommand*\hitsz@tokens@authorname{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@studentID}
% 学号
%    \begin{macrocode}
\newcommand*\hitsz@tokens@studentID{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@majorin}
% 专业
%    \begin{macrocode}
\newcommand*\hitsz@tokens@majorin{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@instructor}
% 指导教师
%    \begin{macrocode}
\newcommand*\hitsz@tokens@instructor{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@titleone}
% 第一行标题
%    \begin{macrocode}
\newcommand*\hitsz@tokens@titleone{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hitsz@tokens@titletwo}
% 第二行标题
%    \begin{macrocode}
\newcommand*\hitsz@tokens@titletwo{}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{定义与常量有关的新命令}
%
% \begin{macro}{\thesistitle}
% 输入论文标题
%    \begin{macrocode}
\newcommand*\thesistitle[1]{%
	\renewcommand{\hitsz@tokens@thesistitle}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\papercategory}
% 输入论文类别
%    \begin{macrocode}
\newcommand*\papercategory[1]{%
	\renewcommand{\hitsz@tokens@papercategory}{#1}}	
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\schoolname}
% 输入校名
%    \begin{macrocode}
\newcommand*\schoolname[1]{%
	\renewcommand{\hitsz@tokens@schoolname}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\departname}
% 输入院系名称
%    \begin{macrocode}
\newcommand*\departname[1]{%
	\renewcommand{\hitsz@tokens@departname}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dateinput}
% 输入日期
%    \begin{macrocode}
\newcommand*\dateinput[1]{%
	\renewcommand{\hitsz@tokens@dateinput}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\authorname}
% 输入姓名
%    \begin{macrocode}
\newcommand*\authorname[1]{%
	\renewcommand{\hitsz@tokens@authorname}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\studentID}
% 输入学号
%    \begin{macrocode}
\newcommand*\studentID[1]{%
	\renewcommand{\hitsz@tokens@studentID}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\majorin}
% 输入专业
%    \begin{macrocode}
\newcommand*\majorin[1]{%
	\renewcommand{\hitsz@tokens@majorin}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\instructor}
% 输入指导教师
%    \begin{macrocode}
\newcommand*\instructor[1]{%
	\renewcommand{\hitsz@tokens@instructor}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titleone}
% 输入第一行标题
%    \begin{macrocode}
\newcommand*\titleone[1]{%
	\renewcommand{\hitsz@tokens@titleone}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titletwo}
% 输入第二行标题
%    \begin{macrocode}
\newcommand*\titletwo[1]{%
	\renewcommand{\hitsz@tokens@titletwo}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{定义常量的值}
% \begin{macro}{\listfigurename}
% \begin{macro}{\listtablename}
% \begin{macro}{\abstractname}
% \begin{macro}{\keywordsname}
% \begin{macro}{\keywordsenname}
% \begin{macro}{\contentsname}
% \begin{macro}{\figurename}
% \begin{macro}{\tablename}
% \begin{macro}{\partname}
% \begin{macro}{\bibname}
% \begin{macro}{\appendixname}
% \begin{macro}{\indexname}
% \begin{macro}{\notename}
% \begin{macro}{\proofname}
% \begin{macro}{\problemname}
% \begin{macro}{\definitionname}
% \begin{macro}{\theoremname}
% \begin{macro}{\axiomname}
% \begin{macro}{\postulatename}
% \begin{macro}{\lemmaname}
% \begin{macro}{\propositionname}
% \begin{macro}{\corollaryname}
% \begin{macro}{\examplename}
% \begin{macro}{\exercisename}
% \begin{macro}{\remarkname}
% \begin{macro}{\assumptionname}
% \begin{macro}{\conclusionname}
% 中文标题名称设置
%    \begin{macrocode}
\renewcommand\listfigurename{插图目录}
\renewcommand\listtablename{附表目录}
\renewcommand\abstractname{摘\quad 要}
\newcommand{\keywordsname}{关键词}
\newcommand{\keywordsenname}{Keywords}
\renewcommand{\contentsname}{目\quad 录}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\renewcommand{\partname}{部分}
\renewcommand{\bibname}{参考文献}
\renewcommand{\appendixname}{附录~\thechapter}
\renewcommand{\indexname}{索\quad 引}
\newcommand{\notename}{笔记}
\renewcommand*{\proofname}{证明}
\newcommand{\problemname}{问题}
\newcommand{\definitionname}{定义}
\newcommand{\theoremname}{定理}
\newcommand{\axiomname}{公理}
\newcommand{\postulatename}{公设}
\newcommand{\lemmaname}{引理}
\newcommand{\propositionname}{命题}
\newcommand{\corollaryname}{推论}
\newcommand{\examplename}{例}
\newcommand{\exercisename}{练习}
\newcommand{\remarkname}{注}
\newcommand{\assumptionname}{假设}
\newcommand{\conclusionname}{结论}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\solutionname}
% \begin{macro}{\propertyname}
% 继续定义
%    \begin{macrocode}
\newcommand{\solutionname}{解}
\newcommand{\propertyname}{性质}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \vskip0.3cm
% \subsection{字号设置}
% \begin{macro}{\hitsz@def@fontsize}
% 中英字号转换
%    \begin{macrocode}
\def\hitsz@def@fontsize#1#2{%
  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\chuhao}
% \begin{macro}{\xiaochu}
% \begin{macro}{\yihao}
% \begin{macro}{\xiaoyi}
% \begin{macro}{\erhao}
% 定义一组字号
%    \begin{macrocode}    
\hitsz@def@fontsize{chuhao}{42bp}
\hitsz@def@fontsize{xiaochu}{36bp}
\hitsz@def@fontsize{yihao}{26bp}
\hitsz@def@fontsize{xiaoyi}{24bp}
\hitsz@def@fontsize{erhao}{22bp}
%    \end{macrocode}
% \begin{macro}{\xiaoer}
% \begin{macro}{\sanhao}
% \begin{macro}{\xiaosan}
% \begin{macro}{\sihao}
% \begin{macro}{\banxiaosi}
% \begin{macro}{\xiaosi}
% \begin{macro}{\dawu}
% \begin{macro}{\wuhao}
% \begin{macro}{\xiaowu}
% \begin{macro}{\liuhao}
% \begin{macro}{\xiaoliu}
% \begin{macro}{\qihao}
% \begin{macro}{\bahao}
% 继续定义字号
%    \begin{macrocode}
\hitsz@def@fontsize{xiaoer}{18bp}
\hitsz@def@fontsize{sanhao}{16bp}
\hitsz@def@fontsize{xiaosan}{15bp}
\hitsz@def@fontsize{sihao}{14bp}
\hitsz@def@fontsize{banxiaosi}{13bp}
\hitsz@def@fontsize{xiaosi}{12bp}
\hitsz@def@fontsize{dawu}{11bp}
\hitsz@def@fontsize{wuhao}{10.5bp}
\hitsz@def@fontsize{xiaowu}{9bp}
\hitsz@def@fontsize{liuhao}{7.5bp}
\hitsz@def@fontsize{xiaoliu}{6.5bp}
\hitsz@def@fontsize{qihao}{5.5bp}
\hitsz@def@fontsize{bahao}{5bp}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{图片搜索目录设置}
% \begin{macro}{\graphicspath}
% 图片搜索目录
%    \begin{macrocode}
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}
{./graphics/}{./graphic/}{./pictures/}{./picture/}{./front/}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{页面设置}
% \begin{macro}{\geometry}
% 页面设置,按照撰写示例word模板设置页边距
%    \begin{macrocode}
\RequirePackage{geometry}
\geometry{
	a4paper,
	left=30mm,  
	right=30mm, 
	top=41mm, 
	bottom=30mm,
	headheight = 2.17cm,
	headsep = 1mm,
	footskip = 0cm,
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{超链接设置}
% \begin{macro}{\hypersetup}
% 超链接设置,设置目录、图表公式引用的跳转
%    \begin{macrocode}
\RequirePackage{hyperref}
\hypersetup{
	breaklinks,
	unicode,
	linktoc=all,
	bookmarksnumbered=true,
	bookmarksopen=true,
	pdfsubject={哈尔滨工业大学(深圳)本科毕业设计(论文)},
	pdftitle = {哈尔滨工业大学(深圳)本科毕业设计(论文)},
	pdfauthor = {杨敬轩},
	pdfkeywords={HITSZThesis, Dissertation},
	pdfcreator={XeLaTeX with hitszthesis class},
	colorlinks,
	linkcolor=black,
	citecolor=black,
	plainpages=false,
	pdfstartview=FitH,
	pdfborder={0 0 0},
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{正文内容设置}
% 章节设置
%    \begin{macrocode}
\RequirePackage[pagestyles]{titlesec}
\RequirePackage{apptools}
%    \end{macrocode}
%
% \begin{macro}{\setcounter}
% \begin{macro}{\chaptername}
% 更改章节编号样式
%    \begin{macrocode}
\setcounter{secnumdepth}{3}
\renewcommand{\chaptername}{第 \thechapter\;章}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\titleformat}
% 设置章节标题样式
%    \begin{macrocode}
\titleformat{\chapter}[hang]{\centering\heiti}
{\filcenter\xiaoer\enspace\heiti{%
\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\xiaoer}
%    \end{macrocode}
%
% 设置节标题样式
%    \begin{macrocode}
\titleformat{\section}[hang]{\heiti}
{\xiaosan\heiti{\thesection}\enspace}{1pt}{\xiaosan\heiti\filright}
%    \end{macrocode}
%
% 设置条标题样式
%    \begin{macrocode}
\titleformat{\subsection}[hang]{\heiti}
{\sihao\heiti\thesubsection\enspace}{1pt}{\sihao\heiti\filright}
%    \end{macrocode}
%
% 设置四级标题样式
%    \begin{macrocode}
\titleformat{\subsubsection}[hang]{\heiti}
{\xiaosi\heiti\thesubsubsection\enspace}{1pt}{\xiaosi\heiti\filright}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titlespacing}
% 设置标题与上下文间距
%    \begin{macrocode}
\titlespacing{\chapter}{0pt}{0bp}{14.4bp}
\titlespacing{\section}{0pt}{7.5bp}{7.5bp}
\titlespacing{\subsection}{0pt}{7bp}{7bp}
\titlespacing{\subsubsection}{0pt}{6bp}{6bp}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\captionsetup}
% 图表标题设置,字号为small,分割符为空格
%    \begin{macrocode}
\RequirePackage[font=small,labelsep=quad]{caption} 
%    \end{macrocode}
%
% 标题与图表的间距为3pt
%    \begin{macrocode}
\captionsetup[table]{skip=3pt}
\captionsetup[figure]{skip=10pt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\figref}
% \begin{macro}{\tabref}
% \begin{macro}{\equref}
% 图表的引用格式
%    \begin{macrocode}
\newcommand\figref[1]{图\ref{#1}}
\newcommand\tabref[1]{表\ref{#1}}
\newcommand\equref[1]{式(\ref{#1})}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\setlist}
% 设置列表环境各项间无自动间距
%    \begin{macrocode}
\setlist{nolistsep}
%    \end{macrocode}
% \end{macro}
%
% \subsection{定理样式设置}
% 定义各类定理样式
%    \begin{macrocode}
\RequirePackage{amsthm}
\let\proof\relax
\let\endproof\relax
%    \end{macrocode}
%
% \begin{macro}{\newtheoremstyle}
% 定义新定义样式
%    \begin{macrocode}
\newtheoremstyle{ydefstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{%
	0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
%    \end{macrocode}
%
% 定义新定理样式
%    \begin{macrocode}
\newtheoremstyle{ythmstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{%
	0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
%    \end{macrocode}
%
% 定义新命题样式
%    \begin{macrocode}
\newtheoremstyle{yprostyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{%
	0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\theoremstyle}
% \begin{macro}{\newtheorem}
% 应用定义样式
%    \begin{macrocode}
\theoremstyle{ydefstyle}
\newtheorem{ydefinition}{\definitionname }[chapter]
%    \end{macrocode}
%
% 应用定理样式
%    \begin{macrocode}
\theoremstyle{ythmstyle}
\newtheorem{ytheorem}{\theoremname }[chapter]
\newtheorem{ylemma}{\lemmaname }[chapter]
\newtheorem{ycorollary}{\corollaryname }[chapter]
\newtheorem{ypostulate}{\postulatename }[chapter]
\newtheorem{yaxiom}{\axiomname }[chapter]
%    \end{macrocode}
%
% 应用命题样式
%    \begin{macrocode}
\theoremstyle{yprostyle}
\newtheorem{yproposition}{\propositionname }[chapter]
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{environment}{theorem}
% 定义新定理环境
%    \begin{macrocode}
\newenvironment{theorem}[2]
  {\ifstrempty{#1}{\ytheorem}{\ytheorem[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endytheorem}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{definition}
% 定义新定义环境
%    \begin{macrocode}
\newenvironment{definition}[2]
  {\ifstrempty{#1}{\ydefinition}{\ydefinition[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endydefinition}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{lemma}
% 定义新引理环境
%    \begin{macrocode}
\newenvironment{lemma}[2]
  {\ifstrempty{#1}{\ylemma}{\ylemma[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endylemma}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{corollary}
% 定义新推论环境
%    \begin{macrocode}
\newenvironment{corollary}[2]
  {\ifstrempty{#1}{\ycorollary}{\ycorollary[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endycorollary}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{postulate}
% 定义新公设环境
%    \begin{macrocode}
\newenvironment{postulate}[2]
  {\ifstrempty{#1}{\ypostulate}{\ypostulate[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endypostulate}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{axiom}
% 定义新公理环境
%    \begin{macrocode}
\newenvironment{axiom}[2]
  {\ifstrempty{#1}{\yaxiom}{\yaxiom[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endyaxiom}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{proposition}
% 定义新命题环境
%    \begin{macrocode}
\newenvironment{proposition}[2]
  {\ifstrempty{#1}{\yproposition}{\yproposition[#1]}\ifstrempty{#2}{}{\label{#2}}}
  {\endyproposition}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{note}
% 定义新注解环境
%    \begin{macrocode}
\newenvironment{note}{
  \par\noindent\textbf{\notename\,}
    \itshape}{\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{proof}
% 定义新证明环境
%    \begin{macrocode}
\newenvironment{proof}{
  \par\noindent\textbf{\proofname\;}
}{\hfill$\Box$\quad\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{solution}
% 定义新解答环境
%    \begin{macrocode}
\newenvironment{solution}{\medskip\par\noindent\textbf{\solutionname} \itshape}{\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{remark}
% 定义新注释环境
%    \begin{macrocode}
\newenvironment{remark}{\noindent\textbf{\remarkname}}{\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{assumption}
% 定义新假设环境
%    \begin{macrocode}
\newenvironment{assumption}{\par\noindent\textbf{\assumptionname}}{\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{conclusion}
% 定义新结论环境
%    \begin{macrocode}
\newenvironment{conclusion}{\par\noindent\textbf{\conclusionname}}{\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{property}
% 定义新性质环境
%    \begin{macrocode}
\newenvironment{property}{\par\noindent\textbf{\propertyname}}{\par}
%    \end{macrocode}
% \end{environment}
%
% \subsection{封面设置}
% \begin{macro}{\maketitle}
% 重定义\cs{maketitle}命令
%    \begin{macrocode}
\renewcommand{\maketitle}{\par
	\begingroup
	 \newgeometry{left=20mm,right=20mm,top=30mm,bottom=35mm}
      \newpage
      % 禁止图片位于页面最上方
      \global\@topnum\z@   
      \@maketitle % 下面再设置封面具体内容
    \endgroup
  % 先取消原来封面样式的所有设置,以便后面重写此命令
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
% 定义封面具体内容
\newdimen\infowidth
\infowidth = 6.5cm
\def\@maketitle{%
  \newpage
 % 开始写封面
  \thispagestyle{empty}  
  \vspace*{2cm}
 %%------------------------
  \begin{center}
  \ifdefstring{\hitsz@covertitle}{tworow}{
    \parbox[t][1.4cm][t]{\textwidth}{
  		\begin{center}\erhao[0]\bfseries\hitsz@tokens@titleone\end{center} 
	}\par
	\parbox[t][2.5cm][t]{\textwidth}{
  		\begin{center}\erhao[0]\bfseries\hitsz@tokens@titletwo\end{center} 
	}\par	
  }{\relax}
  \ifdefstring{\hitsz@covertitle}{onerow}{
    \parbox[t][3.4cm][t]{\textwidth}{
  		\begin{center}\erhao[0]\bfseries\hitsz@tokens@thesistitle\end{center} 
	}
  }{\relax}
    \parbox[t][8.7cm][t]{\textwidth}{
    \begin{center}\xiaoer[0]\song\textbf{\ziju{0.2}\hitsz@tokens@authorname}\end{center}
  }
  \begin{center}
    \bfseries
      \begin{tabular}{rl}
{\xiaosi 学\hphantom{教师}院:} & \xiaosi\hitsz@tokens@departname\\[14pt]
{\xiaosi 学\hphantom{教师}号:} & \xiaosi\hitsz@tokens@studentID
    \end{tabular}
    \hspace{0.5cm}
      \begin{tabular}{rl}
{\xiaosi 专\hphantom{教师}业:} & \xiaosi\hitsz@tokens@majorin\\[14pt]
{\xiaosi 指导教师:} &  \xiaosi\hitsz@tokens@instructor
      \end{tabular}
    \end{center}
    % 日期
    \vspace{2.6cm}
    {\xiaosi[0]\song\textbf{2020年7月}}
  \end{center}
  %%----------------------------
%% 第二页
\clearpage
\thispagestyle{empty}
  \vspace*{0.8cm}
  \centering\includegraphics[width=8cm]{HITSZname}
  \vspace{1.3cm}
  \begin{center}
    \centering\includegraphics[width=10.5cm]{thesistitle}
    \vfill
    \parbox[t][14.2cm][b]{\textwidth}
    {\heiti\xiaosan
      \begin{center} \renewcommand{\arraystretch}{2.6} \bfseries
      % 居中对齐
      \ifdefstring{\hitsz@infoalign}{infocenter}{
		\begin{tabular}{l@{\ \  }c}
		  {\xiaoer  题\hphantom{\ 导\ \ \ }目} &
		   \underline{\makebox[\infowidth]{%
		   	\xiaoer \hitsz@tokens@titleone}}\\
		     &  \underline{\makebox[\infowidth]{%
		     	\xiaoer \hitsz@tokens@titletwo}}\\
		    & \\
		  {\xiaosan 专\hphantom{\ 导\ 教\ }业}  &
		   \underline{\makebox[\infowidth]{%
		   	\xiaosan\hitsz@tokens@majorin}}\\
		  {\xiaosan 学\hphantom{\ 导\ 教\ }号}   &
		   \underline{\makebox[\infowidth]{%
		   	\xiaosan\hitsz@tokens@studentID}}\\
		  {\xiaosan 学\hphantom{\ 导\ 教\ }生}  &
		   \underline{\makebox[\infowidth]{%
		   		\xiaosan\hitsz@tokens@authorname}}\\
		  {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth]{%
		  	\xiaosan\hitsz@tokens@instructor}}\\
		  {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth]{%
		  	\xiaosan\hitsz@tokens@dateinput}}
		\end{tabular} \renewcommand{\arraystretch}{1}
	}{\relax}
	% 左对齐
	\ifdefstring{\hitsz@infoalign}{infoleft}{
		\begin{tabular}{l@{\ \  }c}		
		  {\xiaoer  题\hphantom{\ 导\ \ \ }目} &
		   \underline{\makebox[\infowidth][l]{%
		   \hspace*{1em}\xiaoer \hitsz@tokens@titleone}}\\
		     &  \underline{\makebox[\infowidth][l]{%
		     \hspace*{1em}\xiaoer \hitsz@tokens@titletwo}}\\
		    & \\
		  {\xiaosan 专\hphantom{\ 导\ 教\ }业}  &
		   \underline{\makebox[\infowidth][l]{%
		   	\hspace*{1em}\xiaosan\hitsz@tokens@majorin}}\\
		  {\xiaosan 学\hphantom{\ 导\ 教\ }号}   &
		   \underline{\makebox[\infowidth][l]{%
		   	\hspace*{1em}\xiaosan\hitsz@tokens@studentID}}\\
		  {\xiaosan 学\hphantom{\ 导\ 教\ }生}  &
		   \underline{\makebox[\infowidth][l]{%
		   \hspace*{1em}\xiaosan\hitsz@tokens@authorname}}\\
		  {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth][l]{%
		  	\hspace*{1em}\xiaosan\hitsz@tokens@instructor}}\\
		  {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth][l]{%
		  	\hspace*{1em}\xiaosan\hitsz@tokens@dateinput}}
		\end{tabular} \renewcommand{\arraystretch}{1}
	}{\relax}
      \end{center}
    }
  \end{center}
  \restoregeometry
 \clearpage
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\frontmatter}
% 设置前言页码编号为大写罗马数字
%    \begin{macrocode}
\renewcommand{\frontmatter}{%
\cleardoublepage
\@mainmatterfalse
\pagenumbering{Roman}
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{中英文摘要环境与关键词命令设置}
% \begin{environment}{abstract}
%% 中文摘要环境
%    \begin{macrocode}
\newenvironment{abstract}{\chapter*{\abstractname}
\addcontentsline{toc}{chapter}{\abstractname}
}{\if@twocolumn\else\null\fi}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{keywords}
% 中文关键词环境
%    \begin{macrocode}
\newcommand\keywords[1]{%
	\renewcommand{\hitsz@tokens@keywords}{#1}	
	{\vskip18pt
	\hspace{-30bp}\begin{tabular}{lp{132mm}}
	{\zihao{-4}\heiti\keywordsname:}&
	{\xiaosi\hitsz@tokens@keywords}
	\end{tabular}}
}
%    \end{macrocode}
% \end{environment}
%	
% \begin{environment}{abstracten}
% 英文摘要环境
%    \begin{macrocode}
\newenvironment{abstracten}{\chapter*{\bfseries Abstract}
\addcontentsline{toc}{chapter}{ABSTRACT}
}{\if@twocolumn\else\null\fi}	
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{keywordsen}
% 英文关键词环境
%    \begin{macrocode}
\newcommand\keywordsen[1]{%
	\renewcommand{\hitsz@tokens@keywordsen}{#1}
	{\vskip 18pt
	\hspace{-30bp}\begin{tabular}{lp{127mm}}
	{\zihao{-4}\bf\keywordsenname:}&
	{\xiaosi\hitsz@tokens@keywordsen}
	\end{tabular}}
}
%    \end{macrocode}
% \end{environment}
%
% \subsection{原创性声明设置}
% \begin{macro}{\declaration}
% 定义原创性声明命令
%    \begin{macrocode}
\newcommand{\declaration}{\par
	\begingroup   
      \hitsz@declaration
    \endgroup
}
%    \end{macrocode}
%
% 定义原创性声明具体内容
%    \begin{macrocode}
\def\hitsztitle{\hitsz@tokens@thesistitle}
\def\hitszauthor{\hitsz@tokens@authorname}
\def\hitsz@declaration{
\chapter*{\sanhao 哈尔滨工业大学(深圳)本科毕业设计(论文)原创性声明}
\addcontentsline{toc}{chapter}{原创性声明}\par
本人郑重声明:在哈尔滨工业大学(深圳)攻读学士学位期间,所提交的毕业设计(论文)《\hitsztitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。
\par
本人愿为此声明承担法律责任。\par
\vspace{30pt}
\hspace{6em}作者签名:\hspace{8em}日期:\hspace{3em}年\hspace{1.5em}月\hspace{1.5em}日
}
%    \end{macrocode}
% \end{macro}
%	
% \subsection{参考文献设置}
% \begin{environment}{thebibliography}
% 重定义参考文献环境
%    \begin{macrocode}
\renewenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%    \end{macrocode}
% \end{environment}
%
% \subsection{页眉页脚设置}
% \begin{macro}{\pagestyle}
% 定义页眉页脚
%    \begin{macrocode}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\pagestyle{fancy}
%    \end{macrocode}
%
% 页眉
%    \begin{macrocode}
\lhead{}
\chead{\wuhao 哈尔滨工业大学(深圳)本科毕业设计(论文)}
\rhead{}
%    \end{macrocode}
%
% 页脚
%    \begin{macrocode}
\lfoot{}
\cfoot{\wuhao -\thepage-}
\rfoot{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makeheadrule}
% 定义页眉双横线样式,注意下面代码中的\pkg{\%}不能删
%    \begin{macrocode}
\newcommand{\makeheadrule}{%
\makebox[0pt][l]{\rule[1mm]{\headwidth}{0.4mm}}%
\rule[0.35\baselineskip]{\headwidth}{0.8mm}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\headrule}
% 定义页眉横线为双横线
%    \begin{macrocode}
\renewcommand{\headrule}{%
{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%
\makeheadrule}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{目录格式设置}
%
% \begin{macro}{\titlecontents}
% 设置目录格式,目录只有三级
%
% 1级目录格式
%    \begin{macrocode}
\titlecontents{chapter}[0pt]{\vspace{1mm}\heiti}
{第\thecontentslabel\,\,章\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
%    \end{macrocode}
%
% 2级目录格式
%    \begin{macrocode}
\titlecontents{section}[25pt]{\songti}
{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
%    \end{macrocode}
%
% 3级目录格式
%    \begin{macrocode}
\titlecontents{subsection}[47pt]{\songti}
{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage}
%    \end{macrocode}
% \end{macro}
%
% 附录环境设置,暂时无用
%    \begin{macrocode}
\RequirePackage[title,titletoc]{appendix}
%    \end{macrocode}
%
% \begin{environment}{tabular}
% 修改表格字号,注意 |tabular| 要放在 |table| 环境里
%    \begin{macrocode}
\BeforeBeginEnvironment{tabular}{\wuhao}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{table}
% 修改表格与后文间距,缩短1cm
%    \begin{macrocode}
\AfterEndEnvironment{table}{\vspace{-1cm}}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\newcounter}
% 新计数器,编排表格编号用
%    \begin{macrocode}
\newcounter{rowno}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thefigure}
% \begin{macro}{\thetable}
% \begin{macro}{\theequation}
% 设置图表公式编号格式为1-1
%    \begin{macrocode}
\renewcommand{\thefigure}{\thechapter-\arabic{figure}}
\renewcommand{\thetable}{\thechapter-\arabic{table}}
\renewcommand{\theequation}{\thechapter-\arabic{equation}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{其他杂项设置}
% \begin{macro}{\usetikzlibrary}
% 使用\pkg{tikz}配置流程图基本图形
%    \begin{macrocode}
\usetikzlibrary{shapes.geometric, arrows}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{startstop}
% 开始
%    \begin{macrocode}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width = 2cm, 
minimum height=1cm,text centered, draw = black]
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{io}
% 输入输出
%    \begin{macrocode}
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, 
minimum width=2cm, minimum height=1cm, text centered, draw=black]
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{process}
% 过程
%    \begin{macrocode}
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, 
text centered, draw=black]
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{decision}
% 判断
%    \begin{macrocode}
\tikzstyle{decision} = [diamond, aspect = 3, text centered, draw=black]
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{arrow}
% 箭头形式
%    \begin{macrocode}
\tikzstyle{arrow} = [->,>=stealth]
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\upcite}
% 参考文献标号为上标
%    \begin{macrocode}
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thefootnote}
% 设置脚注编号格式
%    \begin{macrocode}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\chapter}
% 解决book类文档章首页和目录页没有页眉页脚的问题
%    \begin{macrocode}
\makeatletter
\renewcommand\chapter{
	\if@openright\cleardoublepage
	\else\clearpage
	\fi
     \thispagestyle{fancy}
     \global\@topnum\z@
     \@afterindentfalse
     \secdef\@chapter\@schapter
}
\makeatother
%    \end{macrocode}
% \end{macro}
%
% \subsection{新数学命令设置}
% \begin{macro}{\dif}
% \begin{macro}{\no}
% \begin{macro}{\dis}
% \begin{macro}{\ls}
% \begin{macro}{\gs}
% 新简记数学命令
%    \begin{macrocode}
\newcommand\dif{\text{d}}
\newcommand\no{\noindent}
\newcommand\dis{\displaystyle}
\newcommand\ls{\leqslant}
\newcommand\gs{\geqslant}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\limit}
% \begin{macro}{\limn}
% \begin{macro}{\limxz}
% \begin{macro}{\limxi}
% \begin{macro}{\limxpi}
% \begin{macro}{\limxni}
% \begin{macro}{\limtpi}
% \begin{macro}{\limtni}
% 极限
%    \begin{macrocode}
\newcommand\limit{\dis\lim\limits}
\newcommand\limn{\dis\lim\limits_{n\to\infty}}
\newcommand\limxz{\dis\lim\limits_{x\to0}}
\newcommand\limxi{\dis\lim\limits_{x\to\infty}}
\newcommand\limxpi{\dis\lim\limits_{x\to+\infty}}
\newcommand\limxni{\dis\lim\limits_{x\to-\infty}}
\newcommand\limtpi{\dis\lim\limits_{t\to+\infty}}
\newcommand\limtni{\dis\lim\limits_{t\to-\infty}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sumn}
% \begin{macro}{\sumnz}
% $n$求和
%    \begin{macrocode}
\newcommand\sumn{\dis\sum\limits_{n=1}^{\infty}}
\newcommand\sumnz{\dis\sum\limits_{n=0}^{\infty}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sumi}
% \begin{macro}{\sumiz}
% \begin{macro}{\sumin}
% \begin{macro}{\sumizn}
% $i$求和
%    \begin{macrocode}
\newcommand\sumi{\dis\sum\limits_{i=1}^{\infty}}
\newcommand\sumiz{\dis\sum\limits_{i=0}^{\infty}}
\newcommand\sumin{\dis\sum\limits_{i=1}^{n}}
\newcommand\sumizn{\dis\sum\limits_{i=0}^{n}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sumk}
% \begin{macro}{\sumkz}
% \begin{macro}{\sumkn}
% \begin{macro}{\sumkfn}
% $k$求和
%    \begin{macrocode}
\newcommand\sumk{\dis\sum\limits_{k=1}^{\infty}}
\newcommand\sumkz{\dis\sum\limits_{k=0}^{\infty}}
\newcommand\sumkn{\dis\sum\limits_{k=0}^n}
\newcommand\sumkfn{\dis\sum\limits_{k=1}^n}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pzx}
% \begin{macro}{\pzy}
% $z$偏微分
%    \begin{macrocode}
\newcommand\pzx{\dis\frac{\partial z}{\partial x}}
\newcommand\pzy{\dis\frac{\partial z}{\partial y}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pfx}
% \begin{macro}{\pfy}
% $f$偏微分
%    \begin{macrocode}
\newcommand\pfx{\dis\frac{\partial f}{\partial x}}
\newcommand\pfy{\dis\frac{\partial f}{\partial y}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pzxx}
% \begin{macro}{\pzxy}
% \begin{macro}{\pzyx}
% \begin{macro}{\pzyy}
% $z$二重偏微分
%    \begin{macrocode}
\newcommand\pzxx{\dis\frac{\partial^2 z}{\partial x^2}}
\newcommand\pzxy{\dis\frac{\partial^2 z}{\partial x\partial y}}
\newcommand\pzyx{\dis\frac{\partial^2 z}{\partial y\partial x}}
\newcommand\pzyy{\dis\frac{\partial^2 z}{\partial y^2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pfxx}
% \begin{macro}{\pfxy}
% \begin{macro}{\pfyx}
% \begin{macro}{\pfyy}
% $f$二重偏微分
%    \begin{macrocode}
\newcommand\pfxx{\dis\frac{\partial^2 f}{\partial x^2}}
\newcommand\pfxy{\dis\frac{\partial^2 f}{\partial x\partial y}}
\newcommand\pfyx{\dis\frac{\partial^2 f}{\partial y\partial x}}
\newcommand\pfyy{\dis\frac{\partial^2 f}{\partial y^2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\intzi}
% \begin{macro}{\intd}
% \begin{macro}{\intab}
% 积分
%    \begin{macrocode}
\newcommand\intzi{\dis\int_{0}^{+\infty}}
\newcommand\intd{\dis\int}
\newcommand\intab{\dis\int_a^b}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\degree}
% 角度符号
%    \begin{macrocode}
\newcommand{\degree}{^\circ}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ma}
% 花体
%    \begin{macrocode}
\newcommand\ma{\mathcal{A}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\mb}
% \begin{macro}{\mc}
% \begin{macro}{\me}
% \begin{macro}{\mg}
% 继续定义
%    \begin{macrocode}
\newcommand\mb{\mathcal{B}}
\newcommand\mc{\mathcal{C}}
\newcommand\me{\mathcal{E}}
\newcommand\mg{\mathcal{g}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\mcc}
% \begin{macro}{\mrr}
% \begin{macro}{\mzz}
% 重体
%    \begin{macrocode}
\newcommand\mcc{\mathbb{C}}
\newcommand\mrr{\mathbb{R}}
\newcommand\mzz{\mathbb{Z}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\vx}
% \begin{macro}{\vX}
% \begin{macro}{\vy}
% \begin{macro}{\vY}
% 向量
%    \begin{macrocode}
\newcommand\vx{\bf{x}}
\newcommand\vX{\bf{X}}
\newcommand\vy{\bf{y}}
\newcommand\vY{\bf{Y}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sgn}
% \begin{macro}{\arccot}
% \begin{macro}{\arccosh}
% 定义新数学符号
%    \begin{macrocode}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\arccosh}{arccosh}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% 
% \begin{macro}{\arcsinh}
% \begin{macro}{\arctanh}
% \begin{macro}{\arccoth}
% \begin{macro}{\grad}
% \begin{macro}{\argmax}
% \begin{macro}{\argmin}
% \begin{macro}{\diag}
% \begin{macro}{\csign}
% 继续定义数学符号
%    \begin{macrocode}
\DeclareMathOperator{\arcsinh}{arcsinh}
\DeclareMathOperator{\arctanh}{arctanh}
\DeclareMathOperator{\arccoth}{arccoth}
\DeclareMathOperator{\grad}{\bf{grad}}
\DeclareMathOperator{\argmax}{argmax}
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\csign}{csign}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{书脊}
% \label{sec:spine}
% \begin{macro}{\spine}
% 单独使用书脊命令会在新的一页产生竖排书脊。
%    \begin{macrocode}
\newcommand{\spine}{%
	\begingroup   
     	 \hitsz@spine
    \endgroup
}
\def\hitsz@spine{%
  \newpage\thispagestyle{empty}%
  \fangsong\addCJKfontfeatures*{RawFeature={vertical:}}
  \xiaosan\ziju{0.4}%
  \noindent\hfill\rotatebox[origin=lt]{-90}{%
  	\makebox[\textheight]{\hitsztitle \hfill \hitszauthor}
  }
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{其它}
% \label{sec:other}
%
% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。
%    \begin{macrocode}
\AtEndOfClass{\sloppy}
%</cls>
%    \end{macrocode}
%
% \iffalse
%    \begin{macrocode}
%<*dtx-style>
\ProvidesPackage{dtx-style}
\RequirePackage{hypdoc}
\RequirePackage{ifthen}
\RequirePackage[UTF8,scheme=chinese]{ctex}
\RequirePackage{newtxtext}
\RequirePackage{newtxmath}
\RequirePackage[
  top=2.5cm, bottom=2.5cm,
  left=5cm, right=1.5cm,
  headsep=8mm]{geometry}
\RequirePackage{array,longtable,booktabs}
\RequirePackage{listings}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{enumitem}
\RequirePackage{etoolbox}
\RequirePackage{metalogo}

\ifthenelse{\equal{\@nameuse{g__ctex_fontset_tl}}{mac}}{%
  \xeCJKsetwidth{‘’“”}{1em}
}{}

\colorlet{hitsz@macro}{blue!60!black}
\colorlet{hitsz@env}{blue!70!black}
\colorlet{hitsz@option}{purple}
\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{}
\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}
\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{}

\def\DescribeOption{%
  \leavevmode\@bsphack\begingroup\MakePrivateLetters%
  \Describe@Option}
\def\Describe@Option#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1}}%
  \hitsz@special@index{option}{#1}\@esphack\ignorespaces}
\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ }
\def\hitsz@special@index#1#2{\@bsphack
  \begingroup
    \HD@target
    \let\HDorg@encapchar\encapchar
    \edef\encapchar usage{%
      \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
    }%
    \index{#2\actualchar{\string\ttfamily\space#2}
           (#1)\encapchar usage}%
    \index{#1:\levelchar#2\actualchar
           {\string\ttfamily\space#2}\encapchar usage}%
  \endgroup
  \@esphack}

\lstdefinestyle{lstStyleBase}{%
   basicstyle=\small\ttfamily,
   aboveskip=\medskipamount,
   belowskip=\medskipamount,
   lineskip=0pt,
   boxpos=c,
   showlines=false,
   extendedchars=true,
   upquote=true,
   tabsize=2,
   showtabs=false,
   showspaces=false,
   showstringspaces=false,
   numbers=none,
   linewidth=\linewidth,
   xleftmargin=4pt,
   xrightmargin=0pt,
   resetmargins=false,
   breaklines=true,
   breakatwhitespace=false,
   breakindent=0pt,
   breakautoindent=true,
   columns=flexible,
   keepspaces=true,
   gobble=2,
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
   commentstyle=\slshape\color{black!60}}

\lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{purple},
   language=bash}

\definecolor{hitcolor}{RGB}{21,95,130}
\lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{hitcolor},
   language=[LaTeX]TeX}

\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}

\setlist{nosep}

\DeclareDocumentCommand{\option}{m}{\textsf{#1}}
\DeclareDocumentCommand{\env}{m}{\texttt{#1}}
\DeclareDocumentCommand{\pkg}{s m}{%
  \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}}
\DeclareDocumentCommand{\file}{s m}{%
  \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}}
\newcommand{\myentry}[1]{%
  \marginpar{\raggedleft\color{purple}\bfseries\strut #1}}
\newcommand{\note}[2][Note]{{%
  \color{magenta}{\bfseries #1}\emph{#2}}}

\def\hitszthesis{\textsc{Hitsz}\-\textsc{Thesis}}
%</dtx-style>
%    \end{macrocode}
% \fi
%
% \Finale
%
\endinput
% \iffalse
%  Local Variables:
%  mode: doctex
%  TeX-master: t
%  End:
% \fi