summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/xduts/xduts.dtx
blob: 8ec2d39d830010e8054affd4e97bb20ed454a438 (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
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
% \iffalse
%<*driver>
\ProvidesFile{xduts.dtx}
[2022/05/08 v1.13.2.0 Xidian University TeX Suite]
%</driver>
%<class|sty>\NeedsTeXFormat{LaTeX2e}
%<class|sty>\RequirePackage{expl3}
%<xdufont>\ProvidesExplPackage{xdufont}
%<xdupgthesis>\ProvidesExplClass{xdupgthesis}
%<xduugthesis>\ProvidesExplClass{xduugthesis}
%<class|sty>  {2022/05/08}{1.13.2.0}
%<xdufont>  {Xidian University Font package}
%<xdupgthesis>  {Xidian University Postgraduate Thesis document class}
%<xduugthesis>  {Xidian University Undergraduate Thesis document class}
%<*driver>
\PassOptionsToPackage{AutoFakeBold=3}{xeCJK}
\documentclass{ctxdoc}
\changes{v1.9.0.0}{2022/05/03}{支持中文选项默认值加粗}
\changes{v1.9.0.0}{2022/05/03}{增大function环境盒子宽度}
\addtolength{\marginparwidth}{5mm}
\geometry{hmargin={0mm,10mm}}
\changes{v0.6.0.0}{2022/04/10}{新增xdufont宏包}
\changes{v0.5.2.1}{2022/04/09}{修改项目名称}
\changes{v0.4.2.1}{2022/04/05}{调整文档目录缩进}
\usepackage{tocloft}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{1em}
\setlength{\cftsubsubsecindent}{2em}
\setlength{\cftparaindent}{3em}
\setlength{\cftsubparaindent}{4em}
\ctexset{
  secnumdepth = 5,
  subparagraph = {
    afterskip = 1ex plus .2ex,
    runin = false
  }
}
\setcounter{tocdepth}{5}
\ctexset{punct=quanjiao}
\usepackage{hologo}
\usepackage{fetamont}
\usepackage{xurl}
\usepackage{xspace}
\xspaceaddexceptions{。?!,、;:“”‘’—….--~·《》<>_}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{multirow}
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}
\usepackage{tabularray}
\SetTblrStyle{caption-tag}{font=\bfseries}
\DefTblrTemplate{caption-sep}{default}{\quad}
\DefTblrTemplate{conthead-text}{default}{(续表)}
\DefTblrTemplate{contfoot-text}{default}{接下页}
% 交叉引用
\newcommand{\secrefx}[1]{第\xspace\ref{#1}\xspace 节}
\newcommand{\tabrefx}[1]{\tablename\xspace\ref{#1}\xspace}
% 文档类选项
\newcommand{\optx}[1]{\xspace\opt{#1}\xspace}
% /name LaTeX3控制序列
\newcommand{\csx}[1]{\xspace\cs{#1}\xspace}
% /name 传统LaTeX2e命令
\newcommand{\tnx}[1]{\xspace\tn{#1}\xspace}
% <name> LaTeX3键值
\newcommand{\metax}[1]{\xspace\meta{#1}\xspace}
% LaTeX3键值对
\newcommand{\breakablethinspace}{\hskip 0.16667em\relax}
\newcommand{\kvoptx}[2]{\xspace\texttt{#1\breakablethinspace=\breakablethinspace#2}\xspace}
% {<name>} LaTeX2e参数
\newcommand{\argx}[1]{\xspace\Arg{#1}\xspace}
% [<name>] LaTeX2e可选参数
\newcommand{\oargx}[1]{\xspace\Arg{#1}\xspace}
% 文件
\usepackage{seqsplit}
\newcommand{\filex}[1]{\xspace{\ttfamily\seqsplit{#1}}\xspace}
% 环境
\newcommand{\envx}[1]{\xspace\env{#1}\xspace}
% 宏包
\newcommand{\pkgx}[1]{\xspace\pkg{#1}\xspace}
% 文档类
\newcommand{\clsx}[1]{\xspace\cls{#1}\xspace}
% 值
\newcommand{\valuex}[1]{\xspace\texttt{#1}\xspace}
% 命令
\newcommand{\cmdx}[1]{\xspace\texttt{#1}\xspace}
% 链接
\newcommand{\footurl}[1]{\footnote{\url{#1}}}
\newcommand{\ctanurl}[1]{\href{https://mirrors.ustc.edu.cn/CTAN/#1}{\ttfamily CTAN://#1}}
\newcommand{\footctan}[1]{\footnote{\ctanurl{#1}}}
% logo
\newcommand{\xduts}{{\bfseries\ffmfamily XDUTS}}
\newcommand{\texlive}{\TeX{} Live}
\newcommand{\mactex}{Mac\TeX{}}
\newcommand{\miktex}{\xspace\hologo{MiKTeX}\xspace}
\newcommand{\bibtex}{\xspace\hologo{BibTeX}\xspace}
\newcommand{\biber}{\xspace\hologo{biber}\xspace\xspace}
% arguments list
\setlist[arguments]{label=\texttt{\#\arabic*}\,:}
% 浮动体默认设置
\makeatletter
\renewcommand{\fps@table}{htbp}
\makeatother
% listings
\definecolor{xdu-ai-orange}{cmyk}{0,0.75,1,0}
\definecolor{xdu-blue}{cmyk}{0.80,0.50,0,0}
\definecolor{xdu-chem-red}{cmyk}{0.28,0.95,0.84,0}
\definecolor{xdu-cs-green}{cmyk}{0.60,0.23,1,0}
\definecolor{xdu-magenta}{cmyk}{0.05,1,0.55,0}
\definecolor{xdu-violet}{cmyk}{0.50,1,0,0.40}
\usepackage{listings}
\lstdefinestyle{style@base}
  {
    basewidth       = 0.5 em,
    gobble          = 3,
    lineskip        = 3 pt,
    frame           = l,
    framerule       = 1 pt,
    framesep        = 0 pt,
    xleftmargin     = 0 em,
    xrightmargin    = 0 em,
    escapeinside    = {(*}{*)},
    breaklines      = true,
    basicstyle      = \small\ttfamily,
    keywordstyle    = \bfseries\color{xdu-violet},
    commentstyle    = \itshape\color{white!50!gray},
    stringstyle     = \color{xdu-chem-red},
    backgroundcolor = \color{white!95!gray}
  }
\lstdefinestyle{style@shell}
  {
    style      = style@base,
    rulecolor  = \color{xdu-magenta},
    language   = bash,
    alsoletter = {-},
    emphstyle  = \color{xdu-cs-green}
  }
\lstdefinestyle{style@latex}
  {
    style      = style@base,
    rulecolor  = \color{xdu-blue},
    language   = [LaTeX]TeX,
    alsoletter = {*, -},
    texcsstyle = *\color{xdu-violet},
    emphstyle  = [1]\color{xdu-ai-orange},
    emphstyle  = [2]\color{xdu-cs-green}
  }
\lstnewenvironment{shellexample}[1][]{%
  \lstset{style=style@shell, #1}}{}
\lstnewenvironment{latexexample}[1][]{%
  \lstset{style=style@latex, #1}}{}
\begin{document}
\DocInput{\jobname.dtx}
\IndexLayout
\PrintChanges
\PrintIndex
\end{document}
%</driver>
% \fi
% \CheckSum{1283}
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
% \GetFileInfo{\jobname.dtx}
% \title{\bfseries\xduts{}手册}
% \author{\href{https://github.com/note286/}{note286}}
% \date{\href{https://github.com/note286/xduts/releases/tag/\fileversion/}{\fileversion}~(\filedate)}
% \maketitle
% \thispagestyle{empty}
% \begin{abstract}
% \xduts{}是面向西安电子科技大学本科生/研究生的\LaTeXiii{}文档类和宏包套装,
% 仅支持\XeLaTeX{},
% 仅支持\texlive{}、\mactex{}、\miktex{},
% 支持Windows、macOS、GNU/Linux、Overleaf和TeXPage。
% \end{abstract}
% \renewcommand{\abstractname}{免责声明}
% \begin{abstract}
% 在使用\xduts{}时,默认您同意以下内容:
% \begin{enumerate}
% \item \xduts{}作者不对使用\xduts{}产生的格式审查问题负责。
% \item \xduts{}的发布遵守
% \LaTeX{} Project Public License\footurl{https://www.latex-project.org/lppl.txt},
% 使用前请认真阅读协议内容。
% \item 任何个人或组织以\xduts{}为基础进行修改、扩展而生成的新的\LaTeX{}文档类/宏包,
% 请严格遵守\LaTeX{} Project Public License,
% 由于违犯协议而引起的任何纠纷争端均与\xduts{}作者无关。
% \end{enumerate}
% \end{abstract}
% \clearpage
% \tableofcontents
% \clearpage
% \section{介绍}
% \xduts{} (Xidian University \TeX{} Suite)
% 是为了帮助西安电子科技大学本科生/研究生撰写开题报告/学位论文及其他文档
% 而编写的\LaTeXiii{}文档类和宏包套装,目前有:
% \begin{itemize}
% \item \pkgx{xdufont},中/英/数学字体配置宏包。
% \item \clsx{xduugthesis},本科毕业设计论文。
% \end{itemize}
% 正在开发:
% \begin{itemize}
% \item \clsx{xdupgthesis},研究生学位论文。
% \end{itemize}
% 即将支持:
% \begin{itemize}
% \item \clsx{xdupgtp},研究生学位论文开题报告表。
% \item \clsx{xduugtp},本科毕业设计论文开题报告表。
% \end{itemize}
% \par
% \changes{v1.2.0.1}{2022/04/19}{增加GitHub Discussions}
% 本文档将尽量完整地介绍\xduts{}的使用方法,
% 如有不清楚之处,或者想提出改进建议,
% 可以在GitHub Discussions\footurl{https://github.com/note286/xduts/discussions/}
% 参与讨论或提问。
% 如确定\xduts{}存在bug,
% 可以在GitHub Issues\footurl{https://github.com/note286/xduts/issues/}
% 具体描述。另外,\textbf{不接受任何Pull Requests}。
% \StopEventually{}
% \section{使用说明}
% \label{使用说明}
% 《一份(不太)简短的\LaTeXe{}介绍》\footctan{info/lshort/chinese/lshort-zh-cn.pdf}
% 中提及的内容本文档将不再赘述。
% \xduts{}中的所有文档类和宏包仅内置了实现功能所需的宏包,
% 对于常用的宏包如\pkgx{subfig}、\pkgx{algpseudocodex}、
% \pkgx{amsmath}、\pkgx{amsthm}和\pkgx{siunitx}等\textbf{均未内置},
% 用户可以参考\secrefx{兼容性说明}后,视需求自行加载。
% 相应格式规范均已实现,用户仅需要撰写文章内容即可,请勿随意添加格式修改命令。
% \changes{v1.1.2.1}{2022/04/15}{增加默认值说明}
% \textbf{部分样式的默认值并不严格符合学校规范},
% 用户可以结合学校规范并参考\secrefx{功能说明}功能说明自行修改。
% \par
% 请在最新版\LaTeX{}环境中使用最新版\xduts{},
% 认真阅读相应文档类/宏包使用说明章节即可使用\xduts{}。
% \subsection{xdufont}
% \pkgx{xdufont}宏包基于\pkgx{xeCJK},相较于\pkgx{ctex}宏包的主要优势为默认支持宋体粗体、斜体,内置多种字体配置,可任意搭配中/英/数学字体,更加符合校内各种文档的撰写要求。
% \par
% \secrefx{编译}介绍了如何编译,\secrefx{参数设置}介绍了如何自定义配置,具体的配置选项见\secrefx{字体选项}。\pkgx{xdufont}可以搭配任意文档类进行使用,例如:
% \begin{latexexample}[moretexcs={\xdusetup},emph={[1]document}]
%   \documentclass{article}
%   \usepackage{xdufont}
%   \xdusetup{}
%   \begin{document}
%   宋体\textbf{加粗}\textsl{加斜}
%   \textsf{黑体}\textbf{\textsf{加粗}}\textsl{\textsf{加斜}}
%   \end{document}
% \end{latexexample}
% \par
% 学会以上用法后即可使用\pkgx{xdufont}宏包。
% \changes{v1.4.0.0}{2022/04/26}{新增研究生学位论文}
% \subsection{xdupgthesis}
% \subsection{xduugthesis}
% \pkgx{xduugthesis}基于\clsx{ctexbook}文档类,
% 提供多种字体配置,部分样式可自定义,信息录入便捷。
% \changes{v1.3.1.1}{2022/04/26}{英文本科生毕业设计规范参考说明}
% 论文语言为英文时,部分格式符合《外国语学院学士论文写作手册》。
% 请在阅读《本科生毕业设计(论文)工作手册》后再使用\pkgx{xduugthesis}。
% \par
% 典型的\clsx{xduugthesis}主文件结构如下所示:
% \begin{latexexample}[moretexcs={\xdusetup,\frontmatter,\mainmatter,\chapter,\backmatter},emph={[1]document}]
%   \documentclass{xduugthesis}
%   \xdusetup{}
%   \begin{document}
%   \frontmatter
%   \mainmatter
%   \chapter{欢迎}
%   使用\LaTeX{}!
%   \backmatter
%   \end{document}
% \end{latexexample}
% \par
% \secrefx{编译}介绍了如何编译,\secrefx{参数设置}介绍了如何自定义配置。
% 其中,字体选项见\secrefx{字体选项},
% 部分英文字体切换见\secrefx{英文字体},
% 参考文献配置见\secrefx{参考文献配置},
% 页面配置见\secrefx{页面配置},
% 交叉引用配置见\secrefx{交叉引用配置},
% Caption配置见\secrefx{Caption配置},
% 表格配置见\secrefx{表格配置},
% 算法配置见\secrefx{算法配置},
% 章节配置见\secrefx{章节配置}。
% 如需附录,请使用附录环境,具体见\secrefx{附录环境}。
% 仅支持如下信息录入,具体每个选项的含义见\secrefx{信息录入},如没有部分选项,则删除该行即可。
% \begin{latexexample}[moretexcs={\xdusetup},emph={[2]info}]
%   \xdusetup {
%     info = {
%       title                 = {第一行标题\\第二行标题},
%       department            = {电子工程学院},
%       major                 = {电子信息工程},
%       author                = {张三},
%       supervisor            = {李四},
%       supervisor-department = {王五},
%       supervisor-enterprise = {赵六},
%       supervisor-school     = {刘七},
%       class-id              = {123456},
%       student-id            = {12345678910},
%       abstract              = {abstract-zh.tex},
%       abstract*             = {abstract-en.tex},
%       keywords              = {我,就是,充数的,关键词},
%       keywords*             = {Dummy,Keywords,Here,it is},
%       acknowledgements      = {acknowledgements.tex}
%     }
%   }
% \end{latexexample}
% \par
% 学会以上用法后即可使用\clsx{xduugthesis}文档类。
% \changes{v1.3.0.1}{2022/04/20}{增加兼容性说明}
% \section{兼容性说明}
% \label{兼容性说明}
% \xduts{}对部分常见宏包进行了针对性地适配,
% 需要注意的是,这些宏包仍需用户视需求自行加载。
% \subsection{算法}
% 主要适配算法内容字号和默认浮动位置。
% \pkgx{algorithm}宏包提供了算法浮动体\envx{algorithm}环境,
% 可以搭配\pkgx{algpseudocodex}等宏包使用。
% \pkgx{algorithm2e}宏包提供了算法环境,
% 该宏包提供的\envx{algorithm}环境实际将浮动体与算法内容合二为一。
% \subsection{图片}
% 主要适配子图caption字体字号,
% \changes{v1.4.1.1}{2022/04/27}{修正子图适配宏包名称}
% 包括\pkgx{subfig}宏包和\pkgx{subcaption}宏包。
% \subsection{表格}
% 主要适配表格内容字号,
% 包括所有使用\envx{table}浮动体的表格、
% \pkgx{tabularray}宏包提供的\envx{tblr}、\envx{longtblr}环境
% 和\pkgx{longtable}宏包提供的\envx{longtable}环境。
% \section{功能说明}
% \label{功能说明}
% 请根据\secrefx{使用说明}中相应文档类/宏包的说明来选择性地阅读本节内容。
% \subsection{编译}
% \label{编译}
% \changes{v0.5.1.2}{2022/04/07}{增加编译说明}
% \LaTeX{}本身是命令行程序,通过不同的命令调用所需的编译引擎,编辑器提供的快捷按钮实际只是做了包装。\xduts{}仅支持\XeLaTeX{},参考文献默认使用\biber{},也可以切换为\bibtex{}。
% \subsection{参数设置}
% \label{参数设置}
% \changes{v0.5.1.1}{2022/04/06}{增加xdusetup配置文档}
% \begin{function}[added=2022-03-07]{\xdusetup}
%   \begin{syntax}
%     \tnx{xdusetup}=\argx{键值列表}
%   \end{syntax}
% \xduts{}提供了一系列选项,可自行配置。
% 载入文档类/宏包之后,以下所有选项均可通过统一的命令\tnx{xdusetup}来设置。
% \csx{xdusetup}的参数是一组由(英文)逗号隔开的选项列表,
% 下文中尖括号内列出了若干个允许的选项,其中加粗的为默认选项。
% 列表中的选项通常是\kvoptx{\metax{key}}{\metax{value}}的形式。
% \csx{xdusetup}采用\LaTeXiii{}风格的键值设置,
% 支持不同类型以及多种层次的选项设定。
% 键值列表中,“|=|”左右的空格不影响设置;
% 但需注意,参数列表中不可以出现空行。
% 一些选项包含子选项,如\optx{style}和\optx{info}等,
% 它们可以按如下两种等价方式来设定:
% \begin{latexexample}[morekeywords={\xdusetup},emph={[1]style,cjk-font,latin-font,info,title,author,department}]
%   \xdusetup{
%     style = { cjk-font = adobe, latin-font = tacn },
%     info  = {
%       title      = {论如何让用户认真阅读文档},
%       author     = {张三},
%       department = {排版学院}
%     }
%   }
% \end{latexexample}
% 或者
% \begin{latexexample}[morekeywords={\xdusetup},emph={[1]style,cjk-font,latin-font,info,title,author,department}]
%   \xdusetup{
%     style / cjk-font   = adobe,
%     style / latin-font = tacn,
%     info  / title      = {论如何让用户认真阅读文档},
%     info  / author     = {张三},
%     info  / department = {排版学院}
%   }
% \end{latexexample}
% \end{function}
% \subsection{字体选项}
% \label{字体选项}
% \begin{function}[added=2022-03-06]{style/cjk-font}
%   \begin{syntax}
%     \optx{style/cjk-font}=\metax{adobe|(fandol)|founder|sinotype|win|none}
%   \end{syntax}
% 设置中文字体,具体配置见\tabrefx{tab:cjk-font}。
% \end{function}
% \begin{optdesc}
%   \item[none] 关闭内置中文字体配置,需自行配置中文字体。
% \end{optdesc}
% \begin{table}
% \begin{threeparttable}
% \caption{中文字体配置}
% \label{tab:cjk-font}
% \centering
% \begin{tabularx}{\linewidth}{cccc}
% \toprule
% \strong{选项名称}   & \strong{罗马字体族}           & \strong{无衬线字体族} & \strong{打字机字体族} \\
% \midrule
% |adobe|\tnote{1}    & Adobe 宋体 Std/Adobe 楷体 Std & Adobe 黑体 Std        & Adobe 仿宋 Std        \\
% |fandol|            & FandolSong/FandolKai          & FandolHei             & FandolFang            \\
% |founder|\tnote{2}  & 方正书宋_GBK/方正楷体_GBK     & 方正黑体_GBK          & 方正仿宋_GBK          \\
% |sinotype|\tnote{3} & 华文宋体/华文楷体             & 华文细黑/华文黑体     & 华文仿宋              \\
% |win|\tnote{4}      & 中易宋体/中易楷体             & 中易黑体              & 中易仿宋              \\
% \bottomrule
% \end{tabularx}
% \begin{tablenotes}
% \item [1] \filex{adobesongstd-light.otf}、\filex{adobekaitistd-regular.otf}、\filex{adobeheitistd-regular.otf}和\filex{Adobe-Fangsong-Std-R-Font.otf}。
% \item [2] \filex{FZShuSong-Z01.ttf}、\filex{FZKai-Z03.ttf}、\filex{FZHei-B01.ttf}和\filex{FZFSK.TTF}。
% \item [3] \filex{STSONG.TTF}、\filex{STKAITI.TTF}、\filex{STXIHEI.TTF}、\filex{STHeiti.ttf}和\filex{STFANGSO.TTF}。
% \item [4] \filex{simsun.ttc}、\filex{simkai.ttf}、\filex{simhei.ttf}和\filex{simfang.ttf}。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
% \begin{function}[added=2022-04-01]{style/cjk-fake-bold}
%   \begin{syntax}
%     \optx{style/cjk-fake-bold}=\metax{伪粗体粗细程度}
%   \end{syntax}
% 设置中文字体伪粗体粗细程度。默认为\valuex{3},对于部分存在对应粗体字体的中文字体,如FandolSong和FandolHei等,该选项不生效。
% \end{function}
% \begin{function}[added=2022-04-01]{style/cjk-fake-slant}
%   \begin{syntax}
%     \optx{style/cjk-fake-slant}=\metax{伪斜体倾斜程度}
%   \end{syntax}
% 设置中文字体伪斜体倾斜程度。默认为\valuex{0.2}。
% \end{function}
% \begin{function}[added=2022-03-06,updated=2022-05-06]{style/latin-font}
%   \begin{syntax}
%     \optx{style/latin-font}=\metax{tac|tacn|thcs|(gyre)|none}
%   \end{syntax}
% 设置英文字体,具体配置见\tabrefx{tab:latin-font}。
% \end{function}
% \begin{optdesc}
%   \item[none] 关闭内置英文字体配置,需自行配置英文字体。
% \end{optdesc}
% \begin{table}
% \begin{threeparttable}
% \caption{英文字体配置}
% \label{tab:latin-font}
% \centering
% \begin{tabularx}{\linewidth}{cYYY}
% \toprule
% \strong{选项名称} & \strong{罗马字体族} & \strong{无衬线字体族} & \strong{打字机字体族} \\
% \midrule
% |tac|\tnote{1}    & Times New Roman     & Arial                 & Consolas              \\
% |tacn|\tnote{2}   & Times New Roman     & Arial                 & Courier New           \\
% |thcs|\tnote{3}   & Times New Roman     & Helvetica             & Courier Std           \\
% |gyre|            & TeX Gyre Termes     & TeX Gyre Heros        & TeX Gyre Cursor       \\
% \bottomrule
% \end{tabularx}
% \begin{tablenotes}
% \item [1] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{consola.ttf}、\filex{consolab.ttf}、\filex{consolai.ttf}和\filex{consolaz.ttf}。
% \item [2] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{cour.ttf}、\filex{courbd.ttf}、\filex{couri.ttf}和\filex{courbi.ttf}。
% \item [3] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{Helvetica.ttf}、\filex{Helvetica~Bold.ttf}、\filex{Helvetica~Oblique.ttf}、\filex{Helvetica~Bold~Oblique.ttf}、\filex{CourierStd.otf}、\filex{CourierStd-Bold.otf}、\filex{CourierStd-Oblique.otf}和\filex{CourierStd-BoldOblique.otf}。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
% \begin{function}[added=2022-03-06,updated=2022-03-09]{style/math-font}
%   \begin{syntax}
%     \optx{style/math-font}=\metax{asana|cambria|(cm)|fira|garamond|lm|...|termes|xits|none}
%   \end{syntax}
% 设置数学字体,具体配置见\tabrefx{tab:math-font}。除Computer Modern字体外,均使用\pkgx{unicode-math}宏包调用字体。
% \end{function}
% \changes{v0.1.4.1}{2022/04/04}{数学字体风格介绍}
% \begin{optdesc}
%   \item[cambria] 微软Office预装的数学字体。
%   \item[fira] 无衬线数学字体。
%   \item[garamond] Garamond风格。
%   \item[lm] 基于Computer Modern风格。
%   \item[libertinus] Linux Libertine风格。
%   \item[stix] Times风格。
%   \item[dejavu] DejaVu风格。
%   \item[pagella] Palatino风格。
%   \item[termes] Times风格。
%   \item[xits] 基于STIX,Times风格,有粗体XITS Math Bold可用。
%   \item[none] 关闭内置数学字体配置,需自行配置数学字体。
% \end{optdesc}
% \begin{table}
% \begin{threeparttable}
% \caption{数学字体配置}
% \label{tab:math-font}
% \centering
% \begin{tabularx}{\linewidth}{cY}
% \toprule
% \strong{选项名称}  & \strong{字体名称}     \\
% \midrule
% |asana|            & Asana Math            \\
% |cambria|\tnote{1} & Cambria Math          \\
% |cm|               & Computer Modern       \\
% |fira|             & Fira Math             \\
% |garamond|         & Garamond Math         \\
% |lm|               & Latin Modern Math     \\
% |libertinus|       & Libertinus Math       \\
% |stix|             & STIX Math             \\
% |bonum|            & TeX Gyre Bonum Math   \\
% |dejavu|           & TeX Gyre DejaVu Math  \\
% |pagella|          & TeX Gyre Pagella Math \\
% |schola|           & TeX Gyre Schola Math  \\
% |termes|           & TeX Gyre Termes Math  \\
% |xits|             & XITS Math             \\
% \bottomrule
% \end{tabularx}
% \begin{tablenotes}
% \item [1] \filex{cambria.ttc}。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
% \begin{function}[added=2022-03-14]{style/unicode-math}
%   \begin{syntax}
%     \optx{style/unicode-math}=\argx{unicode-math宏包选项}
%   \end{syntax}
% 修改\pkgx{unicode-math}默认选项,具体配置参考\pkgx{unicode-math}宏包文档,仅在数学字体不为Computer Modern时有效。
% \end{function}
% \begin{function}[added=2022-03-07]{style/font-type}
%   \begin{syntax}
%     \optx{style/font-type}=\metax{(font)|file}
%   \end{syntax}
% 设置字体调用方式。
% \end{function}
% \begin{optdesc}
%   \item[font] 相应字体已安装,使用字体名称调用字体。
%   \item[file] 相应字体未安装,使用字体文件名称调用字体,适合Overleaf或TeXPage等在线平台,或不方便安装字体的情况。
% \end{optdesc}
% \begin{function}[added=2022-03-07]{style/font-path}
%   \begin{syntax}
%     \optx{style/font-path}=\argx{路径}
%   \end{syntax}
% 设置字体文件路径,即\metax{路径}目录内存储全部所需中文、英文和数学字体文件,仅在\optx{font-type}等于|file|时有效,默认值为\valuex{fonts}。
% \end{function}
% \subsection{英文字体}
% \label{英文字体}
% \begin{function}[added=2022-04-01]{style/en-cjk-font}
%   \begin{syntax}
%     \optx{style/en-cjk-font}=\metax{true|(false)}
%   \end{syntax}
% 切换字体族时,英文是否使用中文字体。主要作用于封面、章节标题、caption、页眉页脚、参考文献列表等。
% \end{function}
% \begin{optdesc}
%   \item[true] 英文使用相对应字体族的中文字体。
%   \item[false] 英文使用相对应字体族的英文字体。
% \end{optdesc}
% \subsection{语言配置}
% \label{语言配置}
% \begin{function}[added=2022-03-29]{style/language}
%   \begin{syntax}
%     \optx{style/language}=\metax{(zh)|en}
%   \end{syntax}
% 设置论文语言。
% \end{function}
% \begin{optdesc}
%   \item[zh] 中文。
%   \item[en] 英文。
% \end{optdesc}
% \subsection{参考文献配置}
% \label{参考文献配置}
% \begin{function}[added=2022-04-02,updated=2022-04-03]{style/bib-backend}
%   \begin{syntax}
%     \optx{style/bib-backend}=\metax{bibtex|(biblatex)}
%   \end{syntax}
% 设置参考文献支持方式。
% \end{function}
% \begin{optdesc}
%   \item[bibtex] 使用\bibtex{}处理文献,样式由\pkgx{natbib}宏包负责。
%   \item[biblatex] 使用\biber{}处理文献,样式由\pkgx{biblatex}宏包负责。
% \end{optdesc}
% \begin{function}[added=2022-04-02]{style/bib-resource}
%   \begin{syntax}
%     \optx{style/bib-resource}=\argx{参考文献文件路径}
%   \end{syntax}
% 设置参考文献\filex{.bib}文件,多个文件之间需要使用英文半角逗号隔开。
% \end{function}
% \subsection{页面配置}
% \label{页面配置}
% \begin{function}[added=2022-04-12]{style/symmetric-margin}
%   \begin{syntax}
%     \optx{style/symmetric-margin}=\metax{true|(false)}
%   \end{syntax}
% 设置左右页边距是否对称。
% \end{function}
% \begin{optdesc}
%   \item[true] 对称。
%   \item[false] 不对称。
% \end{optdesc}
% \begin{function}[added=2022-05-08]{style/page-vertical-align}
%   \begin{syntax}
%     \optx{style/page-vertical-align}=\metax{分散对齐|(顶部对齐)}
%   \end{syntax}
% 设置页面垂直方向的对齐方式。
% \end{function}
% \begin{optdesc}
%   \item[分散对齐] 页面高度均匀地填满,使每一页的底部直接对齐。
%   \item[顶部对齐] 页面中的内容保持它的自然高度,每一页的页面底部用空白填满。
% \end{optdesc}
% \subsection{交叉引用配置}
% \label{交叉引用配置}
% \begin{function}[added=2022-04-16]{style/ref-add-space}
%   \begin{syntax}
%     \optx{style/ref-add-space}=\metax{true|(false)}
%   \end{syntax}
% 是否自动调整\tnx{ref}两侧中英文间空白。
% \end{function}
% \begin{optdesc}
%   \item[true] 自动调整\tnx{ref}两侧中英文间空白。未避免产生不正常的空白宽度,请不要在\tnx{ref}两侧输入空格。仅在\optx{language}等于|zh|时有效。
%   \item[false] 保持原始\tnx{ref}命令效果。
% \end{optdesc}
% \subsection{Caption配置}
% \label{Caption配置}
% \changes{v1.0.0.0}{2022/04/14}{设置图、表、算法标签与后面标题之间的间距}
% \begin{function}[added=2022-04-14]{style/caption-label-sep}
%   \begin{syntax}
%     \optx{style/caption-label-sep}=\argx{间距}
%   \end{syntax}
% 设置图、表、算法标签与后面标题之间的间距,默认值为\valuex{0.75em}。
% \end{function}
% \begin{function}[added=2022-04-03]{style/fig-label-sep}
% 已弃用。
% \end{function}
% \subsection{表格配置}
% \label{表格配置}
% \changes{v0.10.0.1}{2022/04/13}{补充表格内容字号文档说明}
% \begin{function}[added=2022-04-13,updated=2022-04-15]{style/table-small-font}
%   \begin{syntax}
%     \optx{style/table-small-font}=\metax{(true)|false}
%   \end{syntax}
% 设置表格内容字号是否为五号。
% \end{function}
% \begin{optdesc}
%   \item[true] 五号。
%   \item[false] 小四号。
% \end{optdesc}
% \subsection{算法配置}
% \label{算法配置}
% \begin{function}[added=2022-04-15]{style/algorithm-small-font}
%   \begin{syntax}
%     \optx{style/algorithm-small-font}=\metax{(true)|false}
%   \end{syntax}
% 设置算法内容字号是否为五号。
% \end{function}
% \begin{optdesc}
%   \item[true] 五号。
%   \item[false] 小四号。
% \end{optdesc}
% \subsection{章节配置}
% \label{章节配置}
% \begin{function}[added=2022-04-05]{style/before-skip}
%   \begin{syntax}
%     \optx{style/before-skip}=\argx{间距列表}
%   \end{syntax}
% 设置章节标题前的垂直间距,默认值为\valuex{\{24pt, 18pt, 12pt, 12pt, 12pt, 12pt\}},分别对应\tnx{chapter}、\tnx{section}、\tnx{subsection}、\tnx{subsubsection}、\tnx{paragraph}和\tnx{subparagraph}。
% \end{function}
% \begin{function}[added=2022-04-05]{style/after-skip}
%   \begin{syntax}
%     \optx{style/after-skip}=\argx{间距列表}
%   \end{syntax}
% 设置章节标题后的垂直间距,默认值为\valuex{\{18pt, 12pt, 6pt, 6pt, 6pt, 6pt\}},分别对应\tnx{chapter}、\tnx{section}、\tnx{subsection}、\tnx{subsubsection}、\tnx{paragraph}和\tnx{subparagraph}。
% \end{function}
% \begin{function}[added=2022-04-11]
%   {
%     style/chap-zihao,
%     style/sec-zihao,
%     style/subsec-zihao,
%     style/subsubsec-zihao,
%     style/para-zihao,
%     style/subpara-zihao
%   }
%   \begin{syntax}
%     \optx{style/chap-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%     \optx{style/sec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%     \optx{style/subsec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%     \optx{style/subsubsec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%     \optx{style/para-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%     \optx{style/subpara-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
%   \end{syntax}
% 设置章节标题字号。
% 当论文语言为中文时,默认值分别为\valuex{3}、\valuex{4}、\valuex{4}、\valuex{4}、\valuex{4}、\valuex{4}。
% 当论文语言为英文时,默认值分别为\valuex{4}、\valuex{-4}、\valuex{-4}、\valuex{-4}、\valuex{-4}、\valuex{-4}。
% \end{function}
% \begin{optdesc}
%   \item[0] 初号
%   \item[−0] 小初号
%   \item[1] 一号
%   \item[-1] 小一号
%   \item[2] 二号
%   \item[-2] 小二号
%   \item[3] 三号
%   \item[-3] 小三号
%   \item[4] 四号
%   \item[-4] 小四号
%   \item[5] 五号
%   \item[-5] 小五号
%   \item[6] 六号
%   \item[-6] 小六号
%   \item[7] 七号
%   \item[8] 八号
% \end{optdesc}
% \subsection{附录环境}
% \label{附录环境}
% \begin{function}[added=2022-04-04]{appendixes}
% 附录位于参考文献后,即在\tnx{backmatter}后。
% \begin{latexexample}[emph={[1]appendixes}]
%   \begin{appendixes}
%       \chapter{这是一个附录}
%       \chapter{这是另一个附录}
%   \end{appendixes}
% \end{latexexample}
% \end{function}
% \subsection{信息录入}
% \label{信息录入}
% \changes{v1.9.0.0}{2022/05/03}{增加信息录入选项分类表}
% \changes{v1.10.3.1}{2022/05/04}{移除专业博士校外导师信息录入}
% 用户根据\tabrefx{tblr:info}选择相应的选项进行信息录入。
% \begin{tblr}
% [
% long,
% caption = {信息录入选项分类},
% label = {tblr:info}
% ]
% {
% width      = \linewidth,
% colspec    = lX[c]X[c]X[c]X[c]X[c]X[c],
% cell{1}{1} = {r = 2}{},
% cell{1}{2} = {c = 2}{},
% cell{1}{4} = {c = 2}{},
% cell{1}{6} = {c = 2}{},
% hline{1,Z} = {.08em},
% hline{2} = {2-3}{.08em, leftpos = -1, rightpos = -1, endpos},
% hline{2} = {4-5}{.08em, leftpos = -1, rightpos = -1, endpos},
% hline{2} = {6-7}{.08em, leftpos = -1, rightpos = -1, endpos},
% hline{3} = {.08em},
% cell{odd[3-Z]}{1-Z} = {gray9},
% cell{3-Z}{1} = {cmd = \texttt},
% rowhead = 2
% }
%                              & 本科   &        & 硕士   &        & 博士   &        \\
%                              & 校内   & 校外   & 学术   & 专业   & 学术   & 专业   \\
% graduate-type                &        &        & \cmark & \cmark & \cmark & \cmark \\
% degree-type                  &        &        & \cmark & \cmark & \cmark & \cmark \\
% degree                       &        &        & \cmark & \cmark & \cmark & \cmark \\
% degree*                      &        &        &        & \cmark &        &        \\
% title                        & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% title*                       &        &        & \cmark & \cmark & \cmark & \cmark \\
% department                   & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% major                        & \cmark & \cmark & \cmark &        & \cmark &        \\
% major*                       &        &        & \cmark &        & \cmark &        \\
% sub-major                    &        &        & \cmark &        & \cmark &        \\
% domain                       &        &        &        & \cmark &        & \cmark \\
% author                       & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% author*                      &        &        & \cmark & \cmark & \cmark & \cmark \\
% supervisor                   & \cmark &        & \cmark & \cmark & \cmark & \cmark \\
% supervisor*                  &        &        & \cmark & \cmark & \cmark & \cmark \\
% supervisor-department        & \cmark &        &        &        &        &        \\
% supervisor-enterprise        &        & \cmark &        & \cmark &        &        \\
% supervisor-enterprise*       &        &        &        & \cmark &        &        \\
% supervisor-school            &        & \cmark &        &        &        &        \\
% supervisor-title             &        &        & \cmark & \cmark & \cmark & \cmark \\
% supervisor-title*            &        &        & \cmark & \cmark & \cmark & \cmark \\
% supervisor-enterprise-title  &        &        &        & \cmark &        &        \\
% supervisor-enterprise-title* &        &        &        & \cmark &        &        \\
% class-id                     & \cmark & \cmark &        &        &        &        \\
% student-id                   & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% clc                          &        &        & \cmark & \cmark & \cmark & \cmark \\
% secret-level                 &        &        & \cmark & \cmark & \cmark & \cmark \\
% submit-date                  &        &        & \cmark & \cmark & \cmark & \cmark \\
% abstract                     & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% abstract*                    & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% keywords                     & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% keywords*                    & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% acknowledgements             & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
% \end{tblr}
% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项文档}
% \begin{function}[added=2022-05-02,updated=2022-05-03]{info/graduate-type}
%   \begin{syntax}
%     \optx{info/graduate-type}=\metax{(硕士)|博士}
%   \end{syntax}
% 设置研究生类型。
% \end{function}
% \begin{optdesc}
%   \item[硕士] 硕士研究生。
%   \item[博士] 博士研究生。
% \end{optdesc}
% \begin{function}[added=2022-05-03]{info/degree-type}
%   \begin{syntax}
%     \optx{info/degree-type}=\metax{(学术)|专业}
%   \end{syntax}
% 设置研究生学位类型。
% \end{function}
% \begin{optdesc}
%   \item[学术] 学术学位。
%   \item[专业] 专业学位。
% \end{optdesc}
% \begin{function}[added=2022-05-03]{info/degree,info/degree*}
%   \begin{syntax}
%     \optx{info/degree}=\argx{研究生学位类别中文名称}
%     \optx{info/degree*}=\argx{研究生学位类别英文名称}
%   \end{syntax}
% 设置研究生学位类别。
% \end{function}
% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/title,info/title*}
%   \begin{syntax}
%     \optx{info/title}=\argx{论文中文标题}
%     \optx{info/title*}=\argx{论文英文标题}
%   \end{syntax}
% 设置论文标题。如果需要手动制定换行位点,请使用换行控制符(|\\|),最多两行。
% \end{function}
% \begin{function}[added=2022-04-01]{info/department}
%   \begin{syntax}
%     \optx{info/department}=\argx{院系名称}
%   \end{syntax}
% 设置院系名称。
% \end{function}
% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/major,info/major*}
%   \begin{syntax}
%     \optx{info/major}=\argx{专业名称/一级学科名称}
%     \optx{info/major*}=\argx{一级学科英文名称}
%   \end{syntax}
% 设置专业名称/一级学科名称。
% \end{function}
% \begin{function}[added=2022-05-03]{info/sub-major}
%   \begin{syntax}
%     \optx{info/sub-major}=\argx{二级学科名称}
%   \end{syntax}
% 设置二级学科名称。
% \end{function}
% \begin{function}[added=2022-05-03]{info/domain}
%   \begin{syntax}
%     \optx{info/domain}=\argx{领域}
%   \end{syntax}
% 设置领域名称。
% \end{function}
% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/author,info/author*}
%   \begin{syntax}
%     \optx{info/author}=\argx{作者姓名}
%     \optx{info/author*}=\argx{作者姓名拼音}
%   \end{syntax}
% 设置作者姓名。
% \end{function}
% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor,info/supervisor*}
%   \begin{syntax}
%     \optx{info/supervisor}=\argx{导师姓名}
%     \optx{info/supervisor*}=\argx{导师姓名拼音}
%   \end{syntax}
% 设置导师姓名。
% \end{function}
% \begin{function}[added=2022-04-01]{info/supervisor-department}
%   \begin{syntax}
%     \optx{info/supervisor-department}=\argx{院内导师姓名}
%   \end{syntax}
% 设置院内导师姓名。
% \end{function}
% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor-enterprise,info/supervisor-enterprise*}
%   \begin{syntax}
%     \optx{info/supervisor-enterprise}=\argx{校外导师姓名}
%     \optx{info/supervisor-enterprise*}=\argx{校外导师姓名拼音}
%   \end{syntax}
% 设置校外导师姓名。
% \end{function}
% \begin{function}[added=2022-04-01]{info/supervisor-school}
%   \begin{syntax}
%     \optx{info/supervisor-school}=\argx{校内导师姓名}
%   \end{syntax}
% 设置校内导师姓名。
% \end{function}
% \begin{function}[added=2022-05-03]{info/supervisor-title,info/supervisor-title*}
%   \begin{syntax}
%     \optx{info/supervisor-title}=\argx{导师职称}
%     \optx{info/supervisor-title*}=\argx{导师职称英文名称}
%   \end{syntax}
% 设置导师职称。
% \end{function}
% \begin{function}[added=2022-05-03]{info/supervisor-enterprise-title,info/supervisor-enterprise-title*}
%   \begin{syntax}
%     \optx{info/supervisor-enterprise-title}=\argx{校外导师职称}
%     \optx{info/supervisor-enterprise-title*}=\argx{校外导师职称英文名称}
%   \end{syntax}
% 设置校外导师职称。
% \end{function}
% \begin{function}[added=2022-04-01]{info/class-id}
%   \begin{syntax}
%     \optx{info/class-id}=\argx{作者班级号}
%   \end{syntax}
% 设置作者班级号。
% \end{function}
% \begin{function}[added=2022-04-01]{info/student-id}
%   \begin{syntax}
%     \optx{info/student-id}=\argx{作者学号}
%   \end{syntax}
% 设置作者学号。
% \end{function}
% \begin{function}[added=2022-05-03]{info/clc}
%   \begin{syntax}
%     \optx{info/clc}=\argx{中图分类号}
%   \end{syntax}
% 设置中图分类号。
% \end{function}
% \begin{function}[added=2022-05-03]{info/secret-level}
%   \begin{syntax}
%     \optx{info/secret-level}=\metax{秘密|(公开)}
%   \end{syntax}
% 设置密级。
% \end{function}
% \begin{function}[added=2022-05-03]{info/submit-date}
%   \begin{syntax}
%     \optx{info/submit-date}=\argx{提交日期}
%   \end{syntax}
% 设置提交日期。
% \end{function}
% \begin{function}[added=2022-04-02]{info/abstract,info/abstract*}
%   \begin{syntax}
%     \optx{info/abstract}=\argx{中文摘要文件路径}
%     \optx{info/abstract*}=\argx{英文摘要文件路径}
%   \end{syntax}
% 设置摘要文件路径,相应文件内仅撰写摘要内容,无需任何环境。
% \end{function}
% \begin{function}[added=2022-04-02]{info/keywords,info/keywords*}
%   \begin{syntax}
%     \optx{info/keywords}=\argx{中文关键词}
%     \optx{info/keywords*}=\argx{英文关键词}
%   \end{syntax}
% 设置关键词,关键词之间需要使用英文半角逗号隔开。
% \end{function}
% \begin{function}[added=2022-04-02]{info/acknowledgements}
%   \begin{syntax}
%     \optx{info/acknowledgements}=\argx{致谢文件路径}
%   \end{syntax}
% 设置致谢文件路径,相应文件内仅撰写致谢内容,无需任何环境。
% \end{function}
% \section{贡献者}
% \xduts{}的开发过程中,维护者为
% \href{https://github.com/note286/}{\ttfamily @note286}。
% 同时,也要感谢所有在GitHub和睿思上提出问题的同学、老师们。
% \xduts{}的持续发展,离不开你们的帮助与支持。
% \section{致谢}
% 在学习文学编程的过程中,
% 《在\LaTeX{}中进行文学编程》\footurl{https://liam.page/2015/01/23/literate-programming-in-latex/}
% 和《Good things come in little packages: An introduction to writing .ins and .dtx files》\footurl{https://www.tug.org/TUGboat/tb29-2/tb92pakin.pdf}
% 提供了很大帮助。
% 在文档的编写过程中,参考了
% \filex{ctex.dtx}\footctan{language/chinese/ctex/ctex.dtx}、
% \filex{fduthesis.dtx}\footctan{macros/latex/contrib/fduthesis/fduthesis.dtx}、
% \filex{njuthesis.dtx}\footctan{macros/unicodetex/latex/njuthesis/njuthesis.dtx}
% 和\filex{thuthesis.dtx}\footctan{macros/latex/contrib/thuthesis/thuthesis.dtx}。
% \clearpage
% \section{代码实现}
% \changes{v0.1.0.0}{2022/04/03}{基本完成本科毕业设计论文模板}
% \setlength\parindent{0pt}
%    \begin{macrocode}
%<@@=xdu>
%    \end{macrocode}
% \subsection{文档类和宏包}
%    \begin{macrocode}
%<*class|sty>
%    \end{macrocode}
%    \begin{macrocode}
\RequirePackage { xparse, l3keys2e }
%    \end{macrocode}
% \begin{macro}{\PassOptionsToPackage}
% 忽略字体警告。
%    \begin{macrocode}
\PassOptionsToPackage { quiet } { xeCJK }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</class|sty>
%<*class>
%    \end{macrocode}
% \begin{macro}{\PassOptionsToClass,\LoadClass}
% \changes{v0.3.2.0}{2022/04/04}{修正行间距为1.5倍}
% \changes{v1.8.1.0}{2022/05/03}{修正页面尺寸}
% \changes{v1.9.2.0}{2022/05/04}{修正行间距为1.625倍}
% 加载\clsx{ctexbook}文档类。
% \\
% \LaTeX{}中基本行距是字号大小的1.2倍,Microsoft Word中基本行距是字号大小的1.3倍,
% Microsoft Word中1.5倍行距,相当于LaTeX中$1.5\times\frac{1.3}{1.2}=1.625$倍行距。
%    \begin{macrocode}
\PassOptionsToClass
  {
    a4paper,
    zihao=-4,
    sub4section,
%<xduugthesis>    linespread = 1.625,
    fontset    = none
  }
  { ctexbook }
\LoadClass { ctexbook }
%    \end{macrocode}
% \end{macro}
% 设置纸张尺寸为A4。
%    \begin{macrocode}
\RequirePackage { geometry        }
\geometry       { paper = a4paper }
%    \end{macrocode}
%    \begin{macrocode}
%</class>
%<*thesis>
%    \end{macrocode}
%    \begin{macrocode}
\RequirePackage { fancyhdr        }
\RequirePackage { xeCJKfntef      }
\RequirePackage { graphicx        }
%    \end{macrocode}
%    \begin{macrocode}
%</thesis>
%<*xdufont>
%    \end{macrocode}
%    \begin{macrocode}
\RequirePackage { xeCJK           }
%    \end{macrocode}
%    \begin{macrocode}
%</xdufont>
%    \end{macrocode}
% \subsection{字体配置}
%    \begin{macrocode}
%<*class|xdufont>
%    \end{macrocode}
% \begin{variable}
%   {
%     \l_@@_cjk_font_tl,
%     \l_@@_fake_bold_tl,
%     \l_@@_fake_slant_tl,
%     \l_@@_latin_font_tl,
%     \l_@@_math_font_tl,
%     \l_@@_unicode_math_tl,
%     \l_@@_font_type_tl,
%     \l_@@_font_path_tl
%   }
% 中文字体配置名称。
%    \begin{macrocode}
\tl_new:N \l_@@_cjk_font_tl
%    \end{macrocode}
% \changes{v0.8.2.0}{2022/04/12}{修复LaTeX3新接口导致的Overleaf无法编译}
% 中文字体伪粗体粗细程度。
%    \begin{macrocode}
\tl_new:N \l_@@_fake_bold_tl
%    \end{macrocode}
% 中文字体伪斜体倾斜程度。
%    \begin{macrocode}
\tl_new:N \l_@@_fake_slant_tl
%    \end{macrocode}
% 英文字体配置名称。
%    \begin{macrocode}
\tl_new:N \l_@@_latin_font_tl
%    \end{macrocode}
% 数学字体配置名称。
%    \begin{macrocode}
\tl_new:N \l_@@_math_font_tl
%    \end{macrocode}
% unicode-math配置选项。
%    \begin{macrocode}
\tl_new:N \l_@@_unicode_math_tl
%    \end{macrocode}
% 字体名称/文件名称。
%    \begin{macrocode}
\tl_new:N \l_@@_font_type_tl
%    \end{macrocode}
% 字体文件路径。
%    \begin{macrocode}
\tl_new:N \l_@@_font_path_tl
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义样式键值。
%    \begin{macrocode}
\keys_define:nn { xdu / style }
  {
%    \end{macrocode}
% 中文字体配置。
%    \begin{macrocode}
    cjk-font .choices:nn =
      { win, adobe, founder, sinotype, fandol, none }
      { \tl_set_eq:NN \l_@@_cjk_font_tl \l_keys_choice_tl },
%    \end{macrocode}
% 中文字体伪粗体粗细程度。
%    \begin{macrocode}
    cjk-fake-bold .tl_set:N = \l_@@_fake_bold_tl,
%    \end{macrocode}
% 中文字体伪斜体倾斜程度。
%    \begin{macrocode}
    cjk-fake-slant .tl_set:N = \l_@@_fake_slant_tl,
%    \end{macrocode}
% 英文字体配置。
%    \begin{macrocode}
    latin-font .choices:nn = { tac, tacn, thcs, gyre, none }
      { \tl_set_eq:NN \l_@@_latin_font_tl \l_keys_choice_tl },
%    \end{macrocode}
% 数学字体配置。
%    \begin{macrocode}
    math-font .choices:nn =
      {
        asana, cambria, cm, fira, garamond, lm, libertinus, stix,
        bonum, dejavu, pagella, schola, termes, xits, none
      }
      { \tl_set_eq:NN \l_@@_math_font_tl \l_keys_choice_tl },
    unicode-math .tl_set:N = \l_@@_unicode_math_tl,
%    \end{macrocode}
% 字体调用方式配置,文件名称/字体名称。
%    \begin{macrocode}
    font-type .choices:nn = { font, file }
      { \tl_set_eq:NN \l_@@_font_type_tl \l_keys_choice_tl },
%    \end{macrocode}
% 字体文件路径配置。
%    \begin{macrocode}
    font-path .tl_set:N = \l_@@_font_path_tl
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_set:nn}
% \changes{v0.9.1.0}{2022/04/13}{修改中英文字体默认配置}
% 初始设置。
%    \begin{macrocode}
\keys_set:nn { xdu }
  {
    style / cjk-font       = fandol,
    style / cjk-fake-bold  = 3,
    style / cjk-fake-slant = 0.2,
    style / latin-font     = gyre,
    style / math-font      = cm,
    style / unicode-math   = { },
    style / font-type      = font,
    style / font-path      = fonts
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_if_platform_macos:FT}
% \changes{v0.5.1.0}{2022/04/06}{判断操作系统是否是macOS}
% 判断操作系统是否是macOS。
% \begin{arguments}
%   \item 非macOS。
%   \item macOS。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_if_platform_macos:FT #1#2
  { \file_if_exist:nTF { /System/Library/Fonts/Menlo.ttc } { #2 } { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_texmf_font:nn}
% \changes{v0.5.1.0}{2022/04/06}{加载字体时自动判断是否为macOS平台}
% 调用TEXMF中的字体时根据操作系统是否是macOS自动选择调用字体名或文件名。
% \begin{arguments}
%   \item 字体名。
%   \item 文件名。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_texmf_font:nn #1#2
  { \@@_if_platform_macos:FT { #1 } { #2 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_select_font:nn}
% 自动选择字体文件名称或字体名称。
% \begin{arguments}
%   \item 字体名称。
%   \item 字体文件名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_select_font:nn #1#2
  {
    \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
      { #1 }
      { #2 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_font_path:}
% 当选择使用字体文件配置字体时,设置字体文件路径。
%    \begin{macrocode}
\cs_new:Npn \@@_font_path:
  {
    \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
      { }
      { Path = \l_@@_font_path_tl / , }
  }
%    \end{macrocode}
% \end{macro}
% \subsubsection{中文字体}
% \begin{macro}{\@@_cfg_cjk_font_sub_b:}
% 中文粗体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_b:n #1
  {
    BoldFont = { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_fb:n}
% 中文伪粗体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_fb:n #1
  {
    BoldFont     = { #1 },
    BoldFeatures = { FakeBold = \l_@@_fake_bold_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_fs:n}
% 中文伪斜体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_fs:n #1
  {
    SlantedFont     = { #1 },
    SlantedFeatures = { FakeSlant = \l_@@_fake_slant_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_fbfs:n}
% 中文伪粗斜体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_fbfs:n #1
  {
    BoldSlantedFont     = { #1 },
    BoldSlantedFeatures =
      {
        FakeBold  = \l_@@_fake_bold_tl,
        FakeSlant = \l_@@_fake_slant_tl
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_bfs:n}
% 中文粗伪斜体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_bfs:n #1
  {
    BoldSlantedFont     = { #1 },
    BoldSlantedFeatures = { FakeSlant = \l_@@_fake_slant_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_i:n}
% 中文意大利体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_i:n #1
  {
    ItalicFont = { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_fi:n}
% 中文伪意大利体,即伪斜体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_fi:n #1
  {
    ItalicFont     = { #1 },
    ItalicFeatures = { FakeSlant = \l_@@_fake_slant_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_ifb:n}
% 中文意大利体伪粗体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_ifb:n #1
  {
    BoldItalicFont     = { #1 },
    BoldItalicFeatures = { FakeBold = \l_@@_fake_bold_tl }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_sub_fifb:n}
% 中文伪意大利体伪粗体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_sub_fifb:n #1
  {
    BoldItalicFont     = { #1 },
    BoldItalicFeatures =
      {
        FakeBold  = \l_@@_fake_bold_tl,
        FakeSlant = \l_@@_fake_slant_tl
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_r:n}
% 配置中文字体,包括粗体、斜体、斜粗体、意大利体、粗意大利体。
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_r:n #1
  {
    \@@_cfg_cjk_font_sub_fb:n   { #1 },
    \@@_cfg_cjk_font_sub_fs:n   { #1 },
    \@@_cfg_cjk_font_sub_fbfs:n { #1 },
    \@@_cfg_cjk_font_sub_fi:n   { #1 },
    \@@_cfg_cjk_font_sub_fifb:n { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_rb:nn}
% 配置中文字体,包括粗体、斜体、斜粗体、意大利体、粗意大利体,其中粗体和斜粗体为其他字体。
% \begin{arguments}
%   \item 常规字体。
%   \item 粗体字体。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_rb:nn #1#2
  {
    \@@_cfg_cjk_font_sub_b:n    { #2 },
    \@@_cfg_cjk_font_sub_fs:n   { #1 },
    \@@_cfg_cjk_font_sub_bfs:n  { #2 },
    \@@_cfg_cjk_font_sub_fi:n   { #1 },
    \@@_cfg_cjk_font_sub_fifb:n { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_ri:nn}
% 配置中文字体,包括粗体、斜体、斜粗体、意大利体、粗意大利体,其中意大利体和粗意大利体为其他字体。
% \begin{arguments}
%   \item 常规字体。
%   \item 意大利体字体。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_ri:nn #1#2
  {
    \@@_cfg_cjk_font_sub_fb:n   { #1 },
    \@@_cfg_cjk_font_sub_fs:n   { #1 },
    \@@_cfg_cjk_font_sub_fbfs:n { #1 },
    \@@_cfg_cjk_font_sub_i:n    { #2 },
    \@@_cfg_cjk_font_sub_ifb:n  { #2 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cfg_cjk_font_rbi:nnn}
% 配置中文字体,包括粗体、斜体、斜粗体、意大利体、粗意大利体,其中粗体、斜粗体、意大利体和粗意大利体为其他字体。
% \begin{arguments}
%   \item 常规字体。
%   \item 粗体字体。
%   \item 意大利体字体。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cfg_cjk_font_rbi:nnn #1#2#3
  {
    \@@_cfg_cjk_font_sub_b:n   { #2 },
    \@@_cfg_cjk_font_sub_fs:n  { #1 },
    \@@_cfg_cjk_font_sub_bfs:n { #2 },
    \@@_cfg_cjk_font_sub_i:n   { #3 },
    \@@_cfg_cjk_font_sub_ifb:n { #3 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_cjk_main_font:nn,\@@_set_cjk_main_font:nnn}
% 配置中文罗马族字体。
% \begin{arguments}
%   \item 宋体字体。
%   \item 楷体字体。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_cjk_main_font:nn #1#2
  {
    \setCJKmainfont { #1 }
      [ \@@_font_path: \@@_cfg_cjk_font_ri:nn { #1 } { #2 } ]
  }
\cs_new:Npn \@@_set_cjk_main_font:nnn #1#2#3
  {
    \setCJKmainfont { #1 }
      [ \@@_font_path: \@@_cfg_cjk_font_rbi:nnn { #1 } { #2 } { #3 } ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_cjk_sans_font:n,\@@_set_cjk_sans_font:nn}
% 配置中文无衬线族字体。
%    \begin{macrocode}
\cs_new:Npn \@@_set_cjk_sans_font:n #1
  {
    \setCJKsansfont { #1 }
      [ \@@_font_path: \@@_cfg_cjk_font_r:n { #1 } ]
  }
\cs_new:Npn \@@_set_cjk_sans_font:nn #1#2
  {
    \setCJKsansfont { #1 }
      [ \@@_font_path: \@@_cfg_cjk_font_rb:nn { #1 } { #2 } ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_cjk_mono_font:n}
% 配置中文等宽族字体。
%    \begin{macrocode}
\cs_new:Npn \@@_set_cjk_mono_font:n #1
  {
    \setCJKmonofont { #1 }
      [ \@@_font_path: \@@_cfg_cjk_font_r:n { #1 } ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_win:}
% 中文字体配置\valuex{win}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_win:
  {
    \@@_set_cjk_main_font:nn
      { \@@_select_font:nn { SimSun   } { simsun.ttc  } }
      { \@@_select_font:nn { KaiTi    } { simkai.ttf  } }
    \@@_set_cjk_sans_font:n
      { \@@_select_font:nn { SimHei   } { simhei.ttf  } }
    \@@_set_cjk_mono_font:n
      { \@@_select_font:nn { FangSong } { simfang.ttf } }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_adobe:}
% 中文字体配置\valuex{adobe}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_adobe:
  {
    \@@_set_cjk_main_font:nn
      { \@@_select_font:nn { Adobe~Song~Std     } { adobesongstd-light.otf        } }
      { \@@_select_font:nn { Adobe~Kaiti~Std    } { adobekaitistd-regular.otf     } }
    \@@_set_cjk_sans_font:n
      { \@@_select_font:nn { Adobe~Heiti~Std    } { adobeheitistd-regular.otf     } }
    \@@_set_cjk_mono_font:n
      { \@@_select_font:nn { Adobe~Fangsong~Std } { Adobe-Fangsong-Std-R-Font.otf } }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_founder:}
% \changes{v0.5.1.0}{2022/04/06}{适配macOS平台方正字体}
% 中文字体配置\valuex{founder}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_founder:
  {
    \@@_set_cjk_main_font:nn
      { \@@_select_font:nn { FZShuSong-Z01  } { FZShuSong-Z01.ttf } }
      { \@@_select_font:nn { FZKai-Z03      } { FZKai-Z03.ttf     } }
    \@@_set_cjk_sans_font:n
      { \@@_select_font:nn { FZHei-B01      } { FZHei-B01.ttf     } }
    \@@_set_cjk_mono_font:n
      { \@@_select_font:nn { FZFangSong-Z02 } { FZFSK.TTF         } }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_sinotype:}
% 中文字体配置\valuex{sinotype}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_sinotype:
  {
    \@@_set_cjk_main_font:nn
      { \@@_select_font:nn { STSong     } { STSONG.TTF   } }
      { \@@_select_font:nn { STKaiti    } { STKAITI.TTF  } }
    \@@_set_cjk_sans_font:nn
      { \@@_select_font:nn { STXihei    } { STXIHEI.TTF  } }
      { \@@_select_font:nn { STHeiti    } { STHeiti.ttf  } }
    \@@_set_cjk_mono_font:n
      { \@@_select_font:nn { STFangsong } { STFANGSO.TTF } }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_fandol:}
% \changes{v0.5.1.0}{2022/04/06}{适配macOS平台Fandol字体}
% 中文字体配置\valuex{fandol}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_fandol:
  {
    \@@_set_cjk_main_font:nnn
      { FandolSong-Regular.otf }
      { FandolSong-Bold.otf    }
      { FandolKai-Regular.otf  }
    \@@_set_cjk_sans_font:nn
      { FandolHei-Regular.otf  }
      { FandolHei-Bold.otf     }
    \@@_set_cjk_mono_font:n
      { FandolFang-Regular.otf }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_cjk_font_none:}
% 中文字体配置\valuex{none}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_cjk_font_none: { }
%    \end{macrocode}
% \end{macro}
% \subsubsection{英文字体}
% \begin{macro}{\@@_set_latin_font:nnn}
% 配置英文字体。
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_font:nnn #1#2#3
  {
    BoldFont        = { #1 },
    SlantedFont     = { #2 },
    BoldSlantedFont = { #3 },
    ItalicFont      = { #2 },
    BoldItalicFont  = { #3 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_off_latin_ligatures:}
% \changes{v0.8.3.0}{2022/04/13}{匹配小写字母字符高度}
% 匹配小写字母字符高度。
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_scale:
  { Scale = MatchLowercase , }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_off_latin_ligatures:}
% \changes{v0.8.3.0}{2022/04/13}{关闭连字}
% 关闭连字。
%    \begin{macrocode}
\cs_new:Npn \@@_off_latin_ligatures:
  { Ligatures = CommonOff , }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_main_font:nnnnn}
% 配置英文罗马族字体,参数分别为字体名称、字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 字体名称。
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_main_font:nnnnn #1#2#3#4#5
  {
    \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
      { \setmainfont { #1 } }
      {
        \setmainfont { #2 }
          [
            \@@_font_path:
            \@@_set_latin_font:nnn { #3 } { #4 } { #5 }
          ]
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_sans_font:nnnnn}
% \changes{v0.8.3.0}{2022/04/13}{修正英文无衬线族字体字符高度}
% 配置英文无衬线族字体,参数分别为字体名称、字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 字体名称。
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_sans_font:nnnnn #1#2#3#4#5
  {
    \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
      { \setsansfont { #1 } [ \@@_set_latin_scale: ] }
      {
        \setsansfont { #2 }
          [
            \@@_font_path:
            \@@_set_latin_scale:
            \@@_set_latin_font:nnn { #3 } { #4 } { #5 }
          ]
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_mono_font:nnnnn}
% \changes{v0.8.3.0}{2022/04/13}{修正英文等宽族字体字符高度并取消连字}
% 配置英文等宽族字体,参数分别为字体名称、字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 字体名称。
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_mono_font:nnnnn #1#2#3#4#5
  {
    \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
      { \setmonofont{ #1 } [ \@@_set_latin_scale: \@@_off_latin_ligatures: ]}
      {
        \setmonofont{ #2 }
          [
            \@@_font_path:
            \@@_set_latin_scale:
            \@@_off_latin_ligatures:
            \@@_set_latin_font:nnn { #3 } { #4 } { #5 }
          ]
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_main_font:nnnn}
% \changes{v0.9.0.0}{2022/04/13}{配置TeX Live内置英文罗马族字体}
% 配置英文罗马族字体,参数分别为字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_main_font:nnnn #1#2#3#4
  {
    \setmainfont { #1 }
      [
        \@@_set_latin_font:nnn { #2 } { #3 } { #4 }
      ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_sans_font:nnnn}
% \changes{v0.9.0.0}{2022/04/13}{配置TeX Live内置英文无衬线族字体}
% 配置英文无衬线族字体,参数分别为字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_sans_font:nnnn #1#2#3#4
  {
    \setsansfont { #1 }
      [
        \@@_set_latin_scale:
        \@@_set_latin_font:nnn { #2 } { #3 } { #4 }
      ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_set_latin_mono_font:nnnn}
% \changes{v0.9.0.0}{2022/04/13}{配置TeX Live内置英文等宽族字体}
% 配置英文等宽族字体,参数分别为字体文件名称(常规、粗体、意大利体、粗意大利体)。
% \begin{arguments}
%   \item 常规字体名称。
%   \item 粗体字体名称。
%   \item 意大利体字体名称。
%   \item 粗意大利体字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_set_latin_mono_font:nnnn #1#2#3#4
  {
    \setmonofont{ #1 }
      [
        \@@_set_latin_scale:
        \@@_off_latin_ligatures:
        \@@_set_latin_font:nnn { #2 } { #3 } { #4 }
      ]
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_latin_font_tac:}
% \changes{v1.12.0.0}{2022/05/06}{新增Arial和Consolas英文字体配置}
% 英文字体配置\valuex{tac}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_latin_font_tac:
  {
    \@@_set_latin_main_font:nnnnn
      { Times~New~Roman } { times.ttf   } { timesbd.ttf  } { timesi.ttf   } { timesbi.ttf  }
    \@@_set_latin_sans_font:nnnnn
      { Arial           } { arial.ttf   } { arialbd.ttf  } { ariali.ttf   } { arialbi.ttf  }
    \@@_set_latin_mono_font:nnnnn
      { Consolas        } { consola.ttf } { consolab.ttf } { consolai.ttf } { consolaz.ttf }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_latin_font_tacn:}
% 英文字体配置\valuex{tacn}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_latin_font_tacn:
  {
    \@@_set_latin_main_font:nnnnn
      { Times~New~Roman } { times.ttf } { timesbd.ttf } { timesi.ttf } { timesbi.ttf }
    \@@_set_latin_sans_font:nnnnn
      { Arial           } { arial.ttf } { arialbd.ttf } { ariali.ttf } { arialbi.ttf }
    \@@_set_latin_mono_font:nnnnn
      { Courier~New     } { cour.ttf  } { courbd.ttf  } { couri.ttf  } { courbi.ttf  }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_latin_font_thcs:}
% 英文字体配置\valuex{thcs}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_latin_font_thcs:
  {
    \@@_set_latin_main_font:nnnnn
      { Times~New~Roman            }
      { times.ttf                  }
      { timesbd.ttf                }
      { timesi.ttf                 }
      { timesbi.ttf                }
    \@@_set_latin_sans_font:nnnnn
      { Helvetica                  }
      { Helvetica.ttf              }
      { Helvetica~Bold.ttf         }
      { Helvetica~Oblique.ttf      }
      { Helvetica~Bold~Oblique.ttf }
    \@@_set_latin_mono_font:nnnnn
      { Courier~Std                }
      { CourierStd.otf             }
      { CourierStd-Bold.otf        }
      { CourierStd-Oblique.otf     }
      { CourierStd-BoldOblique.otf }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_latin_font_gyre:}
% \changes{v0.9.0.0}{2022/04/13}{新增gyre系列英文字体配置}
% 英文字体配置\valuex{gyre}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_latin_font_gyre:
  {
    \@@_set_latin_main_font:nnnn
      { texgyretermes-regular.otf    }
      { texgyretermes-bold.otf       }
      { texgyretermes-italic.otf     }
      { texgyretermes-bolditalic.otf }
    \@@_set_latin_sans_font:nnnn
      { texgyreheros-regular.otf     }
      { texgyreheros-bold.otf        }
      { texgyreheros-italic.otf      }
      { texgyreheros-bolditalic.otf  }
    \@@_set_latin_mono_font:nnnn
      { texgyrecursor-regular.otf    }
      { texgyrecursor-bold.otf       }
      { texgyrecursor-italic.otf     }
      { texgyrecursor-bolditalic.otf }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_latin_font_none:}
% 英文字体配置\valuex{none}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_latin_font_none: { }
%    \end{macrocode}
% \end{macro}
% \subsubsection{数学字体}
% \begin{macro}{\@@_load_unicode_math_pkg:}
% 加载\pkgx{unicode-math}宏包。
%    \begin{macrocode}
\cs_new:Npn \@@_load_unicode_math_pkg:
  {
    \RequirePackage
      [ \l_@@_unicode_math_tl ]
      { unicode-math          }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_math_font_cambria:}
% 数学字体配置\valuex{cambria}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_math_font_cambria:
  {
    \@@_load_unicode_math_pkg:
    \str_if_eq:NNTF { \l_@@_font_type_tl} { font}
      { \setmathfont { Cambria~Math} }
      { \setmathfont { cambria.ttc} [ Path = \l_@@_font_path_tl/, FontIndex = 1 ] }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_define_math_font:nn}
% 批量定义数学字体配置。
% \changes{v0.2.0.0}{2022/04/04}{增加Garamond Math数学字体}
% \changes{v0.5.1.0}{2022/04/06}{适配macOS平台MacTeX内置数学字体}
% \begin{arguments}
%   \item 配置名称。
%   \item 字体名称。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_define_math_font:nn #1#2
  {
    \cs_new:cpn { @@_load_math_font_ #1 : }
      {
        \@@_load_unicode_math_pkg:
        \setmathfont { #2 }
      }
  }
\clist_map_inline:nn
  {
    { asana      } { Asana-Math.otf             },
    { fira       } { FiraMath-Regular.otf       },
    { garamond   } { Garamond-Math.otf          },
    { lm         } { latinmodern-math.otf       },
    { libertinus } { LibertinusMath-Regular.otf },
    { stix       } { STIXMath-Regular.otf       },
    { bonum      } { texgyrebonum-math.otf      },
    { dejavu     } { texgyredejavu-math.otf     },
    { pagella    } { texgyrepagella-math.otf    },
    { schola     } { texgyreschola-math.otf     },
    { termes     } { texgyretermes-math.otf     }
  }
  { \@@_define_math_font:nn #1 }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_math_font_xits:}
% \changes{v0.5.1.0}{2022/04/06}{适配macOS平台MacTeX内置XITSMath数学字体}
% 数学字体配置\valuex{xits}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_math_font_xits:
  {
    \@@_load_unicode_math_pkg:
    \@@_if_platform_macos:FT
      {
        \setmathfont { XITS~Math }
      }
      {
        \@@_load_unicode_math_pkg:
        \setmathfont { XITSMath-Regular.otf }
        \setmathfont { XITSMath-Bold.otf    }
          [range= { bfup -> up, bfit -> it } ]
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_math_font_cm:}
% 数学字体配置\valuex{cm}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_math_font_cm: { }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_math_font_none:}
% 数学字体配置\valuex{none}。
%    \begin{macrocode}
\cs_new:Npn \@@_load_math_font_none: { }
%    \end{macrocode}
% \end{macro}
% \subsubsection{加载字体}
% \begin{macro}{\@@_load_font:}
% 加载中文字体、英文字体和数学字体。
%    \begin{macrocode}
\cs_new:Npn \@@_load_font:
  {
    \use:c { @@_load_cjk_font_   \l_@@_cjk_font_tl   : }
    \use:c { @@_load_latin_font_ \l_@@_latin_font_tl : }
    \use:c { @@_load_math_font_  \l_@@_math_font_tl  : }
  }
%    \end{macrocode}
% 在导言区末尾加载中文字体、英文字体和数学字体。
%    \begin{macrocode}
\ctex_at_end_preamble:n { \@@_load_font: }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</class|xdufont>
%<*thesis>
%    \end{macrocode}
% \subsection{信息录入}
% \changes{v1.8.0.0}{2022/05/02}{拆分信息录入选项}
% \begin{variable}
%   {
%     \l_@@_title_str,
%     \l_@@_title_i_str,
%     \l_@@_title_ii_str,
%     \l_@@_dept_str,
%     \l_@@_major_str,
%     \l_@@_author_str,
%     \l_@@_supv_str,
%     \l_@@_supv_ent_str,
%     \l_@@_student_id_str,
%     \l_@@_abstract_zh_tl,
%     \l_@@_abstract_en_tl,
%     \l_@@_keywords_zh_clist,
%     \l_@@_keywords_en_clist,
%     \l_@@_ack_tl
%   }
% 论文标题。
%    \begin{macrocode}
\str_new:N \l_@@_title_str
\str_new:N \l_@@_title_i_str
\str_new:N \l_@@_title_ii_str
%    \end{macrocode}
% 院系名称。
%    \begin{macrocode}
\str_new:N \l_@@_dept_str
%    \end{macrocode}
% 专业名称。
%    \begin{macrocode}
\str_new:N \l_@@_major_str
%    \end{macrocode}
% 作者姓名。
%    \begin{macrocode}
\str_new:N \l_@@_author_str
%    \end{macrocode}
% 导师姓名。
%    \begin{macrocode}
\str_new:N \l_@@_supv_str
%    \end{macrocode}
% 校外导师姓名。
%    \begin{macrocode}
\str_new:N \l_@@_supv_ent_str
%    \end{macrocode}
% 作者学号。
%    \begin{macrocode}
\str_new:N \l_@@_student_id_str
%    \end{macrocode}
% 中文摘要。
%    \begin{macrocode}
\tl_new:N \l_@@_abstract_zh_tl
%    \end{macrocode}
% 英文摘要。
%    \begin{macrocode}
\tl_new:N \l_@@_abstract_en_tl
%    \end{macrocode}
% 中文关键词。
%    \begin{macrocode}
\clist_new:N \l_@@_keywords_zh_clist
%    \end{macrocode}
% 英文关键词。
%    \begin{macrocode}
\clist_new:N \l_@@_keywords_en_clist
%    \end{macrocode}
% 致谢。
%    \begin{macrocode}
\tl_new:N \l_@@_ack_tl
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义信息键值。
%    \begin{macrocode}
\keys_define:nn { xdu / info }
  {
%    \end{macrocode}
% 论文标题。
%    \begin{macrocode}
    title .tl_set:N = \l_@@_title_str,
%    \end{macrocode}
% 院系名称。
%    \begin{macrocode}
    department .tl_set:N = \l_@@_dept_str,
%    \end{macrocode}
% 专业名称。
%    \begin{macrocode}
    major .tl_set:N = \l_@@_major_str,
%    \end{macrocode}
% 作者姓名。
%    \begin{macrocode}
    author .tl_set:N = \l_@@_author_str,
%    \end{macrocode}
% 导师姓名。
%    \begin{macrocode}
    supervisor .tl_set:N = \l_@@_supv_str,
%    \end{macrocode}
% 校外导师姓名。
%    \begin{macrocode}
    supervisor-enterprise .tl_set:N = \l_@@_supv_ent_str,
%    \end{macrocode}
% 作者学号。
%    \begin{macrocode}
    student-id .tl_set:N = \l_@@_student_id_str,
%    \end{macrocode}
% 中文摘要。
%    \begin{macrocode}
    abstract .tl_set:N = \l_@@_abstract_zh_tl,
%    \end{macrocode}
% 英文摘要。
%    \begin{macrocode}
    abstract* .tl_set:N = \l_@@_abstract_en_tl,
%    \end{macrocode}
% 中文关键词。
%    \begin{macrocode}
    keywords .clist_set:N = \l_@@_keywords_zh_clist,
%    \end{macrocode}
% 英文关键词。
%    \begin{macrocode}
    keywords* .clist_set:N = \l_@@_keywords_en_clist,
%    \end{macrocode}
% 致谢。
%    \begin{macrocode}
    acknowledgements .tl_set:N = \l_@@_ack_tl
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_set:nn}
% 初始设置。
%    \begin{macrocode}
\keys_set:nn { xdu }
  {
    info / title                 = { },
    info / department            = { },
    info / major                 = { },
    info / author                = { },
    info / supervisor            = { },
    info / supervisor-enterprise = { },
    info / student-id            = { },
    info / abstract              = { },
    info / abstract*             = { },
    info / keywords              = { },
    info / keywords*             = { },
    info / acknowledgements      = { }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%<*xduugthesis>
%    \end{macrocode}
% \subsubsection{本科生}
% \begin{variable}
%   {
%     \l_@@_supv_dept_str,
%     \l_@@_supv_sch_str,
%     \l_@@_class_id_str
%   }
% 院内导师姓名。
%    \begin{macrocode}
\str_new:N \l_@@_supv_dept_str
%    \end{macrocode}
% 校内导师姓名。
%    \begin{macrocode}
\str_new:N \l_@@_supv_sch_str
%    \end{macrocode}
% 作者班级号。
%    \begin{macrocode}
\str_new:N \l_@@_class_id_str
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义信息键值。
%    \begin{macrocode}
\keys_define:nn { xdu / info }
  {
%    \end{macrocode}
% 院内导师姓名。
%    \begin{macrocode}
    supervisor-department .tl_set:N = \l_@@_supv_dept_str,
%    \end{macrocode}
% 校内导师姓名。
%    \begin{macrocode}
    supervisor-school .tl_set:N = \l_@@_supv_sch_str,
%    \end{macrocode}
% 作者班级号。
%    \begin{macrocode}
    class-id .tl_set:N = \l_@@_class_id_str
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_set:nn}
% 初始设置。
%    \begin{macrocode}
\keys_set:nn { xdu }
  {
    info / supervisor-department = { },
    info / supervisor-school     = { },
    info / class-id              = { }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xduugthesis>
%<*xdupgthesis>
%    \end{macrocode}
% \subsubsection{研究生}
% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项}
% \begin{variable}
%   {
%     \l_@@_gr_type_tl,
%     \l_@@_degree_type_tl,
%     \l_@@_degree_str,
%     \l_@@_degree_en_str,
%     \l_@@_author_en_str,
%     \l_@@_supv_en_str,
%     \l_@@_supv_ent_en_str,
%     \l_@@_supv_t_str,
%     \l_@@_supv_t_en_str,
%     \l_@@_supv_ent_t_str,
%     \l_@@_supv_ent_t_en_str,
%     \l_@@_title_en_str,
%     \l_@@_major_en_str,
%     \l_@@_sub_major_str,
%     \l_@@_domain_str,
%     \l_@@_clc_str,
%     \l_@@_secret_lv_str,
%     \l_@@_submit_date_str
%   }
% 研究生类型。
%    \begin{macrocode}
\tl_new:N \l_@@_gr_type_tl
%    \end{macrocode}
% 学位类型。
%    \begin{macrocode}
\tl_new:N \l_@@_degree_type_tl
%    \end{macrocode}
% 学位类别。
%    \begin{macrocode}
\str_new:N \l_@@_degree_str
\str_new:N \l_@@_degree_en_str
%    \end{macrocode}
% 作者姓名拼音。
%    \begin{macrocode}
\str_new:N \l_@@_author_en_str
%    \end{macrocode}
% 导师姓名拼音。
%    \begin{macrocode}
\str_new:N \l_@@_supv_en_str
%    \end{macrocode}
% 校外导师姓名拼音。
%    \begin{macrocode}
\str_new:N \l_@@_supv_ent_en_str
%    \end{macrocode}
% 导师职称。
%    \begin{macrocode}
\str_new:N \l_@@_supv_t_str
\str_new:N \l_@@_supv_t_en_str
%    \end{macrocode}
% 校外导师职称。
%    \begin{macrocode}
\str_new:N \l_@@_supv_ent_t_str
\str_new:N \l_@@_supv_ent_t_en_str
%    \end{macrocode}
% 论文标题英文。
%    \begin{macrocode}
\str_new:N \l_@@_title_en_str
%    \end{macrocode}
% 一级学科英文名称。
%    \begin{macrocode}
\str_new:N \l_@@_major_en_str
%    \end{macrocode}
% 二级学科。
%    \begin{macrocode}
\str_new:N \l_@@_sub_major_str
%    \end{macrocode}
% 领域。
%    \begin{macrocode}
\str_new:N \l_@@_domain_str
%    \end{macrocode}
% 中图分类号。
%    \begin{macrocode}
\str_new:N \l_@@_clc_str
%    \end{macrocode}
% 密级。
%    \begin{macrocode}
\str_new:N \l_@@_secret_lv_str
%    \end{macrocode}
% 提交日期。
%    \begin{macrocode}
\str_new:N \l_@@_submit_date_str
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义信息键值。
%    \begin{macrocode}
\keys_define:nn { xdu / info }
  {
%    \end{macrocode}
% 研究生类型。
%    \begin{macrocode}
    graduate-type .choices:nn = { 硕士, 博士 }
      { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl },
%    \end{macrocode}
% 学位类型。
%    \begin{macrocode}
    degree-type .choices:nn = { 学术, 专业 }
      { \tl_set_eq:NN \l_@@_degree_type_tl \l_keys_choice_tl },
%    \end{macrocode}
% 学位类别。
%    \begin{macrocode}
    degree .tl_set:N = \l_@@_degree_str,
    degree* .tl_set:N = \l_@@_degree_en_str,
%    \end{macrocode}
% 作者姓名拼音。
%    \begin{macrocode}
    author* .tl_set:N = \l_@@_author_en_str,
%    \end{macrocode}
% 导师姓名拼音。
%    \begin{macrocode}
    supervisor* .tl_set:N = \l_@@_supv_en_str,
%    \end{macrocode}
% 校外导师姓名拼音。
%    \begin{macrocode}
    supervisor-enterprise* .tl_set:N = \l_@@_supv_ent_en_str,
%    \end{macrocode}
% 导师职称。
%    \begin{macrocode}
    supervisor-title .tl_set:N = \l_@@_supv_t_str,
    supervisor-title* .tl_set:N = \l_@@_supv_t_en_str,
%    \end{macrocode}
% 校外导师职称。
%    \begin{macrocode}
    supervisor-enterprise-title .tl_set:N = \l_@@_supv_ent_t_str,
    supervisor-enterprise-title* .tl_set:N = \l_@@_supv_ent_t_en_str,
%    \end{macrocode}
% 论文标题英文。
%    \begin{macrocode}
    title* .tl_set:N = \l_@@_title_en_str,
%    \end{macrocode}
% 一级学科英文名称。
%    \begin{macrocode}
    major* .tl_set:N = \l_@@_major_en_str,
%    \end{macrocode}
% 二级学科。
%    \begin{macrocode}
    sub-major .tl_set:N = \l_@@_sub_major_str,
%    \end{macrocode}
% 领域。
%    \begin{macrocode}
    domain .tl_set:N = \l_@@_domain_str,
%    \end{macrocode}
% 中图分类号。
%    \begin{macrocode}
    clc .tl_set:N = \l_@@_clc_str,
%    \end{macrocode}
% 密级。
%    \begin{macrocode}
    secret-level .choices:nn = { 秘密, 公开 }
      { \tl_set_eq:NN \l_@@_secret_lv_str \l_keys_choice_tl },
%    \end{macrocode}
% 提交日期。
%    \begin{macrocode}
    submit-date .tl_set:N = \l_@@_submit_date_str
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_set:nn}
% \changes{v1.7.1.0}{2022/05/02}{设置研究生类型默认值}
% \changes{v1.7.2.0}{2022/05/02}{修正guard}
% 初始设置。
%    \begin{macrocode}
\keys_set:nn { xdu }
  {
    info / graduate-type                = { 硕士 },
    info / degree-type                  = { 学术 },
    info / degree                       = { },
    info / degree*                      = { },
    info / author*                      = { },
    info / supervisor*                  = { },
    info / supervisor-enterprise*       = { },
    info / supervisor-title             = { },
    info / supervisor-title*            = { },
    info / supervisor-enterprise-title  = { },
    info / supervisor-enterprise-title* = { },
    info / title*                       = { },
    info / major*                       = { },
    info / sub-major                    = { },
    info / domain                       = { },
    info / clc                          = { },
    info / secret-level                 = { 公开 },
    info / submit-date                  = { }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xdupgthesis>
%    \end{macrocode}
% \subsection{样式配置}
% \begin{variable}
%   {
%     \l_@@_en_cjk_font_bool,
%     \l_@@_lang_tl,
%     \l_@@_bib_tool_tl,
%     \l_@@_bib_file_clist,
%     \l_@@_cap_label_sep_tl,
%     \l_@@_tab_small_bool,
%     \l_@@_alg_small_bool,
%     \l_@@_before_skip_clist,
%     \l_@@_after_skip_clist,
%     \l_@@_chap_tl,
%     \l_@@_sec_tl,
%     \l_@@_subsec_tl,
%     \l_@@_subsubsec_tl,
%     \l_@@_para_tl,
%     \l_@@_subpara_tl,
%     \l_@@_sym_mgn_bool,
%     \l_@@_page_v_align_tl
%   }
% 英文是否使用中文字体。
%    \begin{macrocode}
\bool_new:N \l_@@_en_cjk_font_bool
%    \end{macrocode}
% 语言。
%    \begin{macrocode}
\tl_new:N \l_@@_lang_tl
%    \end{macrocode}
% 参考文献支持方式。
%    \begin{macrocode}
\tl_new:N \l_@@_bib_tool_tl
%    \end{macrocode}
% 参考文献文件。
%    \begin{macrocode}
\clist_new:N \l_@@_bib_file_clist
%    \end{macrocode}
% 是否在\tnx{ref}两侧自动调整中英文间空白。
%    \begin{macrocode}
\tl_new:N \l_@@_ref_add_space
%    \end{macrocode}
% 标签与后面标题之间的间距。
%    \begin{macrocode}
\tl_new:N \l_@@_cap_label_sep_tl
%    \end{macrocode}
% 设置表格字号是否为五号。
%    \begin{macrocode}
\bool_new:N \l_@@_tab_small_bool
%    \end{macrocode}
% 设置算法字号是否为五号。
%    \begin{macrocode}
\bool_new:N \l_@@_alg_small_bool
%    \end{macrocode}
% 设置章节标题前后的垂直间距。
%    \begin{macrocode}
\clist_new:N \l_@@_before_skip_clist
\clist_new:N \l_@@_after_skip_clist
%    \end{macrocode}
% 设置章节标题字号。
%    \begin{macrocode}
\tl_new:N \l_@@_chap_tl
\tl_new:N \l_@@_sec_tl
\tl_new:N \l_@@_subsec_tl
\tl_new:N \l_@@_subsubsec_tl
\tl_new:N \l_@@_para_tl
\tl_new:N \l_@@_subpara_tl
%    \end{macrocode}
% 设置页边距是否对称。
%    \begin{macrocode}
\bool_new:N \l_@@_sym_mgn_bool
%    \end{macrocode}
% 设置页面垂直方向的对齐方式。
%    \begin{macrocode}
\tl_new:N \l_@@_page_v_align_tl
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义样式键值。
%    \begin{macrocode}
\keys_define:nn { xdu / style }
  {
%    \end{macrocode}
% 英文是否使用中文字体。
%    \begin{macrocode}
    en-cjk-font .bool_set:N = \l_@@_en_cjk_font_bool,
%    \end{macrocode}
% 论文语言配置。
%    \begin{macrocode}
    language .choices:nn = { zh, en }
      { \tl_set_eq:NN \l_@@_lang_tl \l_keys_choice_tl },
%    \end{macrocode}
% 参考文献支持方式配置。
%    \begin{macrocode}
    bib-backend .choices:nn = { bibtex, biblatex }
      { \tl_set_eq:NN \l_@@_bib_tool_tl \l_keys_choice_tl },
%    \end{macrocode}
% 参考文献文件。
%    \begin{macrocode}
    bib-resource .clist_set:N = \l_@@_bib_file_clist,
%    \end{macrocode}
% 是否在\tnx{ref}两侧自动调整中英文间空白。
%    \begin{macrocode}
    ref-add-space .bool_set:N = \l_@@_ref_add_space,
%    \end{macrocode}
% 标签与后面标题之间的间距。
%    \begin{macrocode}
    caption-label-sep .tl_set:N = \l_@@_cap_label_sep_tl,
%    \end{macrocode}
% 设置表格字号是否为五号。
%    \begin{macrocode}
    table-small-font .bool_set:N = \l_@@_tab_small_bool,
%    \end{macrocode}
% 设置算法字号是否为五号。
%    \begin{macrocode}
    algorithm-small-font .bool_set:N = \l_@@_alg_small_bool,
%    \end{macrocode}
% 设置章节标题前的垂直间距。
%    \begin{macrocode}
    before-skip .clist_set:N = \l_@@_before_skip_clist,
%    \end{macrocode}
% 设置章节标题后的垂直间距。
%    \begin{macrocode}
    after-skip .clist_set:N = \l_@@_after_skip_clist,
%    \end{macrocode}
% 设置章节标题字号。
%    \begin{macrocode}
    chap-zihao .tl_set:N = \l_@@_chap_tl,
    sec-zihao .tl_set:N = \l_@@_sec_tl,
    subsec-zihao .tl_set:N = \l_@@_subsec_tl,
    subsubsec-zihao .tl_set:N = \l_@@_subsubsec_tl,
    para-zihao .tl_set:N = \l_@@_para_tl,
    subpara-zihao .tl_set:N = \l_@@_subpara_tl,
%    \end{macrocode}
% 设置页边距是否对称。
%    \begin{macrocode}
    symmetric-margin .bool_set:N = \l_@@_sym_mgn_bool,
%    \end{macrocode}
% 设置页面垂直方向的对齐方式。
%    \begin{macrocode}
    page-vertical-align .tl_set:N = \l_@@_page_v_align_tl
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_set:nn}
% 初始设置。
%    \begin{macrocode}
\keys_set:nn { xdu }
  {
    style / en-cjk-font          = false,
    style / language             = zh,
    style / bib-backend          = biblatex,
    style / bib-resource         = { },
    style / ref-add-space        = false,
    style / caption-label-sep    = { 0.75em },
    style / table-small-font     = true,
    style / algorithm-small-font = true,
    style / before-skip          = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
    style / after-skip           = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt },
    style / symmetric-margin     = false,
    style / page-vertical-align  = {顶部对齐}
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</thesis>
%    \end{macrocode}
%    \begin{macrocode}
%<*class|xdufont>
%    \end{macrocode}
% \subsection{键值选项}
% \begin{macro}{\xdusetup}
% 用户设置接口。
%    \begin{macrocode}
\NewDocumentCommand \xdusetup { m }
  { \keys_set:nn { xdu } { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\keys_define:nn}
% 定义元(meta)键值对。
%    \begin{macrocode}
\keys_define:nn { xdu }
  {
    style .meta:nn = { xdu / style } { #1 },
    info  .meta:nn = { xdu / info  } { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ProcessKeysOptions}
% 处理选项。
%    \begin{macrocode}
\ProcessKeysOptions { xdu / style }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</class|xdufont>
%<*xdupgthesis>
%    \end{macrocode}
% \subsection{内部文本}
% \begin{variable}{l_@@_header_str}
% \changes{v1.7.0.0}{2022/05/02}{研究生页眉文本}
% 研究生页眉文本。
%    \begin{macrocode}
\str_new:N \l_@@_header_str
\ctex_at_end_preamble:n
  {
    \@@_lang_switch:nn
      {
        \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 }
          { \str_set:Nn \l_@@_header_str { 西安电子科技大学硕士学位论文 } }
          { \str_set:Nn \l_@@_header_str { 西安电子科技大学博士学位论文 } }
      }
      {
        \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 }
          {
            \str_set:Nn \l_@@_header_str
              { Master~Thesis~of~XIDIAN~UNIVERSITY }
          }
          {
            \str_set:Nn \l_@@_header_str
              { Doctoral~Dissertation~of~XIDIAN~UNIVERSITY }
          }
      }
  }
%    \end{macrocode}
% \end{variable}
%    \begin{macrocode}
%</xdupgthesis>
%<*thesis>
%    \end{macrocode}
% \subsection{内部函数}
% \begin{macro}{\@@_lang_switch:nn}
% 根据论文语言自动选择中文对应内容或英文对应内容。
% \begin{arguments}
%   \item 中文对应内容。
%   \item 英文对应内容。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_lang_switch:nn #1#2
  {
    \str_if_eq:NNTF { \l_@@_lang_tl } { zh }
      { #1 }
      { #2 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_rm_family:,\@@_sf_family:,\@@_tt_family:}
% 切换字体族时,英文根据配置选择是否使用中文字体。
%    \begin{macrocode}
\cs_new:Npn \@@_rm_family:
  { \bool_if:NTF \l_@@_en_cjk_font_bool { \CJKfamily+ { rm } } { \rmfamily } }
\cs_new:Npn \@@_sf_family:
  { \bool_if:NTF \l_@@_en_cjk_font_bool { \CJKfamily+ { sf } } { \sffamily } }
\cs_new:Npn \@@_tt_family:
  { \bool_if:NTF \l_@@_en_cjk_font_bool { \CJKfamily+ { tt } } { \ttfamily } }
%    \end{macrocode}
% \end{macro}
% \begin{variable}{\l_@@_pure_title_str}
% 移除标题中换行符。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \str_new:N \l_@@_pure_title_str
    \str_set_eq:NN \l_@@_pure_title_str \l_@@_title_str
    \str_remove_all:Nn \l_@@_pure_title_str { \\ }
  }
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\@@_uline:n}
% 绘制下划线。
%    \begin{macrocode}
\cs_new:Npn \@@_uline:n #1
  { \CJKunderline [ thickness = 0.5pt ] { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_tl_set_if_empty:Nn}
% \changes{v0.7.0.0}{2022/04/11}{对空凭据表赋值}
% 对空凭据表赋值。
%    \begin{macrocode}
\cs_new:Npn \@@_tl_set_if_empty:Nn #1#2
  { \tl_if_empty:NT #1 { \tl_set:Nn #1 { #2 } } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_get_text_width:Nn,\@@_get_text_width:NV}
% 获取文本宽度。
% \begin{arguments}
%   \item 文本宽度。
%   \item 文本。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_get_text_width:Nn #1#2
  {
    \box_clear_new:N \l_@@_tmp_box
    \hbox_set:Nn \l_@@_tmp_box { #2 }
    \dim_set:Nn #1 { \box_wd:N \l_@@_tmp_box }
  }
\cs_generate_variant:Nn \@@_get_text_width:Nn { NV }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_add_bookmark:n}
% 为当前位置添加书签。
%    \begin{macrocode}
\cs_new:Npn \@@_add_bookmark:n #1
  { \currentpdfbookmark { #1 } { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_add_toc:n}
% 章节添加目录。
%    \begin{macrocode}
\cs_new:Npn \@@_add_toc:n #1
  {
    \cleardoublepage
    \phantomsection
    \addcontentsline { toc } { chapter } { #1 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head:n}
% 新建无编号章节并添加页眉和书签。
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head:n #1
  {
    \@@_add_bookmark:n { #1 }
    \chapter*          { #1 }
    \markboth          { #1 } { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head_ii:nn}
% 新建无编号章节并添加页眉和书签并单独设置标题样式。
% \begin{arguments}
%   \item 章节标题处。
%   \item 章节标题样式。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head_ii:nn #1#2
  {
    {
      \ctexset { chapter / format = { #2 } }
      \@@_n_chapter_head:n { #1 }
    }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head:nn}
% \changes{v1.1.4.0}{2022/04/16}{新建无编号章节并单独添加页眉和书签}
% 新建无编号章节并添加页眉和书签,多用于章节标题为2个汉字的情况。
% \begin{arguments}
%   \item 书签和页眉处。
%   \item 章节标题处。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head:nn #1#2
  {
    \@@_add_bookmark:n { #1 }
    \chapter*          { #2 }
    \markboth          { #1 } { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head_ii:nnn}
% \changes{v1.2.1.0}{2022/04/19}{新建无编号章节并单独添加页眉和书签并单独设置标题样式}
% 新建无编号章节并添加页眉和书签并单独设置标题样式,多用于章节标题为2个汉字的情况。
% \begin{arguments}
%   \item 章节标题处。
%   \item 书签和页眉处。
%   \item 章节标题样式。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head_ii:nnn #1#2#3
  {
    {
      \ctexset { chapter / format = { #3 } }
      \@@_n_chapter_head:nn { #1 } { #2 }
    }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head_toc:n}
% 新建无编号章节并添加目录及页眉。
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head_toc:n #1
  {
    \@@_add_toc:n { #1 }
    \chapter* { #1 }
    \markboth { #1 } { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_n_chapter_head_toc:nn}
% \changes{v1.1.4.0}{2022/04/16}{新建无编号章节并单独添加目录及页眉}
% 新建无编号章节并添加目录及页眉,多用于章节标题为2个汉字的情况。
% \begin{arguments}
%   \item 目录、书签、页眉处。
%   \item 章节标题处。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_n_chapter_head_toc:nn #1#2
  {
    \@@_add_toc:n { #1 }
    \chapter* { #2 }
    \markboth { #1 } { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_typeout_keywords:nNn}
% 排版关键词。
% \begin{arguments}
%   \item 标签名称。
%   \item 关键词列表。
%   \item 关键词分隔符。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_typeout_keywords:nNn #1#2#3
  {
    \str_clear_new:N \l_@@_keywords_label_str
    \str_set:Nn \l_@@_keywords_label_str { #1 }
    \dim_zero_new:N \l_@@_keywords_label_dim
    \@@_get_text_width:NV \l_@@_keywords_label_dim \l_@@_keywords_label_str
    \begin { list } { \l_@@_keywords_label_str }
      {
        \labelwidth  \l_@@_keywords_label_dim
        \labelsep    \c_zero_dim
        \rightmargin \c_zero_dim
        \leftmargin  \l_@@_keywords_label_dim
      }
      \item \clist_use:Nnnn #2 { #3 } { #3 } { #3 }
    \end { list }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{页面设置}
% \subsubsection{页面尺寸}
% \begin{macro}{\geometry,\newgeometry,\savegeometry}
% \changes{v1.5.1.0}{2022/05/01}{修正页脚高度}
% \changes{v1.5.2.0}{2022/05/02}{修正底部页边距高度}
% 正文页面。
% \begin{description}
% \item[本科生] 上3、下2、内3、外2;装订线1;页眉2、页脚1。
% \item[研究生] 上3、\textbf{下2.5}、内2.5、外2.5;装订线0.5;页眉2、页脚$2.5-1.75=0.75$。
% \end{description}
%    \begin{macrocode}
\newgeometry
  {
%<*xduugthesis>
    top           = 3cm,
    bottom        = 2cm,
    inner         = 3cm,
    outer         = 2cm,
    bindingoffset = 1cm,
    head          = 2cm,
    foot          = 1cm
%</xduugthesis>
%<*xdupgthesis>
    top           = 3cm,
    bottom        = 2.5cm,
    inner         = 2.5cm,
    outer         = 2.5cm,
    bindingoffset = 0.5cm,
    head          = 2cm,
    foot          = 0.75cm
%</xdupgthesis>
  }
\savegeometry { main }
%    \end{macrocode}
% \changes{v1.5.1.0}{2022/05/01}{修正页脚高度}
% \changes{v1.5.2.0}{2022/05/02}{修正底部页边距高度}
% 左右对称正文页面。
% \begin{description}
% \item[本科生] 上3、下2、内3、外3;页眉2、页脚1。
% \item[研究生] 上3、\textbf{下2.5}、内2.75、外2.75;页眉2、页脚$2.5-1.75=0.75$。
% \end{description}
%    \begin{macrocode}
\newgeometry
  {
%<*xduugthesis>
    top    = 3cm,
    bottom = 2cm,
    inner  = 3cm,
    outer  = 3cm,
    head   = 2cm,
    foot   = 1cm
%</xduugthesis>
%<*xdupgthesis>
    top    = 3cm,
    bottom = 2.5cm,
    inner  = 2.75cm,
    outer  = 2.75cm,
    head   = 2cm,
    foot   = 0.75cm
%</xdupgthesis>
  }
\savegeometry { main-sym }
%    \end{macrocode}
% \changes{v0.10.3.0}{2022/04/14}{修复封面超页}
% 封面页面。
% \begin{description}
% \item[本科生] 上2.5、下2、内3、外2。
% \item[研究生] 上3、下2、内3、外2.5。
% \end{description}
%    \begin{macrocode}
\newgeometry
  {
%<*xduugthesis>
    top    = 2.5cm,
    bottom = 2cm,
    inner  = 3cm,
    outer  = 2cm
%</xduugthesis>
%<*xdupgthesis>
    top    = 3cm,
    bottom = 2cm,
    inner  = 3cm,
    outer  = 2.5cm
%</xdupgthesis>
  }
\savegeometry { cover }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_load_main_geometry:}
% \changes{v0.8.0.0}{2022/04/12}{根据用户配置加载正文页边距配置}
% 根据用户配置加载正文页边距配置。
%    \begin{macrocode}
\cs_new:Npn \@@_load_main_geometry:
  {
    \bool_if:NTF \l_@@_sym_mgn_bool
      { \loadgeometry { main-sym } }
      { \loadgeometry { main     } }
  }
%    \end{macrocode}
% \end{macro}
% \subsubsection{页眉页脚}
% \begin{macro}
%   {
%     \@@_chinese:,
%     \@@_arabic:,
%     \@@_roman:,
%     \@@_Roman:,
%     \@@_alph:,
%     \@@_Alph:,
%     \@@_fnsymbol:
%   }
% \changes{v1.2.2.0}{2022/04/20}{定义序号转换函数}
% 定义序号转换函数。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    { chinese  },
    { arabic   },
    { roman    },
    { Roman    },
    { alph     },
    { Alph     },
    { fnsymbol }
  }
  { \cs_new_eq:cc { @@ _ #1 : } { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{variable}{\l_@@_chaptername}
% \changes{v1.2.2.0}{2022/04/20}{页眉内部英文章节名}
% 页眉内部英文章节名。
%    \begin{macrocode}
\tl_set:Nn \chaptername { Chapter }
\tl_new:N \l_@@_chaptername
\tl_set_eq:NN \l_@@_chaptername \chaptername
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\chaptermark}
% 设置奇数页页眉为章标题。
%    \begin{macrocode}
\renewcommand { \chaptermark } [ 1 ]
  {
    \markboth
      {
        \@@_lang_switch:nn
          { \CTEXthechapter }
          { \l_@@_chaptername \space \@@_Roman: { chapter } }
        \quad #1
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fancypagestyle}
% \changes{v0.1.1.0}{2022/04/03}{修正页眉字号}
% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
% \changes{v1.7.0.0}{2022/05/02}{设置页眉}
% 设置正文页眉页脚。
% \begin{description}
% \item[本科生] 页眉:宋体五号,居中排列。左面页眉为论文题目,右面页眉为章次和章标题。页眉底划线的宽度为0.75磅。页码:宋体小五号,排在页眉行的最外侧,不加任何修饰。
% \item[研究生] 页眉设置:单面页码页眉标题为章节题目,每一章节的起始页必须在单面页码,双面页码页眉标题统一为“西安电子科技大学博/硕士学位论文”,页眉标题居中排列,字体为宋体,字号为五号。页眉文字下添加双横线,双横线宽度为0.5磅。页眉的“西安电子科技大学博士/硕士学位论文”统一翻译成:Doctoral Dissertation of XIDIAN UNIVERSITY/Master Thesis of XIDIAN UNIVERSITY。页码设置:前置部分的页码用罗马数字标识,字体为Times New Roman,字号为小五号;主体部分的页码用阿拉伯数字标识,字体为宋体,字号为小五号。页码统一居于页面底端中部,不加任何修饰。
% \end{description}
%    \begin{macrocode}
\fancypagestyle { plain }
  {
    \pagestyle { fancy }
    \fancyhf { }
%<*xduugthesis>
    \fancyhead [ CE ] { \@@_rm_family: \zihao { 5  } \l_@@_pure_title_str }
    \fancyhead [ CO ] { \@@_rm_family: \zihao { 5  } \leftmark            }
    \fancyhead [ LE ] { \@@_rm_family: \zihao { -5 } \thepage             }
    \fancyhead [ RO ] { \@@_rm_family: \zihao { -5 } \thepage             }
    \renewcommand { \headrulewidth } { 0.75pt }
%</xduugthesis>
%<*xdupgthesis>
    \fancyhead [ CE ] { \@@_rm_family: \zihao { 5  } \l_@@_header_str     }
    \fancyhead [ CO ] { \@@_rm_family: \zihao { 5  } \leftmark            }
    \fancyfoot [ CE ] { \@@_rm_family: \zihao { -5 } \thepage             }
    \fancyfoot [ CO ] { \@@_rm_family: \zihao { -5 } \thepage             }
    \cs_set:Npn \headrulewidth { 0.5pt }
    \cs_set:Npn \headrule
      {
        \hrule \@height \headrulewidth
        \skip_vertical:N \headrulewidth
        \hrule \@height \headrulewidth
        \skip_vertical:N -\headrulewidth
      }
%</xdupgthesis>
  }
%<*xdupgthesis>
\fancypagestyle { front }
  {
    \pagestyle { plain }
    \fancyfoot [ CE ] { \rmfamily \zihao { -5 } \thepage }
    \fancyfoot [ CO ] { \rmfamily \zihao { -5 } \thepage }
  }
%</xdupgthesis>
%    \end{macrocode}
% \end{macro}
% \subsubsection{对齐方式}
% \begin{macro}{\raggedbottom,\flushbottom}
% \changes{v1.13.0.0}{2022/05/08}{设置页面垂直方向的对齐方式}
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \tl_if_eq:NnTF \l_@@_page_v_align_tl { 顶部对齐 }
      { \raggedbottom }
      { \flushbottom  }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</thesis>
%<*xduugthesis>
%    \end{macrocode}
% \subsection{标题设置}
% 中文章标题黑体,三号,居中排列。节标题宋体,四号,居中排列。英文一级标题字体为Times New Roman,四号,正体,左对齐,以大写罗马数字(I、II 等)标出序号。其余各级标题的字体均为Times New Roman,小四号,正体。二级及以下级别的标题依次缩进4个英文字符,以1.1,1.2,1.1.1,1.1.2形式标出序号。
% \subsubsection{章节层次}
% \begin{macro}{\ctexset}
% 设置章节层次为subparagraph。
%    \begin{macrocode}
\ctexset { secnumdepth=5 }
%    \end{macrocode}
% \end{macro}
% \subsubsection{章节名字}
% \begin{macro}{\ctexset}
% 设置章节的名字。
%    \begin{macrocode}
\ctexset
  {
    chapter       / name =
      {
        \@@_lang_switch:nn { 第 } { \l_@@_chaptername \space },
        \@@_lang_switch:nn { 章 } { }
      },
    section       / name = { },
    subsection    / name = { },
    subsubsection / name = { },
    paragraph     / name = { },
    subparagraph  / name = { }
  }
%    \end{macrocode}
% \end{macro}
% \subsubsection{章节编号}
% \begin{macro}{\ctexset}
% \changes{v1.2.1.0}{2022/04/19}{修正英文论文标题序号}
% 设置章节编号的数字输出格式。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \@@_lang_switch:nn
      {
        \ctexset
          {
            chapter       / number = { \chinese { chapter } },
            section       / number = { \thesection          },
            subsection    / number = { \thesubsection       },
            subsubsection / number = { \thesubsubsection    },
            paragraph     / number = { \theparagraph        },
            subparagraph  / number = { \thesubparagraph     }
          }
      }
      {
        \ctexset
          {
            chapter       / number = { \Roman { chapter }           },
            section       / number = { \thesection                  },
            subsection    / number = { \thesubsection               },
            subsubsection / number = { ( \roman { subsubsection } ) },
            paragraph     / number = { ( \alph { paragraph } )      },
            subparagraph  / number = { ( \arabic { subparagraph } ) }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
% \subsubsection{章节和标题}
% \begin{macro}{\@@_zh_t:nnn}
% 设置中文章节名字和随后的标题内容格式。
% \begin{arguments}
%   \item 字体族。
%   \item 字号。
%   \item 位置。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_zh_t:nnn #1#2#3
  {
    \use:c { @@_ #1 _family : }
    \zihao { \use:c { l_@@_ #2 _tl } }
    \str_if_eq:ccTF { #3 } { c }
      { \centering   }
      { \raggedright }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_en_t:nnn}
% \changes{v1.2.1.0}{2022/04/19}{英文章节样式增加位置参数}
% 设置英文章节名字和随后的标题内容格式。
% \begin{arguments}
%   \item 字号。
%   \item 位置。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_en_t:nn #1#2
  {
    \rmfamily
    \zihao { \use:c { l_@@_ #1 _tl } }
    \bfseries
    \str_if_eq:ccTF { #2 } { c }
      { \centering   }
      { \raggedright }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ctexset}
% \changes{v0.7.0.0}{2022/04/11}{自定义章节标题字号}
% 设置章节名字和随后的标题内容格式。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \@@_lang_switch:nn
      {
        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 3 }
        \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { 4 }
        \@@_tl_set_if_empty:Nn \l_@@_subsec_tl    { 4 }
        \@@_tl_set_if_empty:Nn \l_@@_subsubsec_tl { 4 }
        \@@_tl_set_if_empty:Nn \l_@@_para_tl      { 4 }
        \@@_tl_set_if_empty:Nn \l_@@_subpara_tl   { 4 }
        \ctexset
          {
            chapter       / format = { \@@_zh_t:nnn { sf } { chap      } { c } },
            section       / format = { \@@_zh_t:nnn { rm } { sec       } { c } },
            subsection    / format = { \@@_zh_t:nnn { rm } { subsec    } { l } },
            subsubsection / format = { \@@_zh_t:nnn { rm } { subsubsec } { l } },
            paragraph     / format = { \@@_zh_t:nnn { rm } { para      } { l } },
            subparagraph  / format = { \@@_zh_t:nnn { rm } { subpara   } { l } }
          }
      }
      {
        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 3  }
        \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { 4  }
        \@@_tl_set_if_empty:Nn \l_@@_subsec_tl    { -4 }
        \@@_tl_set_if_empty:Nn \l_@@_subsubsec_tl { -4 }
        \@@_tl_set_if_empty:Nn \l_@@_para_tl      { -4 }
        \@@_tl_set_if_empty:Nn \l_@@_subpara_tl   { -4 }
        \ctexset
          {
            chapter       / format = { \@@_en_t:nn { chap      } { c } },
            section       / format = { \@@_en_t:nn { sec       } { l } },
            subsection    / format = { \@@_en_t:nn { subsec    } { l } },
            subsubsection / format = { \@@_en_t:nn { subsubsec } { l } },
            paragraph     / format = { \@@_en_t:nn { para      } { l } },
            subparagraph  / format = { \@@_en_t:nn { subpara   } { l } }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ctexset}
% 设置章节标题前后的垂直间距。
% \changes{v0.4.0.0}{2022/04/05}{设置章节标题前后的垂直间距}
%    \begin{macrocode}
\ctexset
  {
    chapter       / fixskip    = true,
    section       / fixskip    = true,
    subsection    / fixskip    = true,
    subsubsection / fixskip    = true,
    paragraph     / fixskip    = true,
    subparagraph  / fixskip    = true,
    chapter       / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 1 } },
    section       / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 2 } },
    subsection    / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 3 } },
    subsubsection / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 4 } },
    paragraph     / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 5 } },
    subparagraph  / beforeskip = { \clist_item:Nn \l_@@_before_skip_clist { 6 } },
    chapter       / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 1 } },
    section       / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 2 } },
    subsection    / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 3 } },
    subsubsection / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 4 } },
    paragraph     / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 5 } },
    subparagraph  / afterskip  = { \clist_item:Nn \l_@@_after_skip_clist  { 6 } }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{目录}
% \begin{macro}{\RequirePackage}
% \changes{v0.4.1.0}{2022/04/05}{设置目录样式}
% 设置目录样式。
%    \begin{macrocode}
\RequirePackage [ titles ] { tocloft }
%    \end{macrocode}
% \end{macro}
% \begin{variable}{\cftchapleader}
% 修改目录中一级标题引导点。
%    \begin{macrocode}
\cs_set:Npn \cftchapleader { \bfseries \cftdotfill { \cftdotsep } }
%    \end{macrocode}
% \end{variable}
% \begin{variable}
%   {
%     \cftbeforechapskip,
%     \cftbeforesecskip
%   }
% \changes{v1.10.1.0}{2022/05/04}{修正目录条目间距}
% 设置一级标题与其余各级标题条目前垂直间距一致。
%    \begin{macrocode}
\dim_set_eq:NN \cftbeforechapskip \cftbeforesecskip
%    \end{macrocode}
% \end{variable}
% \begin{variable}
%   {
%     \cftchapfont,
%     \cftchappagefont
%   }
% 设置一级标题及相应页码字体字号。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    \cftchapfont,
    \cftchappagefont
  }
  { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } \bfseries } }
%    \end{macrocode}
% \end{variable}
% \begin{variable}
%   {
%     \cftsecfont,,
%     \cftsubsecfont,,
%     \cftsubsubsecfont,,
%     \cftparafont,,
%     \cftsubparafont,,
%     \cftsecpagefont,,
%     \cftsubsecpagefont,,
%     \cftsubsubsecpagefont,,
%     \cftparapagefont,,
%     \cftsubparapagefont
%   }
% 设置二三四五六级标题及相应页码字体字号。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    \cftsecfont,
    \cftsubsecfont,
    \cftsubsubsecfont,
    \cftparafont,
    \cftsubparafont,
    \cftsecpagefont,
    \cftsubsecpagefont,
    \cftsubsubsecpagefont,
    \cftparapagefont,
    \cftsubparapagefont
  }
  { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } } }
%    \end{macrocode}
% \end{variable}
%    \begin{macrocode}
%</xduugthesis>
%<*thesis>
%    \end{macrocode}
% \subsection{公式}
% \begin{macro}{\theequation}
% 重定义公式编号样式。
%    \begin{macrocode}
\renewcommand { \theequation } { \thechapter - \arabic { equation } }
%    \end{macrocode}
% \end{macro}
% \subsection{算法}
% \begin{macro}{\ALG@name,\algorithmcfname}
% \changes{v1.1.1.0}{2022/04/15}{汉化算法标签名称}
% 算法标签名称。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \clist_map_inline:nn
      {
        { \algorithmname   },
        { \ALG@name        },
        { \algorithmcfname }
      }
      { \cs_set:Npn #1 { \@@_lang_switch:nn { 算法 } { Algorithm } } }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thealgorithm,\floatplacement}
% \changes{v0.10.1.0}{2022/04/13}{重定义算法编号样式}
% \changes{v0.10.2.0}{2022/04/14}{修正算法环境未加载导致的无法编译}
% \changes{v0.10.4.0}{2022/04/14}{修正\pkgx{algorithm}算法编号样式}
% \changes{v1.0.1.0}{2022/04/14}{修改\pkgx{algorithm}算法浮动体默认浮动位置}
% \changes{v1.1.2.0}{2022/04/15}{检测是否加载\pkgx{algorithm}}
% 重定义\pkgx{algorithm}宏包算法编号样式并修改默认浮动位置。
%    \begin{macrocode}
\PassOptionsToPackage { chapter } { algorithm }
\ctex_at_end_preamble:n
  {
    \@ifpackageloaded { algorithm }
      {
        \cs_if_exist:NT \thealgorithm
          {
            \floatplacement { algorithm } { tbp }
            \cs_set:Npn \thealgorithm { \thechapter . \arabic { algorithm } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\renewenvironment}
% \changes{v1.1.0.0}{2022/04/15}{设置\pkgx{algorithm}算法内容字号}
% 设置\pkgx{algorithm}算法内容字号。
%    \begin{macrocode}
            \bool_if:NT \l_@@_alg_small_bool
              {
                \renewenvironment { algorithm }
                  {
                    \@nameuse { fst@algorithm }
                    \@float@setevery { algorithm }
                    \ctex_gadd_ltxhook:nn
                      { cmd/@floatboxreset/after }
                      { \zihao { 5 } }
                    \@float { algorithm }
                  }
                  { \float@end }
              }
          }
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thealgocf}
% \changes{v0.10.4.0}{2022/04/14}{修正\pkgx{algorithm2e}算法编号样式}
% \changes{v1.1.2.0}{2022/04/15}{检测是否加载\pkgx{algorithm2e}}
% 重定义\pkgx{algorithm2e}宏包算法编号样式。
%    \begin{macrocode}
\PassOptionsToPackage { algochapter } { algorithm2e }
\ctex_at_end_preamble:n
  {
    \@ifpackageloaded { algorithm2e }
      {
        \cs_if_exist:NT \thealgocf
          {
            \cs_set:Npn \thealgocf { \thechapter . \arabic { algocf } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\renewenvironment}
% \changes{v1.0.3.0}{2022/04/15}{修改\pkgx{algorithm2e}算法浮动体默认浮动位置}
% 修改\pkgx{algorithm2e}算法浮动体默认浮动位置。
%    \begin{macrocode}
            \renewenvironment { \algocf@envname } [ 1 ] [ tbp ]
              {
                \setboolean { algocf@algostar } { false }
                \setboolean { algocf@procenvironment } { false }
                \gdef \algocfautorefname { \algorithmautorefname }
                \begin { algocf@algorithm } [ #1 ] \ignorespaces
              }
              { \end { algocf@algorithm } \ignorespacesafterend }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\SetAlFnt}
% \changes{v1.1.0.0}{2022/04/15}{设置\pkgx{algorithm2e}算法内容字号}
% 设置\pkgx{algorithm2e}算法内容字号。
%    \begin{macrocode}
            \bool_if:NT \l_@@_alg_small_bool
              { \SetAlFnt { \zihao { 5 } } }
          }
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{Caption}
% \begin{macro}{\DeclareCaptionLabelSeparator,\DeclareCaptionFont,\captionsetup}
% \changes{v0.1.2.0}{2022/04/03}{设置图片标签与后面标题之间的间距}
% \changes{v0.1.3.0}{2022/04/03}{设置图片标签与标题字体字号}
% 设置图表标签与后面标题之间的间距及caption字体字号。
%    \begin{macrocode}
\RequirePackage { caption }
\DeclareCaptionLabelSeparator { customskip } { \hskip \l_@@_cap_label_sep_tl }
\DeclareCaptionFont { customfont } { \@@_rm_family: \zihao { 5 } }
\captionsetup
  {
    labelsep = customskip,
    font     = customfont
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\captionsetup}
% \changes{v1.0.4.0}{2022/04/15}{设置\pkgx{algorithm}算法标签与标题字体字号及标签与后面标题之间的间距}
% \changes{v1.1.3.0}{2022/04/15}{修正\pkgx{algorithm}算法标签字体系列}
% 设置\pkgx{algorithm}算法标签与标题字体字号及标签与后面标题之间的间距。
%    \begin{macrocode}
\captionsetup [ algorithm ]
  {
    labelsep  = customskip,
    labelfont = customfont,
    font      = customfont
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\SetAlgoCaptionSeparator,\SetAlCapNameFnt,\SetAlCapFnt}
% \changes{v1.0.0.0}{2022/04/14}{修正\pkgx{algorithm2e}算法标签与后面标题之间的间距}
% \changes{v1.0.4.0}{2022/04/15}{修正\pkgx{algorithm2e}算法标签与标题字体字号}
% 设置\pkgx{algorithm2e}算法标签与标题字体字号及标签与后面标题之间的间距。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \cs_if_exist:NT \thealgocf
      {
        \SetAlgoCaptionSeparator { \hbox_to_wd:nn { \l_@@_cap_label_sep_tl } { } }
        \SetAlCapNameFnt         { \@@_rm_family: \zihao { 5 } }
        \SetAlCapFnt             { \@@_rm_family: \zihao { 5 } }
        \SetAlCapSty             { }
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\SetTblrStyle,\DefTblrTemplate}
% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包caption样式}
% 设置\pkgx{tabularray}宏包中表格标签与后面标题之间的间距及caption字体字号。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \@ifpackageloaded { tabularray }
      {
        \SetTblrStyle { head } { font = \@@_rm_family: \zihao { 5 } }
        \DefTblrTemplate { caption-sep } { default }
          { \hskip \l_@@_cap_label_sep_tl }
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{图片}
% \begin{macro}{\PassOptionsToPackage,\captionsetup}
% \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号}
% 设置子图标签与标题字体字号,支持\pkgx{subfig}和\pkgx{subcaption}宏包。
%    \begin{macrocode}
\PassOptionsToPackage { font = small } { subfig }
\captionsetup [ sub ] { font = customfont }
%    \end{macrocode}
% \end{macro}
% \subsection{表格}
% \changes{v0.10.0.0}{2022/04/13}{设置表格字号是否为五号}
% \changes{v1.0.2.0}{2022/04/14}{修复表格五号字无法设定浮动位置}
% \begin{macro}{table}
% 设置表格字号是否为五号。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \bool_if:NT \l_@@_tab_small_bool
      {
        \renewenvironment { table }
          { \def\@floatboxreset { \reset@font\small\@setminipage } \@float { table } }
          { \end@float }
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{longtable}
% \changes{v1.3.0.0}{2022/04/20}{设置\envx{longtable}环境字号是否为五号}
% 设置\pkgx{longtable}宏包中\envx{longtable}环境字号是否为五号。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \@ifpackageloaded { longtable }
      {
        \bool_if:NT \l_@@_tab_small_bool
          {
            \ctex_gadd_ltxhook:nn
              { env/longtable/begin }
              { \small }
          }
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{tblr,longtblr}
% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号}
% 设置\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号是否为五号。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \@ifpackageloaded { tabularray }
      {
        \bool_if:NT \l_@@_tab_small_bool
          {
            \ctex_gadd_ltxhook:nn
              { env/tblr/begin }
              { \small }
            \ctex_gadd_ltxhook:nn
              { env/longtblr/begin }
              { \small }
          }
      }
      { }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{超链接和PDF元数据}
% \begin{macro}{\hyperref}
% \changes{v0.5.0.0}{2022/04/05}{添加PDF主题元数据}
% \changes{v1.10.0.0}{2022/05/04}{添加PDF应用程序元数据}
% 配置超链接和PDF元数据。
%    \begin{macrocode}
\RequirePackage{ hyperref }
\hypersetup
  {
    bookmarksnumbered,
    hidelinks
  }
\ctex_at_end_preamble:n
  {
    \hypersetup
      {
        pdftitle   = \l_@@_pure_title_str,
%<xduugthesis>        pdfsubject = { 西安电子科技大学本科毕业设计论文 },
%<xduugthesis>        pdfcreator = { XeLaTeX~with~xduugthesis~class~in~XDUTS },
%<xdupgthesis>        pdfsubject = \l_@@_header_str,
%<xdupgthesis>        pdfcreator = { XeLaTeX~with~xdupgthesis~class~in~XDUTS },
        pdfauthor  = \l_@@_author_str
      }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{交叉引用}
% \begin{macro}{\@@_trad_ref:n,\ref}
% \changes{v1.2.0.0}{2022/04/16}{优化中文环境下\tnx{ref}两侧中英文间空白}
% 优化中文环境下\tnx{ref}两侧中英文间空白。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \bool_if:NT \l_@@_ref_add_space
      {
        \str_if_eq:NNT { \l_@@_lang_tl } { zh }
          {
            \RequirePackage { xspace }
            \xspaceaddexceptions { 。?!,、;:“”‘’—….--~·《》<>_ }
            \cs_generate_variant:Nn \str_if_in:nnTF { xnTF }
            \ctex_after_end_preamble:n
              {
                \cs_set_eq:NN \@@_trad_ref:n \ref
                \cs_set:Npn \ref #1
                  {
                    \str_if_in:xnTF { \__hyp_get_anchor:n { #1 } } { chapter }
                      {         \@@_trad_ref:n { #1 }         }
                      { \xspace \@@_trad_ref:n { #1 } \xspace }
                  }
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
% \subsection{参考文献}
% \begin{macro}{\@@_begin_document:n}
% 钩子。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_begin_document:n #1
  { \ctex_gadd_ltxhook:nn { env/document/begin } { #1 } }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\RequirePackage,\bibliographystyle,\addbibresource}
% 参考文献。
%    \begin{macrocode}
\@@_begin_document:n
  {
    \tl_if_eq:NnTF \l_@@_bib_tool_tl { bibtex }
      {
        \RequirePackage [ sort&compress,square,super,comma,numbers ] { natbib }
        \RequirePackage { gbt7714 }
        \bibliographystyle { gbt7714-numerical }
      }
      {
        \RequirePackage [ style = gb7714-2015 ] { biblatex }
        \clist_map_inline:Nn \l_@@_bib_file_clist { \addbibresource { #1 } }
      }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</thesis>
%<*xduugthesis>
%    \end{macrocode}
% \subsection{附录}
% \begin{macro}{appendixes}
% 附录环境。
% \changes{v0.3.0.0}{2022/04/04}{新增附录环境}
% \changes{v0.3.1.0}{2022/04/04}{修正附录中图表编号样式}
% \changes{v0.10.2.0}{2022/04/14}{修正附录中算法编号样式}
% \changes{v0.10.4.0}{2022/04/14}{修正附录中\pkgx{algorithm2e}算法编号样式}
% \changes{v1.2.2.0}{2022/04/20}{修正英文附录编号}
%    \begin{macrocode}
\RequirePackage { environ }
\NewEnviron { appendixes }
  {
    \cs_set:Npn \appendixname { \@@_lang_switch:nn { 附录 } { Appendix } }
    \tl_set_eq:NN \l_@@_chaptername \appendixname
    \cs_set_eq:NN \@@_Roman: \@@_Alph:
    \appendix
    \renewcommand { \thefigure } { \thechapter \arabic { figure } }
    \renewcommand { \thetable  } { \thechapter \arabic { table  } }
    \cs_if_exist:NT \thealgorithm
      { \cs_set:Npn \thealgorithm { \thechapter \arabic { algorithm } } }
    \cs_if_exist:NT \thealgocf
      { \cs_set:Npn \thealgocf { \thechapter \arabic { algocf } } }
    \BODY
  }
%    \end{macrocode}
% \end{macro}
% \subsection{封面}
% \subsubsection{本科生}
% \begin{macro}{\@@_cover_i:nn}
% 绘制班级和学号。
% \begin{arguments}
%   \item 标签名称。
%   \item 班级和学号对应值。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cover_i:nn #1#2
  {
    \vbox_to_ht:nn { 12pt }
      {
        \mode_leave_vertical:
        \hfill
        \hbox:n
          {
            \@@_rm_family: \zihao { -4 } \bfseries
            \hbox_to_wd:nn { 3em } { #1 }
            \skip_horizontal:n { 1em }
            \@@_uline:n { \hbox_to_wd:nn { 15ex } { \hfil #2 \hfil } }
            \skip_horizontal:n { 1.5cm }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cover_ii:nnn}
% \changes{v0.6.1.0}{2022/04/11}{修复logo不存在导致的无法编译}
% \changes{v1.13.1.0}{2022/05/08}{使用融合logo文件}
% 绘制西电logo。
% \begin{arguments}
%   \item 盒子高度。
%   \item logo高度。
%   \item logo类型。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cover_ii:nnn #1#2#3
  {
    \vbox_to_ht:nn { #1 }
      {
        \mode_leave_vertical:
        \hfil
        \file_if_exist:nT { xdulogo.pdf }
          {
            \str_if_eq:nnTF { #3 } { text }
              { \includegraphics [ page = 1, height = #2 ] { xdulogo.pdf } }
              { \includegraphics [ page = 2, height = #2 ] { xdulogo.pdf } }
          }
        \hfil
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_cover_iii:nnnnn}
% 绘制论文信息。
% \begin{arguments}
%   \item 标签宽度。
%   \item 标签名称。
%   \item 字体族。
%   \item 字号。
%   \item 论文信息。
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_cover_iii:nnnnn #1#2#3#4#5
  {
    \vbox_to_ht:nn { 42.5pt }
      {
        \vfill
        \mode_leave_vertical:
        \hfil
        \hbox:n
          {
            \@@_rm_family:
            \zihao { 3 }
            \hbox_to_wd:nn { #1 } { \bfseries #2 }
            \skip_horizontal:n { 1em }
            \zihao { -3 }
            \@@_uline:n
              {
                \hbox_to_wd:nn { 16em }
                  { \hfil \use:c { @@_ #3 _family : } \zihao { #4 } #5 \hfil }
              }
          }
        \hfil
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_split_title:Nn,\@@_split_title:Nn}
% 拆分标题。
% \begin{arguments}
%   \item 拆分后标题。
%   \item 拆分前标题。
% \end{arguments}
%    \begin{macrocode}
\cs_new_protected:Npn \@@_split_title:Nn #1#2
  {
    \seq_new:N \l_@@_title_seq
    \tl_if_in:nnTF { #2 } { \\ }
      {
        \seq_set_split:Nnn \l_@@_title_seq { \\ } { #2 }
        \clist_set_from_seq:NN #1 \l_@@_title_seq
      }
      {
        \clist_put_right:Nx #1 { \tl_range:nnn { #2 } { 1  } { 14 } }
        \clist_put_right:Nx #1 { \tl_range:nnn { #2 } { 15 } { -1 } }
      }
  }
\cs_generate_variant:Nn \@@_split_title:Nn { NV }
%    \end{macrocode}
% \end{macro}
% \begin{variable}{\l_@@_is_ent_bool,\l_@@_is_wide_bool}
% \changes{v0.8.1.0}{2022/04/12}{封面导师标签标志位}
% 是否为校外毕设,是否为宽名称。
%    \begin{macrocode}
\bool_new:N \l_@@_is_ent_bool
\bool_new:N \l_@@_is_wide_bool
%    \end{macrocode}
% \end{variable}
% \begin{macro}{\@@_cover_iii:nnnn}
% \changes{v0.8.1.0}{2022/04/12}{使用标志位计算论文信息标签宽度}
% \changes{v0.1.4.0}{2022/04/03}{自动调整论文信息标签宽度}
% 绘制论文信息并自动调整论文信息标签宽度。
% \begin{arguments}
%   \item 标签名称。
%   \item 字体族。
%   \item 字号。
%   \item 论文信息。
% \end{arguments}
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \tl_if_blank:VF \l_@@_supv_dept_str
      { \bool_set_true:N \l_@@_is_wide_bool }
    \tl_if_blank:VF \l_@@_supv_ent_str
      { \bool_set_true:N \l_@@_is_wide_bool }
    \tl_if_blank:VF \l_@@_supv_sch_str
      { \bool_set_true:N \l_@@_is_wide_bool }
    \cs_new:Npn \@@_cover_iii:nnnn #1#2#3#4
      {
        \bool_if:NTF \l_@@_is_wide_bool
          { \@@_cover_iii:nnnnn { 6em } { #1 } { #2 } { #3 } { #4 } }
          { \@@_cover_iii:nnnnn { 4em } { #1 } { #2 } { #3 } { #4 } }
      }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\frontmatter}
% \changes{v1.9.1.0}{2022/05/04}{修正封面元素位置及尺寸}
% 排版正文前部分。
%    \begin{macrocode}
\renewcommand { \frontmatter }
  {
    \loadgeometry { cover }
    \pagestyle    { empty }
    \dim_set:Nn \parindent { 0pt }
    \@@_add_bookmark:n { \@@_lang_switch:nn { 封面 } { Cover } }
%    \end{macrocode}
% 排版班级和学号。
%    \begin{macrocode}
    \@@_cover_i:nn   { 班级 } { \l_@@_class_id_str   }
    \@@_cover_i:nn   { 学号 } { \l_@@_student_id_str }
    \skip_vertical:n { 30pt }
%    \end{macrocode}
% 排版西电文字logo。
%    \begin{macrocode}
    \@@_cover_ii:nnn { 65pt } { 35pt } { text }
%    \end{macrocode}
% \changes{v1.13.2.0}{2022/05/08}{修正封面标题偏移}
% 排版封面标题。
%    \begin{macrocode}
    \vbox_to_ht:nn { 90pt }
      {
        \mode_leave_vertical:
        \hfil
        \hbox_to_wd:nn { 375pt } { \sffamily \zihao { 0 } 本科毕业设计论文 }
        \hfil
      }
%    \end{macrocode}
% 排版西电logo。
%    \begin{macrocode}
    \@@_cover_ii:nnn { 140pt } { 120pt } { icon }
%    \end{macrocode}
% 拆分论文标题并排版。
%    \begin{macrocode}
    \clist_new:N \l_@@_title_clist
    \@@_split_title:NV \l_@@_title_clist \l_@@_title_str
    \str_set:Nx \l_@@_title_i_str  { \clist_item:Nn  \l_@@_title_clist { 1 } }
    \str_set:Nx \l_@@_title_ii_str { \clist_item:Nn  \l_@@_title_clist { 2 } }
    \@@_cover_iii:nnnn { 题目 } { sf } { 3 } { \l_@@_title_i_str }
    \tl_if_blank:VF \l_@@_title_ii_str
      { \@@_cover_iii:nnnn { } { sf } { 3 } { \l_@@_title_ii_str } }
%    \end{macrocode}
% 排版学院、专业、学生姓名。
%    \begin{macrocode}
    \@@_cover_iii:nnnn { 学院     } { rm } { -3 } { \l_@@_dept_str   }
    \@@_cover_iii:nnnn { 专业     } { rm } { -3 } { \l_@@_major_str  }
    \@@_cover_iii:nnnn { 学生姓名 } { rm } { -3 } { \l_@@_author_str }
%    \end{macrocode}
% \changes{v0.8.1.0}{2022/04/12}{修正封面论文信息标签宽度}
% 校外毕设,排版校外导师姓名、校内导师姓名。
%    \begin{macrocode}
    \tl_if_blank:VF \l_@@_supv_ent_str
      { \bool_set_true:N \l_@@_is_ent_bool }
    \tl_if_blank:VF \l_@@_supv_sch_str
      { \bool_set_true:N \l_@@_is_ent_bool }
    \bool_if:NTF \l_@@_is_ent_bool
      {
        \@@_cover_iii:nnnn { 校外导师姓名 } { rm } { -3 } { \l_@@_supv_ent_str }
        \@@_cover_iii:nnnn { 校内导师姓名 } { rm } { -3 } { \l_@@_supv_sch_str }
      }
%    \end{macrocode}
% 校内毕设,排版导师姓名、院内导师姓名。
%    \begin{macrocode}
      {
        \@@_cover_iii:nnnn { 导师姓名 } { rm } { -3 } { \l_@@_supv_str }
        \tl_if_blank:VF \l_@@_supv_dept_str
          {
            \@@_cover_iii:nnnn
              { 院内导师姓名        }
              { rm                  }
              { -3                  }
              { \l_@@_supv_dept_str }
          }
      }
    \cleardoublepage
%    \end{macrocode}
% \changes{v0.8.0.0}{2022/04/12}{支持对称页边距}
% \changes{v1.10.2.0}{2022/05/04}{修正正文前页码样式}
% 更换页面尺寸、页面样式和页码样式。
%    \begin{macrocode}
    \@@_load_main_geometry:
    \pagestyle     { plain }
    \pagenumbering { roman }
%    \end{macrocode}
% \changes{v1.2.1.0}{2022/04/19}{修正英文论文下中文摘要标题样式}
% 中文摘要,宋体小四号。
%    \begin{macrocode}
    \@@_lang_switch:nn
      { \@@_n_chapter_head:nn { 摘要 } { 摘 { \quad } 要 } }
      {
        \@@_n_chapter_head_ii:nnn
          { 摘要 }
          { 摘 { \quad } 要 }
          { \@@_sf_family: \zihao { 3 } \centering }
      }
    {
      \dim_set:Nn \parindent { 2 \ccwd }
      \rmfamily \zihao { -4 }
      \file_if_exist_input:n { \l_@@_abstract_zh_tl }
    }
%    \end{macrocode}
% \changes{v1.10.3.0}{2022/05/04}{使用弹性长度分隔关键词}
% 关键词弹性分隔间距。
%    \begin{macrocode}
    \cs_new:Npn \@@_keywords_space: { \hspace{ 2em plus 1em minus 1em } }
%    \end{macrocode}
% 中文关键词,黑体小四号。
%    \begin{macrocode}
    {
      \sffamily \zihao { -4 } \par
      \@@_typeout_keywords:nNn
        { 关键词: } { \l_@@_keywords_zh_clist } { \@@_keywords_space: }
    }
    \cleardoublepage
%    \end{macrocode}
% 英文摘要,Times New Roman字体,小四号。
% \changes{v0.4.3.0}{2022/04/05}{修正英文摘要标题字体}
%    \begin{macrocode}
    \@@_n_chapter_head_ii:nn
      { ABSTRACT } { \rmfamily \zihao { 3 } \bfseries \centering }
    {
      \dim_set:Nn \parindent { 2 \ccwd }
      \rmfamily \zihao { -4 }
      \file_if_exist_input:n { \l_@@_abstract_en_tl }
    }
%    \end{macrocode}
% 英文关键词,Times New Roman字体加粗,小四号。
%    \begin{macrocode}
    {
      \rmfamily \zihao { -4 } \bfseries \par
      \@@_typeout_keywords:nNn
        { Keywords: } { \l_@@_keywords_en_clist } { \@@_keywords_space: }
    }
    \cleardoublepage
%    \end{macrocode}
% \changes{v1.1.4.0}{2022/04/16}{为目录章节标题增加间距}
% \changes{v1.1.5.0}{2022/04/16}{目录中移除目录章节}
% 目录。
%    \begin{macrocode}
    \setcounter { tocdepth } { 5 }
    \@@_n_chapter_head:nn
      { \@@_lang_switch:nn { 目录            } { Contents } }
      { \@@_lang_switch:nn { 目 { \quad } 录 } { Contents } }
    \@starttoc { toc }
    \cleardoublepage
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xduugthesis>
%<*xdupgthesis>
%    \end{macrocode}
% \subsubsection{研究生}
% \begin{macro}{\frontmatter}
% \changes{v1.5.0.0}{2022/05/01}{设置封面页边距}
% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
% 排版正文前部分。
%    \begin{macrocode}
\renewcommand { \frontmatter }
  {
    \loadgeometry { cover }
    \pagestyle    { empty }
    \@@_load_main_geometry:
    \pagestyle     { front }
    \pagenumbering { Roman }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xdupgthesis>
%<*xduugthesis>
%    \end{macrocode}
% \subsection{正文}
% \subsubsection{本科生}
% \begin{macro}{\mainmatter}
% \changes{v0.8.0.0}{2022/04/12}{支持对称页边距}
% 排版正文部分。
%    \begin{macrocode}
\renewcommand { \mainmatter }
  {
    \@@_load_main_geometry:
    \pagestyle     { plain  }
    \pagenumbering { arabic }
    \dim_set:Nn \parindent { 2 \ccwd }
    \rmfamily \zihao { -4 }
  }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\backmatter}
% 排版正文后部分。
%    \begin{macrocode}
\renewcommand { \backmatter }
  {
%    \end{macrocode}
% \changes{v1.1.4.0}{2022/04/16}{为致谢章节标题增加间距}
% 致谢。
%    \begin{macrocode}
    \@@_n_chapter_head_toc:nn
      { \@@_lang_switch:nn { 致谢            } { Acknowledgements } }
      { \@@_lang_switch:nn { 致 { \quad } 谢 } { Acknowledgements } }
    {
      \dim_set:Nn \parindent { 2 \ccwd }
      \rmfamily \zihao { -4 }
      \file_if_exist_input:n { \l_@@_ack_tl }
    }
%    \end{macrocode}
% 参考文献。
% \changes{v0.2.1.0}{2022/04/04}{参考文献添加至目录}
% \changes{v0.5.2.0}{2022/04/07}{修正参考文献列表字体字号}
% \changes{v1.3.1.0}{2022/04/21}{修复参考文献列表字体字号}
% \changes{v1.4.1.0}{2022/04/27}{修复bibtex产生的多余参考文献列表章节}
%    \begin{macrocode}
    \cs_set:Npn \bibname { \@@_lang_switch:nn { 参考文献 } { Bibliography } }
    \@@_n_chapter_head_toc:n { \bibname }
    {
      \tl_if_eq:NnTF \l_@@_bib_tool_tl { bibtex }
        {
          \cs_set:Npn \bibsection { }
          \@@_rm_family: \zihao { 5 }
          \bibliography { \l_@@_bib_file_clist }
        }
        {
          \defbibheading { bibliography } [ ] { }
          \cs_set:Npn \bibfont { \@@_rm_family: \zihao { 5 } }
          \printbibliography
        }
    }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xduugthesis>
%    \end{macrocode}
%    \begin{macrocode}
%<*xdupgthesis>
%    \end{macrocode}
% \subsubsection{研究生}
% \begin{macro}{\mainmatter}
% \changes{v1.5.0.0}{2022/05/01}{设置正文页边距}
% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
% 排版正文部分。
%    \begin{macrocode}
\renewcommand { \mainmatter }
  {
    \@@_load_main_geometry:
    \pagestyle     { plain  }
    \pagenumbering { arabic }
  }
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</xdupgthesis>
%    \end{macrocode}
%    \begin{macrocode}
%<@@=>
%    \end{macrocode}
% \Finale
\endinput