summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-10-13 09:59:21 +0000
committerNorbert Preining <preining@logic.at>2012-10-13 09:59:21 +0000
commit71f4dd313248c2db8fef21a4c5c3d3c14a5af46a (patch)
tree1e962c8cb5102077c7ea82fe32614ef4e129eef6 /Master/texmf-dist/tex
parentff9712db1ca63bc7701b625784c67abee7e1f17c (diff)
new latex package pkuthss (13Oct)
git-svn-id: svn://tug.org/texlive/trunk@27955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty166
-rw-r--r--Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def49
-rw-r--r--Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def49
-rw-r--r--Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls282
4 files changed, 546 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty
new file mode 100644
index 00000000000..a16e4a1e35d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty
@@ -0,0 +1,166 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Peking University dissertation document class
+%
+% Copyright (c) 2008-2009 solvethis
+% Copyright (c) 2010-2012 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
+% your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% The current maintainer of this work is Casper Ti. Vector.
+%
+% This work consists of the following files:
+% pkuthss.cls
+% pkuthss-gbk.def
+% pkuthss-utf8.def
+% pkuthss-extra.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{pkuthss-extra}
+ [2012/10/11 v1.4-beta2 Common extra settings for the pkuthss document class]
+
+% Check the dependency of pkuthss.
+\@ifclassloaded{pkuthss}{}{
+ \PackageError{pkuthss-extra}%
+ {The pkuthss document class is not loaded}%
+ {The pkuthss-extra package depends on the pkuthss document class.}
+}
+
+% eg. `\pkuthssextra@int@boolopt{spacing}{true}' will expand to:
+% \newif\ifpkuthssextra@opt@spacing \pkuthssextra@opt@spacingtrue
+% \DeclareOption{spacing}{\pkuthssextra@opt@spacingtrue}
+% \DeclareOption{nospacing}{\pkuthssextra@opt@spacingfalse}
+\def\pkuthssextra@int@boolopt#1#2{
+ \expandafter\newif\csname ifpkuthssextra@opt@#1\endcsname
+ \@nameuse{pkuthssextra@opt@#1#2}
+ \DeclareOption{#1}{\@nameuse{pkuthssextra@opt@#1true}}
+ \DeclareOption{no#1}{\@nameuse{pkuthssextra@opt@#1false}}
+}
+% Whethet to use some common settings for adjusting spacing.
+\pkuthssextra@int@boolopt{spacing}{true}
+% Whether to use list environments that are tighter than LaTeX defaults.
+\pkuthssextra@int@boolopt{tightlist}{true}
+% Whether to use some common settings about table of contents, bibliography and
+% indexes.
+\pkuthssextra@int@boolopt{pdftoc}{true}
+% Whether to enable `\Uppercase' (works problematically) in heading marks.
+\pkuthssextra@int@boolopt{uppermark}{false}
+% Whether to enable the `\spacialchap' command.
+\pkuthssextra@int@boolopt{spechap}{true}
+% Whether to automatically set properties for generated PDF from user defined
+% document information (author, title, etc.).
+\pkuthssextra@int@boolopt{pdfprop}{true}
+% Whether to use coloured hyperlinks in generated PDF.
+\pkuthssextra@int@boolopt{colorlinks}{true}
+% Process all class options now.
+\ProcessOptions\relax
+
+\ifpkuthssextra@opt@spacing
+ % Automatically ignore spaces between CJK characters and preserve spaces in other
+ % situations. XeCJK itself will handle this issue, therefore we do not use
+ % `CJKspace' when using XeLaTeX.
+ \unless\ifxetex\RequirePackage{CJKspace}\fi
+ % Make spacing nicer in some situations (eg. footnotes and verbatims).
+ \RequirePackage{setspace}
+ % Make the text area centered in the page.
+ \geometry{centering}
+ % Set line skip.
+ \linespread{1.41}\selectfont
+ % Automatically insert a space between the label and the text in footnotes.
+ \RequirePackage{footmisc}
+ \renewcommand{\footnotelayout}{\ }
+\fi
+
+\ifpkuthssextra@opt@tightlist
+ % Lists often appear to be too sparse when items are just one or two lines long.
+ % Here we cancel the extra vertical spacing between list items.
+ % Biblatex uses `\itemsep' as default `\bibitemsep', no need to change it.
+ \RequirePackage{enumitem}
+ \setlist{nolistsep}
+\fi
+
+\ifpkuthssextra@opt@pdftoc
+ % Add PDF bookmark for table of contents.
+ \let\pkuthssextra@tmp@tableofcontents\tableofcontents
+ \renewcommand{\tableofcontents}{
+ % Make the `Contents' bookmark point correctly to the title of the table of
+ % contents.
+ \cleardoublepage
+ % Actually add the PDF bookmark.
+ \pdfbookmark[1]{\contentsname}{contents}
+ \pkuthssextra@tmp@tableofcontents
+ }
+\fi
+
+\ifpkuthssextra@opt@spechap
+ % This command is used to start a chapter without numbering, and correctly set
+ % the headers and footers in the chapter.
+ \newcommand\specialchap[1]{
+ \chapter*{#1}\addcontentsline{toc}{chapter}{#1}
+ \markboth{#1}{}\phantomsection
+ }
+\fi
+
+\AtBeginDocument{
+ % `\MakeUppercase' works problematically.
+ % eg. it converts `\cite{ctex}' into `\cite{CTEX}'.
+ % This option can disable `\MakeUppercase' in left/right heading marks.
+ \unless\ifpkuthssextra@opt@uppermark
+ % Code modified from part of ctex-book.def in `ctex' package.
+ % The main difference is the deletion of calls to `\MakeUppercase' here.
+ \if@twoside
+ \renewcommand\chaptermark[1]{%
+ \markboth{%
+ \ifnum\value{secnumdepth}>-1 \if@mainmatter \CTEXthechapter \quad \fi\fi
+ #1%
+ }{}%
+ }
+ \renewcommand\sectionmark[1]{%
+ \markright{\ifnum\value{secnumdepth}>-1 \CTEXthesection \quad \fi #1}%
+ }
+ % One side typesetting should also be considered.
+ \else
+ \renewcommand\chaptermark[1]{%
+ \markright{%
+ \ifnum\value{secnumdepth}>-1 \if@mainmatter \CTEXthechapter \quad \fi\fi
+ #1%
+ }%
+ }
+ \fi
+ \fi
+
+ \ifpkuthssextra@opt@pdfprop
+ % Automatically generate properties for generated PDF.
+ % Use English properties to avoid problems with character encodings.
+ \newcommand{\setpdfproperties}{
+ \hypersetup{
+ pdfauthor = {\@eauthor}, pdftitle = {\@etitle},
+ pdfsubject = {\euniversity\ \ethesisname}, pdfkeywords = {\@ekeywords}
+ }
+ }
+ % Set the properties when generating the title page because the document
+ % information should have been all defined before this.
+ \let\pkuthssextra@tmp@maketitle\maketitle
+ % NOTE: `\hypersetup' must appear before `\maketitle', otherwise it might not
+ % act as wished.
+ \renewcommand\maketitle{\setpdfproperties\pkuthssextra@tmp@maketitle}
+ \fi
+
+ \ifpkuthssextra@opt@colorlinks
+ % Use coloured hyperlinks in generated PDF.
+ \hypersetup{colorlinks = true, allcolors = blue}
+ \else
+ % Set hyperlink colour to black in order to prevent hyperlinks from being too
+ % hard-to-recognise in printed thesis.
+ \hypersetup{colorlinks = false, pdfborder = {0 0 0}}
+ \fi
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def
new file mode 100644
index 00000000000..db2862a542e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def
@@ -0,0 +1,49 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Peking University dissertation document class
+%
+% Copyright (c) 2008-2009 solvethis
+% Copyright (c) 2010-2012 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
+% your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% The current maintainer of this work is Casper Ti. Vector.
+%
+% This work consists of the following files:
+% pkuthss.cls
+% pkuthss-gbk.def
+% pkuthss-utf8.def
+% pkuthss-extra.sty
+
+\ProvidesFile{pkuthss-gbk.def}
+ [2012/10/11 v1.4-beta2 Labels and captions in GBK encoding
+ for the pkuthss document class]
+
+\def\label@ctitle{题目:}
+\def\label@cauthor{姓\hphantom{汉字}名:}
+\def\label@studentid{学\hphantom{汉字}号:}
+\def\label@school{院\hphantom{汉字}系:}
+\def\label@cmajor{专\hphantom{汉字}业:}
+\def\label@direction{研究方向:}
+\def\label@cmentora{导\hphantom{汉字}师:}
+\def\label@cmentorb{导师:}
+\def\label@ementor{Directed by\ }
+\def\label@ckeywords{关键词:}
+\def\label@ekeywords{Keywords:\ }
+
+\def\titlepagename{封面}
+\def\cuniversity{北京大学}
+\def\euniversity{Peking University}
+\def\cthesisname{博士研究生学位论文}
+\def\ethesisname{Doctor Thesis}
+\def\cabstractname{摘要}
+\def\eabstractname{Abstract}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def
new file mode 100644
index 00000000000..10d6ea71f9a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def
@@ -0,0 +1,49 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Peking University dissertation document class
+%
+% Copyright (c) 2008-2009 solvethis
+% Copyright (c) 2010-2012 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
+% your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% The current maintainer of this work is Casper Ti. Vector.
+%
+% This work consists of the following files:
+% pkuthss.cls
+% pkuthss-gbk.def
+% pkuthss-utf8.def
+% pkuthss-extra.sty
+
+\ProvidesFile{pkuthss-utf8.def}
+ [2012/10/11 v1.4-beta2 Labels and captions in UTF-8 encoding
+ for the pkuthss document class]
+
+\def\label@ctitle{棰樼洰锛殅
+\def\label@cauthor{濮揬hphantom{姹夊瓧}鍚嶏細}
+\def\label@studentid{瀛hphantom{姹夊瓧}鍙凤細}
+\def\label@school{闄hphantom{姹夊瓧}绯伙細}
+\def\label@cmajor{涓揬hphantom{姹夊瓧}涓氾細}
+\def\label@direction{鐮旂┒鏂瑰悜锛殅
+\def\label@cmentora{瀵糪hphantom{姹夊瓧}甯堬細}
+\def\label@cmentorb{瀵煎笀锛殅
+\def\label@ementor{Directed by\ }
+\def\label@ckeywords{鍏抽敭璇嶏細}
+\def\label@ekeywords{Keywords:\ }
+
+\def\titlepagename{灏侀潰}
+\def\cuniversity{鍖椾含澶у}
+\def\euniversity{Peking University}
+\def\cthesisname{鍗氬+鐮旂┒鐢熷浣嶈鏂噠
+\def\ethesisname{Doctor Thesis}
+\def\cabstractname{鎽樿}
+\def\eabstractname{Abstract}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls
new file mode 100644
index 00000000000..8683162ce1c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls
@@ -0,0 +1,282 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Peking University dissertation document class
+%
+% Copyright (c) 2008-2009 solvethis
+% Copyright (c) 2010-2012 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
+% your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% The current maintainer of this work is Casper Ti. Vector.
+%
+% This work consists of the following files:
+% pkuthss.cls
+% pkuthss-gbk.def
+% pkuthss-utf8.def
+% pkuthss-extra.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{pkuthss}
+ [2012/10/11 v1.4-beta2 Peking University dissertation document class]
+
+% Process the encoding options.
+\newif\ifpkuthss@opt@gbk \pkuthss@opt@gbktrue
+\DeclareOption{GBK}{\pkuthss@opt@gbktrue\PassOptionsToClass{GBK}{ctexbook}}
+\DeclareOption{UTF8}%
+ {\pkuthss@opt@gbkfalse\PassOptionsToClass{UTF8}{ctexbook}}
+% Whether to enable the default extra settings.
+\newif\ifpkuthss@opt@extra \pkuthss@opt@extratrue
+\DeclareOption{extra}{\pkuthss@opt@extratrue}
+\DeclareOption{noextra}{\pkuthss@opt@extrafalse}
+% eg. `\pkuthss@int@extraopt{spacing}' will expand to:
+% \DeclareOption{spacing}{\PassOptionsToClass{spacing}{pkuthss-extra}}
+% \DeclareOption{nospacing}{\PassOptionsToClass{nospacing}{pkuthss-extra}}
+\def\pkuthss@int@extraopt#1{
+ \DeclareOption{#1}{\PassOptionsToClass{#1}{pkuthss-extra}}
+ \DeclareOption{no#1}{\PassOptionsToClass{no#1}{pkuthss-extra}}
+}
+% Pass options to `pkuthss-extra'.
+% See pkuthss-extra.sty for an explanation of the options.
+\pkuthss@int@extraopt{spacing}
+\pkuthss@int@extraopt{tightlist}
+\pkuthss@int@extraopt{pdftoc}
+\pkuthss@int@extraopt{uppermark}
+\pkuthss@int@extraopt{spechap}
+\pkuthss@int@extraopt{pdfprop}
+\pkuthss@int@extraopt{colorlinks}
+% Pass all other options to `ctexbook' document class.
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
+% Process all class options now.
+\ProcessOptions\relax
+
+% pkuthss is based on ctexbook; We use A4 paper, and `xiao 4' as default font size.
+% CJKfntef provides \CJKunderline used in \maketitle.
+% fancyhdr provides utilities for setting headers and footers.
+\LoadClass[fntef,a4paper,fancyhdr,cs4size]{ctexbook}[2009/10/20]
+% Provide support for `key = val' grammar.
+\RequirePackage{keyval}
+% Graphics support.
+\RequirePackage{graphicx}[1999/02/16]
+% Provide utilities for setting page layout.
+\RequirePackage{geometry}
+% Provide \AtEndPreamble used later.
+% To be removed by summer in 2013, see the fix of `\hypersetup' below.
+\RequirePackage{etoolbox}
+% Whether to enable the default extra settings.
+\ifpkuthss@opt@extra\RequirePackage{pkuthss-extra}\fi
+
+\ifxetex\ifpkuthss@opt@gbk
+ % No support for XeLaTeX compilation in non-unicode encoding, i.e. GBK.
+ \ClassError{pkuthss}%
+ {XeLaTeX compilation is not supported without UTF-8}%
+ {%
+ XeLaTeX compilation without UTF-8 is very problematic.\MessageBreak
+ Therefore please use UTF-8 encoding for the LaTeX code.%
+ }
+\fi\fi
+
+\AtEndOfClass{
+ % Setting chinese captions and labels.
+ \ifpkuthss@opt@gbk\input{pkuthss-gbk.def}
+ \else\input{pkuthss-utf8.def}
+ \fi
+
+ % Automatically generate hyperlinks and bookmarks for table of contents,
+ % citations and index.
+ % Code copied with minor modifications from ctex-common.def in `ctex' package.
+ % Not directly using the `hyperref' option of `ctex' package in order to avoid
+ % the conflicts caused by loading of `hyperref' before `setspace' in `ctex'
+ % package older than 1.02c.
+ % This piece of code will be removed by summer in 2013, and we will use the
+ % `hyperref' option of `ctex' package instead, considering most people
+ % will be using newer versions of `ctex' package at that time.
+ \providecommand\hypersetup[1]{\PassOptionsToPackage{#1}{hyperref}}
+ \AtEndPreamble{\RequirePackage{hyperref}}
+ \ifpkuthss@opt@gbk
+ \unless\ifxetex
+ \hypersetup{CJKbookmarks}
+ \unless\ifpdf
+ \AtBeginDvi{\special{pdf:tounicode GBK-EUC-UCS2}}
+ \fi
+ \fi
+ \else
+ \hypersetup{unicode}
+ \fi
+ \hypersetup{driverfallback = dvipdfmx}
+}
+
+% Set page layout.
+\geometry{height = 240mm, width = 150mm, includeheadfoot, headheight = 1.2em}
+% Set headers and footers.
+\pagestyle{fancy}\fancyhf{}
+\fancyhead[LE]{\small\normalfont\leftmark}
+\fancyhead[RO]{\small\normalfont\rightmark}
+\fancyhead[LO,RE]{\small\normalfont\cuniversity\cthesisname}
+\fancyfoot[RO,LE]{\small\normalfont --~\thepage~--}
+% Set the headers and footers on the first page in every chapter.
+\fancypagestyle{plain}{
+ \fancyhf{}\renewcommand{\headrulewidth}{0pt}
+ \fancyfoot[RO,LE]{\small\normalfont --~\thepage~--}
+}
+
+% eg. `\pkuthss@int@infoitema{ctitle}' will expand to:
+% \def\ctitle#1{\def\@ctitle{#1}}
+% \define@key{pkuthss@info}{ctitle}{\ctitle{#1}}
+\def\pkuthss@int@infoitema#1{
+ \@namedef{#1}##1{\@namedef{@#1}{##1}}
+ \define@key{pkuthss@info}{#1}{\@nameuse{#1}{##1}}
+}
+% eg. `\pkuthss@int@infoitemb{cuniversity}' will expand to:
+% \define@key{pkuthss@info}{cuniversity}{\def\cuniversity{#1}}
+\def\pkuthss@int@infoitemb#1{
+ \define@key{pkuthss@info}{#1}{\@namedef{#1}{##1}}
+}
+% Setting document information entries.
+\pkuthss@int@infoitema{ctitle}
+\pkuthss@int@infoitema{etitle}
+\pkuthss@int@infoitema{cauthor}
+\pkuthss@int@infoitema{eauthor}
+\pkuthss@int@infoitema{studentid}
+\pkuthss@int@infoitema{date}
+\pkuthss@int@infoitema{school}
+\pkuthss@int@infoitema{cmajor}
+\pkuthss@int@infoitema{emajor}
+\pkuthss@int@infoitema{direction}
+\pkuthss@int@infoitema{cmentor}
+\pkuthss@int@infoitema{ementor}
+\pkuthss@int@infoitema{ckeywords}
+\pkuthss@int@infoitema{ekeywords}
+\pkuthss@int@infoitemb{cuniversity}
+\pkuthss@int@infoitemb{euniversity}
+\pkuthss@int@infoitemb{cthesisname}
+\pkuthss@int@infoitemb{ethesisname}
+\pkuthss@int@infoitemb{cabstractname}
+\pkuthss@int@infoitemb{eabstractname}
+% Set document information using the `key = value' grammar.
+\newcommand{\pkuthssinfo}[1]{\setkeys{pkuthss@info}{#1}}
+
+% 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}{%
+ \newcount\pkuthss@tmp@linecount
+ \pkuthss@tmp@linecount=#1
+ \loop\ifnum\pkuthss@tmp@linecount>0
+ % Fill specified space with underline on the bottom line. `\underline'
+ % draws line on the baseline (not the bottom line), and this is why
+ % `\CJKunderline' is used here instead.
+ \ifnum\pkuthss@tmp@linecount=1
+ \CJKunderline{\makebox[#2]{}}
+ \else
+ \CJKunderline{\makebox[#2]{}}\\
+ \fi
+ \advance\pkuthss@tmp@linecount by -1\relax
+ \repeat%
+ }%
+}
+% Set format of the title page (cover).
+\renewcommand{\maketitle}{
+ \cleardoublepage
+ % Add PDF bookmark for the title page.
+ \pdfbookmark[1]{\titlepagename}{titlepage}
+ \begin{titlepage}
+ % It will be more nice to use this line skip level in the title page.
+ \linespread{1.6}\selectfont
+ % Make the title page centered.
+ \begin{center}
+ % Emblem and inscription of the university, and type of thesis.
+ {
+ \zihao{1}%
+ \includegraphics[height = 2.4em]{img/pkulogo}\hspace{0.4em}%
+ \raisebox{0.4em}{\includegraphics[height = 1.6em]{img/pkuword}}\\[0.8em]
+ {\bfseries{\cthesisname}}
+ }
+ \vfill
+ % Title of the thesis.
+ {
+ \zihao{2}{\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}{\pkuthss@tmp@len}{\kaishu\@cauthor} \\
+ {\label@studentid} &
+ \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@studentid} \\
+ {\label@school} &
+ \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@school} \\
+ {\label@cmajor} &
+ \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmajor} \\
+ {\label@direction} &
+ \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@direction} \\
+ {\label@cmentora} &
+ \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmentor} \\
+ \end{tabular}
+ }
+ \vfill
+ % Date.
+ {\kaishu\zihao{2}\@date}
+ \end{center}
+ \end{titlepage}
+}
+
+% Internal environment for typesetting abstracts.
+\newenvironment{pkuthss@int@abstract}{
+ \cleardoublepage
+ \pdfbookmark[1]{\pkuthss@tmp@abstractname}{\pkuthss@tmp@abstlabel}
+ \chapter*{\zihao{-2}\pkuthss@tmp@title}
+ \markboth{\pkuthss@tmp@abstractname}{}
+ \vspace{-2em}\par
+ \begin{center}
+ \zihao{-3}
+ {\pkuthss@tmp@author}\quad{\pkuthss@tmp@major}\\
+ {\pkuthss@tmp@label@mentor}{\pkuthss@tmp@mentor}
+ \end{center}
+ \vspace{1em}\par
+ \section*{\zihao{4}\pkuthss@tmp@abstractname}
+ \vskip 0.5em
+}{% Keywords at the bottom of the page.
+ \vfill\noindent\textbf{\pkuthss@tmp@label@keywords}{\pkuthss@tmp@keywords}
+}
+
+% Typesetting the Chinese abstract.
+\newenvironment{cabstract}{
+ \def\pkuthss@tmp@abstlabel{cabstract}
+ \let\pkuthss@tmp@title\@ctitle
+ \let\pkuthss@tmp@author\@cauthor
+ \let\pkuthss@tmp@major\@cmajor
+ \let\pkuthss@tmp@mentor\@cmentor
+ \let\pkuthss@tmp@keywords\@ckeywords
+ \let\pkuthss@tmp@label@mentor\label@cmentorb
+ \let\pkuthss@tmp@label@keywords\label@ckeywords
+ \let\pkuthss@tmp@abstractname\cabstractname
+ \begin{pkuthss@int@abstract}
+}{\end{pkuthss@int@abstract}}
+
+% Typesetting the English abstract.
+\newenvironment{eabstract}{
+ \def\pkuthss@tmp@abstlabel{eabstract}
+ \let\pkuthss@tmp@title\@etitle
+ \let\pkuthss@tmp@author\@eauthor
+ \let\pkuthss@tmp@major\@emajor
+ \let\pkuthss@tmp@mentor\@ementor
+ \let\pkuthss@tmp@keywords\@ekeywords
+ \let\pkuthss@tmp@label@mentor\label@ementor
+ \let\pkuthss@tmp@label@keywords\label@ekeywords
+ \let\pkuthss@tmp@abstractname\eabstractname
+ \begin{pkuthss@int@abstract}
+}{\end{pkuthss@int@abstract}}
+
+\endinput