summaryrefslogtreecommitdiff
path: root/info/lshort/chinese/src/lshort-zh-cn-style.sty
diff options
context:
space:
mode:
Diffstat (limited to 'info/lshort/chinese/src/lshort-zh-cn-style.sty')
-rw-r--r--info/lshort/chinese/src/lshort-zh-cn-style.sty46
1 files changed, 30 insertions, 16 deletions
diff --git a/info/lshort/chinese/src/lshort-zh-cn-style.sty b/info/lshort/chinese/src/lshort-zh-cn-style.sty
index 6f8ae9e306..3aca98d561 100644
--- a/info/lshort/chinese/src/lshort-zh-cn-style.sty
+++ b/info/lshort/chinese/src/lshort-zh-cn-style.sty
@@ -8,7 +8,8 @@
% 基本工具宏包
%
\RequirePackage{amsmath,amsthm}
-\RequirePackage{hologo,ulem,verbatim,fancyvrb,layout,multicol}
+\RequirePackage{hologo,verbatim,fancyvrb,layout,multicol}
+\RequirePackage[normalem]{ulem}
\RequirePackage{colortbl,tabularx,multirow,makecell,booktabs}
\RequirePackage{graphicx,xcolor,float,subfig}
\RequirePackage{makeidx}
@@ -21,17 +22,19 @@
% 中文正文字体使用 Fandol
%
\PassOptionsToPackage{no-math}{fontspec}
-\RequirePackage[zihao=false,scheme=chinese,heading=true]{ctex}[2015/06/24]
+\RequirePackage[zihao=false,scheme=chinese,heading=true,fontset=fandol]{ctex}[2015/06/24]
%
% 字体和符号宏包
%
\setmainfont{cmun}[
- Extension = .otf,
- UprightFont = *rm,
- ItalicFont = *ti,
- BoldFont = *bx,
- BoldItalicFont = *bi,
+ Extension = .otf,
+ UprightFont = *rm,
+ ItalicFont = *ti,
+ SlantedFont = *sl,
+ BoldFont = *bx,
+ BoldItalicFont = *bi,
+ BoldSlantedFont = *bl,
]
\setsansfont{cmun}[
Extension = .otf,
@@ -48,6 +51,10 @@
BoldItalicFont = *tx,
]
\RequirePackage{amssymb,latexsym,textcomp,mathrsfs,euscript,yhmath} % 与默认字体不冲突的一些符号包
+% 消除 \t 命令的字体 warning
+\AtBeginDocument{%}
+ \renewcommand*\t[1]{{\edef\restore@font{\the\font}\usefont{OML}{cmm}{m}{it}\accent"7F\restore@font#1}}
+}
% 调整 layout 宏包的命令使之能够放入浮动体,手动指定奇偶页的 layout
\input lshort-zh-cn-layout
@@ -146,6 +153,22 @@
{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
+% 允许 hologo 断词
+\hologoSetup{discretionarybreak=true}
+% 新定义 hologo
+\def\HoLogo@TeXLive#1{%
+ \hologo{TeX}\HOLOGO@space\HOLOGO@mbox{Live}%
+}
+\def\HoLogo@MacTeX#1{%
+ \HOLOGO@mbox{Mac}\hologo{TeX}%
+}
+\def\HoLogo@CTeX#1{%
+ \HOLOGO@mbox{C}\hologo{TeX}%
+}
+\def\HoLogo@TikZ#1{%
+ \HOLOGO@mbox{Ti\textit{k\/}Z}
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% lshort 用到的自定义命令
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -159,15 +182,6 @@
\def\CTAN|#1|{\href{http://mirrors.tuna.tsinghua.edu.cn/CTAN/#1}{\CTANref|CTAN://#1|}}
\newcommand{\contrib}[3]{#1\quad\mailto|#2|{\small\\\quad\textit{#3}}\\[1ex]}
-\DeclareRobustCommand*\TikZ{Ti\textit{k\/}Z}
-%
-% PDF 书签中对符号的特殊处理
-%
-\pdfstringdefDisableCommands{%
- \def\AmS{AMS}%
- \def\TikZ{TikZ}%
-}
-
%
% 示意长度
%