Support `mentorlines' like casthss.

This commit is contained in:
Casper Ti. Vector 2021-04-16 23:17:24 +08:00
parent 2d373822f6
commit 3a9eed9141
5 changed files with 15 additions and 21 deletions

View File

@ -42,8 +42,9 @@
cauthor = {某某}, eauthor = {Test}, date = {某年某月},
studentid = {0123456789}, school = {某某学院},
cmajor = {某某专业}, emajor = {Some Major},
direction = {某某方向},
cmentor = {某某教授}, ementor = {Prof.\ Somebody},
direction = {某某方向}, mentorlines = {2},
cmentor = {某甲教授\\某乙教授},
ementor = {Prof.\ Somebody and Prof.\ Someone},
ckeywords = {其一,其二},
ekeywords = {First, Second},
% 以下两项无双盲评审需求的用户可保持原状。

View File

@ -207,6 +207,7 @@
出于兼容性的考虑,如果 \texttt{\string\thesiscover} 为空,
那么封面将显示 \texttt{\string\cthesisname}%
}
\item \texttt{\bfseries\string\mentorlines}:封面“导师”部分的行数。
\item \texttt{\bfseries\string\cabstractname}:摘要的中文标题。
\item \texttt{\bfseries\string\eabstractname}:摘要的西文标题。
\end{itemize}
@ -353,20 +354,7 @@ $TEXMFDIST/tex/latex/pkuthss/
一个常见的需求是封面中部分内容(特别是论文的标题、专业和研究方向)太长,
超出了在预设的空间。
此时,用户可以修改 \verb|pkuthss.cls| 里 \verb|\maketitle| 定义中
\verb|\thss@int@fillinblank| 宏的参数来改变
带下划线的空白的行数和行宽,其语法为:
\begin{Verbatim}
\thss@int@fillinblank{行数}{行宽}{内容}
\end{Verbatim}
例如,如果“研究方向”一栏需要两行的空白,
可以将 \verb|pkuthss.cls| 里的
\begin{Verbatim}
\thss@int@fillinblank{1}{\thss@tmp@len}{\kaishu\@direction}
\end{Verbatim}
改为
\begin{Verbatim}
\thss@int@fillinblank{2}{\thss@tmp@len}{\kaishu\@direction}
\end{Verbatim}
当然,为了美观,可以将多于一行的部分移到封面中作者信息部分的最下方。
\verb|\thss@int@fillinblank| 宏的参数来改变带下划线的空白的行数和行宽,
具体方法可以参考该文件中和 \verb|\mentorlines| 相关的代码。
% vim:ts=4:sw=4

View File

@ -63,8 +63,9 @@
date = {\zhdigits{2021}\zhnumber{3}},
studentid = {00910???}, school = {化学与分子工程学院},
cmajor = {应用化学}, emajor = {Applied Chemistry},
direction = {据说 Casper 自己也不知道},
cmentor = {XX 教授}, ementor = {Prof.\ XX},
direction = {据说 Casper 自己也不知道}, mentorlines = {2},
cmentor = {XX 教授\\YY 教授},
ementor = {Prof.\ XX and Prof.\ YY},
ckeywords = {\hologo{LaTeX},排版,文档类,\CTeX{}},
ekeywords = {\hologo{LaTeX}, Typesetting, Document class, \CTeX{}},
blindid = {???01900}, discipline = {化学}

View File

@ -235,6 +235,7 @@
\thss@int@infoitemb{cthesisname}
\thss@int@infoitemb{ethesisname}
\thss@int@infoitemb{thesiscover}
\thss@int@infoitemb{mentorlines}
\thss@int@infoitemb{cabstractname}
\thss@int@infoitemb{eabstractname}
% Set up document information using the `key = value' grammar.
@ -381,7 +382,8 @@
{\bfseries\label@direction} &
\thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@direction} \\
{\bfseries\label@cmentor} &
\thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cmentor} \\
\thss@int@fillinblank{\mentorlines}%
{\thss@tmp@len}{\fangsong\@cmentor} \\
\end{tabular}%
}
\vfill

View File

@ -1,6 +1,7 @@
% Peking University dissertation document class
%
% Copyright (c) 2021 Casper Ti. Vector
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2013,2015,2021 Casper Ti. Vector
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of this license or (at
@ -28,6 +29,7 @@
\def\euniversity{Peking University}
\def\ethesisname{Doctor Thesis}
\def\thesiscover{}
\def\mentorlines{1}
\def\eabstractname{ABSTRACT}
\ifthss@opt@ugly