From 29740d0452a743ccdc3345b0cf600c1a99424d8d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 29 Apr 2015 21:18:58 +0000 Subject: pkuthss (28apr15) git-svn-id: svn://tug.org/texlive/trunk@37123 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf | Bin 3641 -> 3641 bytes .../texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty | 106 +++++++++++----- .../texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def | 8 +- .../texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def | 8 +- Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls | 133 ++++++++++++--------- Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf | Bin 6392 -> 6392 bytes 6 files changed, 156 insertions(+), 99 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf b/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf index 12281c7f4bb..44dda8154c8 100644 Binary files a/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf and b/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf differ diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty index 203978fdfb7..570f8c48bb0 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty @@ -3,7 +3,7 @@ % Peking University dissertation document class % % Copyright (c) 2008-2009 solvethis -% Copyright (c) 2010-2013 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] \ProvidesPackage{pkuthss-extra} - [2014/07/07 v1.5.5 Common extra settings for the pkuthss document class] + [2015/04/28 v1.6.0 Common extra settings for the pkuthss document class] % Check the dependency of pkuthss. \@ifclassloaded{pkuthss}{}{ @@ -45,54 +45,82 @@ \DeclareOption{#1}{\@nameuse{pkuthssextra@opt@#1true}} \DeclareOption{no#1}{\@nameuse{pkuthssextra@opt@#1false}} } +% Whethet to modify footnote format. +\pkuthssextra@int@boolopt{footfmt}{true} +% Whethet to modify spacing according to school regulation. +\pkuthssextra@int@boolopt{pkuspace}{true} % 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 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 the `\spacialchap' command. \pkuthssextra@int@boolopt{spechap}{true} -% Whether to automatically set properties for generated PDF from user defined -% document information (author, title, etc.). +% Whether to automatically set up 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@footfmt + % Handle the `Unparsed material' issue with latex/dvipdfmx compilation. + \unless\ifxetex\unless\ifpdf + \newcommand*\pgfsysdriver{pgfsys-dvipdfm.def} + \fi\fi + % Circled text, cf. . + \RequirePackage{tikz} + \newcommand*\pkuthssextra@int@circled[1]{% + \scalebox{0.8}{\tikz[baseline = (char.base)]{ + \node[ + shape = circle, draw = black, minimum size = 1.25em, inner sep = 0pt + ] (char) {#1}; + }}% + } + % Use circled numbers as footnote symbols. Does not affect title page, but + % footnote is rarely used in dissertation covers ;) + \renewcommand\thefootnote% + {\protect\pkuthssextra@int@circled{\arabic{footnote}}} + % Provides utility to modify footnote spacing. + % Option used to make sure it does not render interleaf pages totally blank. + \RequirePackage[cleardoublepage = current]{scrextend} + % Set up footnote spacing: symbol indent 2 ccwd, paragraph indent 3.5 ccwd, + % 0.75 ccwd between symbol and paragraph. + \deffootnote{2\ccwd}{3.5\ccwd}{\thefootnotemark\hspace{0.75\ccwd}} +\fi + +\ifpkuthssextra@opt@pkuspace + % lineskip / baselineskip = 20 bp / (12 bp * (6 / 5)). + \linespread{1.39}\selectfont + % Quite harmless and frequently used package. Loaded together with `tocloft' + % plus a compatibility option to avoid package clash. + \RequirePackage{subfig} + % Provides utilities for setting TOC format; `titles' applied to avoid + % interfering with LaTeX's own title mechanism. + \RequirePackage[subfigure, titles]{tocloft} + \setlength{\cftbeforechapskip}{6bp plus 1bp} + \setlength{\cftsecindent}{\ccwd} + \setlength{\cftsubsecindent}{2\ccwd} + % Modify font size and separator of captions. + \RequirePackage{caption} + \DeclareCaptionFont{cfive}{\zihao{5}} + \DeclareCaptionLabelSeparator{quad}{\quad} + \captionsetup{font = cfive, labelsep = quad} +\fi + \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 + % Automatically ignore spaces between CJK characters, or otherwise preserve + % spaces. 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. + % 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. \RequirePackage{enumitem} \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,7 +136,7 @@ \ifpkuthssextra@opt@spechap % This command is used to start a chapter without numbering, and correctly set - % the headers and footers in the chapter. + % up the headers and footers in the chapter. \newcommand\specialchap[1]{ \chapter*{#1}\addcontentsline{toc}{chapter}{#1} \markboth{#1}{}\phantomsection @@ -116,6 +144,18 @@ \fi \AtBeginDocument{ + \ifpkuthssextra@opt@pkuspace + % Kludge for `tocloft' used with `ctex'. + % . + \renewcommand{\numberline}[1]{% + \settowidth\@tempdimb{#1\hspace{0.5em}}% + \ifdim\@tempdima<\@tempdimb% + \@tempdima=\@tempdimb% + \fi% + \hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb% + }% + \fi + \ifpkuthssextra@opt@pdfprop % Automatically generate properties for generated PDF. % Use English properties to avoid problems with character encodings. @@ -125,7 +165,7 @@ pdfsubject = {\euniversity\ \ethesisname}, pdfkeywords = {\@ekeywords} } } - % Set the properties when generating the title page because the document + % Set up 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 @@ -137,8 +177,8 @@ % 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. + % Set hyperlink colour to black in order to prevent hyperlinks from being + % too hard-to-recognise in printed thesis. \hypersetup{hidelinks} \fi } diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def index 6113840e3a3..20e95a6644f 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def @@ -3,7 +3,7 @@ % Peking University dissertation document class % % Copyright (c) 2008-2009 solvethis -% Copyright (c) 2010-2013 Casper Ti. Vector +% Copyright (c) 2010-2013,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 @@ -25,7 +25,7 @@ % pkuword.eps \ProvidesFile{pkuthss-gbk.def} - [2014/07/07 v1.5.5 Labels and captions in GBK encoding + [2015/04/28 v1.6.0 Labels and captions in GBK encoding for the pkuthss document class] \def\label@ctitle{题目:} @@ -37,7 +37,7 @@ \def\label@cmentor{导\hphantom{汉字}师:} \def\label@ementor{Directed by\ } \def\label@ckeywords{关键词:} -\def\label@ekeywords{Keywords:\ } +\def\label@ekeywords{KEYWORDS:\ } \def\titlepagename{封面} \def\cuniversity{北京大学} @@ -45,6 +45,6 @@ \def\cthesisname{博士研究生学位论文} \def\ethesisname{Doctor Thesis} \def\cabstractname{摘要} -\def\eabstractname{Abstract} +\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 index 75cc3d0750e..f2b8c671b1e 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def @@ -3,7 +3,7 @@ % Peking University dissertation document class % % Copyright (c) 2008-2009 solvethis -% Copyright (c) 2010-2013 Casper Ti. Vector +% Copyright (c) 2010-2013,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 @@ -25,7 +25,7 @@ % pkuword.eps \ProvidesFile{pkuthss-utf8.def} - [2014/07/07 v1.5.5 Labels and captions in UTF-8 encoding + [2015/04/28 v1.6.0 Labels and captions in UTF-8 encoding for the pkuthss document class] \def\label@ctitle{棰樼洰锛殅 @@ -37,7 +37,7 @@ \def\label@cmentor{瀵糪hphantom{姹夊瓧}甯堬細} \def\label@ementor{Directed by\ } \def\label@ckeywords{鍏抽敭璇嶏細} -\def\label@ekeywords{Keywords:\ } +\def\label@ekeywords{KEYWORDS:\ } \def\titlepagename{灏侀潰} \def\cuniversity{鍖椾含澶у} @@ -45,6 +45,6 @@ \def\cthesisname{鍗氬+鐮旂┒鐢熷浣嶈鏂噠 \def\ethesisname{Doctor Thesis} \def\cabstractname{鎽樿} -\def\eabstractname{Abstract} +\def\eabstractname{ABSTRACT} \endinput 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} } diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf b/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf index a7ce97296f5..c6d5dfae2f6 100644 Binary files a/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf and b/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf differ -- cgit v1.2.3