File tree Expand file tree Collapse file tree 1 file changed +0
-45
lines changed
Expand file tree Collapse file tree 1 file changed +0
-45
lines changed Original file line number Diff line number Diff line change 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 {
You can’t perform that action at this time.
0 commit comments