summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thuthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-17 20:25:45 +0000
committerKarl Berry <karl@freefriends.org>2018-05-17 20:25:45 +0000
commit6523183e9bf0cb9c831adaa6eed6cac3b3c9d207 (patch)
treedfb57e6a782143343f709904b9e3ff57c091ab76 /Master/texmf-dist/source/latex/thuthesis
parent7e9227dfbf310d133bca2331f978d17b65320433 (diff)
thuthesis (17may18)
git-svn-id: svn://tug.org/texlive/trunk@47740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/thuthesis')
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx51
1 files changed, 40 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index 1fa40eab89e..b1e0dd0b123 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -16,7 +16,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2018/04/24 5.4.4 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2018/05/17 5.4.5 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -1116,7 +1116,7 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{thuthesis}
%<cfg>\ProvidesFile{thuthesis.cfg}
-%<cls|cfg>[2018/04/24 5.4.4 Tsinghua University Thesis Template]
+%<cls|cfg>[2018/05/17 5.4.5 Tsinghua University Thesis Template]
% \end{macrocode}
%
% \subsection{定义选项}
@@ -1135,7 +1135,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{5.4.4}
+\def\version{5.4.5}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -1182,11 +1182,6 @@
\DeclareBoolOption{tocarialchapterpage}
% \end{macrocode}
%
-% 在 Windows Vista 或之后系统下时,默认使用微软雅黑,这可能会导致审查不合格。
-% 下面设置默认不使用微软雅黑,同时保持跨平台兼容性。
-% \begin{macrocode}
-\IfFileExists{/dev/null}{}{\PassOptionsToClass{fontset=windowsold}{ctexbook}}
-% \end{macrocode}
%
% \option{raggedbottom} 选项(默认打开)
% \changes{v4.8}{2013/03/05}{增加 noraggedbottom 选项。}
@@ -1488,14 +1483,48 @@
%
% \subsubsection{字体}
% \label{sec:font}
+% 在使用 Windows Vista 或之后版本的系统时,\pkg{ctex} 宏包会默认使用微软雅黑字体,
+% 这可能会导致审查不合格。 下面设置适合印刷的黑体,同时保持跨平台兼容性。
+% \begin{macrocode}
+%<*cls>
+\newcommand\thu@fontset{\csname g__ctex_fontset_tl\endcsname}
+\ifthenelse{\equal{\thu@fontset}{windows}}{
+ \ifxetex
+ \setCJKsansfont{SimHei}
+ \else
+ \setCJKsansfont{simhei.ttf}
+ \csname ctex_punct_map_family:nn\endcsname{\CJKsfdefault}{zhhei}
+ \fi
+}{}
+% \end{macrocode}
+%
+% 类似地,\pkg{ctex} 2.4.14 开始在 macOS 下自动调用苹方黑体,所以必进行调整。
+% \begin{macrocode}
+\ifthenelse{\equal{\thu@fontset}{mac}}{
+ \setCJKmainfont[
+ UprightFont = * Light,
+ BoldFont = * Bold,
+ ItalicFont = Kaiti SC,
+ BoldItalicFont = Kaiti SC Bold
+ ]{Songti SC}
+ \setCJKsansfont{Heiti SC}
+ \setCJKfamilyfont{zhsong}[
+ UprightFont = * Light,
+ BoldFont = * Bold,
+ ]{Songti SC}
+ \setCJKfamilyfont{zhhei}{Heiti SC}
+ \setCJKfamilyfont{zhkai}{Kaiti SC}
+}{}
+% \end{macrocode}
+%
% \begin{macro}{\normalsize}
% 正文小四号 (12bp) 字,行距为固定值 20 bp。
+% \changes{v5.4.5}{2018/05/17}{调整公式和正文间距。}
% \begin{macrocode}
-%<*cls>
\renewcommand\normalsize{%
\@setfontsize\normalsize{12bp}{20bp}%
- \abovedisplayskip=20bp \@plus 2bp \@minus 2bp
- \abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
+ \abovedisplayskip=12bp \@plus 2bp \@minus 2bp
+ \abovedisplayshortskip=12bp \@plus 2bp \@minus 2bp
\belowdisplayskip=\abovedisplayskip
\belowdisplayshortskip=\abovedisplayshortskip}
% \end{macrocode}