Further reduce duplication; update documentation.
This commit is contained in:
parent
c7d9a92f07
commit
5e03865331
@ -36,8 +36,8 @@
|
||||
\begin{Verbatim}[frame = single]
|
||||
\documentclass[openany, ...]{pkuthss} % 每章从任意页开始。
|
||||
\end{Verbatim}
|
||||
但这样设置时左右(奇偶)页页眉页脚设置仍然是不同的。
|
||||
如果需要使奇偶页页眉页脚设置一致,可以直接采用单面模式:
|
||||
但这样设置时左右(奇偶)页的页眉页脚设置仍然是不同的。
|
||||
如果需要使左右页的页眉页脚设置一致,可以直接采用单面模式:
|
||||
\begin{Verbatim}[frame = single]
|
||||
% 使用 oneside 选项时不需要再指定 openany 选项。
|
||||
\documentclass[oneside, ...]{pkuthss}
|
||||
@ -309,3 +309,29 @@
|
||||
\end{itemize}%
|
||||
}
|
||||
|
||||
\subsection{高级设置}
|
||||
|
||||
pkuthss 文档模版的实现是简洁、清晰、灵活的。
|
||||
当一些细节的自定义无法通过模版提供的外部接口实现时,
|
||||
我们鼓励用户(在适当理解相关部分代码的前提下)通过修改模版进行自定义。
|
||||
|
||||
一个常见的需求是封面中部分内容(特别是论文的标题、专业和研究方向)太长,
|
||||
超出了在预设的空间。
|
||||
此时,
|
||||
用户可以修改 \verb|pkuthss.cls| 里 \verb|\maketitle| 定义中
|
||||
\verb|\pkuthss@int@fillinblank| 宏的参数来改变
|
||||
带下划线的空白的行数和行宽,其语法为:
|
||||
\begin{Verbatim}[frame = single]
|
||||
\pkuthss@int@fillinblank{行数}{行宽}{内容}
|
||||
\end{Verbatim}
|
||||
例如,如果研究方向需要两行的空白,
|
||||
可以将 \verb|pkuthss.cls| 里的
|
||||
\begin{Verbatim}[frame = single]
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@direction}
|
||||
\end{Verbatim}
|
||||
改为
|
||||
\begin{Verbatim}[frame = single]
|
||||
\pkuthss@int@fillinblank{2}{\pkuthss@tmp@len}{\kaishu\@direction}
|
||||
\end{Verbatim}
|
||||
当然,为了美观,可以将多于一行的部分移到封面中作者信息部分的最下方。
|
||||
|
||||
|
||||
@ -166,9 +166,7 @@
|
||||
% Set document information using the `key = value' grammar.
|
||||
\newcommand{\pkuthssinfo}[1]{\setkeys{pkuthss@info}{#1}}
|
||||
|
||||
% Fill #3 into underlined blanks with width #2 and #3 lines.
|
||||
% For example, `\pkuthss@int@fillinblank{1}{4em}{test}' will generate "test"
|
||||
% filled on one line with width `4em'.
|
||||
% Usage: \pkuthss@int@fillinblank{(number of lines)}{(line width)}{(contents)}
|
||||
\def\pkuthss@int@fillinblank#1#2#3{
|
||||
\makebox[0pt][l]{\parbox[t]{#2}{\centering{#3}}}\mbox{}%
|
||||
\parbox[t]{#2}{%
|
||||
@ -207,26 +205,28 @@
|
||||
% Title of the thesis.
|
||||
{
|
||||
\zihao{2}
|
||||
{\label@ctitle}\pkuthss@int@fillinblank{2}{12em}{\textbf{\@ctitle}}
|
||||
{\label@ctitle}%
|
||||
\pkuthss@int@fillinblank{2}{0.64\textwidth}{\textbf{\@ctitle}}
|
||||
}
|
||||
\vfill
|
||||
% Information about the author.
|
||||
{
|
||||
% Slightly adjust the line skip when using new font size.
|
||||
\zihao{-2}\linespread{1.75}\selectfont
|
||||
\def\pkuthss@tmp@len{0.56\textwidth}
|
||||
\begin{tabular}{l@{\extracolsep{0.2em}}c}
|
||||
{\label@cauthor} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@cauthor} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cauthor} \\
|
||||
{\label@studentid} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@studentid} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@studentid} \\
|
||||
{\label@school} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@school} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@school} \\
|
||||
{\label@cmajor} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@cmajor} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmajor} \\
|
||||
{\label@direction} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@direction} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@direction} \\
|
||||
{\label@cmentora} &
|
||||
\pkuthss@int@fillinblank{1}{12em}{\kaishu\@cmentor} \\
|
||||
\pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmentor} \\
|
||||
\end{tabular}
|
||||
}
|
||||
\vfill
|
||||
|
||||
Loading…
Reference in New Issue
Block a user