From 80eb9f5eb815b61a90bb92933c64dac1e40fcf3b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 16 Dec 2015 22:14:32 +0000 Subject: pkuthss (16dec15) git-svn-id: svn://tug.org/texlive/trunk@39120 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pkuthss/pkulogo.eps | 1 - Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf | Bin 3641 -> 3641 bytes .../texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty | 182 -------------------- .../texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def | 3 +- .../texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def | 3 +- Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls | 186 +++++++++++++++++---- Master/texmf-dist/tex/latex/pkuthss/pkuword.eps | 1 - Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf | Bin 6392 -> 6392 bytes 8 files changed, 154 insertions(+), 222 deletions(-) delete mode 100644 Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkulogo.eps b/Master/texmf-dist/tex/latex/pkuthss/pkulogo.eps index 2af63c37446..ddb5832e713 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkulogo.eps +++ b/Master/texmf-dist/tex/latex/pkuthss/pkulogo.eps @@ -23,7 +23,6 @@ % pkuthss.cls % pkuthss-gbk.def % pkuthss-utf8.def -% pkuthss-extra.sty % pkulogo.eps % pkuword.eps diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf b/Master/texmf-dist/tex/latex/pkuthss/pkulogo.pdf index 66dc945397a..a7ebc04112c 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 deleted file mode 100644 index 51a785b405a..00000000000 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-extra.sty +++ /dev/null @@ -1,182 +0,0 @@ -% vim:ft=tex:ts=2:sw=2 -% -% Peking University dissertation document class -% -% Copyright (c) 2008-2009 solvethis -% 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 -% 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 -% pkulogo.eps -% pkuword.eps - -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{pkuthss-extra} - [2015/06/30 v1.6.3 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 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} -% 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 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, 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} - % 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@pdftoc - % Add PDF bookmark for table of contents. - \let\pkuthssextra@tmp@tableofcontents\tableofcontents - \renewcommand{\tableofcontents}{% - \pkuthss@int@pdfmark{\contentsname}{contents} - \pkuthssextra@tmp@tableofcontents% - } -\fi - -\ifpkuthssextra@opt@spechap - % This command is used to start a chapter without numbering, and correctly set - % up the headers and footers in the chapter. - \newcommand\specialchap[1]{% - \chapter*{#1}\addcontentsline{toc}{chapter}{#1} - \markboth{#1}{}\phantomsection% - } -\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. - \newcommand*{\setpdfproperties}{% - \hypersetup{ - pdfauthor = {\@eauthor}, pdftitle = {\@etitle}, - pdfsubject = {\euniversity\ \ethesisname}, pdfkeywords = {\@ekeywords} - }% - } - % 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 - % 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{hidelinks} - \fi -} - -\endinput diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def index 85dde02cb03..f508af5c57a 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-gbk.def @@ -20,12 +20,11 @@ % pkuthss.cls % pkuthss-gbk.def % pkuthss-utf8.def -% pkuthss-extra.sty % pkulogo.eps % pkuword.eps \ProvidesFile{pkuthss-gbk.def} - [2015/06/30 v1.6.3 Labels and captions in GBK encoding + [2015/12/16 v1.7.0 Labels and captions in GBK encoding for the pkuthss document class] \def\label@ctitle{ÌâÄ¿£º} diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def index 7edca1b51b6..62a7674aba7 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss-utf8.def @@ -20,12 +20,11 @@ % pkuthss.cls % pkuthss-gbk.def % pkuthss-utf8.def -% pkuthss-extra.sty % pkulogo.eps % pkuword.eps \ProvidesFile{pkuthss-utf8.def} - [2015/06/30 v1.6.3 Labels and captions in UTF-8 encoding + [2015/12/16 v1.7.0 Labels and captions in UTF-8 encoding for the pkuthss document class] \def\label@ctitle{题目:} diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls index a630a829f13..01f249063f3 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuthss.cls @@ -20,48 +20,51 @@ % pkuthss.cls % pkuthss-gbk.def % pkuthss-utf8.def -% pkuthss-extra.sty % pkulogo.eps % pkuword.eps \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{pkuthss} - [2015/06/30 v1.6.3 Peking University dissertation document class] + [2015/12/16 v1.7.0 Peking University dissertation document class] +% eg. `\pkuthss@int@boolopt{spacing}{true}' will expand to: +% \newif\ifpkuthss@opt@spacing \pkuthss@opt@spacingtrue +% \DeclareOption{spacing}{\pkuthss@opt@spacingtrue} +% \DeclareOption{nospacing}{\pkuthss@opt@spacingfalse} +\def\pkuthss@int@boolopt#1#2{ + \expandafter\newif\csname ifpkuthss@opt@#1\endcsname + \@nameuse{pkuthss@opt@#1#2} + \DeclareOption{#1}{\@nameuse{pkuthss@opt@#1true}} + \DeclareOption{no#1}{\@nameuse{pkuthss@opt@#1false}} +} % 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}} +\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} -\DeclareOption{noextra}{\pkuthss@opt@extrafalse} -% eg. `\pkuthss@int@extraopt{spacing}' will expand to: -% \DeclareOption{spacing}{\PassOptionsToPackage{spacing}{pkuthss-extra}} -% \DeclareOption{nospacing}{\PassOptionsToPackage{nospacing}{pkuthss-extra}} -\def\pkuthss@int@extraopt#1{ - \DeclareOption{#1}{\PassOptionsToPackage{#1}{pkuthss-extra}} - \DeclareOption{no#1}{\PassOptionsToPackage{no#1}{pkuthss-extra}} -} -% 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{pdftoc} -\pkuthss@int@extraopt{spechap} -\pkuthss@int@extraopt{pdfprop} -\pkuthss@int@extraopt{colorlinks} +\pkuthss@int@boolopt{uppermark}{false} +% Whether to modify fonts according to school regulation. +\pkuthss@int@boolopt{pkufont}{true} +% Whether to modify footnote format according to school regulation. +\pkuthss@int@boolopt{pkufoot}{true} +% Whether to modify spacing according to school regulation. +\pkuthss@int@boolopt{pkuspace}{true} +% Whether to use some common settings for adjusting spacing. +\pkuthss@int@boolopt{spacing}{true} +% Add PDF bookmark for table of contents. +\pkuthss@int@boolopt{pdftoc}{true} +% Whether to enable the `\spacialchap' command. +\pkuthss@int@boolopt{spechap}{true} +% Whether to automatically set up properties for generated PDF from user +% defined document information (author, title, etc.). +\pkuthss@int@boolopt{pdfprop}{true} % Pass all other options to `ctexbook' document class. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} % Process all class options now. \ProcessOptions\relax +% Prevent fontspec (loaded by xeCJK) from interfering with newtxmath. +\ifpkuthss@opt@pkufont\PassOptionsToPackage{no-math}{fontspec}\fi % 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. @@ -72,10 +75,13 @@ \RequirePackage{graphicx}[1999/02/16] % Provides utilities for setting up page layout. \RequirePackage{geometry} -% Whether to enable the default extra settings. -\ifpkuthss@opt@extra\RequirePackage{pkuthss-extra}\fi +% `hyperref', `fntef', `fancyhdr' and `cs4size' are deprecated in ctex 2.x. +% hyperref now does not make citation hyperlinks if not explicitly loaded. +% All compatibility support for ctex 1.x is scheduled for removal in 2017. +\RequirePackage{hyperref} \ifpkuthss@opt@gbk + \input{pkuthss-gbk.def} \ifxetex % No support for XeLaTeX compilation in non-unicode encoding, i.e. GBK. \ClassError{pkuthss}% @@ -90,12 +96,124 @@ % loads xCJK2uni by itself when necessary. \RequirePackage{xCJK2uni} \fi\fi +\else + \input{pkuthss-utf8.def} +\fi + +\ifpkuthss@opt@pkufont + % Use Times New Roman / Arial according to school regulation. + % Option used to prevent newtxtext from manipulating footnote marks. + \RequirePackage[defaultsups]{newtxtext} + \RequirePackage{newtxmath} +\else + % Provides `\Box' for originauth.tex if newtx is absent. + \RequirePackage{latexsym} +\fi + +\ifpkuthss@opt@pkufoot + % 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*\pkuthss@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\pkuthss@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 + +\ifpkuthss@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 + +\ifpkuthss@opt@spacing + % 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} + % 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 + +\ifpkuthss@opt@pdftoc + % Add PDF bookmark for table of contents. + \let\pkuthss@tmp@tableofcontents\tableofcontents + \renewcommand{\tableofcontents}{% + \pkuthss@int@pdfmark{\contentsname}{contents} + \pkuthss@tmp@tableofcontents% + } \fi -\AtEndOfClass{ - % Set up chinese captions and labels. - \ifpkuthss@opt@gbk\input{pkuthss-gbk.def} - \else\input{pkuthss-utf8.def} +\ifpkuthss@opt@spechap + % This command is used to start a chapter without numbering, and correctly set + % up the headers and footers in the chapter. + \newcommand\specialchap[1]{% + \chapter*{#1}\addcontentsline{toc}{chapter}{#1} + \markboth{#1}{}\phantomsection% + } +\fi + +\AtBeginDocument{ + \ifpkuthss@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 + + \ifpkuthss@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 up the properties when generating the title page because the document + % information should have been all defined before this. + \let\pkuthss@tmp@maketitle\maketitle + % NOTE: `\hypersetup' must appear before `\maketitle', otherwise it might not + % act as wished. + \renewcommand\maketitle{\setpdfproperties\pkuthss@tmp@maketitle} \fi } @@ -208,7 +326,7 @@ % because the bookmark will point to somewhere below the chapter mark. \def\pkuthss@int@pdfmark#1#2{% \if@openright\cleardoublepage\else\clearpage\fi - \pdfbookmark[1]{#1}{#2}% + \pdfbookmark[0]{#1}{#2}% } % Usage: \pkuthss@int@fillinblank{(number of lines)}{(line width)}{(contents)} diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuword.eps b/Master/texmf-dist/tex/latex/pkuthss/pkuword.eps index f62f3792453..ab9ebcfe17b 100644 --- a/Master/texmf-dist/tex/latex/pkuthss/pkuword.eps +++ b/Master/texmf-dist/tex/latex/pkuthss/pkuword.eps @@ -23,7 +23,6 @@ % pkuthss.cls % pkuthss-gbk.def % pkuthss-utf8.def -% pkuthss-extra.sty % pkulogo.eps % pkuword.eps diff --git a/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf b/Master/texmf-dist/tex/latex/pkuthss/pkuword.pdf index 842c49a3e07..596356cef75 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