Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update document commands to set the correct title in the header (#304) #305

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions whu-thesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@

%tag 用户设置命令接口
\NewDocumentCommand \whusetup { m }
{ \keys_set:nn { whu } {#1} }
{
\keys_set:nn { whu } {#1}
\tl_new:N \l__whu_info_header_title_tl
\tl_set_eq:NN \l__whu_info_header_title_tl \l__whu_info_title_tl
\tl_replace_all:Nnn \l__whu_info_header_title_tl { \\ } { }
}
\NewDocumentCommand \whumodule { m }
{
\ExplSyntaxOn
Expand Down Expand Up @@ -1034,14 +1039,14 @@
{
\fancyhf { }
\fancyhead [CE] { 武汉大学硕士学位论文 }
\fancyhead [CO] { \l__whu_info_title_tl }
\fancyhead [CO] { \l__whu_info_header_title_tl }
\fancyfoot [C] { \zihao{5} \Roman{page} }
}
\fancypagestyle { master-mainmatter }
{
\fancyhf { }
\fancyhead [CE] { 武汉大学硕士学位论文 }
\fancyhead [CO] { \l__whu_info_title_tl }
\fancyhead [CO] { \l__whu_info_header_title_tl }
\fancyfoot [C] { \zihao{5} \arabic{page} }
}
%tag 博士
Expand All @@ -1050,14 +1055,14 @@
{
\fancyhf { }
\fancyhead [CE] { 武汉大学博士学位论文 }
\fancyhead [CO] { \l__whu_info_title_tl }
\fancyhead [CO] { \l__whu_info_header_title_tl }
\fancyfoot [C] { \zihao{5} \Roman{page} }
}
\fancypagestyle { doctor-mainmatter }
{
\fancyhf { }
\fancyhead [CE] { 武汉大学博士学位论文 }
\fancyhead [CO] { \l__whu_info_title_tl }
\fancyhead [CO] { \l__whu_info_header_title_tl }
\fancyfoot [C] { \zihao{5} \arabic{page} }
}
%tag 给-\mainmatter-添加钩子
Expand Down