-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
提交前检查
- 我已经充分阅读了模板文档。
- 我的问题并非关于模板的用法(否则请前往 discussions 提出)。
- 我已经搜索了已有的 issues 和 discussion,确认没有重复提交。
系统
Window 11
TeX 发行版
TeX Live 2024
TeX 编译器
XeLaTeX
版本
7.5.2
学位类型
master
问题描述
目前声明的style有两种:empty和plain,但我在插入扫描件的时候出现如下不便:
如plain,扫描时一旦不正(这是大概率事件),便会出现页眉的重影,扫描的页眉和plain的页眉不能完全重合。
如empty,签字再扫描时,需要确保打印的word页码时正确的。一旦正文篇幅有修改,就得再去打印签字扫描,非常麻烦。
我建议在thuthesis.cls中增加
% 定义新的 emptynumber 页面样式
\fancypagestyle{emptynumber}{
\fancyhf{} % 清空所有页眉和页脚
\fancyfoot[C]{\thepage} % 在页脚居中显示页码
\renewcommand{\headrulewidth}{0pt} % 去掉页眉的横线
\renewcommand{\footrulewidth}{0pt} % 去掉页脚的横线
}
然后在\statement中,除了empty和plain,再增加一个选项emptynumber。
复现代码
\newenvironment{denotation}[1][2.5cm]{%
\ifthu@degree@bachelor
\cleardoublepage
\fi
\ifthu@degree@graduate
\thu@chapter*{\thu@denotation@name}%
\else
\thu@chapter*[]{\thu@denotation@name}%
\fi
\vskip-30bp\xiaosi[1.6]\begin{thu@denotation}[labelwidth=#1]
}{%
\end{thu@denotation}
}
\newlist{thu@denotation}{description}{1}
\setlist[thu@denotation]{%
nosep,
font=\normalfont,
align=left,
leftmargin=!, % sum of the following 3 lengths
labelindent=0pt,
labelwidth=2.5cm,
labelsep*=0.5cm,
itemindent=0pt,
}
\newcommand{\thu@statement@text}{本人郑重声明:所呈交的学位论文,是本人在导师指导下
,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论
文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的
其他个人和集体,均已在文中以明确方式标明。}
\newcommand{\thu@signature}{签\hspace{1em}名:}
\newcommand{\thu@backdate}{日\hspace{1em}期:}
\newenvironment{acknowledgements}{%
\@mainmatterfalse
\thu@end@appendix@ref@section
\ifthu@degree@bachelor
\cleardoublepage
\fi
\thu@chapter*{\thu@acknowledgements@name}%
}{%
\ifthu@degree@bachelor
\cleardoublepage
\fi
}
\thu@define@key{
statement-page-style = {
name = statement@page@style,
choices = {
auto,
empty,
plain,
},
default = auto,
},
statement-page-number = {
name = statement@page@number,
choices = {
false,
true,
},
default = false,
},
}
\thu@option@hook{statement-page-number}{%
\ifthu@statement@page@number@false
\thusetup{statement-page-style=empty}%
\else
\thusetup{statement-page-style=plain}%
\fi
\thu@warning{%
The "statement-page-number" option is deprecated.
Use "page-style" option of \protect\statement command instead%
}%
}
\newif\ifthu@statement@exists
\newcommand\statement[1][]{%
\@mainmatterfalse
\thu@end@appendix@ref@section
\thu@statement@existstrue
\ifthu@degree@bachelor
\cleardoublepage
\def\thu@statement@name{声\hspace{2em}明}%
\else
\def\thu@statement@name{声\hspace{1em}明}%
\fi
\let\thu@statement@file\@empty
\kv@define@key{thu@statement}{page-style}{\thusetup{statement-page-style=##1}}%
\kv@define@key{thu@statement}{file}{\let\thu@statement@file\kv@value}%
\kv@set@family@handler{thu@statement}{%
\ifx\kv@value\relax
\let\thu@statement@file\kv@key
\else
\kv@handled@false
\fi
}%
\kvsetkeys{thu@statement}{#1}%
\ifthu@statement@page@style@auto
\ifx\thu@statement@file\@empty
\ifthu@degree@bachelor
\thusetup{statement-page-style = empty}%
\else
\thusetup{statement-page-style = plain}%
\fi
\else
\ifthu@degree@bachelor
\thusetup{statement-page-style = plain}%
\else
\thusetup{statement-page-style = empty}%
\fi
\fi
\fi
\ifx\thu@statement@file\@empty
\thusetup{language=chinese}%
\begingroup
\ifthu@degree@graduate
\ifthu@main@language@english
\ctexset{%
chapter/format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont,
}%
\fi
\fi
\thu@chapter*{\thu@statement@name}%
\endgroup
\thispagestyle{\thu@statement@page@style}%
\thu@statement@text\par
\ifthu@degree@graduate
\vskip 2cm%
\else
\null\par
\fi
{\hfill\thu@signature\thu@underline[2.5cm]\relax
\thu@backdate\thu@underline[2.5cm]\relax}%
\thu@reset@main@language
\else
\includepdf[pagecommand={%
\markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
\thispagestyle{\thu@statement@page@style}%
}]{\thu@statement@file}%
\fi
\ifthu@degree@bachelor
\cleardoublepage
\fi
}
\let\acknowledgement\acknowledgements
\let\endacknowledgement\endacknowledgements
\def\thu@listof#1{% #1: float type
\setcounter{tocdepth}{2} % restore tocdepth in case being modified
\@ifstar
{\thu@chapter*[]{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}
{\thu@chapter*{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}%
}
\renewcommand\listoffigures{%
\ifthu@degree@bachelor
\ifthu@backmatter\else
\thu@warning{The list of figures should be placed in back matter}%
\fi
\fi
\thu@listof{figure}%
}
\titlecontents{figure}
[\z@]{}
{\contentspush{\figurename~\thecontentslabel\quad}}{}
{\nobreak\thu@leaders\nobreak\hfil\thecontentspage}
\renewcommand\listoftables{%
\ifthu@degree@bachelor
\ifthu@backmatter\else
\thu@warning{The list of tables should be placed in back matter}%
\fi
\fi
\thu@listof{table}%
}
\titlecontents{table}
[\z@]{}
{\contentspush{\tablename~\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}
\newcommand\listoffiguresandtables{%
\ifthu@degree@bachelor
\thu@warning{The list of figures and tables are for graduates only}%
\listoffigures
\listoftables
\else
\thu@chapter*{\thu@list@figure@table@name}%
\@starttoc{lof}%
\par
\null\par
\@starttoc{lot}%
\fi
}
编译日志
其他信息
No response
Metadata
Metadata
Assignees
Labels
No labels