Skip to content

Commit

Permalink
Include header and footer in statement page for graduates (Fix tuna#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Nov 9, 2020
1 parent cbdb372 commit 02c1eec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
点击版本号即可在 GitHub 上查看相邻版本间的代码变动。

## [Unreleased]
- 研究生的声明页默认加上页眉和页码,不受 `page-style` 的控制(#574)。

## [v7.1.0] - 2020-10-14
### Changed
Expand Down
5 changes: 2 additions & 3 deletions thuthesis-example.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@

% 声明
\statement
% 生成的声明页是否要插入页眉和页脚(默认 empty)
% 仅在需要进行电子签名时,才需要打开这一选项
% 插入的扫描声明页总是会生成页眉(研究生)和页脚,不受这一选项影响
% 本科生编译生成的声明页默认不带页码(page-style=empty),而在插入扫描版时补上页码。
% 如果使用电子签名,可以选择加上页码:
% \statement[page-style=plain]
% 将签字扫描后的声明文件 scan-statement.pdf 替换原始页面
% \statement[file=scan-statement.pdf]
Expand Down
21 changes: 15 additions & 6 deletions thuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -958,22 +958,26 @@
%
% \subsubsection{声明}
% \DescribeMacro{\statement}
% 如果使用声明扫描页,将可选参数指定为扫描后的 PDF 文件名,例如:
% 直接使用 \cs{statement} 命令可以编译生成声明页。
% 如果要插入扫描后的声明页,将可选参数指定为扫描后的 PDF 文件名,例如:
%
% \begin{latex}
% \statement[file=scan-statement.pdf]
% \end{latex}
%
% 由于打印版和电子版有空白页的差别,声明的页码可能不同。
% 所以编译声明页时默认不加页眉和页脚(\texttt{page-style=empty}),
% 在签字后插入扫描页时再补上页眉和页脚,防止页码冲突。
% 由于本科生打印版和电子版有空白页的差别,声明的页码可能不同。
% 所以编译声明页时默认不加页脚(\texttt{page-style=empty}),
% 在签字后插入扫描页时再补上页脚,防止页码冲突。
%
% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),
% 可以使用在 \cs{statement} 命令设置
% \begin{latex}
% \statement[page-style=plain]
% \end{latex}
% 注意,插入扫描页总是会加页码,不受该选项控制。
% 注意,本科生插入扫描页时总是会加页码,不受该选项控制。
%
% 研究生不存在空白页的问题,所以在编译声明页时总是会加上页眉和页脚,
% 而在插入扫描页时则不再添加,不受 \option{page-style} 的控制。
%
% \subsubsection{附录}
%
Expand Down Expand Up @@ -4293,7 +4297,9 @@
\kvsetkeys{thu@statement}{#1}%
\ifx\thu@statement@file\@empty
\thu@chapter*{\thu@statement@name}%
\thispagestyle{\thu@statement@page@style}%
\ifthu@degree@bachelor
\thispagestyle{\thu@statement@page@style}%
\fi
\thu@statement@text\par
\ifthu@degree@graduate
\vskip 2cm%
Expand All @@ -4307,6 +4313,9 @@
\markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
\ifthu@degree@bachelor\else
\thispagestyle{empty}%
\fi
}]{\thu@statement@file}%
\fi
\ifthu@degree@bachelor
Expand Down

0 comments on commit 02c1eec

Please sign in to comment.