diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-29 21:18:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-29 21:18:58 +0000 |
commit | 29740d0452a743ccdc3345b0cf600c1a99424d8d (patch) | |
tree | 89dddbed44d5ad21b8bff7b855330751ba285d94 /Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls | |
parent | 7a2fe1d9507a254c7a80626380fc6af3449b5fee (diff) |
pkuthss (28apr15)
git-svn-id: svn://tug.org/texlive/trunk@37123 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls | 133 |
1 files changed, 75 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls index 05b67561f93..cf9edac2f87 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls @@ -3,7 +3,7 @@ % Peking University dissertation document class % % Copyright (c) 2008-2009 solvethis -% Copyright (c) 2010-2014 Casper Ti. Vector +% Copyright (c) 2010-2015 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 @@ -26,7 +26,7 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{pkuthss} - [2014/07/07 v1.5.5 Peking University dissertation document class] + [2015/04/28 v1.6.0 Peking University dissertation document class] % Process the encoding options. \newif\ifpkuthss@opt@gbk \pkuthss@opt@gbktrue @@ -50,8 +50,9 @@ } % Pass options to `pkuthss-extra'. % See pkuthss-extra.sty for an explanation of the options. +\pkuthss@int@extraopt{footfmt} +\pkuthss@int@extraopt{pkuspace} \pkuthss@int@extraopt{spacing} -\pkuthss@int@extraopt{tightlist} \pkuthss@int@extraopt{pdftoc} \pkuthss@int@extraopt{spechap} \pkuthss@int@extraopt{pdfprop} @@ -61,15 +62,15 @@ % Process all class options now. \ProcessOptions\relax -% pkuthss is based on ctexbook; We use `xiao 4' as default font size. -% CJKfntef provides \CJKunderline used in \maketitle. -% fancyhdr provides utilities for setting headers and footers. +% pkuthss is based on ctexbook; we use `xiao 4' as default font size. +% CJKfntef provides `\CJKunderline' used in `\maketitle'. +% fancyhdr provides utilities for setting up headers and footers. \LoadClass[hyperref, cs4size, fntef, fancyhdr]{ctexbook}[2011/03/11] -% Provide support for `key = val' grammar. +% Provides support for `key = val' grammar. \RequirePackage{keyval} % Graphics support. \RequirePackage{graphicx}[1999/02/16] -% Provide utilities for setting page layout. +% Provides utilities for setting up page layout. \RequirePackage{geometry} % Whether to enable the default extra settings. \ifpkuthss@opt@extra\RequirePackage{pkuthss-extra}\fi @@ -92,43 +93,62 @@ \fi \AtEndOfClass{ - % Setting chinese captions and labels. + % Set up chinese captions and labels. \ifpkuthss@opt@gbk\input{pkuthss-gbk.def} \else\input{pkuthss-utf8.def} \fi } -% Set page layout. +% Set up page layout. \geometry{ - a4paper, height = 240mm, width = 150mm, includeheadfoot, headheight = 1.2em + a4paper, includefoot, hmargin = 2.6cm, top = 3cm, bottom = 2.5cm, + headheight = 1.5cm, headsep = 0.5cm, footskip = 0.75cm } -% Internal command to set headers and footers. + +% Set up spacing for displayed formulae. +\setlength{\abovedisplayskip}{6bp plus 1.5bp minus 3.5bp} +\setlength{\abovedisplayshortskip}{3bp plus 0.75bp minus 1.75bp} +\setlength{\belowdisplayshortskip}{3bp plus 0.75bp minus 1.75bp} +\setlength{\belowdisplayskip}{6bp plus 1.5bp minus 3.5bp} + +% Set up chapter/section/... captions. +\CTEXsetup[ + nameformat = {\zihao{-2}\bfseries}, + titleformat = {\zihao{-2}\bfseries}, + beforeskip = {20bp}, afterskip = {18bp} +]{chapter} +\CTEXsetup[ + format = {\zihao{-3}\bfseries}, + beforeskip = {-20bp plus -1ex minus -0.2ex}, + afterskip = {6bp plus 0.2ex} +]{section} +\CTEXsetup[ + format = {\zihao{4}\bfseries}, + beforeskip = {-12bp plus -1ex minus -0.2ex}, + afterskip = {6bp plus 0.2ex} +]{subsection} +\CTEXsetup[ + format = {\bfseries}, + beforeskip = {-12bp plus -1ex minus -0.2ex}, + afterskip = {6bp plus 0.2ex} +]{subsubsection} + +% Internal command to set up headers and footers. \def\pkuthss@int@setpagestyle{ - % Set the headers and footers on the first page in every chapter. + % The actual setup commands. \fancypagestyle{plain}{ - \fancyhf{}\renewcommand*{\headrulewidth}{0pt} - \if@twoside - \fancyfoot[RO,LE]{\small\normalfont --~\thepage~--} - \else - \fancyfoot[C]{\small\normalfont --~\thepage~--} - \fi - } - % Set the headers and footers on other pages. - \fancypagestyle{pkuthss}{ - \fancyhf{} + \fancyhf{}\renewcommand*{\headrulewidth}{0.75bp} + \fancyfoot[C]{\zihao{5}\normalfont{\thepage}} \if@twoside - \fancyhead[LE]{\small\normalfont\pkuthss@int@setcase{\leftmark}} - \fancyhead[RO]{\small\normalfont\pkuthss@int@setcase{\rightmark}} - \fancyhead[LO,RE]{\small\normalfont\cuniversity\cthesisname} - \fancyfoot[RO,LE]{\small\normalfont --~\thepage~--} + \fancyhead[CE]{\zihao{5}\normalfont{\cuniversity\cthesisname}} + \fancyhead[CO]{\zihao{5}\normalfont\pkuthss@int@setcase{\leftmark}} \else - \fancyhead[L]{\small\normalfont\pkuthss@int@setcase{\leftmark}} - \fancyhead[R]{\small\normalfont\pkuthss@int@setcase{\rightmark}} - \fancyfoot[C]{\small\normalfont --~\thepage~--} + \fancyhead[C]{\zihao{5}\normalfont\pkuthss@int@setcase{\leftmark}} \fi } - \pagestyle{pkuthss} + \pagestyle{plain} } + % `\MakeUppercase' works problematically. % eg. it converts `\cite{ctex}' into `\cite{CTEX}'. % This option can disable `\MakeUppercase' in left/right heading marks. @@ -159,7 +179,7 @@ \def\pkuthss@int@infoitemb#1{ \define@key{pkuthss@info}{#1}{\@namedef{#1}{##1}} } -% Setting document information entries. +% Set up document information entries. \pkuthss@int@infoitema{ctitle} \pkuthss@int@infoitema{etitle} \pkuthss@int@infoitema{cauthor} @@ -180,7 +200,7 @@ \pkuthss@int@infoitemb{ethesisname} \pkuthss@int@infoitemb{cabstractname} \pkuthss@int@infoitemb{eabstractname} -% Set document information using the `key = value' grammar. +% Set up document information using the `key = value' grammar. \newcommand*{\pkuthssinfo}[1]{\setkeys{pkuthss@info}{#1}} % Usage: \pkuthss@int@fillinblank{(number of lines)}{(line width)}{(contents)} @@ -208,7 +228,7 @@ % 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. + % It will be nicer to use this line skip level in the title page. \linespread{1.6}\selectfont % Make the title page centered. \begin{center} @@ -229,55 +249,52 @@ % Information about the author. { % Slightly adjust the line skip when using new font size. - \zihao{-2}\linespread{1.75}\selectfont + \zihao{3}\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@cmentor} & - \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmentor} \\ + {\heiti\label@cauthor} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@cauthor} \\ + {\heiti\label@studentid} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@studentid} \\ + {\heiti\label@school} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@school} \\ + {\heiti\label@cmajor} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@cmajor} \\ + {\heiti\label@direction} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@direction} \\ + {\heiti\label@cmentor} & + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\fangsong\@cmentor} \\ \end{tabular} } \vfill % Date. - {\kaishu\zihao{2}\@date} + {\zihao{-2}\@date} \end{center} \end{titlepage} } -% Typesetting the Chinese abstract. +% Typeset the Chinese abstract. \newenvironment{cabstract}{ \cleardoublepage \pdfbookmark[1]{\cabstractname}{cabstract} - \chapter*{\zihao{-2}\cabstractname} + \chapter*{\cabstractname} \markboth{\cabstractname}{} }{% Keywords at the bottom of the page. \vfill\noindent\textbf{\label@ckeywords}{\@ckeywords} } -% Typesetting the English abstract. +% Typeset the English abstract. \newenvironment{eabstract}{ \cleardoublepage \pdfbookmark[1]{\eabstractname}{eabstract} - \chapter*{\zihao{-2}\@etitle} + \chapter*{\sffamily\@etitle} \markboth{\eabstractname}{} - \vspace{-2em}\par \begin{center} - \zihao{-3} {\@eauthor} ({\@emajor})\\ - {\label@ementor}{\@ementor} + {\label@ementor}{\@ementor}\\[2em] + \textbf{\sffamily\eabstractname} \end{center} - \vspace{1em}\par - \section*{\zihao{4}\eabstractname} - \vskip 0.5em + \par }{% Keywords at the bottom of the page. \vfill\noindent\textbf{\label@ekeywords}{\@ekeywords} } |