Skip to content

Commit 4b17a7d

Browse files
committed
移除本科吞参数处理
1 parent 1018aec commit 4b17a7d

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

whu-thesis.cls

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,51 +2230,6 @@
22302230
}
22312231

22322232
%region 目录
2233-
%tag 本科吞参数
2234-
% 目录标题和正文标题相同(即不能输入 \chapter[]{} 只能输入 \chapter{})
2235-
% 下面采用的是“吞参数”的方法:让 [] 的参数不起作用(被忽略)从而起到吞掉参数的效果
2236-
\__whu_msg_new:nn { bachelor-no-optional-argument }
2237-
{
2238-
#1~shouldn't~be~used~with~optional~argument~in~bachelor's~thesis.\\
2239-
The~optional~argument~of~#1~is~ignored.
2240-
}
2241-
\cs_new:Npn \__whu_bachelor_chapter_cmds_no_optional_argument:
2242-
{
2243-
\NewCommandCopy { \bachelorchapter } { \chapter }
2244-
\NewCommandCopy { \bachelorsection } { \section }
2245-
\NewCommandCopy { \bachelorsubsection } { \subsection }
2246-
\RenewDocumentCommand \chapter { s o m }
2247-
{
2248-
\IfBooleanTF {##1}
2249-
{ \bachelorchapter* {##3} }
2250-
{ \bachelorchapter {##3} } % ]
2251-
\IfNoValueF {##2}
2252-
{ \__whu_warning:nn { bachelor-no-optional-argument } { \chapter } }
2253-
}
2254-
\RenewDocumentCommand \section { s o m }
2255-
{
2256-
\IfBooleanTF {##1}
2257-
{ \bachelorsection* {##3} }
2258-
{ \bachelorsection {##3} } % ]
2259-
\IfNoValueF {##2}
2260-
{ \__whu_warning:nn { bachelor-no-optional-argument } { \section } }
2261-
}
2262-
\RenewDocumentCommand \subsection { s o m }
2263-
{
2264-
\IfBooleanTF {##1}
2265-
{ \bachelorsubsection* {##3} }
2266-
{ \bachelorsubsection {##3} } % ]
2267-
\IfNoValueF {##2}
2268-
{ \__whu_warning:nn { bachelor-no-optional-argument } { \subsection } }
2269-
}
2270-
}
2271-
\AddToHook { begindocument }
2272-
{
2273-
\tl_if_eq:NnT \g__whu_thesis_type_tl { bachelor }
2274-
{
2275-
\__whu_bachelor_chapter_cmds_no_optional_argument:
2276-
}
2277-
}
22782233
%tag 本科设置
22792234
\cs_new:Npn \__whu_bachelor_set_tocline:
22802235
{

0 commit comments

Comments
 (0)