Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support numbered pdf bookmarks and Chinese pdf properties #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions tex/pkuthss.cls
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
% Process all class options now.
\ProcessOptions\relax

% Work around the `\lvert already defined' error.
% cf. <https://github.com/CTeX-org/ctex-kit/issues/454>.
\ifthss@opt@pkufont\RequirePackage{amsmath}\fi
% pkuthss is based on ctexbook; we use `xiao 4' as default font size.
\LoadClass[zihao = -4]{ctexbook}[2014/03/06]
% ctex 2.x no longer loads ifpdf and ifxetex by itself.
Expand All @@ -83,10 +80,11 @@
% Provides `\uline' used in `\maketitle' (but do not mess with `\emph').
\RequirePackage[normalem]{ulem}
% `\AtEndOfClass' used to avoid `PDF destination not defined' with setspace.
\AtEndOfClass{\RequirePackage{hyperref}}
\AtEndOfClass{\RequirePackage[bookmarksnumbered, unicode]{hyperref}}
\input{pkuthss.def}

\ifthss@opt@pkufont
\RequirePackage{amsmath}
% Use Times New Roman / Arial according to school regulation.
\ifxetex
\RequirePackage{unicode-math}
Expand Down Expand Up @@ -218,8 +216,8 @@
% information does not leak into the blind version.
\newcommand*{\setpdfproperties}{%
\hypersetup{
pdfauthor = {\@eauthor}, pdftitle = {\@etitle},
pdfsubject = {\euniversity\ \ethesisname}, pdfkeywords = {\@ekeywords}
pdfauthor = {\@cauthor}, pdftitle = {\@ctitle},
pdfsubject = {\cuniversity\cthesisname}, pdfkeywords = {\@ckeywords}
}%
}
% Set up the properties when generating the title page because the document
Expand Down Expand Up @@ -277,7 +275,7 @@
% Set up page layout.
\geometry{a4paper, hmargin = 2.6cm, headheight = 0.5cm, headsep = 0.6cm}
\ifthss@opt@ugly
\geometry{top = 3.1cm, bottom = 3.0cm, footskip = 0.8cm}
\geometry{top = 3.1cm, bottom = 2.5cm, footskip = 0.8cm}
\else
\geometry{top = 3.0cm, bottom = 3.1cm, footskip = 1.1cm}
\fi
Expand Down
9 changes: 2 additions & 7 deletions tex/pkuthss.def
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,13 @@
\ProvidesFile{pkuthss.def}
[2024/03/07 v1.9.4 Labels and captions for the pkuthss document class]

\def\label@ementor{Directed by\ }
\def\euniversity{Peking University}
\def\ethesisname{Doctor Thesis}
\def\thesiscover{}
\def\mentorlines{1}
\def\eabstractname{ABSTRACT}

\ifthss@opt@ugly
\def\label@ekeywords{KEY WORDS:\ }
\else
\def\label@ekeywords{KEYWORDS:\ }
\fi
\def\label@ementor{Supervised by\ }
\def\label@ekeywords{KEY WORDS:\ }

\ifthss@opt@gbk
\input{pkuthss-gbk.def}
Expand Down