diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/pkuthss')
4 files changed, 85 insertions, 93 deletions
diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty index 47910fefebf..0515be72cfb 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty @@ -24,7 +24,7 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{pkuthss-extra} - [2013/04/07 v1.4-rc3 Common extra settings for the pkuthss document class] + [2013/12/26 v1.4-rc4 Common extra settings for the pkuthss document class] % Check the dependency of pkuthss. \@ifclassloaded{pkuthss}{}{ @@ -47,10 +47,10 @@ \pkuthssextra@int@boolopt{spacing}{true} % Whether to use list environments that are tighter than LaTeX defaults. \pkuthssextra@int@boolopt{tightlist}{true} +% Whether to let captions use a different font from the main text. +\pkuthssextra@int@boolopt{caption}{true} % Add PDF bookmark for table of contents. \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 @@ -85,6 +85,12 @@ \setlist{nolistsep} \fi +\ifpkuthssextra@opt@caption + % According to common aesthetics of typography, it is nice to make the font of + % captions lighter than main text, and tables lighter than captions. + \RequirePackage[font = it]{caption} +\fi + \ifpkuthssextra@opt@pdftoc % Add PDF bookmark for table of contents. \let\pkuthssextra@tmp@tableofcontents\tableofcontents @@ -108,33 +114,6 @@ \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. @@ -158,7 +137,7 @@ \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}} + \hypersetup{hidelinks = true} \fi } diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def index d18b26501af..d98f7b75b41 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def @@ -23,7 +23,7 @@ % pkuthss-extra.sty \ProvidesFile{pkuthss-gbk.def} - [2013/04/07 v1.4-rc3 Labels and captions in GBK encoding + [2013/12/26 v1.4-rc4 Labels and captions in GBK encoding for the pkuthss document class] \def\label@ctitle{题目:} @@ -32,8 +32,7 @@ \def\label@school{院\hphantom{汉字}系:} \def\label@cmajor{专\hphantom{汉字}业:} \def\label@direction{研究方向:} -\def\label@cmentora{导\hphantom{汉字}师:} -\def\label@cmentorb{导师:} +\def\label@cmentor{导\hphantom{汉字}师:} \def\label@ementor{Directed by\ } \def\label@ckeywords{关键词:} \def\label@ekeywords{Keywords:\ } diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def index 794d79a65ab..4d2e7067f81 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def @@ -23,7 +23,7 @@ % pkuthss-extra.sty \ProvidesFile{pkuthss-utf8.def} - [2013/04/07 v1.4-rc3 Labels and captions in UTF-8 encoding + [2013/12/26 v1.4-rc4 Labels and captions in UTF-8 encoding for the pkuthss document class] \def\label@ctitle{棰樼洰锛殅 @@ -32,8 +32,7 @@ \def\label@school{闄hphantom{姹夊瓧}绯伙細} \def\label@cmajor{涓揬hphantom{姹夊瓧}涓氾細} \def\label@direction{鐮旂┒鏂瑰悜锛殅 -\def\label@cmentora{瀵糪hphantom{姹夊瓧}甯堬細} -\def\label@cmentorb{瀵煎笀锛殅 +\def\label@cmentor{瀵糪hphantom{姹夊瓧}甯堬細} \def\label@ementor{Directed by\ } \def\label@ckeywords{鍏抽敭璇嶏細} \def\label@ekeywords{Keywords:\ } diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls index b7cfc3e9186..0df8967a097 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls @@ -24,13 +24,17 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{pkuthss} - [2013/04/07 v1.4-rc3 Peking University dissertation document class] + [2013/12/26 v1.4-rc4 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 `\Uppercase' (works problematically) in heading marks. +\newif\ifpkuthss@opt@uppermark \pkuthss@opt@uppermarkfalse +\DeclareOption{uppermark}{\pkuthss@opt@uppermarktrue} +\DeclareOption{nouppermark}{\pkuthss@opt@uppermarkfalse} % Whether to enable the default extra settings. \newif\ifpkuthss@opt@extra \pkuthss@opt@extratrue \DeclareOption{extra}{\pkuthss@opt@extratrue} @@ -47,7 +51,6 @@ \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} @@ -56,10 +59,10 @@ % Process all class options now. \ProcessOptions\relax -% pkuthss is based on ctexbook; We use A4 paper, and `xiao 4' as default font size. +% 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. -\LoadClass[hyperref, a4paper, cs4size, fntef, fancyhdr]{ctexbook}[2011/03/11] +\LoadClass[hyperref, cs4size, fntef, fancyhdr]{ctexbook}[2011/03/11] % Provide support for `key = val' grammar. \RequirePackage{keyval} % Graphics support. @@ -87,18 +90,48 @@ } % 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~--} +\geometry{ + a4paper, height = 240mm, width = 150mm, includeheadfoot, headheight = 1.2em } +% Internal command to set headers and footers. +\def\pkuthss@int@setpagestyle{ + % Set the headers and footers on the first page in every chapter. + \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{} + \if@twoside + \fancyhead[LE]{\small\normalfont\pkuthss@int@setcase{\leftmark}} + \fancyhead[RO]{\small\normalfont\pkuthss@int@setcase{\rightmark}} + \fancyhead[LO,RE]{% + \small\normalfont\pkuthss@int@setcase{\cuniversity\cthesisname}% + } + \fancyfoot[RO,LE]{\small\normalfont --~\thepage~--} + \else + \fancyhead[L]{\small\normalfont\pkuthss@int@setcase{\leftmark}} + \fancyhead[R]{\small\normalfont\pkuthss@int@setcase{\rightmark}} + \fancyfoot[C]{\small\normalfont --~\thepage~--} + \fi + } + \pagestyle{pkuthss} +} +% `\MakeUppercase' works problematically. +% eg. it converts `\cite{ctex}' into `\cite{CTEX}'. +% This option can disable `\MakeUppercase' in left/right heading marks. +\ifpkuthss@opt@uppermark + \def\pkuthss@int@setcase#1{#1} + \pkuthss@int@setpagestyle +\else + \def\pkuthss@int@setcase#1{\nouppercase{#1}} + \pkuthss@int@setpagestyle +\fi % eg. `\pkuthss@int@infoitema{ctitle}' will expand to: % \def\ctitle#1{\def\@ctitle{#1}} @@ -190,12 +223,12 @@ {\label@studentid} & \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@studentid} \\ {\label@school} & - \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@school} \\ + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@school} \\ {\label@cmajor} & - \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmajor} \\ + \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmajor} \\ {\label@direction} & \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@direction} \\ - {\label@cmentora} & + {\label@cmentor} & \pkuthss@int@fillinblank{1}{\pkuthss@tmp@len}{\kaishu\@cmentor} \\ \end{tabular} } @@ -206,51 +239,33 @@ \end{titlepage} } -% Internal environment for typesetting abstracts. -\newenvironment{pkuthss@int@abstract}{ +% Typesetting the Chinese abstract. +\newenvironment{cabstract}{ + \cleardoublepage + \pdfbookmark[1]{\cabstractname}{cabstract} + \chapter*{\zihao{-2}\cabstractname} + \markboth{\cabstractname}{} +}{% Keywords at the bottom of the page. + \vfill\noindent\textbf{\label@ckeywords}{\@ckeywords} +} + +% Typesetting the English abstract. +\newenvironment{eabstract}{ \cleardoublepage - \pdfbookmark[1]{\pkuthss@tmp@abstractname}{\pkuthss@tmp@abstlabel} - \chapter*{\zihao{-2}\pkuthss@tmp@title} - \markboth{\pkuthss@tmp@abstractname}{} + \pdfbookmark[1]{\eabstractname}{eabstract} + \chapter*{\zihao{-2}\@etitle} + \markboth{\eabstractname}{} \vspace{-2em}\par \begin{center} - \zihao{-3} - {\pkuthss@tmp@author}\quad{\pkuthss@tmp@major}\\ - {\pkuthss@tmp@label@mentor}{\pkuthss@tmp@mentor} + \zihao{-3} + {\@eauthor} ({\@emajor})\\ + {\label@ementor}{\@ementor} \end{center} \vspace{1em}\par - \section*{\zihao{4}\pkuthss@tmp@abstractname} + \section*{\zihao{4}\eabstractname} \vskip 0.5em }{% Keywords at the bottom of the page. - \vfill\noindent\textbf{\pkuthss@tmp@label@keywords}{\pkuthss@tmp@keywords} + \vfill\noindent\textbf{\label@ekeywords}{\@ekeywords} } -% 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 |