Merge ctex-kit updates with minor modifications.

This commit is contained in:
Casper Ti. Vector 2012-04-27 18:10:19 +08:00
parent e5e76b35f4
commit 236bd6cffe
2 changed files with 10 additions and 16 deletions

View File

@ -68,7 +68,7 @@
% Automatically ignore spaces between CJK characters and preserve spaces in other
% situations. XeCJK itself will handle this issue, therefore we do not use
% `CJKspace' when using XeLaTeX.
\ifxetex\else\RequirePackage{CJKspace}\fi
\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.
@ -122,7 +122,7 @@
% `\MakeUppercase' works problematically.
% eg. it converts `\cite{ctex}' into `\cite{CTEX}'.
% This option can disable `\MakeUppercase' in left/right heading marks.
\ifpkuthssextra@opt@uppermark\else
\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

View File

@ -102,24 +102,18 @@
% `hyperref' option of `ctex' package instead, considering most people
% will be using newer versions of `ctex' package at that time.
\providecommand\hypersetup[1]{\PassOptionsToPackage{#1}{hyperref}}
\AtEndPreamble{\@ifpackageloaded{hyperref}{}{\RequirePackage{hyperref}}}
\ifxetex
\hypersetup{xetex,unicode}
\else
\ifpdf
\hypersetup{pdftex}
\else
\hypersetup{dvipdfmx}
\ifpkuthss@opt@gbk
\AtEndPreamble{\RequirePackage{hyperref}}
\ifpkuthss@opt@gbk
\unless\ifxetex
\hypersetup{CJKbookmarks}
\unless\ifpdf
\AtBeginDvi{\special{pdf:tounicode GBK-EUC-UCS2}}
\fi
\fi
\ifpkuthss@opt@gbk
\hypersetup{CJKbookmarks}
\else
\hypersetup{unicode}
\fi
\else
\hypersetup{unicode}
\fi
\hypersetup{driverfallback = dvipdfmx}
}
% Set page layout.