summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ctex/README22
-rw-r--r--Master/texmf-dist/doc/latex/ctex/ctex.pdfbin0 -> 326587 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ctex/ctex.tex954
-rw-r--r--Master/texmf-dist/doc/latex/ctex/test/test-cjk.tex832
-rw-r--r--Master/texmf-dist/doc/latex/ctex/test/test-cjkutf8.tex829
-rw-r--r--Master/texmf-dist/doc/latex/ctex/test/test-xetex.tex817
-rw-r--r--Master/texmf-dist/doc/latex/ctex/test/test-xetexgbk.tex819
-rw-r--r--Master/texmf-dist/tex/latex/ctex/back/ctexartutf8.cls13
-rw-r--r--Master/texmf-dist/tex/latex/ctex/back/ctexbookutf8.cls13
-rw-r--r--Master/texmf-dist/tex/latex/ctex/back/ctexcaputf8.sty13
-rw-r--r--Master/texmf-dist/tex/latex/ctex/back/ctexreputf8.cls13
-rw-r--r--Master/texmf-dist/tex/latex/ctex/back/ctexutf8.sty13
-rw-r--r--Master/texmf-dist/tex/latex/ctex/cfg/ctex.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-gbk.cfg46
-rw-r--r--Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-utf8.cfg46
-rw-r--r--Master/texmf-dist/tex/latex/ctex/cfg/ctexcap.cfg111
-rw-r--r--Master/texmf-dist/tex/latex/ctex/cfg/ctexopts.cfg.template6
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex.sty22
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexart.cls29
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbook.cls29
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexcap.sty30
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexrep.cls29
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-article.def220
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-book.def252
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-caption.def165
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-class.def96
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-common.def385
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-gbk.def28
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-loadclass.def16
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-report.def242
-rw-r--r--Master/texmf-dist/tex/latex/ctex/def/ctex-utf8.def28
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-cct-engine.def82
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def50
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def69
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def27
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fd17
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fdx62
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fd17
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fdx62
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd49
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-adobefonts.def7
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-cjkfonts.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-winfonts.def78
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def19
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-cjkfonts.def7
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def23
-rw-r--r--Master/texmf-dist/tex/latex/ctex/opt/ctex-caption-opts.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/opt/ctex-class-opts.def26
-rw-r--r--Master/texmf-dist/tex/latex/ctex/opt/ctex-common-opts.def59
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check4
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds10
-rw-r--r--Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc5
-rw-r--r--Master/tlpkg/tlpsrc/ctex.tlpsrc0
58 files changed, 7058 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/ctex/README b/Master/texmf-dist/doc/latex/ctex/README
new file mode 100644
index 00000000000..6efe927ed52
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/README
@@ -0,0 +1,22 @@
+ctex is a collection of macro packages and document classes
+for LaTeX Chinese typesetting.
+
+This package is licensed in LPPL.
+
+The authors and contributors of this package are:
+
+ * Wu Lingyun <aloft@ctex.org>
+ * Jiang Jiang <gzjjgod@gmail.com>
+ * Wang Yue <yuleopen@gmail.com>
+ * Liu Haiyang <leoliu.pku@gmail.com>
+ * Li Yanrui
+ * Chen Zhichu
+
+If you are interested in the process of development you
+may observe
+
+ http://code.google.com/p/ctex-kit/updates/list
+
+Report feedback in the Issues section of ctex-kit project,
+or in http://bbs.ctex.org forum.
+
diff --git a/Master/texmf-dist/doc/latex/ctex/ctex.pdf b/Master/texmf-dist/doc/latex/ctex/ctex.pdf
new file mode 100644
index 00000000000..18d25606453
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/ctex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/ctex/ctex.tex b/Master/texmf-dist/doc/latex/ctex/ctex.tex
new file mode 100644
index 00000000000..2a06a813a5c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/ctex.tex
@@ -0,0 +1,954 @@
+%# -*- coding: utf-8 -*-
+% ctex.tex: manual of ctex package
+
+\documentclass{ltxdoc}
+\usepackage[UTF8,fntef,adobefonts]{ctex}
+\usepackage{texnames}
+ \topmargin 0.5 true cm
+ \oddsidemargin 1 true cm
+ \evensidemargin 1 true cm
+ \textheight 21 true cm
+ \textwidth 14 true cm
+
+\MakeShortVerb{\|}
+\setcounter{StandardModuleDepth}{1}
+
+\newcommand{\ctex}{\texttt{ctex}}
+\newcommand{\ctexorg}{\texttt{ctex.org}}
+
+\setlength{\parskip}{0.75ex plus .2ex minus .5ex}
+\renewcommand{\baselinestretch}{1.2}
+
+\makeatletter
+\def\parg#1{\mbox{$\langle${\it #1\/}$\rangle$}}
+\def\@smarg#1{{\tt\string{}\parg{#1}{\tt\string}}}
+\def\@marg#1{{\tt\string{}{\rm #1}{\tt\string}}}
+\def\marg{\@ifstar\@smarg\@marg}
+\def\@soarg#1{{\tt[}\parg{#1}{\tt]}}
+\def\@oarg#1{{\tt[}{\rm #1}{\tt]}}
+\def\oarg{\@ifstar\@soarg\@oarg}
+\makeatother
+
+\begin{document}
+
+\title{\bf \ctex{} 宏包说明}
+\author{\it \ctexorg\thanks{http://www.ctex.org}}
+\date{\small 版本号:v0.92 \hskip 2\ccwd 修改日期:2009/06/26}
+\maketitle
+
+
+\begin{abstract}
+\ctex{}~宏包提供了一个统一的中文~\LaTeX{}~文档框架,底层支持~CCT、CJK~和
+~xeCJK~三种中文~\LaTeX{}~系统。\ctex{}~宏包提供了编写中文~\LaTeX{}~文档
+常用的一些宏定义和命令。
+
+\ctex{}~宏包需要~CCT~系统或者~CJK~宏包或者~xeCJK~宏包的支持。主要文件包括
+~\texttt{ctexart.cls}、\texttt{ctexrep.cls}、\texttt{ctexbook.cls}~和
+~\texttt{ctex.sty}、\texttt{ctexcap.sty}。
+
+\ctex{}~宏包由~\ctexorg{}~制作并负责维护。
+\end{abstract}
+
+\tableofcontents
+
+\section{简介}
+
+这个宏包的部分原始代码来自于由王磊编写~\texttt{cjkbook.cls}~文档类,
+还有一小部分原始代码来自于吴凌云编写的~\texttt{GB.cap}~文件。
+原来的这些工作都是零零碎碎编写的,没有认真、系统的设计,
+也没有用户文档,非常不利于维护和改进。2003~年,吴凌云用~\texttt{doc}~
+和~\texttt{docstrip}~工具重新编写了整个文档,并增加了许多新的功能。
+2007~年,oseen~和王越在~\ctex{}~宏包基础上增加了对~UTF8~编码的支持,
+开发出了~\texttt{ctexutf8}~宏包。
+2009~年~5~月,我们在~Google Code~建立了~ctex-kit~项目\footnote{http://code.google.com/p/ctex-kit/},
+对~\ctex{}~宏包及相关宏包和脚本进行了整合,并加入了对~Xe\TeX{}~的支持。
+该项目由~\ctexorg{}~社区的开发者共同维护,新版本号为~v0.9。
+在开发新版本时,考虑到合作开发和调试的方便,
+我们不再使用~\texttt{doc}~和~\texttt{docstrip}~工具,改为直接编写宏包文件。
+
+最初~Knuth~设计开发~\TeX{}~的时候没有考虑到支持多国语言,
+特别是多字节的中日韩语言。这使得~\TeX{}~以至后来的
+~\LaTeX{}~对中文的支持一直不是很好。即使在~CJK~解决了中文字符
+处理的问题以后,中文用户使用~\LaTeX{}~仍然要面对许多困难。
+最常见的就是中文化的标题。由于中文习惯和西方语言的不同,
+使得很难直接使用原有的标题结构来表示中文标题。因此需要对
+标准~\LaTeX{}~宏包做较大的修改。此外,还有诸如中文字号的对应
+关系等等。~\ctex{}~宏包正是尝试着解决这些问题。中间很多地方
+用到了在~\ctexorg{}~论坛上的讨论结果,在此对参与讨论的
+朋友们表示感谢。
+
+\ctex{}~宏包由五个主要文件构成:
+~\texttt{ctexart.cls}、~\texttt{ctexrep.cls}、~\texttt{ctexbook.cls}~和
+~\texttt{ctex.sty}、~\texttt{ctexcap.sty}。~\texttt{ctex.sty}~主要是提供整合的
+中文环境,可以配合大多数文档类使用。而~\texttt{ctexcap.sty}~则是在~\texttt{ctex.sty}~
+的基础上对~\LaTeX{}~的三个标准文档类的格式进行修改以符合中文习惯,
+该宏包只能配合这三个标准文档类使用。
+~\texttt{ctexart.cls}、~\texttt{ctexrep.cls}、~\texttt{ctexbook.cls}~则是
+~\texttt{ctex.sty}、\texttt{ctexcap.sty}~分别和三个标准文档类结合产生的新文档类,
+除了包含~\texttt{ctex.sty}、\texttt{ctexcap.sty}~的所有功能,还加入了一些修改文档类
+缺省设置的内容(如使用五号字体为缺省字体)。
+
+\vskip 10pt
+{\kaishu
+这份说明文档可以通过用~\LaTeX{}~编译~\texttt{ctex.tex}~文件来得到。
+编译说明文档需要先安装~\ctex{}~宏包。}
+
+
+\section{使用帮助}
+
+\ctex{}~宏包的使用十分简单。如果是使用~\ctex{}~的文档类,只需用
+~\texttt{ctexart}、~\texttt{ctexrep}~或者~\texttt{ctexbook}~替换原来的
+文档类就可以了。你也可以继续使用原来的文档类,而用~\texttt{ctex.sty}~或者
+~\texttt{ctexcap.sty}~宏包来配合使用,两者的效果是一样的
+(除了不能修改一些文档设置如缺省字体大小)。
+
+\subsection{使用~CJK~和~xeCJK}
+
+这是 \ctex{} 宏包的缺省设置。\ctex{} 宏包会自动根据使用的~\TeX{}~引擎
+调用 CJK 或者 xeCJK 宏包,你无需再自己调用。
+
+此外,\ctex{} 宏包会在 |\begin{document}| 和 |\end{document}|
+之间自动加入一个 CJK 环境,你无需再添加 CJK 环境。CJK宏包的命令都可以
+在 |\begin{document}| 和 |\end{document}| 之间正常使用。
+
+例子1:使用文档类宏包
+\begin{verbatim}
+\documentclass{ctexart}
+\begin{document}
+中文宏包测试
+\end{document}
+\end{verbatim}
+
+例子2:使用普通宏包
+\begin{verbatim}
+\documentclass{article}
+\usepackage{ctex}
+\begin{document}
+中文宏包测试
+\end{document}
+\end{verbatim}
+
+\subsection{使用~CCT}
+\ctex{}~宏包也可以配合新版的~CCT~使用,只需在使用~\ctex{}~宏包时加上~CCT~选项即可。
+缺省~CCT~会使用~CJK~字库,因为这种字库方式比传统~CCT~字库更方便,兼容性也更好。
+如果要使用传统~CCT~字库,则还要加上~CCTfont~选项。
+
+例子3:使用~CJK~方式字库
+\begin{verbatim}
+\documentclass[CCT]{ctexart}
+\begin{document}
+中文宏包测试
+\end{document}
+\end{verbatim}
+
+例子2:使用~CCT~方式字库
+\begin{verbatim}
+\documentclass[CCT,CCTfont]{ctexart}
+\begin{document}
+中文宏包测试
+\end{document}
+\end{verbatim}
+
+
+\subsection{选项}
+
+宏包的选项用于改变一些缺省风格的设置。缺省的设置已经针对中文
+的习惯进行了尽量的修改,所以一般用户无需使用这些选项。
+如果你觉得某些设置不合适,可以向作者反映。我们会考虑在后面的
+版本中予以改进。我们也欢迎关于增加或者删减选项的建议。
+
+{\kaishu 除了~\ref{class-opts}~和~\ref{caption-opts}~的选项,
+其余的选项都可以在所有文档类宏包和普通宏包上使用。}
+
+\subsubsection{只能用于文档类的选项} \label{class-opts}
+
+下面的选项可能会是最经常使用的。但是它们只能用于文档类
+(\texttt{ctexart}、~\texttt{ctexrep}~和~\texttt{ctexbook})。
+\begin{description}
+\item[cs4size] 使用小四字号为缺省字体大小。
+\item[c5size] 使用五号字为缺省字体大小。{\kaishu 这个是
+~\ctex{}~文档类的缺省模式。}
+\end{description}
+
+\subsubsection{只能用于文档类和~\texttt{ctexcap.sty}~的选项} \label{caption-opts}
+
+下面这些则只可以在文档类宏包和~\texttt{ctexcap.sty}~上使用。
+\begin{description}
+\item[sub3section] 将~|\paragraph|~命令产生的标题改为~section~类格式。
+此时~|\subparagraph|~命令产生的标题会具有原来~|\paragraph|~的格式。
+
+\item[sub4section] 将~|\paragraph|~和~|\subparagraph|~命令产生的标题
+都改为~section~类格式。
+\end{description}
+
+\subsubsection{中文编码选项}
+
+下面的选项用于选择中文的编码。
+\begin{description}
+\item[GBK] 使用~GBK~编码。{\kaishu 这个是~\ctex{}~宏包的缺省模式。}
+
+\item[UTF8] 使用~UTF8~编码。
+\end{description}
+
+\subsubsection{中文字库选项} \label{fontset}
+
+下面的选项用于选择可用的中文字库。设置这些选项是考虑到不同的操作系统平台
+提供的中文字库是不同的。不同的~\TeX{}~发行版可以根据目标操作系统平台和
+提供的中文字库在~\texttt{ctexfonts.cfg}~文件中修改这些选项之一为缺省设置。
+\begin{description}
+\item[nofonts] 没有中文字库,此时没有中文字体命令可用。
+
+\item[cjkfonts] 在~CJK~模式(即不使用~Xe\TeX{}~时)使用~CJKfonts~中的两套
+文鼎字库:宋体和楷体。在~xeCJK~模式(即使用~Xe\TeX{}~时),该选项将使用
+~adobefonts~选项的设置。
+
+\item[winfonts] 使用~Windows~的字体设置,默认为六种中易字体:宋体、仿宋、黑体、
+楷体、隶书、幼圆。该选项的结果将和老版本~\ctex{}~宏包完全一致。
+
+\item[adobefonts] 在~xeCJK~模式中使用~Adobe~的四套字体:宋体、仿宋、黑体、楷体。
+在~CJK~模式(即不使用~Xe\TeX{}~时)下,该选项将使用~winfonts~选项的设置。
+\end{description}
+
+\subsubsection{CCT~引擎选项}
+
+下面的选项用于选择底层的中文系统。缺省情况下,宏包会根据编译方式自动选择~CJK~
+或者~xeCJK~引擎。
+\begin{description}
+\item[CCT] 使用~CCT~代替~CJK~做为底层的中文支持系统。
+
+\item[CCTfont] 使用传统的~CCT~字库方式,该选项会自动激活~CCT~选项。
+\end{description}
+
+\subsubsection{排版风格选项}
+
+\begin{description}
+\item[cap] 使用中文的标题样式,缺省格式由~\texttt{ctexcap.cfg}~配置文件
+内的定义给出。对于~\texttt{ctex.sty},该选项只影响交叉引用中的数字和日期格式。
+{\kaishu 这个是~\ctex{}~宏包的缺省模式。}
+
+\item[nocap] 保留使用英文的标题样式。
+
+\item[punct] 对中文标点的位置(宽度)进行调整。{\kaishu 这个是~\ctex{}~宏包的缺省模式。}
+
+\item[nopunct] 不对中文标点的位置进行调整(每个标点占有相同的宽度)。
+
+\item[space] 使用~CJK~的保留空格模式,保留中文字符间的空格(类似英文的
+习惯)。你需要自己处理中文字符间的空格以及换行产生的空格(在行尾加上
+~\%~符号可以避免),否则排版结果可能不符合中文习惯。这种模式可以通过
+~|\CTEXnospace|~转换到~nospace~模式。
+
+\item[nospace] 使用~CJK~的忽略空格模式,也就是~CJK*~环境的模式。
+~CJK~会自动忽略中文字符间的空格,比较符合中文习惯。在这种模式下,
+可以使用~\textasciitilde~来分隔中英文字符,产生的间距稍小于普通空格,
+排版效果比较美观。这种模式可以通过~|\CTEXspace|~命令转换到~space~模式。
+{\kaishu 这个是~\ctex{}~宏包的缺省模式。}
+
+\item[indent] 使用中文的段首缩进模式,即缩进两个汉字宽度,同时每个段落
+都缩进。{\kaishu 这个是~\ctex{}~宏包的缺省模式。}
+
+\item[noindent] 使用原来的段首缩进模式,章节标题后的第一段不缩进。
+\end{description}
+
+\subsubsection{宏包兼容选项}
+
+\begin{description}
+\item[fancyhdr] 保持和~\texttt{fancyhdr}~宏包的兼容性。该选项将使得
+~\texttt{fancyhdr}~宏包被自动调用。
+
+\item[fntef] 为~\texttt{CJKfntef}~宏包和~\texttt{CCTfntef}~宏包提供统一接口。
+该选项将使得~\texttt{CJKfntef}~宏包或者~\texttt{CCTfntef}~宏包被自动调用。
+\end{description}
+
+\subsubsection{缺省选项}
+
+总结一下:\ctex{}~宏包的缺省选项是~GBK nospace cap punct indent,\ctex{}~文档类
+的缺省选项是~GBK nospace cap punct indent c5size。
+
+
+\subsection{基本命令}
+
+\ctex{}~宏包给用户提供一个通用的文档框架,使得用户可以自由地在不同的
+底层中文系统间切换。为此,我们为~CJK~定制了一些模拟~CCT~的命令,
+也对部分~CCT~命令进行了修改,使得两者保持一致。
+此外,我们还定义了用于设置文档参数的高级设置命令。
+
+\subsubsection{字体设置}
+
+中文字体很多,但是常用的就那么几个。我们为~CJK~常用的六种中文
+字体定义了简单易用的命令。它们是:
+
+\DescribeMacro{\songti}
+宋体:~|\songti|,~CJK~等价命令~|\CJKfamily{song}|
+
+\DescribeMacro{\heiti}
+黑体:~|\heiti|,~CJK~等价命令~|\CJKfamily{hei}|
+
+\DescribeMacro{\fangsong}
+仿宋:~|\fangsong|,~CJK~等价命令~|\CJKfamily{fs}|
+
+\DescribeMacro{\kaishu}
+楷书:~|\kaishu|,~CJK~等价命令~|\CJKfamily{kai}|
+
+\DescribeMacro{\lishu}
+隶书:~|\lishu|,~CJK~等价命令~|\CJKfamily{li}|
+
+\DescribeMacro{\youyuan}
+幼圆:~|\youyuan|,~CJK~等价命令~|\CJKfamily{you}|
+
+\vskip 10pt
+{\kaishu
+\TeX{}~系统中必须已经定义好这六种中文字体,并且使用和~\CTeX{}~套装中
+一致的字体名称。(参见上面~CJK~等价命令的参数)
+
+可用的字体命令还取决于使用的中文字库选项,参见~\ref{fontset}~一节的介绍。
+
+上面的字体命令和~CCT~中的一致,但传统的~CCT~字库中没有隶书和
+仿宋两种字体,需要用户自行安装定义。如果使用~CCT~时选择~CJK~字库方式,
+则可以使用这两种中文字体。
+}
+
+\subsubsection{字号、字距、字宽和缩进}
+
+\DescribeMacro{\zihao}
+中文字号的设置命令是~|\zihao|\marg*{字号},例如~|\zihao{3}|。
+可以使用的参数有~16~个,小号字体在前面加负号表示,从大到小依次为
+\begin{center}
+\begin{tabular}{cccccccc}
+\hline
+初号 & 小初 & 一号 & 小一 & 二号 & 小二 & 三号 & 小三 \\
+0 & -0 & 1 & -1 & 2 & -2 & 3 & -3 \\
+\hline
+四号 & 小四 & 五号 & 小五 & 六号 & 小六 & 七号 & 八号 \\
+4 & -4 & 5 & -5 & 6 & -6 & 7 & 8 \\
+\hline
+\end{tabular}
+\end{center}
+\noindent 英文字体大小会始终保持和中文字体一致。
+
+\DescribeMacro{\ziju}
+汉字字距的调整使用命令~|\ziju|\marg*{字宽的倍数}。参数可以是任意的数字,
+例如~|\ziju{5}|~设置汉字字距为当前汉字字宽的~5~倍,~|\ziju{0.5}|~设置汉字
+字距为当前汉字字宽的一半。这里的汉字字宽指的是实际汉字的宽度,
+不包含当前字距。该命令不影响英文字距。
+
+\DescribeMacro{\ccwd}
+当前汉字的字宽保存在宏~|\ccwd|~中。字宽是相邻两个汉字中心的距离,
+也就是说字距会被计算在内。
+
+\DescribeMacro{\CTEXindent}
+正常的缩进两个汉字字宽的距离,同时在汉字大小和字距改变的
+情况都可以自动修改缩进距离。
+
+\DescribeMacro{\CTEXnoindent}
+取消缩进。
+
+\DescribeMacro{\CTEXsetfont}
+|\CTEXsetfont|~命令用于更新当前的中文字体信息,包括当前字距和缩进
+距离。一般来说,用户无需使用这个命令。
+
+
+\subsubsection{中文数字转换}
+
+\DescribeMacro{\CTEXnumber}
+使用~CJK~提供的~|\CJKnumber|~命令可以将阿拉伯数字转换为中文数字。
+由于~\LaTeX{}~臭名昭著的脆弱命令的原因,当~|\CJKnumber|~被用在
+章节标题等地方的时候,要么出现错误无法使用,要么无法达到预期目的,
+例如在产生~PDF~书签的时候。于是我们定义了一个~|\CTEXnumber|~命令,
+可以将产生的中文数字保存下来。该命令的格式为
+\begin{quote}
+|\CTEXnumber|\marg*{result}\marg*{number}
+\end{quote}
+其中~\parg{result}~必须是一个~\TeX{}~宏的名字,不需要预先定义。
+例如
+\begin{quote}
+|\CTEXnumber{\test}{100002005}|
+\end{quote}
+则~|\test|~中的内容就是“一亿零二千零五”(不包括引号)。
+
+\DescribeMacro{\CTEXdigits}
+|\CTEXdigits|~命令和~|\CTEXnumber|~命令类似,用于代替~CJK~提供的
+~|\CJKdigits|~命令。它和~|\CTEXnumber|~命令的不同之处在于转换后
+结果是中文数字串,而不是按照中文习惯的数字。该命令的格式为
+\begin{quote}
+|\CTEXdigits|\marg*{result}\marg*{number}
+\end{quote}
+其中~\parg{result}~必须是一个~\TeX{}~宏的名字,不需要预先定义。
+例如
+\begin{quote}
+|\CTEXnumber{\test}{100002005}|
+\end{quote}
+\CTEXdigits{\test}{100002005}
+则~|\test|~中的内容就是“\test{}”(不包括引号)。
+
+\DescribeMacro{\chinese}
+对于经常需要转换的计数器,我们特别定义了一个~|\chinese|~命令。
+该命令可以象罗马数字转换命令~|\roman|、~|\Roman|~一样使用。
+具体格式是
+\begin{quote}
+|\chinese|\marg*{counter}
+\end{quote}
+其中~\parg{counter}~是一个~\LaTeX{}~计数器(counter),即由
+~|\newcounter|~命令产生的,例如~|section|,~|figure|~等。
+
+
+\subsection{高级设置}
+
+\DescribeMacro{\CTEXoptions}
+\ctex{}~宏包中一般的设置通过~|\CTEXoptions|~命令完成。
+这个命令的基本格式是
+\begin{quote}
+|\CTEXoptions|\oarg{\parg{key1}={\parg{val1}},
+ \parg{key2}={\parg{val2}}, ...}
+\end{quote}
+其中~\parg{key1}, \parg{key2}~是设置选项,
+~\parg{val1}, \parg{val2}~则是对应选项的设置内容。
+多个选项可以在一个语句中完成设置。
+
+\DescribeMacro{\CTEXsetup}
+部分设置如章节标题则通过~|\CTEXsetup|~命令完成。这个命令比
+~|\CTEXoptions|~多一个参数,用于指定设置对象。
+基本格式是
+\begin{quote}
+|\CTEXsetup|\oarg{\parg{key1}={\parg{val1}},
+ \parg{key2}={\parg{val2}}, ...}\marg*{type}
+\end{quote}
+其中~\parg{type}~是设置的对象类型,如~|part|, |chapter|, |section|,
+|subsection|, |subsubsection|, |paragraph|, |subparagraph|~等。
+~\parg{key1}, \parg{key2}~是设置选项,如~|name|, |number|, |format|,
+|nameformat|, |numberformat|, |aftername|, |titleformat|~等。
+~\parg{val1}, \parg{val2}~则是对应选项的设置内容。
+同一个目标类型的多个选项可以在一个语句中完成设置。
+
+{\kaishu 在~v0.7~版本之前,如果以上命令的参数中包含中文字符,则命令必须放在
+~|\begin{document}|~之后才能正常工作。从~v0.7~版本开始支持在导言区使用中文。}
+
+
+\subsubsection{章节标题设置}
+
+普通章节标题的格式全部通过~|\CTEXsetup|~命令完成。
+章节类型在~|\CTEXsetup|~命令的第二个参数中指定。
+
+{\kaishu 在~v0.7~版本之前,如果使用了宏包选项~cap~(缺省情况即是如此),则所有
+对章节标题的修改必须在~|\begin{document}|~以后进行。原因是
+缺省的中文标题设置文件~\texttt{ctexcap.cfg}~文件是在
+~|\begin{document}|~之后才会自动装入,因而之前的修改都
+会被覆盖而无效。这一限制对后面的附录标题以及其他标题设置
+一样有效。从~v0.7~版本开始,\texttt{ctexcap.cfg}~文件
+在宏包文件结束时就已经被装入,因此可以在导言区使用设置命令。}
+
+\begin{description}
+
+\item[name=\{\parg{prename},\parg{postname}\}]
+该选项用于设置章节的名字,包括章节编号前后的词语,两个之间用逗号分开。
+例如
+\begin{quote}
+|\CTEXsetup[name={第,节}]{section}|
+\end{quote}
+会使得~section~的标题使用形如“第1节”的名字。注意{\bf 不要}使用中文
+的逗号。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part & \{第,部分\} & \{Part\cs{space},\} \\
+chapter & \{第,章\} & \{Chapter\cs{space},\} \\
+section & 同右 & \{,\} \\
+subsection & 同右 & \{,\} \\
+subsubsection & 同右 & \{,\} \\
+paragraph & 同右 & \{,\} \\
+subparagraph & 同右 & \{,\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[number=\{\parg{number}\}]
+该选项用于设置章节编号的数字样式。例如
+\begin{quote}
+|\CTEXsetup[number={\roman{section}}]{section}|
+\end{quote}
+会使得~section~的标题使用小写罗马数字作为编号。常用的数字样式命令有
+\begin{description}
+\item \cs{chinese}\marg*{counter}: 一, 二, 三, ...
+\item \cs{arabic}\marg*{counter}: 1, 2, 3, ...
+\item \cs{roman}\marg*{counter}: i, ii, iii, ...
+\item \cs{Roman}\marg*{counter}: I, II, III, ...
+\item \cs{alph}\marg*{counter}: a, b, c, ...
+\item \cs{Alph}\marg*{counter}: A, B, C, ...
+\end{description}
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part & \{\cs{chinese}\marg{part}\} & \{\cs{Roman}\marg{part}\} \\
+chapter & \{\cs{chinese}\marg{chapter}\} & \{\cs{arabic}\marg{chapter}\} \\
+section & 同右 & \{\cs{thesection}\} \\
+subsection & 同右 & \{\cs{thesubsection}\} \\
+subsubsection & 同右 & \{\cs{thesubsubsection}\} \\
+paragraph & 同右 & \{\cs{theparagraph}\} \\
+subparagraph & 同右 & \{\cs{thesubparagraph}\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[format=\{\parg{format}\}]
+用于控制章节标题的全局格式,作用域为章节名字和随后的标题内容。
+常用于控制章节标题的对齐方式。
+
+该选项的缺省设置是
+\begin{center} \small
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & \{\cs{centering}\} & \{\cs{raggedright}\} \\
+part & \{\cs{centering}\} & \{\cs{centering}\} \\
+chapter & \{\cs{centering}\} & \{\cs{raggedright}\} \\
+section & \{\cs{Large}\cs{bfseries}\cs{centering}\} & \{\cs{Large}\cs{bfseries}\} \\
+subsection & \{\cs{large}\cs{bfseries}\cs{centering}\} & \{\cs{large}\cs{bfseries}\} \\
+subsubsection & \{\cs{normalsize}\cs{bfseries}\cs{centering}\} & \{\cs{normalsize}\cs{bfseries}\} \\
+paragraph & \{\cs{normalsize}\cs{bfseries}\cs{centering}\} & \{\cs{normalsize}\cs{bfseries}\} \\
+subparagraph & \{\cs{normalsize}\cs{bfseries}\cs{centering}\} & \{\cs{normalsize}\cs{bfseries}\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[nameformat=\{\parg{nameformat}\}]
+用于控制章节名字的格式,作用域为章节名字,包括编号。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & 同右 & \{\cs{Large}\cs{bfseries}\} \\
+part & 同右 & \{\cs{huge}\cs{bfseries}\} \\
+chapter & 同右 & \{\cs{huge}\cs{bfseries}\} \\
+section & 同右 & \{\} \\
+subsection & 同右 & \{\} \\
+subsubsection & 同右 & \{\} \\
+paragraph & 同右 & \{\} \\
+subparagraph & 同右 & \{\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[numberformat=\{\parg{numberformat}\}]
+用于控制章节编号的格式。一般为空,当你需要编号的格式和前后的章节名字
+不一样时使用。
+
+\item[aftername=\{\parg{aftername}\}]
+用于控制章节标题中章节名字和随后的标题内容之间的格式变换。
+常用于控制标题内容是否另起一行。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & \{\cs{quad}\} & \{\cs{par}\cs{nobreak}\} \\
+part & 同右 & \{\cs{par}\cs{vskip} 20pt\} \\
+chapter & \{\cs{quad}\} & \{\cs{par}\cs{vskip} 20pt\} \\
+section & 同右 & \{\} \\
+subsection & 同右 & \{\} \\
+subsubsection & 同右 & \{\} \\
+paragraph & 同右 & \{\} \\
+subparagraph & 同右 & \{\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[titleformat=\{\parg{titleformat}\}]
+用于控制标题内容的格式,作用域为章节标题内容。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & \{\cs{Large}\cs{bfseries}\} & \{\cs{huge}\cs{bfseries}\} \\
+part & \{\cs{huge}\cs{bfseries}\} & \{\cs{Huge}\cs{bfseries}\} \\
+chapter & \{\cs{huge}\cs{bfseries}\} & \{\cs{Huge}\cs{bfseries}\} \\
+section & 同右 & \{\} \\
+subsection & 同右 & \{\} \\
+subsubsection & 同右 & \{\} \\
+paragraph & 同右 & \{\} \\
+subparagraph & 同右 & \{\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\item[beforeskip=\{\parg{beforeskip}\}]
+用于控制章节标题前的空距。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & 同右 & \{4ex\} \\
+part & 无效 & 无效 \\
+chapter & 同右 & \{50pt\} \\
+section & 同右 & \{-3.5ex plus -1ex minus -.2ex\} \\
+subsection & 同右 & \{-3.25ex plus -1ex minus -.2ex\} \\
+subsubsection & 同右 & \{-3.25ex plus -1ex minus -.2ex\} \\
+paragraph & 同右 & \{3.25ex plus 1ex minus .2ex\} \\
+subparagraph & 同右 & \{3.25ex plus 1ex minus .2ex\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+在~section~及以下的标题中,使用负的距离表示标题后的段落不缩进
+(如标准的英文~LaTeX~文档),否则缩进。标题上方真正的空距是该参数的绝对值。
+
+\item[afterskip=\{\parg{afterskip}\}]
+用于控制章节标题后的空距。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & 同右 & \{3ex\} \\
+part & 无效 & 无效 \\
+chapter & 同右 & \{40pt\} \\
+section & 同右 & \{2.3ex plus .2ex\} \\
+subsection & 同右 & \{1.5ex plus .2ex\} \\
+subsubsection & 同右 & \{1.5ex plus .2ex\} \\
+paragraph & 同右 & \{-1em\} \\
+subparagraph & 同右 & \{-1em\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+在~section~及以下的标题中,正的距离表示向下留出的空距(如标准的~section~标题),
+使用负的距离则表示向右留出的空距的负值(如标准的~paragraph~标题)。
+
+\item[indent=\{\parg{indent}\}]
+用于控制章节标题本身的缩进。
+
+该选项的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+part (article) & 同右 & \{0pt\} \\
+part & 无效 & 无效 \\
+chapter & 同右 & \{0pt\} \\
+section & 同右 & \{0pt\} \\
+subsection & 同右 & \{0pt\} \\
+subsubsection & 同右 & \{0pt\} \\
+paragraph & 同右 & \{0pt\} \\
+subparagraph & 同右 & \{\cs{parindent}\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+\end{description}
+
+
+\subsubsection{部分修改标题格式}
+
+如果只想修改标题格式中的某些参数而不是完全重新设置,可以使用带~+~号的
+设置选项。例如
+\begin{quote}
+|\CTEXsetup[format+={\zihao{1}}]{section}|
+\end{quote}
+则~section~的标题使用一号字体,而其他格式设置保持不变。
+
+标题格式相关的选项都支持这一功能,包括~|format|, |nameformat|, |numberformat|,
+|aftername|~和~|titleformat|,而且对所有文档类型都有效。
+
+\subsubsection{附录标题设置}
+
+附录(appendix)的标题也使用~|\CTEXsetup|~命令进行设置,
+第二个参数设为~|appendix|。但是只能使用~|name|~和~|number|~
+两个设置选项。在使用了~|\appendix|~命令之后,附录
+的名字和编号会被自动使用。{\bf 附录的名字和前面的章节不同,
+它只有一个部分,放在编号之前。}在~article~类文档中,
+附录是用~section~实现的,而在~report~和~book~类文档中附录
+使用的是~chapter~的设置。因此在设置附录的编号的时候要注意
+使用正确的计数器。如果你要设置其他格式的附录标题,
+可以根据使用的文档类直接用~section~或者~chapter~的设置命令来控制,
+但是要记住把设置命令放在~|\appendix|~(如果有的话)的后面,
+否则会被~|\appendix|~命令的设置覆盖。
+
+附录的缺省设置是
+\begin{center}
+\begin{tabular}{lll}
+\hline\hline
+ & 使用宏包选项~cap~ & 使用宏包选项~nocap~ \\
+\hline
+name (article) & 同右 & \{\} \\
+name & \{附录\textasciitilde\} & \{Appendix\cs{space}\} \\
+number (article) & 同右 & \{\cs{Alph}\marg{section}\} \\
+number & 同右 & \{\cs{Alph}\marg{chapter}\} \\
+\hline\hline
+\end{tabular}
+\end{center}
+
+
+\subsubsection{其他标题设置}
+
+除章节标题外其他标题的设置通过~|\CTEXoptions|~设置。包括
+
+\begin{description}
+\item[contentsname] 目录名
+\item[listfigurename] 表格目录
+\item[listtablename] 插图目录
+\item[figurename] 图
+\item[tablename] 表
+\item[abstractname] 摘要
+\item[indexname] 索引
+\item[bibname] 参考文献
+\end{description}
+
+例如
+\begin{quote}
+|\CTEXoptions[indexname={总索引}]|
+\end{quote}
+把索引的名字改为“总索引”。
+
+
+\subsubsection{其他设置}
+
+\paragraph{设置~\cs{today}~的日期格式}
+使用~|\CTEXoptions|~可以设置~|\today|~命令产生的日期格式。
+支持的格式包括
+
+\begin{enumerate}
+
+\item 阿拉伯数字加中文年月日
+\begin{quote}
+|\CTEXoptions[today=small]|
+\end{quote}
+\CTEXoptions[today=small]
+|\today|~生成的日期例子为“\today{}”。
+
+\item 中文数字加中文年月日
+\begin{quote}
+|\CTEXoptions[today=big]|
+\end{quote}
+\CTEXoptions[today=big]
+|\today|~生成的日期例子为“\today{}”。
+
+\item \LaTeX{}~标准格式
+\begin{quote}
+|\CTEXoptions[today=old]|
+\end{quote}
+\CTEXoptions[today=old]
+|\today|~生成的日期例子为“\today{}”。
+
+\end{enumerate}
+
+
+\paragraph{设置图表标题的分隔符}
+使用~|\CTEXoptions|~可以设置~|\caption|~命令产生的图表标题的分隔符。
+这个分隔符缺省是使用冒号~:~。可以通过命令
+\begin{quote}
+|\CTEXoptions[captiondelimiter={|\parg{string}|}]|
+\end{quote}
+设置为任意的单个字符或者字符串~\parg{string}。
+
+
+\subsection{配置文件}
+
+主要的配置文件有:
+\begin{itemize}
+\item \texttt{ctexopts.cfg}
+\item \texttt{ctexcap.cfg}, \texttt{ctexcap-gbk.cfg}, \texttt{ctexcap-utf8.cfg}
+\item \texttt{ctex.cfg}
+\end{itemize}
+
+\texttt{ctexopts.cfg}~用于设置缺省选项。例如可以根据系统中的可用中文字库,
+设置~\ref{fontset}~一节中的几个选项之一为缺省选项。
+该文件会在处理宏包选项之前装入。
+
+\texttt{ctexcap.cfg}~是缺省中文标题格式的定义,当你使用~\texttt{cap}~
+选项时就会使用这里的定义。你可以把它改为你经常使用的格式,这样就不用
+每次都在正文中修改了。~\texttt{ctexcap.cfg}~中的设置都可以通过宏包提供
+的设置命令在正文中进行修改。与中文编码有关的定义分别在
+~\texttt{ctexcap-gbk.cfg}~和~\texttt{ctexcap-utf8.cfg}~文件中。
+
+最后,宏包还将读入 \texttt{ctex.cfg} 文件,该文件中的设置将覆盖其他配置
+文件中的设置。用户可以在该文件中加入自己的定义。
+
+在修改这些配置文件的时候,你可以修改系统目录中的文件,也可以拷贝一份放到
+当前目录下,然后修改。TeX 会优先使用当前目录下的同名文件。这样你可以针对
+不同的应用设置不同的缺省配置文件。
+
+
+\section{版本更新}
+
+\begin{description}
+
+\item[v0.91 2009/05/23]
+调整宏包结构,增加对各种系统中文字库的支持选项:~cjkfonts, winfonts,
+adobefonts
+
+\item[v0.9 2009/05/05]
+整合~ctexutf8~宏包,增加对~UTF8~编码的支持;
+开始支持~Xe\TeX{}~中文系统(使用~xeCJK~宏包)
+
+\item[v0.8a 2007/05/06]
+增加 bold 字体的定义
+
+\item[v0.8 2006/06/09]
+将~ctex.sty~文件分割为~ctex.sty~和~ctexcap.sty,
+后者只支持标准文档类增加对~|\stepcounter|~的重定义,以和~calc~宏包兼容
+
+\item[v0.7f 2006/04/12]
+采用修改~|\AtBeginDocument|~和~|\AtEndDocument|~命令的方式
+来设置~CJK~环境,以减少宏包冲突
+
+\item[v0.7e 2006/03/22]
+改用~|\DeclareRobustCommand|~定义~|\CTEXnumber|~和~|\CTEXcounter|;
+除去~|\CTEXdigits|~和~|\CTEX@getdigit|~命令带来的多余空格
+
+\item[v0.7d 2005/12/28]
+在~fntef~类宏包后使用~|\normalem|~恢复~|\em|~宏的缺省定义
+
+\item[v0.7c 2005/12/20]
+增加对~|\if@mainmatter|~的判断,以兼容~amsbook~宏包
+
+\item[v0.7b 2005/12/09]
+调整宏包导入位置,解决~fntef~类宏包早于相应中文宏包导入的问题
+
+\item[v0.7a 2005/11/28]
+将~ctex.cfg~文件的读取时间前移,使得导言中的设置命令优先
+
+\item[v0.7 2005/11/25]
+支持在导言区中使用中文和章节标题设置命令(感谢~tercelxy~的建议);
+增加~CJKfntef~宏包和~CCTfntef~宏包的统一接口(感谢~chenyu\_21cn~的建议)
+
+\item[v0.6b 2005/11/07]
+将节以下编号和标题之间的空距定义转移到相应的~aftername~变量中
+
+\item[v0.6a 2005/09/30]
+增加对~|\CCT@set@fontsize|~的判断
+
+\item[v0.6 2005/09/24]
+针对~cct 0.6180~的修改,
+|\set@fontsize|: cct~从~0.6180~开始将宏~|\oset@fontsize|~改为~|\CCT@set@fontsize|
+
+\item[v0.5c 2004/09/29]
+避免重复执行设置~CJK~环境结束语句
+
+\item[v0.5b 2004/09/29]
+改变设置~CJK~环境结束语句的~|\AtEndDocument|~执行的位置,以减少宏包冲突
+
+\item[v0.5a 2004/09/06]
+修改图表标题分隔符设置中的错误
+
+\item[v0.5 2004/08/23]
+General: Move Chinese definitions from ctex.cfg to ctex.def
+
+\item[v0.4d 2004/08/14]
+|\ps@fancy|:~增加对~mainmatter~的判断;
+|\refstepcounter|:~修改~|\ref|~命令,不再包含除编号外的内容
+
+\item[v0.4c 2004/07/26]
+增加判断以避免嵌套定义~|\setcounter|~和~|\addtocounter|
+
+\item[v0.4b 2004/07/13]
+|\baselinestretch|:~把~|\baselinestretch|~从~1.2~改为~1.3
+
+\item[v0.4a 2004/05/15]
+|\CTEXdigits|:~增加~|\CTEXdigits|~命令;
+|\ziju|:~修改~CCT~的字距命令使得缩进保持一致
+
+\item[v0.4 2004/05/13]
+General:~如果指定了标准的~\LaTeX{}~字体大小,则不使用中文字号;
+中文字号定义改为直接使用~pt~为单位;
+|\zihao|:~删除~|\CTEX@fontsize|~命令,改为直接使用~|\fontsize|~命令
+
+\item[v0.3b 2004/05/11]
+General:~增加~fancyhdr~选项
+
+\item[v0.3a 2004/04/30]
+General:~修改命令~|\CCTpuncttrue|~的拼写错误
+
+\item[v0.3 2004/04/24]
+General:~对页眉设置进行微调;
+对中文标题的章节编号格式进行调整,去掉~|\S|;
+修改为使用 |\chinese| 命令以避免产生错误;
+修正 sub3section 和 sub4section 选项无效的问题;
+增加对图表标题分隔符的设置;
+|\ps@fancy|:~解决与~fancyhdr~的冲突
+
+\item[v0.2d 2004/04/23]
+General: Change option c5size to base on 10pt basic class;
+补上字号定义中行间距参数中缺少的~|\CTEX@bp|;
+修改缺省的字号大小
+
+\item[v0.2c 2004/02/13]
+General: Add CJKpunct as standard configuration;
+|\ifCTEX@punct|: 增加判断是否调整中文标点宽度的选项
+
+\item[v0.2b 2004/02/13]
+General:~修改缺省的行距;
+修改缺省的字号大小
+
+\item[v0.2a 2004/02/11]
+|\baselinestretch|:~增加对行距的设置;
+|\CTEX@spaceChar|:~加快处理速度,改善和~CJKpunct~的兼容性
+
+\item[v0.2 2004/01/16]
+General: Add support for CCT;
+增加部分修改标题格式设置的选项;
+增加修改标题前后空距设置的选项;
+|\CTEXsetfont|: |\CTEXfontinfo|~命令改为 |\CTEXsetfont|;
+|\ziju|:~参数的单位由绝对距离改为相对于当前汉字大小的倍数
+
+\item[v0.1f 2003/12/24]
+|\refname|:~修正~article~类中参考文献标题没有使用中文的问题
+
+\item[v0.1e 2003/11/05]
+|\refstepcounter|:~修正~|\ref|~命令后多出空格的问题
+
+\item[v0.1d 2003/09/27]
+|\addtocounter|:~将对~|\setcounter|~和~|\addtocounter|~的修改放到导言的最后以和其他宏包兼容
+
+\item[v0.1c 2003/08/19]
+General:~去掉生成的~.out~文件里章的标题前的多余空格
+
+\item[v0.1b 2003/08/17]
+|\zihao|:~删除多余的~|\newcount|~命令
+
+\item[v0.1a 2003/08/15]
+General:~修正~ctex.sty~中无法使用~sub3section~和~sub4section~选项的问题
+
+\item[v0.1 2003/08/15]
+General: First beta release
+
+\item[v0.0 2003/04/26] General: Initial version
+
+\end{description}
+
+
+\section{开发人员}
+
+\begin{itemize}
+
+\item 吴凌云~(aloft@ctex.org)
+\item 江疆~(gzjjgod@gmail.com)
+\item 王越~(yuleopen@gmail.com)
+\item 刘海洋~(LeoLiu.PKU@gmail.com)
+\item LiYanrui.m2~(LiYanrui)
+\item 陈之初~(Neals)
+
+\end{itemize}
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/ctex/test/test-cjk.tex b/Master/texmf-dist/doc/latex/ctex/test/test-cjk.tex
new file mode 100644
index 00000000000..0c02b5b1465
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/test/test-cjk.tex
@@ -0,0 +1,832 @@
+%# -*- coding: gbk -*-
+% $Id$
+\documentclass[cs4size,a4paper,fancyhdr,fntef,winfonts]{ctexbook}
+\usepackage{ifpdf}
+\usepackage{ifxetex}
+\ifxetex
+ \XeTeXinputencoding "GBK"
+ \usepackage[xetex]{hyperref}
+\else
+ \ifpdf
+ % pdflatex ʱҪʹ gbk2uni ܵõȷǩ
+ \usepackage[pdftex,CJKbookmarks]{hyperref}
+ \else% Assuming dvipdfm(x)
+ \AtBeginDvi{\special{pdf:tounicode GBK-EUC-UCS2}}
+ \usepackage[dvipdfm,CJKbookmarks]{hyperref}
+ \fi
+\fi
+
+\usepackage{shortvrb, makeidx}
+
+ \makeindex
+
+ \MakeShortVerb{\|}
+
+ \topmargin -0.5 true cm
+ \oddsidemargin 0 true cm
+ \evensidemargin 0 true cm
+ \textheight 23 true cm
+ \textwidth 16.5 true cm
+
+ \setlength{\parskip}{0.75ex plus .2ex minus .5ex}
+ \renewcommand{\baselinestretch}{1.2}
+
+
+ \pagestyle{fancy}
+
+
+ \newcommand{\ctex}{\texttt{ctex}}
+ \newcommand{\ctexorg}{\texttt{ctex.org}}
+
+ \newcommand{\TestFile}{ļ}
+
+
+ \CTEXoptions[today=big]
+ \CTEXsetup[name={,},number={\chinese{section}},format+={\bfseries},beforeskip={-10ex plus -.1ex minus -.1ex},afterskip={1ex plus .1ex minus .1ex}]{section}
+ \CTEXsetup[name={},number={\chinese{chapter}}]{appendix}
+
+ \CTEXsetup[name={,ƪ},nameformat={\centering\bfseries},titleformat={\zihao{0}\bfseries}]{part}
+
+ \setcounter{secnumdepth}{4}
+ \CTEXsetup[name={(,)},number={\arabic{paragraph}}]{paragraph}
+
+
+\begin{document}
+
+\title{~ctex~\TestFile\thanks{just test}}
+\author{}
+
+\maketitle
+
+\tableofcontents
+
+
+\part{ǰ}
+
+\chapter{} \label{chapter:intro}
+
+
+
+\section{˵}
+
+\ctex{}~ṩ˱д~\LaTeX{}~ĵõһЩ궨
+Ҫ~CJK~֧֣~\ctexorg{}~ά
+
+ļڲ~\ctex{}~͹ܡ
+
+
+\part{}
+
+\chapter{}
+
+
+
+
+\section{ֺ}
+|\zihao| \index{zihao}
+
+\begin{tabular}{l}
+\zihao{0} English \\
+\zihao{-0} С English \\
+\zihao{1} һ English \\
+\zihao{-1} Сһ English \\
+\zihao{2} English \\
+\zihao{-2} С English \\
+\zihao{3} English \\
+\zihao{-3} С English \\
+\zihao{4} ĺ English \\
+\zihao{-4} Сĺ English \\
+\zihao{5} English \\
+\zihao{-5} С English \\
+\zihao{6} English \\
+\zihao{-6} С English \\
+\zihao{7} ߺ English \\
+\zihao{8} ˺ English \\
+\end{tabular}
+
+\zihao{0}
+ֳֳֳֳֳֳֳֳֳ
+ֳֳֳֳֳֳֳֳֳ
+ֳֳֳֳֳֳֳֳֳ
+
+\zihao{-0}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{1}
+һһһһһһһһһһ
+һһһһһһһһһһ
+һһһһһһһһһһ
+
+\zihao{-1}
+СһСһСһСһСһСһСһСһСһСһ
+СһСһСһСһСһСһСһСһСһСһ
+СһСһСһСһСһСһСһСһСһСһ
+
+\zihao{2}
+ֶֶֶֶֶֶֶֶֶ
+ֶֶֶֶֶֶֶֶֶ
+ֶֶֶֶֶֶֶֶֶ
+
+\zihao{-2}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{3}
+
+
+
+
+\zihao{-3}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{4}
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+
+\zihao{-4}
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+
+\zihao{5}
+
+
+
+
+
+
+\zihao{-5}
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{6}
+
+
+
+
+
+
+\zihao{-6}
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{7}
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+
+\zihao{8}
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+
+\normalsize
+
+\section{־}
+
+|\ziju| \index{ziju}
+
+׼־Ϊ㣬ı־|\ziju{1}|
+
+{\ziju{1}
+ڵ־Ϊ~1~֣ӢIJӰ죺\\
+This is an English example
+}
+
+\section{ֿ}
+
+|\ccwd| \index{ccwd}
+
+ǰֿ~\the\ccwd~\framebox[\ccwd]{\ }~Ŀȡ
+
+ıֺŴС|\zihao{3}|
+
+{\zihao{3}
+ǰֿ~\the\ccwd~\framebox[\ccwd]{\ }~Ŀȡ
+}
+
+ı־|\ziju{1}|
+
+{\ziju{1}
+ǰֿ~\the\ccwd~\framebox[\ccwd]{\ }~Ŀȡ
+}
+
+\section{}
+
+|\CTEXindent| \index{CTEXindent}
+
+׼Ķ֣
+
+
+\noindent ûС
+
+ıֺŴС|\zihao{3}|
+
+{\zihao{3}
+
+\noindent ûС
+}
+
+ı־|\ziju{1}|
+
+{\ziju{1}
+
+\noindent ûС
+}
+
+\section{}
+
+\begin{tabular}{ll}
+ |\songti| & {\songti } \\
+ |\heiti| & {\heiti } \\
+ |\fangsong| & {\fangsong } \\
+ |\kaishu| & {\kaishu } \\
+ |\lishu| & {\lishu } \\
+ |\youyuan| & {\youyuan Բ}
+\end{tabular}
+
+\index{songti} \index{heiti} \index{fangsong} \index{kaishu} \index{lishu} \index{youyuan}
+
+\section{}
+
+\begin{center}
+\begin{tabular}{lllll}
+
+\hline
+ Family & Series & Shape & & \\ \hline
+ {\bf rm} & & & |\rmfamily| &
+ {\rmfamily English } \\
+ & & it & |\rmfamily\itshape| &
+ {\rmfamily\itshape English } \\
+ & & sl & |\rmfamily\slshape| &
+ {\rmfamily\slshape English } \\ \cline{2-5}
+ & bf & & |\rmfamily\bfseries| &
+ {\rmfamily\bfseries English } \\
+ & bf & it & |\rmfamily\bfseries\itshape| &
+ {\rmfamily\bfseries\itshape English } \\
+ & bf & sl & |\rmfamily\bfseries\slshape| &
+ {\rmfamily\bfseries\slshape English } \\ \hline
+
+ {\bf sf} & & & |\sffamily| &
+ {\sffamily English } \\
+ & & it & |\sffamily\itshape| &
+ {\sffamily\itshape English } \\
+ & & sl & |\sffamily\slshape| &
+ {\sffamily\slshape English } \\ \cline{2-5}
+ & bf & & |\sffamily\bfseries| &
+ {\sffamily\bfseries English } \\
+ & bf & it & |\sffamily\bfseries\itshape| &
+ {\sffamily\bfseries\itshape English } \\
+ & bf & sl & |\sffamily\bfseries\slshape| &
+ {\sffamily\bfseries\slshape English } \\ \hline
+
+ {\bf tt} & & & |\ttfamily| &
+ {\ttfamily English } \\
+ & & it & |\ttfamily\itshape| &
+ {\ttfamily\itshape English } \\
+ & & sl & |\ttfamily\slshape| &
+ {\ttfamily\slshape English } \\ \cline{2-5}
+ & bf & & |\ttfamily\bfseries| &
+ {\ttfamily\bfseries English } \\
+ & bf & it & |\ttfamily\bfseries\itshape| &
+ {\ttfamily\bfseries\itshape English } \\
+ & bf & sl & |\ttfamily\bfseries\slshape| &
+ {\ttfamily\bfseries\slshape English } \\ \hline
+\end{tabular}
+\end{center}
+
+
+\chapter{߼}
+
+\section{}
+
+|\CTEXnumber| |\CTEXdigits| \index{CTEXnumber} \index{CTEXdigits}
+
+\CTEXnumber{\test}{100002005}
+\typeout{\test}
+\test
+
+\CTEXdigits{\test}{100002005}
+\typeout{\test}
+\test
+
+\section{}
+
+|\ref| |\ref*| \index{ref} \index{ref*}
+
+õǣ\ref{chapter:intro}
+
+õǣ\ref*{chapter:intro}ӣ
+
+\section{}
+
+|\index| \index{index}
+
+\index{test1}
+\index{test2}
+\index{test3}
+\index{test4}
+\index{test5}
+\index{test6}
+\index{test7}
+\index{test8}
+\index{test9}
+\index{test10}
+\index{test11}
+\index{test12}
+\index{test13}
+\index{test14}
+\index{test15}
+\index{test16}
+\index{test17}
+\index{test18}
+\index{test19}
+\index{test20}
+\index{test21}
+\index{test22}
+\index{test23}
+\index{test24}
+\index{test25}
+\index{test26}
+\index{test27}
+\index{test28}
+\index{test29}
+\index{test30}
+\index{test31}
+\index{test32}
+\index{test33}
+\index{test34}
+\index{test35}
+\index{test36}
+\index{test37}
+\index{test38}
+\index{test39}
+\index{test40}
+\index{test41}
+\index{test42}
+\index{test43}
+\index{test44}
+\index{test45}
+\index{test46}
+\index{test47}
+\index{test48}
+\index{test49}
+\index{test50}
+
+
+\chapter{ı}
+
+һǧŰٰʮ䣬׮£ϵѣһջ÷ȥ
+ƹ񻷵Ĺƾ˶ץһЯڻɻѯ
+ˣ֪Ǿˣûȥ뻨裬ʮޡҲ
+࣬°أװһֻղ˶ĺֻ˺õĻ֡û룬
+֮أѿڳ󣬾һԣľرʶ
+Ʒࡣȥµϻ̣ҲDzʶǡʦ̴
+ʦʦҡͷһȴ˵ŴʦܲԤ⣬ռ⻨ܿ
+֦ʦһȡһʳֻļ֣˵֡
+ʦ˵滨֦侰ãΪҲ󻨿Ȼ
+״ĵõ塣һ֦Ϊɫһ֦Ϊɫһ֦Ϊɫһ֦Ϊ
+ɫһʱϢÿ߲Ī̾ΪֹȻ⣬
+һϧͷԽˮʩʣŪijƣҹ
+øȥ࣬ѳ¯ϵˮȥ˻ں޲ѣ
+Ҳˤ裬˯һ²
+
+\paragraph{һ}
+죬ϾΪһ軨ѣ֪֮˻󣬹Ҳˡû뵽죬
+ȴַһ׮˶¡³ߵ磬̫
+õţ̫ĺô̫Ŷȴ˻̫ţ
+˭ҲûȥơмԳԳû
+ģеǮ㲻ԸǹˣƱȥ⳵ƫƫʲôҪ
+ٵľľѾͳ۵غеԳ
+⳵ֻÿУгӵĽࡣֻͽֻͽ
+ҵӰӣҲӰӣӰDzʹġͻȻӰӵɫdz
+dẓһ˲ȫȻʧûӰţƺ˲ˣƨɺ
+һɻ˾żһĸ̫ˣȫ
+ͷϿϹȻĸ̫ĸ̫Сһ㣬ֲ¾ɴۣ
+ǾһģɸΡȥľй¿ʴģͬʱ
+̫ȴûΪ۾ˣϿ̫Ͳٷ죬ǰ׵ģ
+纸һİף׵ûʲôʲôҲˣȫĺڰǿʲ
+ôģȫĹ˾Ҳǿʲô𣿴Сijٲҷˣֻȣ
+ȴ̤͸оѲڽˣڿӰɣӳͻȻϣ
+Ļϵͼʧˣ컹ڽšһôоˣе˲Ҳ
+ôоˣǼžΨгǽͷ˴Ҫٴ
+һûд꣬ײǽǣһ£ʧˡƺ
+ˣЦһ£͵ؾʵͬʱž־壬۾У
+ࡣ
+
+\paragraph{ڶ}
+Ĺ˽Сʱϵָֻ̫һǵ۾𽥿
+ԼӰӣ֮Ϊ˵DZͻŲ·ɢһ
+ʱϣȴָӽͨľ졣ȫϣȻľһͷ
+ͷ׹棬ȴһ˫üۣؿ˵ææʹЩܲã
+վͷŭˣ캰أĶյľһһߴͷϵӲñӣ
+Ͻлӣpipi׵ͷˣ
+ָڰȫддȴһŵϹŴʣܣЦˡЦ
+һƬΪͷ°ȫʱ򡢱¶ϵ·ԭ;
+ơǰӡš֣˫ȲɴǴֲڵĴһֱ˺
+ƨɵ߾Ǹء֣ұ߾ǸӦ֣ͷ֪ܣȴڳ£˵
+һҥҥȫǣǣһǹͣ߸帣
+ٵͶ˱˸аԺζȫޣ
+ڼ˴ñԭԱ档ﴧֽ
+˵ԱŤŤƨɾ׬Ǯ˸ΪԱɽ
+亣ζϲȫʮ̣ʵʵѧ׷档
+
+ҥ˷ͷǸؤ˵ǸʦΪֻн
+ʦܱҥǣҥжǰ˶ָΨΪʦһ˺
+ͷʲôˣ׷һǡһλг
+ԭϺȴʮÿгųǽ
+ҵȴȫǼڣɫ΢ӪˮĹȥˡµг䲻
+ǰְ;ȫȻɲԼκͷѸôӺδٸ
+ĿټΪʲıһ˽л
+¸ģ˵һνʮŶĻʱҲǸ
+ɲȺ˼άڱأʳ÷չغʡԶԶǰε
+ץҵϻǽǷʴࡢþʮֻЧ
+ְؾ͵õԶ滮ɱ¸£
+ץ˲ץ֮ҵ緢չĻΣڵ֡г
+ʣ̸ҹֽԭְѧУи顣һ
+ʱ䣬ϾҪĴʣһǧŲ֮ҵ޸ǽ
+ͨ˳ǺӣسǺӱ߽ɼطɫֳָĽ֣һΪƽ
+֣ר黭һΪν֣רӪȫȫʡСԣһ
+彨֣乤ƷزǣĻҵĴչʹ
+еԱȻ࣬ͳΰıײһʱDZ˳ǡ
+̳ǡ潳ǡҲʼһֵIJλ׹ͷڽͷ˵
+ҥ˸һкµһΣһΣͷ˵
+䣺˵УУҲС˵УͲУҲСкˣһ
+ơͷû˵ҥָˣкȴԺҥ÷죬ȻƵ
+Ҳˣֲ˵绰˵ͷɢгҥԣӦֹ
+ͷһ飬ԭһλʮϷƦӡΪϷƦӣǴʮǰ
+ʦתʦʱܵ˾ݺδתɣϷʡδܳɹdzס
+ȥʡſ״飬ˣû·
+̨ף̬ҲԲϷá಻磬ڽͷ
+ʮ졢޴ַųóһط¡ûͷֳ
+ڽͷȴһӳؽִʰˡһкȻӵʹ˵ҥ
+ͷȴ˿ֻܸ࣬ߺܳġඣаãඣÿ
+ڽСҲڳǽͷϴһǺһӦ
+¥¥ϵijɰǧֻһƬˡ
+
+
+\chapter{CJKfntef~~CCTfntef}
+
+\CTEXunderdot{ҥ}
+
+\CTEXunderline{ҥ}
+
+\CTEXunderdblline{ҥ}
+
+\CTEXunderwave{ҥ}
+
+\CTEXsout{ҥ}
+
+\CTEXxout{ҥ}
+
+
+\begin{CTEXfilltwosides}{3cm}
+ҥ \\
+ \\
+ \\
+
+\end{CTEXfilltwosides}
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+
+\appendix
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+
+\printindex
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/ctex/test/test-cjkutf8.tex b/Master/texmf-dist/doc/latex/ctex/test/test-cjkutf8.tex
new file mode 100644
index 00000000000..c5e1070b95d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/test/test-cjkutf8.tex
@@ -0,0 +1,829 @@
+%# -*- coding: utf-8 -*-
+% $Id$
+\documentclass[cs4size,a4paper,fancyhdr,fntef,UTF8,winfonts]{ctexbook}
+\usepackage{ifpdf}
+\usepackage{ifxetex}
+\ifxetex
+ \usepackage[xetex]{hyperref}
+\else
+ \ifpdf
+ \usepackage[pdftex,unicode]{hyperref}
+ \else% Assuming dvipdfm(x)
+ \usepackage[dvipdfm,unicode]{hyperref}
+ \fi
+\fi
+
+\usepackage{shortvrb, makeidx}
+
+ \makeindex
+
+ \MakeShortVerb{\|}
+
+ \topmargin -0.5 true cm
+ \oddsidemargin 0 true cm
+ \evensidemargin 0 true cm
+ \textheight 23 true cm
+ \textwidth 16.5 true cm
+
+ \setlength{\parskip}{0.75ex plus .2ex minus .5ex}
+ \renewcommand{\baselinestretch}{1.2}
+
+
+ \pagestyle{fancy}
+
+
+ \newcommand{\ctex}{\texttt{ctex}}
+ \newcommand{\ctexorg}{\texttt{ctex.org}}
+
+ \newcommand{\TestFile}{测试文件}
+
+
+ \CTEXoptions[today=big]
+ \CTEXsetup[name={第,节},number={\chinese{section}},format+={\bfseries},beforeskip={-10ex plus -.1ex minus -.1ex},afterskip={1ex plus .1ex minus .1ex}]{section}
+ \CTEXsetup[name={附件},number={\chinese{chapter}}]{appendix}
+
+ \CTEXsetup[name={第,篇},nameformat={\centering\bfseries},titleformat={\zihao{0}\bfseries}]{part}
+
+ \setcounter{secnumdepth}{4}
+ \CTEXsetup[name={(,)},number={\arabic{paragraph}}]{paragraph}
+
+
+\begin{document}
+
+\title{宏包~ctex~\TestFile\thanks{just test}}
+\author{吴凌云}
+
+\maketitle
+
+\tableofcontents
+
+
+\part{前言}
+
+\chapter{简介} \label{chapter:intro}
+
+简介
+
+\section{说明}
+
+\ctex{}~宏包提供了编写中文~\LaTeX{}~文档常用的一些宏定义和命令。
+需要~CJK~宏包的支持,由~\ctexorg{}~制作并负责维护。
+
+本文件用于测试~\ctex{}~宏包的命令和功能。
+
+
+\part{正文}
+
+\chapter{基本命令}
+
+基本命令
+
+
+\section{字号}
+测试命令:|\zihao| \index{zihao}
+
+\begin{tabular}{l}
+\zihao{0} 初号字 English \\
+\zihao{-0} 小初号 English \\
+\zihao{1} 一号字 English \\
+\zihao{-1} 小一号 English \\
+\zihao{2} 二号字 English \\
+\zihao{-2} 小二号 English \\
+\zihao{3} 三号字 English \\
+\zihao{-3} 小三号 English \\
+\zihao{4} 四号字 English \\
+\zihao{-4} 小四号 English \\
+\zihao{5} 五号字 English \\
+\zihao{-5} 小五号 English \\
+\zihao{6} 六号字 English \\
+\zihao{-6} 小六号 English \\
+\zihao{7} 七号字 English \\
+\zihao{8} 八号字 English \\
+\end{tabular}
+
+\zihao{0}
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+
+\zihao{-0}
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+
+\zihao{1}
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+
+\zihao{-1}
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+
+\zihao{2}
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+
+\zihao{-2}
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+
+\zihao{3}
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+
+\zihao{-3}
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+
+\zihao{4}
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+
+\zihao{-4}
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+
+\zihao{5}
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+
+\zihao{-5}
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+
+\zihao{6}
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+
+\zihao{-6}
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+
+\zihao{7}
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+
+\zihao{8}
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+
+\normalsize
+
+\section{字距}
+
+测试命令:|\ziju| \index{ziju}
+
+标准字距为零,改变字距后:|\ziju{1}|
+
+{\ziju{1}
+现在的字距为~1~个字,英文不受影响:\\
+This is an English example。
+}
+
+\section{字宽}
+
+测试命令:|\ccwd| \index{ccwd}
+
+当前汉字字宽是~\the\ccwd,即盒子~\framebox[\ccwd]{\ }~的宽度。
+
+改变字号大小后:|\zihao{3}|
+
+{\zihao{3}
+当前汉字字宽是~\the\ccwd,即盒子~\framebox[\ccwd]{\ }~的宽度。
+}
+
+改变字距后:|\ziju{1}|
+
+{\ziju{1}
+当前汉字字宽是~\the\ccwd,即盒子~\framebox[\ccwd]{\ }~的宽度。
+}
+
+\section{段首缩进}
+
+测试命令:|\CTEXindent| \index{CTEXindent}
+
+标准的中文段首缩进是两个汉字:
+
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+
+改变字号大小后:|\zihao{3}|
+
+{\zihao{3}
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+}
+
+改变字距后:|\ziju{1}|
+
+{\ziju{1}
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+}
+
+\section{字体命令}
+
+\begin{tabular}{ll}
+ |\songti| & {\songti 宋体} \\
+ |\heiti| & {\heiti 黑体} \\
+ |\fangsong| & {\fangsong 仿宋} \\
+ |\kaishu| & {\kaishu 楷书} \\
+ |\lishu| & {\lishu 隶书} \\
+ |\youyuan| & {\youyuan 幼圆}
+\end{tabular}
+
+\index{songti} \index{heiti} \index{fangsong} \index{kaishu} \index{lishu} \index{youyuan}
+
+\section{字体框架}
+
+\begin{center}
+\begin{tabular}{lllll}
+
+\hline
+ Family & Series & Shape & 命令 & 例子 \\ \hline
+ {\bf rm} & & & |\rmfamily| &
+ {\rmfamily English 中文字体} \\
+ & & it & |\rmfamily\itshape| &
+ {\rmfamily\itshape English 中文字体} \\
+ & & sl & |\rmfamily\slshape| &
+ {\rmfamily\slshape English 中文字体} \\ \cline{2-5}
+ & bf & & |\rmfamily\bfseries| &
+ {\rmfamily\bfseries English 中文字体} \\
+ & bf & it & |\rmfamily\bfseries\itshape| &
+ {\rmfamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\rmfamily\bfseries\slshape| &
+ {\rmfamily\bfseries\slshape English 中文字体} \\ \hline
+
+ {\bf sf} & & & |\sffamily| &
+ {\sffamily English 中文字体} \\
+ & & it & |\sffamily\itshape| &
+ {\sffamily\itshape English 中文字体} \\
+ & & sl & |\sffamily\slshape| &
+ {\sffamily\slshape English 中文字体} \\ \cline{2-5}
+ & bf & & |\sffamily\bfseries| &
+ {\sffamily\bfseries English 中文字体} \\
+ & bf & it & |\sffamily\bfseries\itshape| &
+ {\sffamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\sffamily\bfseries\slshape| &
+ {\sffamily\bfseries\slshape English 中文字体} \\ \hline
+
+ {\bf tt} & & & |\ttfamily| &
+ {\ttfamily English 中文字体} \\
+ & & it & |\ttfamily\itshape| &
+ {\ttfamily\itshape English 中文字体} \\
+ & & sl & |\ttfamily\slshape| &
+ {\ttfamily\slshape English 中文字体} \\ \cline{2-5}
+ & bf & & |\ttfamily\bfseries| &
+ {\ttfamily\bfseries English 中文字体} \\
+ & bf & it & |\ttfamily\bfseries\itshape| &
+ {\ttfamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\ttfamily\bfseries\slshape| &
+ {\ttfamily\bfseries\slshape English 中文字体} \\ \hline
+\end{tabular}
+\end{center}
+
+
+\chapter{高级命令}
+
+\section{中文数字}
+
+测试命令:|\CTEXnumber| |\CTEXdigits| \index{CTEXnumber} \index{CTEXdigits}
+
+\CTEXnumber{\test}{100002005}
+\typeout{\test}
+\test
+
+\CTEXdigits{\test}{100002005}
+\typeout{\test}
+\test
+
+\section{中文引用}
+
+测试命令:|\ref| |\ref*| \index{ref} \index{ref*}
+
+我们引用的是:\ref{chapter:intro}。
+
+我们引用的是:\ref*{chapter:intro}。(不带超链接)
+
+\section{索引}
+
+测试命令:|\index| \index{index}
+
+\index{test1}
+\index{test2}
+\index{test3}
+\index{test4}
+\index{test5}
+\index{test6}
+\index{test7}
+\index{test8}
+\index{test9}
+\index{test10}
+\index{test11}
+\index{test12}
+\index{test13}
+\index{test14}
+\index{test15}
+\index{test16}
+\index{test17}
+\index{test18}
+\index{test19}
+\index{test20}
+\index{test21}
+\index{test22}
+\index{test23}
+\index{test24}
+\index{test25}
+\index{test26}
+\index{test27}
+\index{test28}
+\index{test29}
+\index{test30}
+\index{test31}
+\index{test32}
+\index{test33}
+\index{test34}
+\index{test35}
+\index{test36}
+\index{test37}
+\index{test38}
+\index{test39}
+\index{test40}
+\index{test41}
+\index{test42}
+\index{test43}
+\index{test44}
+\index{test45}
+\index{test46}
+\index{test47}
+\index{test48}
+\index{test49}
+\index{test50}
+
+
+\chapter{中文标点}
+
+一千九百八十年间,西京城里出了桩异事,两个关系是死死的朋友,一日活得泼烦,去
+了唐贵妃杨玉环的墓地凭吊,见许多游人都抓了一包坟丘的土携在怀里,甚感疑惑,询
+问了,才知贵妃是绝代佳人,这土拿回去撒入花盆,花就十分鲜艳。这二人遂也刨了许
+多,用衣包回,装在一只收藏了多年的黑陶盆里,只待有了好的花籽来种。没想,数天
+之后,盆里兀自生出绿芽,月内长大,竟蓬蓬勃勃了一丛,但这草木特别,无人能识得
+品类。抱了去城中孕璜寺的老花工请教,花工也是不识。恰有智祥大师经过,又请教大
+师,大师还是摇头。其中一人却说:“常闻大师能卜卦预测,不妨占这花将来能开几
+枝?”大师命另一人取一个字来,那人适持花工的剪刀在手,随口说出个“耳”字。大
+师说:“花是奇花,当开四枝,但其景不久,必为尔所残也。”后花开果然如数,但形
+状类似牡丹,又类似玫瑰。且一枝蕊为红色,一枝蕊为黄色,一枝蕊为白色,一枝蕊为
+紫色,极尽娇美。一时消息传开每日欣赏者不绝,莫不叹为观止。两个朋友自然得意,
+尤其一个更是珍惜,供养案头,亲自浇水施肥,殷勤务弄。不料某日醉酒,夜半醒来忽
+觉得该去浇灌,竟误把厨房炉子上的热水壶提去,结果花被浇死。此人悔恨不已,索性
+也摔了陶盆,生病睡倒一月不起。
+
+\paragraph{第一段}
+此事虽异,毕竟为一盆花而已,知道之人还并不广大,过后也便罢了。没想到了夏天,
+西京城却又发生了一桩更大的人人都经历的异事。是这古历六月初七的晌午,先是太阳
+还红堂堂地照着,太阳的好处是太阳照着而人却忘记了还有太阳在照着,所以这个城里
+的人谁也没有往天上去看。街面的形势依旧是往日形势。有级别坐卧车的坐着卧车。没
+级别的,但有的是钱,便不愿挤那公共车了,抖着票子去搭出租车。偏偏有了什么重要
+的人物亲临到这里,数辆的警车护卫开道,尖锐的警笛就长声儿价地吼,所有的卧车,
+出租车、公共车只得靠边慢行,扰乱了自行车长河的节奏。只有徒步的人只管徒步,你
+踩着我的影子,我踩着他的影子,影子是不痛不痒的。突然。影子的颜色由深而浅,愈
+浅愈短,一瞬间全然消失。人没有了阴影拖着,似乎人不是了人,用手在屁股后摸摸,
+摸得一脸的疑惑。有人就偶尔往天上一瞅,立即欢呼:“天上有四个太阳了!”人们全
+举了头往天上看,天上果然出现了四个太阳。四个太阳大小一般,分不清了新旧雌雄,
+是聚在一起的,组成个丁字形。过去的经验里,天上是有过月亏和日蚀的,但同时有四
+个太阳却没有遇过,以为是眼睛看错了;再往天上看,那太阳就不再发红,是白的,白
+得像电焊光一样的白,白得还像什么?什么就也看不见了,完全的黑暗人是看不见了什
+么的,完全的光明人竟也是看不见了什么吗?大小的车辆再不敢发动了,只鸣喇叭,人
+却胡扑乱踏,恍惚里甚或就感觉身已不在街上了,是在看电影吧?放映机突然发生故障,
+银幕上的图象消失了,而音响还在进行着。一个人这么感觉了,所有的人差不多也都这
+么感觉了,于是寂静下来,竟静得死气沉沉,唯有城墙头上有人吹动的埙音最后要再吹
+一声,但没有吹起,是力气用完,像风撞在墙角,拐了一下,消失了。人们似乎看不起
+吹埙的人,笑了一下,猛地惊醒身处的现实,同时被寂静所恐惧,哇哇惊叫,各处便疯
+倒了许多。
+
+\paragraph{第二段}
+这样的怪异持续了近半个小时,天上的太阳又恢复成了一个。待人们的眼睛逐渐看见地
+上有了自己的影子,皆面面相觑,随之倒为人的狼狈有了羞愧,就慌不择路地四散。一
+时又是人乱如蚁,却不见了指挥交通的警察。安全岛上,悠然独坐的竟是一个老头。老
+头囚首垢面,却有一双极长的眉眼,冷冷地看着人的忙忙。这眼神使大家有些受不得,
+终就愤怒了,遂喊警察呢?警察在哪儿,姓苏的警察就一边跑一边戴头上的硬壳帽子,
+骂着老叫花子:“pi!”“pi”是西京城里骂“滚”的最粗俗的土话。老头听了,
+拿手指在安全岛上写,写出来却是一个极文雅的上古词:避,就慢慢地笑了。随着笑起
+来的是一大片,因为老头走下安全岛的时候、暴露了身上的衣服原是孕璜寺香客敬奉的
+锦旗所制。前心印着“有求”两字,那双腿岔开,裤裆处是粗糙的大针脚一直到了后腰,
+屁股蛋上左边就是个“必”字,右边就是个“应”字,老头并不知耻,却出口成章;说
+出了一段谣儿来。这谣儿后来流传全城,其辞是:一类人是公仆,高高在上享清福。二
+类人作“官倒”,投机倒把有人保。三类人搞承包,吃喝嫖赌全报销。四类人来租赁,
+坐在家里拿利润。五类人大盖帽,吃了原告吃被告。六类人手术刀,腰里揣满红纸包。
+七类人当演员,扭扭屁股就赚钱。八类人搞宣传,隔三岔五解个馋。九类人为教员,山
+珍海味认不全。十类人主人翁,老老实实学雷锋。
+
+此谣儿流传开来后,有人分析老头并不是个乞丐,或者说他起码是个教师,因为只有教
+师才能编出这样的谣辞,且谣辞中对前几类人都横加指责,唯独为教师一类人喊苦叫屈。
+但到底老头是什么人,无人再作追究。这一年里,恰是西京城里新任了一位市长,这市
+长原籍上海,夫人却是西京土著,十数春秋,西京的每任市长都有心在这座古城建功立
+业,但却差不多全是几经折腾,起色甚微,便铁打的营盘流水的官去了。新的市长虽不
+悦意在岳父门前任职,苦于身在仕途,全然由不得自己,到任后就犯难该从何处举纲张
+目。夫人属于贤内助,便召集了许多亲朋好友为其夫顾问参谋,就有了一个年轻人叫黄
+德复的,说出了一段建议来:西京是十二朝古都,文化积淀深厚是资本也是负担。各层
+干部和群众思维趋于保守,故长期以来经济发展比沿海省市远远落后,若如前几任的市
+长那样面面俱抓,常因企业老化,城建欠帐大多、用尽十分力,往往只有三分效果,且
+当今任职总是三年或五载就得调动,长远规划难以完成便又人事更新;与其这样,倒不
+如抓别人不抓之业,如发展文化和旅游,短期内倒有政绩出现。市长大受启发,不耻下
+问,竟邀这年轻人谈了三天三夜,又将其调离原来任职的学校来市府作了身边秘书。一
+时间,上京索要拨款,在下四处集资,干了一宗千古不朽之宏业,即修复了西京城墙,
+疏通了城河,沿城河边建成极富地方特色的娱乐场。又改建了三条大街:一条为仿唐建
+筑街,专售书画、瓷器;一条为仿宋建筑街,专营全市乃至全省民间小吃;一条仿明、
+清建筑街,集中了所有民间工艺品、土特产。但是,城市文化旅游业的大力发展,使城
+市的流动人员骤然增多,就出现了许多治安方面的弊病,一时西京城被外地人称作贼城、
+烟城、暗娼城。市民也开始滋生另一种的不满情绪。当那位囚首垢面的老头又在街头说
+他的谣儿,身后总是厮跟了一帮闲汉,嚷道:“来一段,再来一段!”,老头就说了两
+句:“说你行,你就行,不行也行。说不行,就不行,行也不行。”闲汉们听了,一齐
+鼓掌。老头并没说这谣儿所指何人,闲汉们却对号入座,将这谣儿传得风快,自然黄德
+复不久也听到了,便给公安局拨了电话,说老头散布市长的谣言,应予制止。公安局收
+留了老头,一查,原是一位十多年上访痞子。为何是上访痞子?因是此人十多年前任民
+办教师,转公办教师时受到上司陷害未能转成,就上访省府,仍未能成功,于是长住西
+京,隔三间五去省府门口提意见,递状书,静坐耍赖,慢慢地欲进没有门路,欲退又无
+台阶,精神变态,后来也索性不再上访。亦不返乡,就在街头流浪起来。公安局收审了
+十天、查无大罪,又放出来,用车一气拉出城三百里地放下。没想这老头几天后又出现
+在街头,却拉动了一辆架子车,沿街穿巷收拾破烂了。一帮闲汉自然拥他,唆使再说谣
+儿,老头却吝啬了口舌,只吼很高很长的“破烂喽-!承包破烂-喽!”这叫声每日
+早晚在街巷吼叫。常也有人在城墙头上吹埙,一个如狼嚎,一个鸣咽如鬼,两厢呼应,
+钟楼鼓楼上的成百上千只鸟类就聒噪一片了。
+
+
+\chapter{CJKfntef~和~CCTfntef}
+
+\CTEXunderdot{此谣儿流传开来后}
+
+\CTEXunderline{此谣儿流传开来后}
+
+\CTEXunderdblline{此谣儿流传开来后}
+
+\CTEXunderwave{此谣儿流传开来后}
+
+\CTEXsout{此谣儿流传开来后}
+
+\CTEXxout{此谣儿流传开来后}
+
+
+\begin{CTEXfilltwosides}{3cm}
+此谣 \\
+儿流 \\
+传开 \\
+来后
+\end{CTEXfilltwosides}
+
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+
+\appendix
+
+\chapter{测试}
+
+测试
+
+\chapter{测试}
+
+测试
+
+\chapter{测试}
+
+测试
+
+
+\printindex
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/ctex/test/test-xetex.tex b/Master/texmf-dist/doc/latex/ctex/test/test-xetex.tex
new file mode 100644
index 00000000000..5d7fe772878
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/test/test-xetex.tex
@@ -0,0 +1,817 @@
+%# -*- coding: utf-8 -*-
+% $Id$
+% test-xetex.tex: XeTeX only test case, use xelatex to run
+
+\documentclass[cs4size,a4paper,fancyhdr,fntef,winfonts]{ctexbook}
+
+\usepackage{hyperref}
+
+\usepackage{shortvrb, makeidx}
+
+\setlength{\headheight}{15pt}
+
+ \makeindex
+
+ \MakeShortVerb{\|}
+
+ \setlength{\parskip}{0.75ex plus .2ex minus .5ex}
+ \renewcommand{\baselinestretch}{1.2}
+
+ \pagestyle{fancy}
+
+
+ \newcommand{\ctex}{\texttt{ctex}}
+ \newcommand{\ctexorg}{\texttt{ctex.org}}
+
+ \newcommand{\TestFile}{测试文件}
+
+
+ \CTEXoptions[today=big]
+ \CTEXsetup[name={第,节},number={\chinese{section}},format+={\bfseries},beforeskip={-10ex plus -.1ex minus -.1ex},afterskip={1ex plus .1ex minus .1ex}]{section}
+ \CTEXsetup[name={附件},number={\chinese{chapter}}]{appendix}
+
+ \CTEXsetup[name={第,篇},nameformat={\centering\bfseries},titleformat={\zihao{0}\bfseries}]{part}
+
+ \setcounter{secnumdepth}{4}
+ \CTEXsetup[name={(,)},number={\arabic{paragraph}}]{paragraph}
+
+
+\begin{document}
+
+\title{宏包 ctex \TestFile\thanks{just test}}
+\author{吴凌云}
+
+\maketitle
+
+\tableofcontents
+
+
+\part{前言}
+
+\chapter{简介} \label{chapter:intro}
+
+简介
+
+\section{说明}
+
+\ctex{} 宏包提供了编写中文 \LaTeX{} 文档常用的一些宏定义和命令。
+需要 CJK 宏包的支持,由 \ctexorg{} 制作并负责维护。
+
+本文件用于测试 \ctex{} 宏包的命令和功能。
+
+
+\part{正文}
+
+\chapter{基本命令}
+
+基本命令
+
+
+\section{字号}
+测试命令:|\zihao| \index{zihao}
+
+\begin{tabular}{l}
+\zihao{0} 初号字 English \\
+\zihao{-0} 小初号 English \\
+\zihao{1} 一号字 English \\
+\zihao{-1} 小一号 English \\
+\zihao{2} 二号字 English \\
+\zihao{-2} 小二号 English \\
+\zihao{3} 三号字 English \\
+\zihao{-3} 小三号 English \\
+\zihao{4} 四号字 English \\
+\zihao{-4} 小四号 English \\
+\zihao{5} 五号字 English \\
+\zihao{-5} 小五号 English \\
+\zihao{6} 六号字 English \\
+\zihao{-6} 小六号 English \\
+\zihao{7} 七号字 English \\
+\zihao{8} 八号字 English \\
+\end{tabular}
+
+\zihao{0}
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+初号字初号字初号字初号字初号字初号字初号字初号字初号字初号字
+
+\zihao{-0}
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+小初号小初号小初号小初号小初号小初号小初号小初号小初号小初号
+
+\zihao{1}
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+一号字一号字一号字一号字一号字一号字一号字一号字一号字一号字
+
+\zihao{-1}
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+小一号小一号小一号小一号小一号小一号小一号小一号小一号小一号
+
+\zihao{2}
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+二号字二号字二号字二号字二号字二号字二号字二号字二号字二号字
+
+\zihao{-2}
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+小二号小二号小二号小二号小二号小二号小二号小二号小二号小二号
+
+\zihao{3}
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+三号字三号字三号字三号字三号字三号字三号字三号字三号字三号字
+
+\zihao{-3}
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+小三号小三号小三号小三号小三号小三号小三号小三号小三号小三号
+
+\zihao{4}
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+四号字四号字四号字四号字四号字四号字四号字四号字四号字四号字
+
+\zihao{-4}
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+小四号小四号小四号小四号小四号小四号小四号小四号小四号小四号
+
+\zihao{5}
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+五号字五号字五号字五号字五号字五号字五号字五号字五号字五号字
+
+\zihao{-5}
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+小五号小五号小五号小五号小五号小五号小五号小五号小五号小五号
+
+\zihao{6}
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+六号字六号字六号字六号字六号字六号字六号字六号字六号字六号字
+
+\zihao{-6}
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+小六号小六号小六号小六号小六号小六号小六号小六号小六号小六号
+
+\zihao{7}
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+七号字七号字七号字七号字七号字七号字七号字七号字七号字七号字
+
+\zihao{8}
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+八号字八号字八号字八号字八号字八号字八号字八号字八号字八号字
+
+\normalsize
+
+\section{字距}
+
+测试命令:|\ziju| \index{ziju}
+
+标准字距为零,改变字距后:|\ziju{1}|
+
+{\ziju{1}
+现在的字距为 1 个字,英文不受影响:\\
+This is an English example。
+}
+
+\section{字宽}
+
+测试命令:|\ccwd| \index{ccwd}
+
+当前汉字字宽是 \the\ccwd,即盒子 \framebox[\ccwd]{\ } 的宽度。
+
+改变字号大小后:|\zihao{3}|
+
+{\zihao{3}
+当前汉字字宽是 \the\ccwd,即盒子 \framebox[\ccwd]{\ } 的宽度。
+}
+
+改变字距后:|\ziju{1}|
+
+{\ziju{1}
+当前汉字字宽是 \the\ccwd,即盒子 \framebox[\ccwd]{\ } 的宽度。
+}
+
+\section{段首缩进}
+
+测试命令:|\CTEXindent| \index{CTEXindent}
+
+标准的中文段首缩进是两个汉字:
+
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+
+改变字号大小后:|\zihao{3}|
+
+{\zihao{3}
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+}
+
+改变字距后:|\ziju{1}|
+
+{\ziju{1}
+这是缩进的行。
+
+\noindent 这是没有缩进的行。
+}
+
+\section{字体命令}
+
+\begin{tabular}{ll}
+ |\songti| & {\songti 宋体} \\
+ |\heiti| & {\heiti 黑体} \\
+ |\fangsong| & {\fangsong 仿宋} \\
+ |\kaishu| & {\kaishu 楷书} \\
+ |\lishu| & {\lishu 隶书} \\
+ |\youyuan| & {\youyuan 幼圆}
+\end{tabular}
+
+\index{songti} \index{heiti} \index{fangsong} \index{kaishu} \index{lishu} \index{youyuan}
+
+\section{字体框架}
+
+\begin{center}
+\begin{tabular}{lllll}
+
+\hline
+ Family & Series & Shape & 命令 & 例子 \\ \hline
+ {\bf rm} & & & |\rmfamily| &
+ {\rmfamily English 中文字体} \\
+ & & it & |\rmfamily\itshape| &
+ {\rmfamily\itshape English 中文字体} \\
+ & & sl & |\rmfamily\slshape| &
+ {\rmfamily\slshape English 中文字体} \\ \cline{2-5}
+ & bf & & |\rmfamily\bfseries| &
+ {\rmfamily\bfseries English 中文字体} \\
+ & bf & it & |\rmfamily\bfseries\itshape| &
+ {\rmfamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\rmfamily\bfseries\slshape| &
+ {\rmfamily\bfseries\slshape English 中文字体} \\ \hline
+
+ {\bf sf} & & & |\sffamily| &
+ {\sffamily English 中文字体} \\
+ & & it & |\sffamily\itshape| &
+ {\sffamily\itshape English 中文字体} \\
+ & & sl & |\sffamily\slshape| &
+ {\sffamily\slshape English 中文字体} \\ \cline{2-5}
+ & bf & & |\sffamily\bfseries| &
+ {\sffamily\bfseries English 中文字体} \\
+ & bf & it & |\sffamily\bfseries\itshape| &
+ {\sffamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\sffamily\bfseries\slshape| &
+ {\sffamily\bfseries\slshape English 中文字体} \\ \hline
+
+ {\bf tt} & & & |\ttfamily| &
+ {\ttfamily English 中文字体} \\
+ & & it & |\ttfamily\itshape| &
+ {\ttfamily\itshape English 中文字体} \\
+ & & sl & |\ttfamily\slshape| &
+ {目前不可用} \\ \cline{2-5}
+ & bf & & |\ttfamily\bfseries| &
+ {\ttfamily\bfseries English 中文字体} \\
+ & bf & it & |\ttfamily\bfseries\itshape| &
+ {\ttfamily\bfseries\itshape English 中文字体} \\
+ & bf & sl & |\ttfamily\bfseries\slshape| &
+ {目前不可用} \\ \hline
+\end{tabular}
+\end{center}
+
+
+\chapter{高级命令}
+
+\section{中文数字}
+
+测试命令:|\CTEXnumber| |\CTEXdigits| \index{CTEXnumber} \index{CTEXdigits}
+
+\CTEXnumber{\test}{100002005}
+\typeout{\test}
+\test
+
+\CTEXdigits{\test}{100002005}
+\typeout{\test}
+\test
+
+\section{中文引用}
+
+测试命令:|\ref| |\ref*| \index{ref} \index{ref*}
+
+我们引用的是:\ref{chapter:intro}。
+
+我们引用的是:\ref*{chapter:intro}。(不带超链接)
+
+\section{索引}
+
+测试命令:|\index| \index{index}
+
+\index{test1}
+\index{test2}
+\index{test3}
+\index{test4}
+\index{test5}
+\index{test6}
+\index{test7}
+\index{test8}
+\index{test9}
+\index{test10}
+\index{test11}
+\index{test12}
+\index{test13}
+\index{test14}
+\index{test15}
+\index{test16}
+\index{test17}
+\index{test18}
+\index{test19}
+\index{test20}
+\index{test21}
+\index{test22}
+\index{test23}
+\index{test24}
+\index{test25}
+\index{test26}
+\index{test27}
+\index{test28}
+\index{test29}
+\index{test30}
+\index{test31}
+\index{test32}
+\index{test33}
+\index{test34}
+\index{test35}
+\index{test36}
+\index{test37}
+\index{test38}
+\index{test39}
+\index{test40}
+\index{test41}
+\index{test42}
+\index{test43}
+\index{test44}
+\index{test45}
+\index{test46}
+\index{test47}
+\index{test48}
+\index{test49}
+\index{test50}
+
+
+\chapter{中文标点}
+
+一千九百八十年间,西京城里出了桩异事,两个关系是死死的朋友,一日活得泼烦,去
+了唐贵妃杨玉环的墓地凭吊,见许多游人都抓了一包坟丘的土携在怀里,甚感疑惑,询
+问了,才知贵妃是绝代佳人,这土拿回去撒入花盆,花就十分鲜艳。这二人遂也刨了许
+多,用衣包回,装在一只收藏了多年的黑陶盆里,只待有了好的花籽来种。没想,数天
+之后,盆里兀自生出绿芽,月内长大,竟蓬蓬勃勃了一丛,但这草木特别,无人能识得
+品类。抱了去城中孕璜寺的老花工请教,花工也是不识。恰有智祥大师经过,又请教大
+师,大师还是摇头。其中一人却说:“常闻大师能卜卦预测,不妨占这花将来能开几
+枝?”大师命另一人取一个字来,那人适持花工的剪刀在手,随口说出个“耳”字。大
+师说:“花是奇花,当开四枝,但其景不久,必为尔所残也。”后花开果然如数,但形
+状类似牡丹,又类似玫瑰。且一枝蕊为红色,一枝蕊为黄色,一枝蕊为白色,一枝蕊为
+紫色,极尽娇美。一时消息传开每日欣赏者不绝,莫不叹为观止。两个朋友自然得意,
+尤其一个更是珍惜,供养案头,亲自浇水施肥,殷勤务弄。不料某日醉酒,夜半醒来忽
+觉得该去浇灌,竟误把厨房炉子上的热水壶提去,结果花被浇死。此人悔恨不已,索性
+也摔了陶盆,生病睡倒一月不起。
+
+\paragraph{第一段}
+此事虽异,毕竟为一盆花而已,知道之人还并不广大,过后也便罢了。没想到了夏天,
+西京城却又发生了一桩更大的人人都经历的异事。是这古历六月初七的晌午,先是太阳
+还红堂堂地照着,太阳的好处是太阳照着而人却忘记了还有太阳在照着,所以这个城里
+的人谁也没有往天上去看。街面的形势依旧是往日形势。有级别坐卧车的坐着卧车。没
+级别的,但有的是钱,便不愿挤那公共车了,抖着票子去搭出租车。偏偏有了什么重要
+的人物亲临到这里,数辆的警车护卫开道,尖锐的警笛就长声儿价地吼,所有的卧车,
+出租车、公共车只得靠边慢行,扰乱了自行车长河的节奏。只有徒步的人只管徒步,你
+踩着我的影子,我踩着他的影子,影子是不痛不痒的。突然。影子的颜色由深而浅,愈
+浅愈短,一瞬间全然消失。人没有了阴影拖着,似乎人不是了人,用手在屁股后摸摸,
+摸得一脸的疑惑。有人就偶尔往天上一瞅,立即欢呼:“天上有四个太阳了!”人们全
+举了头往天上看,天上果然出现了四个太阳。四个太阳大小一般,分不清了新旧雌雄,
+是聚在一起的,组成个丁字形。过去的经验里,天上是有过月亏和日蚀的,但同时有四
+个太阳却没有遇过,以为是眼睛看错了;再往天上看,那太阳就不再发红,是白的,白
+得像电焊光一样的白,白得还像什么?什么就也看不见了,完全的黑暗人是看不见了什
+么的,完全的光明人竟也是看不见了什么吗?大小的车辆再不敢发动了,只鸣喇叭,人
+却胡扑乱踏,恍惚里甚或就感觉身已不在街上了,是在看电影吧?放映机突然发生故障,
+银幕上的图象消失了,而音响还在进行着。一个人这么感觉了,所有的人差不多也都这
+么感觉了,于是寂静下来,竟静得死气沉沉,唯有城墙头上有人吹动的埙音最后要再吹
+一声,但没有吹起,是力气用完,像风撞在墙角,拐了一下,消失了。人们似乎看不起
+吹埙的人,笑了一下,猛地惊醒身处的现实,同时被寂静所恐惧,哇哇惊叫,各处便疯
+倒了许多。
+
+\paragraph{第二段}
+这样的怪异持续了近半个小时,天上的太阳又恢复成了一个。待人们的眼睛逐渐看见地
+上有了自己的影子,皆面面相觑,随之倒为人的狼狈有了羞愧,就慌不择路地四散。一
+时又是人乱如蚁,却不见了指挥交通的警察。安全岛上,悠然独坐的竟是一个老头。老
+头囚首垢面,却有一双极长的眉眼,冷冷地看着人的忙忙。这眼神使大家有些受不得,
+终就愤怒了,遂喊警察呢?警察在哪儿,姓苏的警察就一边跑一边戴头上的硬壳帽子,
+骂着老叫花子:“pi!”“pi”是西京城里骂“滚”的最粗俗的土话。老头听了,
+拿手指在安全岛上写,写出来却是一个极文雅的上古词:避,就慢慢地笑了。随着笑起
+来的是一大片,因为老头走下安全岛的时候、暴露了身上的衣服原是孕璜寺香客敬奉的
+锦旗所制。前心印着“有求”两字,那双腿岔开,裤裆处是粗糙的大针脚一直到了后腰,
+屁股蛋上左边就是个“必”字,右边就是个“应”字,老头并不知耻,却出口成章;说
+出了一段谣儿来。这谣儿后来流传全城,其辞是:一类人是公仆,高高在上享清福。二
+类人作“官倒”,投机倒把有人保。三类人搞承包,吃喝嫖赌全报销。四类人来租赁,
+坐在家里拿利润。五类人大盖帽,吃了原告吃被告。六类人手术刀,腰里揣满红纸包。
+七类人当演员,扭扭屁股就赚钱。八类人搞宣传,隔三岔五解个馋。九类人为教员,山
+珍海味认不全。十类人主人翁,老老实实学雷锋。
+
+此谣儿流传开来后,有人分析老头并不是个乞丐,或者说他起码是个教师,因为只有教
+师才能编出这样的谣辞,且谣辞中对前几类人都横加指责,唯独为教师一类人喊苦叫屈。
+但到底老头是什么人,无人再作追究。这一年里,恰是西京城里新任了一位市长,这市
+长原籍上海,夫人却是西京土著,十数春秋,西京的每任市长都有心在这座古城建功立
+业,但却差不多全是几经折腾,起色甚微,便铁打的营盘流水的官去了。新的市长虽不
+悦意在岳父门前任职,苦于身在仕途,全然由不得自己,到任后就犯难该从何处举纲张
+目。夫人属于贤内助,便召集了许多亲朋好友为其夫顾问参谋,就有了一个年轻人叫黄
+德复的,说出了一段建议来:西京是十二朝古都,文化积淀深厚是资本也是负担。各层
+干部和群众思维趋于保守,故长期以来经济发展比沿海省市远远落后,若如前几任的市
+长那样面面俱抓,常因企业老化,城建欠帐大多、用尽十分力,往往只有三分效果,且
+当今任职总是三年或五载就得调动,长远规划难以完成便又人事更新;与其这样,倒不
+如抓别人不抓之业,如发展文化和旅游,短期内倒有政绩出现。市长大受启发,不耻下
+问,竟邀这年轻人谈了三天三夜,又将其调离原来任职的学校来市府作了身边秘书。一
+时间,上京索要拨款,在下四处集资,干了一宗千古不朽之宏业,即修复了西京城墙,
+疏通了城河,沿城河边建成极富地方特色的娱乐场。又改建了三条大街:一条为仿唐建
+筑街,专售书画、瓷器;一条为仿宋建筑街,专营全市乃至全省民间小吃;一条仿明、
+清建筑街,集中了所有民间工艺品、土特产。但是,城市文化旅游业的大力发展,使城
+市的流动人员骤然增多,就出现了许多治安方面的弊病,一时西京城被外地人称作贼城、
+烟城、暗娼城。市民也开始滋生另一种的不满情绪。当那位囚首垢面的老头又在街头说
+他的谣儿,身后总是厮跟了一帮闲汉,嚷道:“来一段,再来一段!”,老头就说了两
+句:“说你行,你就行,不行也行。说不行,就不行,行也不行。”闲汉们听了,一齐
+鼓掌。老头并没说这谣儿所指何人,闲汉们却对号入座,将这谣儿传得风快,自然黄德
+复不久也听到了,便给公安局拨了电话,说老头散布市长的谣言,应予制止。公安局收
+留了老头,一查,原是一位十多年上访痞子。为何是上访痞子?因是此人十多年前任民
+办教师,转公办教师时受到上司陷害未能转成,就上访省府,仍未能成功,于是长住西
+京,隔三间五去省府门口提意见,递状书,静坐耍赖,慢慢地欲进没有门路,欲退又无
+台阶,精神变态,后来也索性不再上访。亦不返乡,就在街头流浪起来。公安局收审了
+十天、查无大罪,又放出来,用车一气拉出城三百里地放下。没想这老头几天后又出现
+在街头,却拉动了一辆架子车,沿街穿巷收拾破烂了。一帮闲汉自然拥他,唆使再说谣
+儿,老头却吝啬了口舌,只吼很高很长的“破烂喽-!承包破烂-喽!”这叫声每日
+早晚在街巷吼叫。常也有人在城墙头上吹埙,一个如狼嚎,一个鸣咽如鬼,两厢呼应,
+钟楼鼓楼上的成百上千只鸟类就聒噪一片了。
+
+
+\chapter{CJKfntef 和 CCTfntef}
+
+\CTEXunderdot{此谣儿流传开来后}
+
+\CTEXunderline{此谣儿流传开来后}
+
+\CTEXunderdblline{此谣儿流传开来后}
+
+\CTEXunderwave{此谣儿流传开来后}
+
+\CTEXsout{此谣儿流传开来后}
+
+\CTEXxout{此谣儿流传开来后}
+
+
+\begin{CTEXfilltwosides}{3cm}
+此谣 \\
+儿流 \\
+传开 \\
+来后
+\end{CTEXfilltwosides}
+
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+\chapter{其他测试}
+
+其他测试
+
+
+\appendix
+
+\chapter{测试}
+
+测试
+
+\chapter{测试}
+
+测试
+
+\chapter{测试}
+
+测试
+
+
+\printindex
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/ctex/test/test-xetexgbk.tex b/Master/texmf-dist/doc/latex/ctex/test/test-xetexgbk.tex
new file mode 100644
index 00000000000..0ed490321e4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ctex/test/test-xetexgbk.tex
@@ -0,0 +1,819 @@
+%# -*- coding: gbk -*-
+% $Id$
+% test-xetex.tex: XeTeX only test case, use xelatex to run
+\XeTeXinputencoding "GBK"
+\documentclass[cs4size,a4paper,fancyhdr,fntef,GBK,winfonts]{ctexbook}
+% ˵ʵ GBK ڴ˲á
+% Դļֹ \XeTeXinputencoding "GBK"
+
+\usepackage{hyperref}
+
+\usepackage{shortvrb, makeidx}
+
+\setlength{\headheight}{15pt}
+
+ \makeindex
+
+ \MakeShortVerb{\|}
+
+ \setlength{\parskip}{0.75ex plus .2ex minus .5ex}
+ \renewcommand{\baselinestretch}{1.2}
+
+ \pagestyle{fancy}
+
+
+ \newcommand{\ctex}{\texttt{ctex}}
+ \newcommand{\ctexorg}{\texttt{ctex.org}}
+
+ \newcommand{\TestFile}{ļ}
+
+
+ \CTEXoptions[today=big]
+ \CTEXsetup[name={,},number={\chinese{section}},format+={\bfseries},beforeskip={-10ex plus -.1ex minus -.1ex},afterskip={1ex plus .1ex minus .1ex}]{section}
+ \CTEXsetup[name={},number={\chinese{chapter}}]{appendix}
+
+ \CTEXsetup[name={,ƪ},nameformat={\centering\bfseries},titleformat={\zihao{0}\bfseries}]{part}
+
+ \setcounter{secnumdepth}{4}
+ \CTEXsetup[name={(,)},number={\arabic{paragraph}}]{paragraph}
+
+
+\begin{document}
+
+\title{ ctex \TestFile\thanks{just test}}
+\author{}
+
+\maketitle
+
+\tableofcontents
+
+
+\part{ǰ}
+
+\chapter{} \label{chapter:intro}
+
+
+
+\section{˵}
+
+\ctex{} ṩ˱д \LaTeX{} ĵõһЩ궨
+Ҫ CJK ֧֣ \ctexorg{} ά
+
+ļڲ \ctex{} ͹ܡ
+
+
+\part{}
+
+\chapter{}
+
+
+
+
+\section{ֺ}
+|\zihao| \index{zihao}
+
+\begin{tabular}{l}
+\zihao{0} English \\
+\zihao{-0} С English \\
+\zihao{1} һ English \\
+\zihao{-1} Сһ English \\
+\zihao{2} English \\
+\zihao{-2} С English \\
+\zihao{3} English \\
+\zihao{-3} С English \\
+\zihao{4} ĺ English \\
+\zihao{-4} Сĺ English \\
+\zihao{5} English \\
+\zihao{-5} С English \\
+\zihao{6} English \\
+\zihao{-6} С English \\
+\zihao{7} ߺ English \\
+\zihao{8} ˺ English \\
+\end{tabular}
+
+\zihao{0}
+ֳֳֳֳֳֳֳֳֳ
+ֳֳֳֳֳֳֳֳֳ
+ֳֳֳֳֳֳֳֳֳ
+
+\zihao{-0}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{1}
+һһһһһһһһһһ
+һһһһһһһһһһ
+һһһһһһһһһһ
+
+\zihao{-1}
+СһСһСһСһСһСһСһСһСһСһ
+СһСһСһСһСһСһСһСһСһСһ
+СһСһСһСһСһСһСһСһСһСһ
+
+\zihao{2}
+ֶֶֶֶֶֶֶֶֶ
+ֶֶֶֶֶֶֶֶֶ
+ֶֶֶֶֶֶֶֶֶ
+
+\zihao{-2}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{3}
+
+
+
+
+\zihao{-3}
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{4}
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+ĺĺĺĺĺĺĺĺĺĺ
+
+\zihao{-4}
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+СĺСĺСĺСĺСĺСĺСĺСĺСĺСĺ
+
+\zihao{5}
+
+
+
+
+
+
+\zihao{-5}
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{6}
+
+
+
+
+
+
+\zihao{-6}
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+СССССССССС
+
+\zihao{7}
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+ߺߺߺߺߺߺߺߺߺߺ
+
+\zihao{8}
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺ְ˺
+
+\normalsize
+
+\section{־}
+
+|\ziju| \index{ziju}
+
+׼־Ϊ㣬ı־|\ziju{1}|
+
+{\ziju{1}
+ڵ־Ϊ 1 ֣ӢIJӰ죺\\
+This is an English example
+}
+
+\section{ֿ}
+
+|\ccwd| \index{ccwd}
+
+ǰֿ \the\ccwd \framebox[\ccwd]{\ } Ŀȡ
+
+ıֺŴС|\zihao{3}|
+
+{\zihao{3}
+ǰֿ \the\ccwd \framebox[\ccwd]{\ } Ŀȡ
+}
+
+ı־|\ziju{1}|
+
+{\ziju{1}
+ǰֿ \the\ccwd \framebox[\ccwd]{\ } Ŀȡ
+}
+
+\section{}
+
+|\CTEXindent| \index{CTEXindent}
+
+׼Ķ֣
+
+
+\noindent ûС
+
+ıֺŴС|\zihao{3}|
+
+{\zihao{3}
+
+\noindent ûС
+}
+
+ı־|\ziju{1}|
+
+{\ziju{1}
+
+\noindent ûС
+}
+
+\section{}
+
+\begin{tabular}{ll}
+ |\songti| & {\songti } \\
+ |\heiti| & {\heiti } \\
+ |\fangsong| & {\fangsong } \\
+ |\kaishu| & {\kaishu } \\
+ |\lishu| & {\lishu } \\
+ |\youyuan| & {\youyuan Բ}
+\end{tabular}
+
+\index{songti} \index{heiti} \index{fangsong} \index{kaishu} \index{lishu} \index{youyuan}
+
+\section{}
+
+\begin{center}
+\begin{tabular}{lllll}
+
+\hline
+ Family & Series & Shape & & \\ \hline
+ {\bf rm} & & & |\rmfamily| &
+ {\rmfamily English } \\
+ & & it & |\rmfamily\itshape| &
+ {\rmfamily\itshape English } \\
+ & & sl & |\rmfamily\slshape| &
+ {\rmfamily\slshape English } \\ \cline{2-5}
+ & bf & & |\rmfamily\bfseries| &
+ {\rmfamily\bfseries English } \\
+ & bf & it & |\rmfamily\bfseries\itshape| &
+ {\rmfamily\bfseries\itshape English } \\
+ & bf & sl & |\rmfamily\bfseries\slshape| &
+ {\rmfamily\bfseries\slshape English } \\ \hline
+
+ {\bf sf} & & & |\sffamily| &
+ {\sffamily English } \\
+ & & it & |\sffamily\itshape| &
+ {\sffamily\itshape English } \\
+ & & sl & |\sffamily\slshape| &
+ {\sffamily\slshape English } \\ \cline{2-5}
+ & bf & & |\sffamily\bfseries| &
+ {\sffamily\bfseries English } \\
+ & bf & it & |\sffamily\bfseries\itshape| &
+ {\sffamily\bfseries\itshape English } \\
+ & bf & sl & |\sffamily\bfseries\slshape| &
+ {\sffamily\bfseries\slshape English } \\ \hline
+
+ {\bf tt} & & & |\ttfamily| &
+ {\ttfamily English } \\
+ & & it & |\ttfamily\itshape| &
+ {\ttfamily\itshape English } \\
+ & & sl & |\ttfamily\slshape| &
+ {Ŀǰ} \\ \cline{2-5}
+ & bf & & |\ttfamily\bfseries| &
+ {\ttfamily\bfseries English } \\
+ & bf & it & |\ttfamily\bfseries\itshape| &
+ {\ttfamily\bfseries\itshape English } \\
+ & bf & sl & |\ttfamily\bfseries\slshape| &
+ {Ŀǰ} \\ \hline
+\end{tabular}
+\end{center}
+
+
+\chapter{߼}
+
+\section{}
+
+|\CTEXnumber| |\CTEXdigits| \index{CTEXnumber} \index{CTEXdigits}
+
+\CTEXnumber{\test}{100002005}
+\typeout{\test}
+\test
+
+\CTEXdigits{\test}{100002005}
+\typeout{\test}
+\test
+
+\section{}
+
+|\ref| |\ref*| \index{ref} \index{ref*}
+
+õǣ\ref{chapter:intro}
+
+õǣ\ref*{chapter:intro}ӣ
+
+\section{}
+
+|\index| \index{index}
+
+\index{test1}
+\index{test2}
+\index{test3}
+\index{test4}
+\index{test5}
+\index{test6}
+\index{test7}
+\index{test8}
+\index{test9}
+\index{test10}
+\index{test11}
+\index{test12}
+\index{test13}
+\index{test14}
+\index{test15}
+\index{test16}
+\index{test17}
+\index{test18}
+\index{test19}
+\index{test20}
+\index{test21}
+\index{test22}
+\index{test23}
+\index{test24}
+\index{test25}
+\index{test26}
+\index{test27}
+\index{test28}
+\index{test29}
+\index{test30}
+\index{test31}
+\index{test32}
+\index{test33}
+\index{test34}
+\index{test35}
+\index{test36}
+\index{test37}
+\index{test38}
+\index{test39}
+\index{test40}
+\index{test41}
+\index{test42}
+\index{test43}
+\index{test44}
+\index{test45}
+\index{test46}
+\index{test47}
+\index{test48}
+\index{test49}
+\index{test50}
+
+
+\chapter{ı}
+
+һǧŰٰʮ䣬׮£ϵѣһջ÷ȥ
+ƹ񻷵Ĺƾ˶ץһЯڻɻѯ
+ˣ֪Ǿˣûȥ뻨裬ʮޡҲ
+࣬°أװһֻղ˶ĺֻ˺õĻ֡û룬
+֮أѿڳ󣬾һԣľرʶ
+Ʒࡣȥµϻ̣ҲDzʶǡʦ̴
+ʦʦҡͷһȴ˵ŴʦܲԤ⣬ռ⻨ܿ
+֦ʦһȡһʳֻļ֣˵֡
+ʦ˵滨֦侰ãΪҲ󻨿Ȼ
+״ĵõ塣һ֦Ϊɫһ֦Ϊɫһ֦Ϊɫһ֦Ϊ
+ɫһʱϢÿ߲Ī̾ΪֹȻ⣬
+һϧͷԽˮʩʣŪijƣҹ
+øȥ࣬ѳ¯ϵˮȥ˻ں޲ѣ
+Ҳˤ裬˯һ²
+
+\paragraph{һ}
+죬ϾΪһ軨ѣ֪֮˻󣬹Ҳˡû뵽죬
+ȴַһ׮˶¡³ߵ磬̫
+õţ̫ĺô̫Ŷȴ˻̫ţ
+˭ҲûȥơмԳԳû
+ģеǮ㲻ԸǹˣƱȥ⳵ƫƫʲôҪ
+ٵľľѾͳ۵غеԳ
+⳵ֻÿУгӵĽࡣֻͽֻͽ
+ҵӰӣҲӰӣӰDzʹġͻȻӰӵɫdz
+dẓһ˲ȫȻʧûӰţƺ˲ˣƨɺ
+һɻ˾żһĸ̫ˣȫ
+ͷϿϹȻĸ̫ĸ̫Сһ㣬ֲ¾ɴۣ
+ǾһģɸΡȥľй¿ʴģͬʱ
+̫ȴûΪ۾ˣϿ̫Ͳٷ죬ǰ׵ģ
+纸һİף׵ûʲôʲôҲˣȫĺڰǿʲ
+ôģȫĹ˾Ҳǿʲô𣿴Сijٲҷˣֻȣ
+ȴ̤͸оѲڽˣڿӰɣӳͻȻϣ
+Ļϵͼʧˣ컹ڽšһôоˣе˲Ҳ
+ôоˣǼžΨгǽͷ˴Ҫٴ
+һûд꣬ײǽǣһ£ʧˡƺ
+ˣЦһ£͵ؾʵͬʱž־壬۾У
+ࡣ
+
+\paragraph{ڶ}
+Ĺ˽Сʱϵָֻ̫һǵ۾𽥿
+ԼӰӣ֮Ϊ˵DZͻŲ·ɢһ
+ʱϣȴָӽͨľ졣ȫϣȻľһͷ
+ͷ׹棬ȴһ˫üۣؿ˵ææʹЩܲã
+վͷŭˣ캰أĶյľһһߴͷϵӲñӣ
+Ͻлӣpipi׵ͷˣ
+ָڰȫддȴһŵϹŴʣܣЦˡЦ
+һƬΪͷ°ȫʱ򡢱¶ϵ·ԭ;
+ơǰӡš֣˫ȲɴǴֲڵĴһֱ˺
+ƨɵ߾Ǹء֣ұ߾ǸӦ֣ͷ֪ܣȴڳ£˵
+һҥҥȫǣǣһǹͣ߸帣
+ٵͶ˱˸аԺζȫޣ
+ڼ˴ñԭԱ档ﴧֽ
+˵ԱŤŤƨɾ׬Ǯ˸ΪԱɽ
+亣ζϲȫʮ̣ʵʵѧ׷档
+
+ҥ˷ͷǸؤ˵ǸʦΪֻн
+ʦܱҥǣҥжǰ˶ָΨΪʦһ˺
+ͷʲôˣ׷һǡһλг
+ԭϺȴʮÿгųǽ
+ҵȴȫǼڣɫ΢ӪˮĹȥˡµг䲻
+ǰְ;ȫȻɲԼκͷѸôӺδٸ
+ĿټΪʲıһ˽л
+¸ģ˵һνʮŶĻʱҲǸ
+ɲȺ˼άڱأʳ÷չغʡԶԶǰε
+ץҵϻǽǷʴࡢþʮֻЧ
+ְؾ͵õԶ滮ɱ¸£
+ץ˲ץ֮ҵ緢չĻΣڵ֡г
+ʣ̸ҹֽԭְѧУи顣һ
+ʱ䣬ϾҪĴʣһǧŲ֮ҵ޸ǽ
+ͨ˳ǺӣسǺӱ߽ɼطɫֳָĽ֣һΪƽ
+֣ר黭һΪν֣רӪȫȫʡСԣһ
+彨֣乤ƷزǣĻҵĴչʹ
+еԱȻ࣬ͳΰıײһʱDZ˳ǡ
+̳ǡ潳ǡҲʼһֵIJλ׹ͷڽͷ˵
+ҥ˸һкµһΣһΣͷ˵
+䣺˵УУҲС˵УͲУҲСкˣһ
+ơͷû˵ҥָˣкȴԺҥ÷죬ȻƵ
+Ҳˣֲ˵绰˵ͷɢгҥԣӦֹ
+ͷһ飬ԭһλʮϷƦӡΪϷƦӣǴʮǰ
+ʦתʦʱܵ˾ݺδתɣϷʡδܳɹdzס
+ȥʡſ״飬ˣû·
+̨ף̬ҲԲϷá಻磬ڽͷ
+ʮ졢޴ַųóһط¡ûͷֳ
+ڽͷȴһӳؽִʰˡһкȻӵʹ˵ҥ
+ͷȴ˿ֻܸ࣬ߺܳġඣаãඣÿ
+ڽСҲڳǽͷϴһǺһӦ
+¥¥ϵijɰǧֻһƬˡ
+
+
+\chapter{CJKfntef CCTfntef}
+
+\CTEXunderdot{ҥ}
+
+\CTEXunderline{ҥ}
+
+\CTEXunderdblline{ҥ}
+
+\CTEXunderwave{ҥ}
+
+\CTEXsout{ҥ}
+
+\CTEXxout{ҥ}
+
+
+\begin{CTEXfilltwosides}{3cm}
+ҥ \\
+ \\
+ \\
+
+\end{CTEXfilltwosides}
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+
+\appendix
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+\chapter{}
+
+
+
+
+\printindex
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/ctex/back/ctexartutf8.cls b/Master/texmf-dist/tex/latex/ctex/back/ctexartutf8.cls
new file mode 100644
index 00000000000..7e703145921
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/back/ctexartutf8.cls
@@ -0,0 +1,13 @@
+% ctexartutf8.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexartutf8}
+ [2009/06/26 v0.92 ctexartutf8
+ document class]
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}}
+\PassOptionsToClass{UTF8}{ctexart}
+\ProcessOptions
+\LoadClass{ctexart}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/back/ctexbookutf8.cls b/Master/texmf-dist/tex/latex/ctex/back/ctexbookutf8.cls
new file mode 100644
index 00000000000..c28b202fb9c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/back/ctexbookutf8.cls
@@ -0,0 +1,13 @@
+% ctexbookutf8.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexbookutf8}
+ [2009/06/26 v0.92 ctexbookutf8
+ document class]
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
+\PassOptionsToClass{UTF8}{ctexbook}
+\ProcessOptions
+\LoadClass{ctexbook}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/back/ctexcaputf8.sty b/Master/texmf-dist/tex/latex/ctex/back/ctexcaputf8.sty
new file mode 100644
index 00000000000..7ee25a73335
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/back/ctexcaputf8.sty
@@ -0,0 +1,13 @@
+% ctexcaputf8.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{ctexcaputf8}
+ [2009/06/26 v0.92 ctexcaputf8
+ macros package]
+
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{ctexcap}}
+\PassOptionsToPackage{UTF8}{ctexcap}
+\ProcessOptions
+\RequirePackage{ctexcap}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/back/ctexreputf8.cls b/Master/texmf-dist/tex/latex/ctex/back/ctexreputf8.cls
new file mode 100644
index 00000000000..8c4d01aad11
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/back/ctexreputf8.cls
@@ -0,0 +1,13 @@
+% ctexreputf8.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexreputf8}
+ [2009/06/26 v0.92 ctexreputf8
+ document class]
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexrep}}
+\PassOptionsToClass{UTF8}{ctexrep}
+\ProcessOptions
+\LoadClass{ctexrep}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/back/ctexutf8.sty b/Master/texmf-dist/tex/latex/ctex/back/ctexutf8.sty
new file mode 100644
index 00000000000..7dbbe9a42a9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/back/ctexutf8.sty
@@ -0,0 +1,13 @@
+% ctexutf8.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{ctexutf8}
+ [2009/06/26 v0.92 ctexutf8
+ macros package]
+
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{ctex}}
+\PassOptionsToPackage{UTF8}{ctex}
+\ProcessOptions
+\RequirePackage{ctex}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/cfg/ctex.cfg b/Master/texmf-dist/tex/latex/ctex/cfg/ctex.cfg
new file mode 100644
index 00000000000..0feb9f95ec1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/cfg/ctex.cfg
@@ -0,0 +1,4 @@
+% ctex.cfg: for user's customized definitions
+% vim:ft=tex
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-gbk.cfg b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-gbk.cfg
new file mode 100644
index 00000000000..900864986eb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-gbk.cfg
@@ -0,0 +1,46 @@
+% ctexcap-gbk.cfg: default Chinese caption settings
+% vim:ft=tex
+
+%% Chinese captions
+%%
+%% character set: GBK
+%% encoding: EUC
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% caption name
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\CTEX@contentsname{Ŀ¼}
+\def\CTEX@listfigurename{ͼ}
+\def\CTEX@listtablename{}
+
+\def\CTEX@figurename{ͼ}
+\def\CTEX@tablename{}
+
+\def\CTEX@abstractname{ժҪ}
+\def\CTEX@indexname{}
+\def\CTEX@bibname{ο}
+
+\def\CTEX@prepart{}
+\def\CTEX@postpart{}
+\def\CTEX@prechapter{}
+\def\CTEX@postchapter{}
+\def\CTEX@presection{}
+\def\CTEX@postsection{}
+\def\CTEX@presubsection{}
+\def\CTEX@postsubsection{}
+\def\CTEX@presubsubsection{}
+\def\CTEX@postsubsubsection{}
+\def\CTEX@preparagraph{}
+\def\CTEX@postparagraph{}
+\def\CTEX@presubparagraph{}
+\def\CTEX@postsubparagraph{}
+
+\ifCTEX@cls{article}{
+ \def\CTEX@appendixname{}
+}{
+ \def\CTEX@appendixname{¼~}
+}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-utf8.cfg b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-utf8.cfg
new file mode 100644
index 00000000000..f9d39747048
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap-utf8.cfg
@@ -0,0 +1,46 @@
+% ctexcap-utf8.cfg: default Chinese caption settings
+% vim:ft=tex
+
+%% Chinese captions
+%%
+%% character set: UTF-8
+%% encoding: EUC
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% caption name
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\CTEX@contentsname{目录}
+\def\CTEX@listfigurename{插图}
+\def\CTEX@listtablename{表格}
+
+\def\CTEX@figurename{图}
+\def\CTEX@tablename{表}
+
+\def\CTEX@abstractname{摘要}
+\def\CTEX@indexname{索引}
+\def\CTEX@bibname{参考文献}
+
+\def\CTEX@prepart{第}
+\def\CTEX@postpart{部分}
+\def\CTEX@prechapter{第}
+\def\CTEX@postchapter{章}
+\def\CTEX@presection{}
+\def\CTEX@postsection{}
+\def\CTEX@presubsection{}
+\def\CTEX@postsubsection{}
+\def\CTEX@presubsubsection{}
+\def\CTEX@postsubsubsection{}
+\def\CTEX@preparagraph{}
+\def\CTEX@postparagraph{}
+\def\CTEX@presubparagraph{}
+\def\CTEX@postsubparagraph{}
+
+\ifCTEX@cls{article}{
+ \def\CTEX@appendixname{}
+}{
+ \def\CTEX@appendixname{附录~}
+}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap.cfg b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap.cfg
new file mode 100644
index 00000000000..842d54d2e84
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/cfg/ctexcap.cfg
@@ -0,0 +1,111 @@
+% ctexcap.cfg: default Chinese caption settings
+% vim:ft=tex
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% caption by encoding
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\ifCTEX@GBK
+ \input{ctexcap-gbk.cfg}
+\else
+ \input{ctexcap-utf8.cfg}
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% caption number
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\CTEX@thepart{\chinese{part}}
+\def\CTEX@thechapter{\chinese{chapter}}
+
+\def\CTEX@thesection{\thesection}
+\def\CTEX@thesubsection{\thesubsection}
+\def\CTEX@thesubsubsection{\thesubsubsection}
+\def\CTEX@theparagraph{\theparagraph}
+\def\CTEX@thesubparagraph{\thesubparagraph}
+
+\ifCTEX@cls{article}{
+ \def\CTEX@appendixnumber{\@Alph\c@section}
+}{
+ \def\CTEX@appendixnumber{\@Alph\c@chapter}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% caption format
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\ifCTEX@cls{article}{
+ \def\CTEX@part@format{\centering}
+ \def\CTEX@part@nameformat{\Large\bfseries}
+ \def\CTEX@part@aftername{\quad}
+ \def\CTEX@part@titleformat{\Large\bfseries}
+ \def\CTEX@part@beforeskip{4ex}
+ \def\CTEX@part@afterskip{3ex}
+ \def\CTEX@part@indent{\z@}
+}{
+ \def\CTEX@part@format{\centering}
+ \def\CTEX@part@nameformat{\huge\bfseries}
+ \def\CTEX@part@aftername{\par\vskip 20\p@}
+ \def\CTEX@part@titleformat{\huge\bfseries}
+}
+
+\def\CTEX@chapter@format{\centering}
+\def\CTEX@chapter@nameformat{\huge\bfseries}
+\def\CTEX@chapter@aftername{\quad}
+\def\CTEX@chapter@titleformat{\huge\bfseries}
+\def\CTEX@chapter@beforeskip{50\p@}
+\def\CTEX@chapter@afterskip{40\p@}
+\def\CTEX@chapter@indent{\z@}
+
+\def\CTEX@section@format{\Large\bfseries\centering}
+\def\CTEX@section@aftername{\quad}
+\def\CTEX@section@beforeskip{-3.5ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@section@afterskip{2.3ex \@plus .2ex}
+\def\CTEX@section@indent{\z@}
+
+\def\CTEX@subsection@format{\large\bfseries\flushleft}
+\def\CTEX@subsection@aftername{\quad}
+\def\CTEX@subsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsection@indent{\z@}
+
+\def\CTEX@subsubsection@format{\normalsize\bfseries\flushleft}
+\def\CTEX@subsubsection@aftername{\quad}
+\def\CTEX@subsubsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsubsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsubsection@indent{\z@}
+
+\def\CTEX@paragraph@format{\normalsize\bfseries\flushleft}
+\def\CTEX@paragraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@paragraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@paragraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@paragraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@paragraph@afterskip{-1em}
+\fi
+\def\CTEX@paragraph@indent{\z@}
+
+\def\CTEX@subparagraph@format{\normalsize\bfseries\flushleft}
+\def\CTEX@subparagraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>3
+ \def\CTEX@subparagraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@subparagraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@subparagraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@subparagraph@afterskip{-1em}
+\fi
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@subparagraph@indent{\z@}
+\else
+ \def\CTEX@subparagraph@indent{\parindent}
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% other configurations
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\CTEX@caption@delimiter{: }
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/cfg/ctexopts.cfg.template b/Master/texmf-dist/tex/latex/ctex/cfg/ctexopts.cfg.template
new file mode 100644
index 00000000000..bbd8d3afba8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/cfg/ctexopts.cfg.template
@@ -0,0 +1,6 @@
+% ctexopts.cfg.template: set default options
+% vim:ft=tex
+
+\ExecuteOptions{winfonts}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty
new file mode 100644
index 00000000000..6b3fa1bd34c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty
@@ -0,0 +1,22 @@
+% ctex.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{ctex}
+ [2009/06/26 v0.92 ctex
+ macros package]
+
+\input{ctex-common-opts.def}
+
+\InputIfFileExists{ctexopts.cfg}{}{}
+
+\ProcessOptions
+
+\input{ctex-common.def}
+
+% ctex.cfg should be loaded very last
+\AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctex.cfg}{}{}
+ \makeatother}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
new file mode 100644
index 00000000000..d0db7cf44a0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
@@ -0,0 +1,29 @@
+% ctexart.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexart}
+ [2009/06/26 v0.92 ctexart
+ document class]
+
+\def\CTEX@classtoload{article}
+
+\input{ctex-common-opts.def}
+\input{ctex-caption-opts.def}
+\input{ctex-class-opts.def}
+
+\InputIfFileExists{ctexopts.cfg}{}{}
+
+\input{ctex-loadclass.def}
+
+\input{ctex-common.def}
+\input{ctex-caption.def}
+\input{ctex-class.def}
+\input{ctex-article.def}
+
+% ctex.cfg should be loaded very last
+\AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctex.cfg}{}{}
+ \makeatother}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
new file mode 100644
index 00000000000..4c2f5fadb6b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
@@ -0,0 +1,29 @@
+% ctexbook.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexbook}
+ [2009/06/26 v0.92 ctexbook
+ document class]
+
+\def\CTEX@classtoload{book}
+
+\input{ctex-common-opts.def}
+\input{ctex-caption-opts.def}
+\input{ctex-class-opts.def}
+
+\InputIfFileExists{ctexopts.cfg}{}{}
+
+\input{ctex-loadclass.def}
+
+\input{ctex-common.def}
+\input{ctex-caption.def}
+\input{ctex-class.def}
+\input{ctex-book.def}
+
+% ctex.cfg should be loaded very last
+\AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctex.cfg}{}{}
+ \makeatother}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
new file mode 100644
index 00000000000..8ace4ce4137
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
@@ -0,0 +1,30 @@
+% ctexcap.sty
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{ctexcap}
+ [2009/06/26 v0.92 ctexcap
+ macros package]
+
+\input{ctex-common-opts.def}
+\input{ctex-caption-opts.def}
+
+\InputIfFileExists{ctexopts.cfg}{}{}
+
+\ProcessOptions
+
+\input{ctex-common.def}
+\input{ctex-caption.def}
+
+\@ifundefined{if@mainmatter}{\let\if@mainmatter\iftrue}{}
+
+\ifCTEX@cls{article}{\input{ctex-article.def}}{}
+\ifCTEX@cls{report}{\input{ctex-report.def}}{}
+\ifCTEX@cls{book}{\input{ctex-book.def}}{}
+
+% ctex.cfg should be loaded very last
+\AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctex.cfg}{}{}
+ \makeatother}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls
new file mode 100644
index 00000000000..92994593374
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls
@@ -0,0 +1,29 @@
+% ctexrep.cls
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{ctexrep}
+ [2009/06/26 v0.92 ctexrep
+ document class]
+
+\def\CTEX@classtoload{report}
+
+\input{ctex-common-opts.def}
+\input{ctex-caption-opts.def}
+\input{ctex-class-opts.def}
+
+\InputIfFileExists{ctexopts.cfg}{}{}
+
+\input{ctex-loadclass.def}
+
+\input{ctex-common.def}
+\input{ctex-caption.def}
+\input{ctex-class.def}
+\input{ctex-report.def}
+
+% ctex.cfg should be loaded very last
+\AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctex.cfg}{}{}
+ \makeatother}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-article.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-article.def
new file mode 100644
index 00000000000..607af578781
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-article.def
@@ -0,0 +1,220 @@
+% ctex-article.def: definitions for article class files
+% vim:ft=tex
+
+\def\CTEX@prepart{Part\space}
+\def\CTEX@prechapter{Chapter\space}
+\def\CTEX@part@format{\raggedright}
+\def\CTEX@part@nameformat{\Large\bfseries}
+\def\CTEX@part@aftername{\par\nobreak}
+\def\CTEX@part@titleformat{\huge\bfseries}
+\def\CTEX@part@beforeskip{4ex}
+\def\CTEX@part@afterskip{3ex}
+\def\CTEX@part@indent{\z@}
+\def\CTEX@chapter@format{\raggedright}
+\def\CTEX@chapter@nameformat{\huge\bfseries}
+\def\CTEX@chapter@aftername{\par\nobreak\vskip 20\p@}
+\def\CTEX@chapter@titleformat{\Huge\bfseries}
+\def\CTEX@chapter@beforeskip{50\p@}
+\def\CTEX@chapter@afterskip{40\p@}
+\def\CTEX@chapter@indent{\z@}
+\def\CTEX@section@format{\Large\bfseries}
+\def\CTEX@section@aftername{\quad}
+\def\CTEX@section@beforeskip{-3.5ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@section@afterskip{2.3ex \@plus .2ex}
+\def\CTEX@section@indent{\z@}
+\def\CTEX@subsection@format{\large\bfseries}
+\def\CTEX@subsection@aftername{\quad}
+\def\CTEX@subsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsection@indent{\z@}
+\def\CTEX@subsubsection@format{\normalsize\bfseries}
+\def\CTEX@subsubsection@aftername{\quad}
+\def\CTEX@subsubsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsubsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsubsection@indent{\z@}
+\def\CTEX@paragraph@format{\normalsize\bfseries}
+\def\CTEX@paragraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@paragraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@paragraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@paragraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@paragraph@afterskip{-1em}
+\fi
+\def\CTEX@paragraph@indent{\z@}
+\def\CTEX@subparagraph@format{\normalsize\bfseries}
+\def\CTEX@subparagraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>3
+ \def\CTEX@subparagraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@subparagraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@subparagraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@subparagraph@afterskip{-1em}
+\fi
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@subparagraph@indent{\z@}
+\else
+ \def\CTEX@subparagraph@indent{\parindent}
+\fi
+\def\CTEX@appendixname{}
+\def\CTEX@appendixnumber{\@Alph\c@section}
+\let\CTEX@save@appendix\appendix
+\renewcommand*\appendix{\CTEX@save@appendix%
+ \gdef\CTEX@presection{\CTEX@appendixname}%
+ \gdef\CTEX@thesection{\CTEX@appendixnumber}%
+ \gdef\CTEX@postsection{}}%
+\renewcommand\part{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \addvspace{\CTEX@part@beforeskip}%
+ \@afterindentfalse
+ \secdef\@part\@spart}
+\def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ {\interlinepenalty \@M
+ \normalfont \parindent \CTEX@part@indent \CTEX@part@format
+ \ifnum \c@secnumdepth >\m@ne
+ \CTEX@partname
+ \fi
+ \CTEX@part@titleformat #2%
+ \markboth{}{}\par}%
+ \nobreak
+ \vskip \CTEX@part@afterskip
+ \@afterheading}
+\def\@spart#1{%
+ {\interlinepenalty \@M
+ \normalfont \parindent \CTEX@part@indent \CTEX@part@format
+ \CTEX@part@titleformat #1\par}%
+ \nobreak
+ \vskip \CTEX@part@afterskip
+ \@afterheading}
+\def\@seccntformat#1{%
+ \@ifundefined{CTEX@#1name}%
+ {\csname the#1\endcsname\quad}%
+ {\csname CTEX@#1name\endcsname}}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M
+ \csname CTEX@#1@titleformat\endcsname #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec \csname CTEX@#1@titleformat\endcsname #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+\def\numberline#1{%
+ \settowidth\@tempdimb{#1\hspace{0.5em}}%
+ \ifdim\@tempdima<\@tempdimb%
+ \@tempdima=\@tempdimb%
+ \fi%
+ \hb@xt@\@tempdima{#1\hfil}}
+\renewcommand\section{\@startsection{section}{1}%
+ {\CTEX@section@indent}%
+ {\CTEX@section@beforeskip}%
+ {\CTEX@section@afterskip}%
+ {\normalfont\CTEX@section@format}}
+\renewcommand\subsection{\@startsection{subsection}{2}%
+ {\CTEX@subsection@indent}%
+ {\CTEX@subsection@beforeskip}%
+ {\CTEX@subsection@afterskip}%
+ {\normalfont\CTEX@subsection@format}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}%
+ {\CTEX@subsubsection@indent}%
+ {\CTEX@subsubsection@beforeskip}%
+ {\CTEX@subsubsection@afterskip}%
+ {\normalfont\CTEX@subsubsection@format}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}%
+ {\CTEX@paragraph@indent}%
+ {\CTEX@paragraph@beforeskip}%
+ {\CTEX@paragraph@afterskip}%
+ {\normalfont\CTEX@paragraph@format}}
+\renewcommand\subparagraph{\@startsection{subparagraph}{5}%
+ {\CTEX@subparagraph@indent}%
+ {\CTEX@subparagraph@beforeskip}%
+ {\CTEX@subparagraph@afterskip}%
+ {\normalfont\CTEX@subparagraph@format}}
+\if@twoside
+ \def\ps@headings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\sectionmark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \CTEXthesection\quad %
+ \fi
+ ##1}}{}}%
+ \def\subsectionmark##1{%
+ \markright {%
+ \ifnum \c@secnumdepth >\@ne
+ \CTEXthesubsection\quad %
+ \fi
+ ##1}}}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \CTEXthesection\quad %
+ \fi
+ ##1}}}}
+\fi
+\pagestyle{headings}
+\@ifundefined{ps@fancy}{}{%
+ \def\ps@fancy{%
+ \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
+ \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
+ \@ifundefined{chapter}{\def\sectionmark##1{\markboth
+ {\MakeUppercase{\ifnum \c@secnumdepth>\z@
+ \CTEXthesection\quad \fi ##1}}{}}%
+ \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
+ \CTEXthesubsection\quad \fi ##1}}}%
+ {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne
+ \ifCTEX@cls{book}{\if@mainmatter\CTEXthechapter \quad\fi}{\CTEXthechapter \quad}
+ \fi ##1}}{}}%
+ \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
+ \CTEXthesection \quad \fi ##1}}}}%
+ \ps@@fancy
+ \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
+ \ifdim\headwidth<0sp
+ \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
+ \fi}
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-book.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-book.def
new file mode 100644
index 00000000000..557cf127764
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-book.def
@@ -0,0 +1,252 @@
+% ctex-book.def: definitions for book class files
+% vim:ft=tex
+
+\def\CTEX@prepart{Part\space}
+\def\CTEX@prechapter{Chapter\space}
+\def\CTEX@part@format{\centering}
+\def\CTEX@part@nameformat{\huge\bfseries}
+\def\CTEX@part@aftername{\par\vskip 20\p@}
+\def\CTEX@part@titleformat{\Huge\bfseries}
+\def\CTEX@chapter@format{\raggedright}
+\def\CTEX@chapter@nameformat{\huge\bfseries}
+\def\CTEX@chapter@aftername{\par\nobreak\vskip 20\p@}
+\def\CTEX@chapter@titleformat{\Huge\bfseries}
+\def\CTEX@chapter@beforeskip{50\p@}
+\def\CTEX@chapter@afterskip{40\p@}
+\def\CTEX@chapter@indent{\z@}
+\def\CTEX@section@format{\Large\bfseries}
+\def\CTEX@section@aftername{\quad}
+\def\CTEX@section@beforeskip{-3.5ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@section@afterskip{2.3ex \@plus .2ex}
+\def\CTEX@section@indent{\z@}
+\def\CTEX@subsection@format{\large\bfseries}
+\def\CTEX@subsection@aftername{\quad}
+\def\CTEX@subsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsection@indent{\z@}
+\def\CTEX@subsubsection@format{\normalsize\bfseries}
+\def\CTEX@subsubsection@aftername{\quad}
+\def\CTEX@subsubsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsubsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsubsection@indent{\z@}
+\def\CTEX@paragraph@format{\normalsize\bfseries}
+\def\CTEX@paragraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@paragraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@paragraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@paragraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@paragraph@afterskip{-1em}
+\fi
+\def\CTEX@paragraph@indent{\z@}
+\def\CTEX@subparagraph@format{\normalsize\bfseries}
+\def\CTEX@subparagraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>3
+ \def\CTEX@subparagraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@subparagraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@subparagraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@subparagraph@afterskip{-1em}
+\fi
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@subparagraph@indent{\z@}
+\else
+ \def\CTEX@subparagraph@indent{\parindent}
+\fi
+\def\CTEX@appendixname{Appendix\space}
+\def\CTEX@appendixnumber{\@Alph\c@chapter}
+\let\CTEX@save@appendix\appendix
+\renewcommand*\appendix{\CTEX@save@appendix%
+ \gdef\CTEX@prechapter{\CTEX@appendixname}%
+ \gdef\CTEX@thechapter{\CTEX@appendixnumber}%
+ \gdef\CTEX@postchapter{}}%
+\def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ \markboth{}{}%
+ {\interlinepenalty \@M
+ \normalfont \CTEX@part@format
+ \ifnum \c@secnumdepth >-2\relax
+ \CTEX@partname
+ \fi
+ \CTEX@part@titleformat #2\par}%
+ \@endpart}
+\def\@spart#1{%
+ {\interlinepenalty \@M
+ \normalfont \CTEX@part@format
+ \CTEX@part@titleformat #1\par}%
+ \@endpart}
+\def\@chapter[#1]#2{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\CTEXthechapter}%
+ \addcontentsline{toc}{chapter}
+ {\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}
+\def\@makechapterhead#1{%
+ \vspace*{\CTEX@chapter@beforeskip}%
+ {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \CTEX@chaptername
+ \fi
+ \fi
+ \interlinepenalty\@M
+ \CTEX@chapter@titleformat #1\par\nobreak
+ \vskip \CTEX@chapter@afterskip
+ }}
+\def\@makeschapterhead#1{%
+ \vspace*{\CTEX@chapter@beforeskip}%
+ {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
+ \interlinepenalty\@M
+ \CTEX@chapter@titleformat #1\par\nobreak
+ \vskip \CTEX@chapter@afterskip
+ }}
+\def\@seccntformat#1{%
+ \@ifundefined{CTEX@#1name}%
+ {\csname the#1\endcsname\quad}%
+ {\csname CTEX@#1name\endcsname}}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M
+ \csname CTEX@#1@titleformat\endcsname #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec \csname CTEX@#1@titleformat\endcsname #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+\def\numberline#1{%
+ \settowidth\@tempdimb{#1\hspace{0.5em}}%
+ \ifdim\@tempdima<\@tempdimb%
+ \@tempdima=\@tempdimb%
+ \fi%
+ \hb@xt@\@tempdima{#1\hfil}}
+\renewcommand\section{\@startsection{section}{1}%
+ {\CTEX@section@indent}%
+ {\CTEX@section@beforeskip}%
+ {\CTEX@section@afterskip}%
+ {\normalfont\CTEX@section@format}}
+\renewcommand\subsection{\@startsection{subsection}{2}%
+ {\CTEX@subsection@indent}%
+ {\CTEX@subsection@beforeskip}%
+ {\CTEX@subsection@afterskip}%
+ {\normalfont\CTEX@subsection@format}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}%
+ {\CTEX@subsubsection@indent}%
+ {\CTEX@subsubsection@beforeskip}%
+ {\CTEX@subsubsection@afterskip}%
+ {\normalfont\CTEX@subsubsection@format}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}%
+ {\CTEX@paragraph@indent}%
+ {\CTEX@paragraph@beforeskip}%
+ {\CTEX@paragraph@afterskip}%
+ {\normalfont\CTEX@paragraph@format}}
+\renewcommand\subparagraph{\@startsection{subparagraph}{5}%
+ {\CTEX@subparagraph@indent}%
+ {\CTEX@subparagraph@beforeskip}%
+ {\CTEX@subparagraph@afterskip}%
+ {\normalfont\CTEX@subparagraph@format}}
+\if@twoside
+ \def\ps@headings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \CTEXthechapter \quad %
+ \fi
+ \fi
+ ##1}}{}}%
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \CTEXthesection \quad %
+ \fi
+ ##1}}}}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \CTEXthechapter \quad %
+ \fi
+ \fi
+ ##1}}}}
+\fi
+\pagestyle{headings}
+\@ifundefined{ps@fancy}{}{%
+ \def\ps@fancy{%
+ \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
+ \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
+ \@ifundefined{chapter}{\def\sectionmark##1{\markboth
+ {\MakeUppercase{\ifnum \c@secnumdepth>\z@
+ \CTEXthesection\quad \fi ##1}}{}}%
+ \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
+ \CTEXthesubsection\quad \fi ##1}}}%
+ {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne
+ \ifCTEX@cls{book}{\if@mainmatter\CTEXthechapter \quad\fi}{\CTEXthechapter \quad}
+ \fi ##1}}{}}%
+ \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
+ \CTEXthesection \quad \fi ##1}}}}%
+ \ps@@fancy
+ \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
+ \ifdim\headwidth<0sp
+ \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
+ \fi}
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-caption.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-caption.def
new file mode 100644
index 00000000000..9dda3fa6285
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-caption.def
@@ -0,0 +1,165 @@
+% ctex-caption.def: definitions only ctexcap.sty and ctex document classes used
+% vim:ft=tex
+
+% Load caption file
+
+\ifCTEX@caption
+ \AtEndOfPackage{%
+ \makeatletter
+ \InputIfFileExists{ctexcap.cfg}{}{%
+ \PackageError{ctex}{%
+ Can't find ctexcap.cfg}{%
+ The english captions are used if you continue.}}
+ \makeatother}
+\fi
+
+% section format
+
+\def\CTEX@defsecformat#1{%
+ \expandafter\def\csname CTEX@pre#1\endcsname{}%
+ \expandafter\def\csname CTEX@post#1\endcsname{}%
+ \expandafter\def\csname CTEX@the#1\endcsname{%
+ \csname the#1\endcsname}%
+ \expandafter\def\csname CTEXthe#1\endcsname{%
+ \csname CTEX@pre#1\endcsname%
+ \csname CTEX@the#1\endcsname%
+ \csname CTEX@post#1\endcsname}%
+ \expandafter\def\csname CTEX@#1@format\endcsname{}%
+ \expandafter\def\csname CTEX@#1@nameformat\endcsname{}%
+ \expandafter\def\csname CTEX@#1@numberformat\endcsname{}%
+ \expandafter\def\csname CTEX@#1@aftername\endcsname{}%
+ \expandafter\def\csname CTEX@#1@titleformat\endcsname{}
+ \expandafter\def\csname CTEX@#1name\endcsname{%
+ \csname CTEX@#1@nameformat\endcsname%
+ \csname CTEX@pre#1\endcsname%
+ \begingroup%
+ \csname CTEX@#1@numberformat\endcsname%
+ \csname CTEX@the#1\endcsname%
+ \endgroup%
+ \csname CTEX@post#1\endcsname%
+ \csname CTEX@#1@aftername\endcsname}%
+ \expandafter\def\csname CTEX@#1@beforeskip\endcsname{}%
+ \expandafter\def\csname CTEX@#1@afterskip\endcsname{}%
+ \expandafter\def\csname CTEX@#1@indent\endcsname{}%
+}
+\CTEX@defsecformat{part}
+\CTEX@defsecformat{chapter}
+\CTEX@defsecformat{section}
+\CTEX@defsecformat{subsection}
+\CTEX@defsecformat{subsubsection}
+\CTEX@defsecformat{paragraph}
+\CTEX@defsecformat{subparagraph}
+
+% Default caption names
+
+\def\CTEX@contentsname{Contents}
+\def\CTEX@listfigurename{List of Figures}
+\def\CTEX@listtablename{List of Tables}
+\def\CTEX@figurename{Figure}
+\def\CTEX@tablename{Table}
+\def\CTEX@abstractname{Abstract}
+\def\CTEX@indexname{Index}
+\def\CTEX@bibname{Bibliography}
+
+\renewcommand*\contentsname{\CTEX@contentsname}
+\renewcommand*\listfigurename{\CTEX@listfigurename}
+\renewcommand*\listtablename{\CTEX@listtablename}
+\renewcommand*\figurename{\CTEX@figurename}
+\renewcommand*\tablename{\CTEX@tablename}
+\@ifundefined{abstractname}{}{
+ \renewcommand*\abstractname{\CTEX@abstractname}}
+\renewcommand*\partname{\CTEX@thepart}
+\@ifundefined{chaptername}{}{
+ \renewcommand*\chaptername{\CTEX@thechapter}}
+\renewcommand*\appendixname{\CTEX@appendixname}
+\renewcommand*\indexname{\CTEX@indexname}
+
+\ifCTEX@cls{article}{
+ \renewcommand*\refname{\CTEX@bibname}
+ }{
+ \renewcommand*\bibname{\CTEX@bibname}
+ }
+
+\def\CTEX@setsecname#1[#2,#3]{%
+ \expandafter\def\csname CTEX@pre#1\endcsname{#2}%
+ \expandafter\def\csname CTEX@post#1\endcsname{\ignorespaces#3}}
+\def\CTEX@setsecnumber#1[#2]{%
+ \expandafter\def\csname CTEX@the#1\endcsname{#2}}
+\def\CTEX@setsecformat#1#2[#3]{%
+ \expandafter\def\csname CTEX@#1@#2\endcsname{#3}}
+\def\CTEX@addsecformat#1#2[#3]{%
+ \expandafter\let\expandafter\reserved@a\csname CTEX@#1@#2\endcsname%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter%
+ \csname CTEX@#1@#2\endcsname\expandafter{\reserved@a#3}}
+\def\CTEX@defseckey#1{%
+ \CTEX@subkey{#1}{name}{\CTEX@setsecname{#1}[##1]}%
+ \CTEX@subkey{#1}{number}{\CTEX@setsecnumber{#1}[##1]}%
+ \CTEX@subkey{#1}{format}{\CTEX@setsecformat{#1}{format}[##1]}%
+ \CTEX@subkey{#1}{format+}{\CTEX@addsecformat{#1}{format}[##1]}%
+ \CTEX@subkey{#1}{nameformat}{\CTEX@setsecformat{#1}{nameformat}[##1]}%
+ \CTEX@subkey{#1}{nameformat+}{\CTEX@addsecformat{#1}{nameformat}[##1]}%
+ \CTEX@subkey{#1}{numberformat}{\CTEX@setsecformat{#1}{numberformat}[##1]}%
+ \CTEX@subkey{#1}{numberformat+}{\CTEX@addsecformat{#1}{numberformat}[##1]}%
+ \CTEX@subkey{#1}{aftername}{\CTEX@setsecformat{#1}{aftername}[##1]}%
+ \CTEX@subkey{#1}{aftername+}{\CTEX@addsecformat{#1}{aftername}[##1]}%
+ \CTEX@subkey{#1}{titleformat}{\CTEX@setsecformat{#1}{titleformat}[##1]}%
+ \CTEX@subkey{#1}{titleformat+}{\CTEX@addsecformat{#1}{titleformat}[##1]}%
+ \CTEX@subkey{#1}{beforeskip}{\CTEX@setsecformat{#1}{beforeskip}[##1]}%
+ \CTEX@subkey{#1}{afterskip}{\CTEX@setsecformat{#1}{afterskip}[##1]}%
+ \CTEX@subkey{#1}{indent}{\CTEX@setsecformat{#1}{indent}[##1]}%
+}
+\CTEX@defseckey{part}
+\CTEX@defseckey{chapter}
+\CTEX@defseckey{section}
+\CTEX@defseckey{subsection}
+\CTEX@defseckey{subsubsection}
+\CTEX@defseckey{paragraph}
+\CTEX@defseckey{subparagraph}
+\CTEX@subkey{appendix}{name}{\def\CTEX@appendixname{#1}}
+\CTEX@subkey{appendix}{number}{\def\CTEX@appendixnumber{#1}}
+\CTEX@key{contentsname}{\def\CTEX@contentsname{#1}}
+\CTEX@key{listfigurename}{\def\CTEX@listfigurename{#1}}
+\CTEX@key{listtablename}{\def\CTEX@listtablename{#1}}
+\CTEX@key{figurename}{\def\CTEX@figurename{#1}}
+\CTEX@key{tablename}{\def\CTEX@tablename{#1}}
+\CTEX@key{abstractname}{\def\CTEX@abstractname{#1}}
+\CTEX@key{indexname}{\def\CTEX@indexname{#1}}
+\CTEX@key{bibname}{\def\CTEX@bibname{#1}}
+
+% caption delimiter
+
+\def\CTEX@caption@delimiter{: }
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1\CTEX@caption@delimiter #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1\CTEX@caption@delimiter #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+\CTEX@key{captiondelimiter}{\CTEX@setcaptiondelimiter{#1}}
+\newcommand*\CTEX@setcaptiondelimiter[1]{%
+ \def\CTEX@caption@delimiter{#1}}
+
+% Change the parindent of verse and quotation to two Chinese characters
+\renewenvironment{verse}
+ {\let\\\@centercr
+ \list{}{\itemsep \z@
+ \itemindent -2\ccwd%
+ \listparindent\itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 2\ccwd}%
+ \item\relax}
+ {\endlist}
+\renewenvironment{quotation}
+ {\list{}{\listparindent 2\ccwd%
+ \itemindent \listparindent
+ \rightmargin \leftmargin
+ \parsep \z@ \@plus\p@}%
+ \item\relax}
+ {\endlist}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-class.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-class.def
new file mode 100644
index 00000000000..964692aa770
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-class.def
@@ -0,0 +1,96 @@
+% ctex-class.def: definitions for ctex document class files (not in style files)
+% vim:ft=tex
+
+% font size definitions
+
+\ifCTEX@sfoursize
+ \renewcommand\normalsize{% 12bp
+ \@setfontsize\normalsize{\CTEX@fs@sfour}{\CTEX@fs@sfourskip}%
+ \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+ \normalsize
+ \renewcommand\small{% 10.5bp
+ \@setfontsize\small{\CTEX@fs@five}{\CTEX@fs@fiveskip}%
+ \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 9\p@ \@plus3\p@ \@minus5\p@
+ \parsep 4.5\p@ \@plus2\p@ \@minus\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip}
+ \renewcommand\footnotesize{% 9bp
+ \@setfontsize\footnotesize{\CTEX@fs@sfive}{\CTEX@fs@sfiveskip}%
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 6\p@ \@plus2\p@ \@minus2\p@
+ \parsep 3\p@ \@plus2\p@ \@minus\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip}
+ \renewcommand\scriptsize{% 7.5bp
+ \@setfontsize\scriptsize{\CTEX@fs@six}{\CTEX@fs@sixskip}}
+ \renewcommand\tiny{% 6.5bp
+ \@setfontsize\tiny{\CTEX@fs@ssix}{\CTEX@fs@ssixskip}}
+ \renewcommand\large{% 15bp
+ \@setfontsize\large{\CTEX@fs@sthree}{\CTEX@fs@sthreeskip}}
+ \renewcommand\Large{% 18bp
+ \@setfontsize\Large{\CTEX@fs@stwo}{\CTEX@fs@stwoskip}}
+ \renewcommand\LARGE{% 22bp
+ \@setfontsize\LARGE{\CTEX@fs@two}{\CTEX@fs@twoskip}}
+ \renewcommand\huge{% 24bp
+ \@setfontsize\huge{\CTEX@fs@sone}{\CTEX@fs@soneskip}}
+ \renewcommand\Huge{% 26bp
+ \@setfontsize\Huge{\CTEX@fs@one}{\CTEX@fs@oneskip}}
+\fi
+\ifCTEX@fivesize
+ \renewcommand\normalsize{% 10.5bp
+ \@setfontsize\normalsize{\CTEX@fs@five}{\CTEX@fs@fiveskip}%
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+ \normalsize
+ \renewcommand\small{% 9bp
+ \@setfontsize\small{\CTEX@fs@sfive}{\CTEX@fs@sfiveskip}%
+ \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus2\p@
+ \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 4\p@ \@plus2\p@ \@minus2\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip}
+ \renewcommand\footnotesize{% 7.5bp
+ \@setfontsize\footnotesize{\CTEX@fs@six}{\CTEX@fs@sixskip}%
+ \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus\p@
+ \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 3\p@ \@plus\p@ \@minus\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip}
+ \renewcommand\scriptsize{% 6.5bp
+ \@setfontsize\scriptsize{\CTEX@fs@ssix}{\CTEX@fs@ssixskip}}
+ \renewcommand\tiny{% 5.5bp
+ \@setfontsize\tiny{\CTEX@fs@seven}{\CTEX@fs@sevenskip}}
+ \renewcommand\large{% 12bp
+ \@setfontsize\large{\CTEX@fs@sfour}{\CTEX@fs@sfourskip}}
+ \renewcommand\Large{% 15bp
+ \@setfontsize\Large{\CTEX@fs@sthree}{\CTEX@fs@sthreeskip}}
+ \renewcommand\LARGE{% 18bp
+ \@setfontsize\LARGE{\CTEX@fs@stwo}{\CTEX@fs@stwoskip}}
+ \renewcommand\huge{% 22bp
+ \@setfontsize\huge{\CTEX@fs@two}{\CTEX@fs@twoskip}}
+ \renewcommand\Huge{% 26bp
+ \@setfontsize\Huge{\CTEX@fs@one}{\CTEX@fs@oneskip}}
+\fi
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-common.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-common.def
new file mode 100644
index 00000000000..d6d32eac64f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-common.def
@@ -0,0 +1,385 @@
+% ctex-common.def: common definitions for all ctex packages/classes
+% vim:ft=tex
+
+\@ifclassloaded{article}{\def\CTEX@cls@article{}}{}
+\@ifclassloaded{report}{\def\CTEX@cls@report{}}{}
+\@ifclassloaded{book}{\def\CTEX@cls@book{}}{}
+
+% Load some extra packages
+
+\RequirePackage{ifxetex}
+\RequirePackage{keyval}[1999/03/16]
+\ifCTEX@indent
+ \RequirePackage{indentfirst}
+\fi
+\RequirePackage{fix-cm}
+\ifCTEX@fancyhdr
+ \RequirePackage{fancyhdr}
+\fi
+
+% Useful definitions
+
+\DeclareRobustCommand\CTeX{C\kern-.05em\TeX{}}
+\newcommand*\CTEX@key{\define@key{CTEX}}
+\newcommand*\CTEXoptions[1][]{\setkeys{CTEX}{#1}}
+\newcommand*\CTEX@subkey[1]{\define@key{CTEX#1}}
+\newcommand*\CTEXsetup[2][]{\setkeys{CTEX#2}{#1}}
+
+\def\ifCTEX@cls#1{%
+ \expandafter\ifx\csname CTEX@cls@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\CTEX@replacecommand#1#2#3{%
+ \expandafter\expandafter\expandafter\let\expandafter
+ \csname #1#3\expandafter\endcsname
+ \csname #2#3\endcsname
+ \expandafter\expandafter\expandafter\def\expandafter
+ \csname #2#3\expandafter\endcsname
+ {\csname #1#3\endcsname}}
+
+% Select engine: xetex has the highest priority, if not,
+% then try cct, otherwise we use traditional cjk.
+
+\ifxetex
+ \input{ctex-xecjk-engine.def}
+\else
+ \ifCTEX@cct
+ \input{ctex-cct-engine.def}
+ \else
+ \input{ctex-cjk-engine.def}
+ \fi
+\fi
+
+\AtEndOfPackage{%
+ \makeatletter
+ \ifCTEX@GBK
+ \input{ctex-gbk.def}
+ \else
+ \input{ctex-utf8.def}
+ \fi\makeatother}
+
+\newcommand*\CTEXindent{\CTEXsetfont\parindent2\ccwd}
+\newcommand*\CTEXnoindent{\parindent\z@}
+\ifCTEX@indent
+ \AtBeginDocument{\CTEXindent}
+\fi
+\def\CTEX@spaceChar{\hskip \f@size \p@}
+\def\baselinestretch{1.3}
+
+% About font sizing
+
+\def\CTEX@fs@eight{5.02} \def\CTEX@fs@eightskip{6.02} %八号字 5bp
+\def\CTEX@fs@seven{5.52} \def\CTEX@fs@sevenskip{6.62} %七号字 5.5bp
+\def\CTEX@fs@ssix{6.52} \def\CTEX@fs@ssixskip{7.83} %小六号 6.5bp
+\def\CTEX@fs@six{7.53} \def\CTEX@fs@sixskip{9.03} %六号字 7.5bp
+\def\CTEX@fs@sfive{9.03} \def\CTEX@fs@sfiveskip{10.84} %小五号 9bp
+\def\CTEX@fs@five{10.54} \def\CTEX@fs@fiveskip{12.65} %五号字 10.5bp
+\def\CTEX@fs@sfour{12.05} \def\CTEX@fs@sfourskip{14.45} %小四号 12bp
+\def\CTEX@fs@four{14.05} \def\CTEX@fs@fourskip{16.86} %四号字 14bp
+\def\CTEX@fs@sthree{15.06} \def\CTEX@fs@sthreeskip{18.07} %小三号 15bp
+\def\CTEX@fs@three{16.06} \def\CTEX@fs@threeskip{19.27} %三号字 16bp
+\def\CTEX@fs@stwo{18.07} \def\CTEX@fs@stwoskip{21.68} %小二号 18bp
+\def\CTEX@fs@two{22.08} \def\CTEX@fs@twoskip{26.50} %二号字 22bp
+\def\CTEX@fs@sone{24.09} \def\CTEX@fs@soneskip{28.91} %小一号 24bp
+\def\CTEX@fs@one{26.10} \def\CTEX@fs@oneskip{31.32} %一号字 26bp
+\def\CTEX@fs@szero{36.14} \def\CTEX@fs@szeroskip{43.36} %小初号 36bp
+\def\CTEX@fs@zero{42.16} \def\CTEX@fs@zeroskip{50.59} %初号字 42bp
+\DeclareMathSizes{\CTEX@fs@eight}{\CTEX@fs@eight}{5}{5}
+\DeclareMathSizes{\CTEX@fs@seven}{\CTEX@fs@seven}{5}{5}
+\DeclareMathSizes{\CTEX@fs@ssix}{\CTEX@fs@ssix}{5}{5}
+\DeclareMathSizes{\CTEX@fs@six}{\CTEX@fs@six}{5}{5}
+\DeclareMathSizes{\CTEX@fs@sfive}{\CTEX@fs@sfive}{6}{5}
+\DeclareMathSizes{\CTEX@fs@five}{\CTEX@fs@five}{7}{5}
+\DeclareMathSizes{\CTEX@fs@sfour}{\CTEX@fs@sfour}{8}{6}
+\DeclareMathSizes{\CTEX@fs@four}
+ {\CTEX@fs@four}{\CTEX@fs@five}{\CTEX@fs@six}
+\DeclareMathSizes{\CTEX@fs@sthree}
+ {\CTEX@fs@sthree}{\CTEX@fs@sfour}{\CTEX@fs@sfive}
+\DeclareMathSizes{\CTEX@fs@three}
+ {\CTEX@fs@three}{\CTEX@fs@four}{\CTEX@fs@five}
+\DeclareMathSizes{\CTEX@fs@stwo}
+ {\CTEX@fs@stwo}{\CTEX@fs@sthree}{\CTEX@fs@sfour}
+\DeclareMathSizes{\CTEX@fs@two}
+ {\CTEX@fs@two}{\CTEX@fs@three}{\CTEX@fs@four}
+\DeclareMathSizes{\CTEX@fs@sone}
+ {\CTEX@fs@sone}{\CTEX@fs@stwo}{\CTEX@fs@sthree}
+\DeclareMathSizes{\CTEX@fs@one}
+ {\CTEX@fs@one}{\CTEX@fs@two}{\CTEX@fs@three}
+\DeclareMathSizes{\CTEX@fs@szero}
+ {\CTEX@fs@szero}{\CTEX@fs@sone}{\CTEX@fs@stwo}
+\DeclareMathSizes{\CTEX@fs@zero}
+ {\CTEX@fs@zero}{\CTEX@fs@one}{\CTEX@fs@two}
+\def\CTEX@zihao{}
+\DeclareRobustCommand*\zihao[1]{\def\CTEX@zihao{#1}%
+ \ifnum #11<0%
+ \@tempcnta=-#1
+ \ifcase\@tempcnta%
+ \fontsize\CTEX@fs@szero\CTEX@fs@szeroskip%
+ \or \fontsize\CTEX@fs@sone\CTEX@fs@soneskip%
+ \or \fontsize\CTEX@fs@stwo\CTEX@fs@stwoskip%
+ \or \fontsize\CTEX@fs@sthree\CTEX@fs@sthreeskip%
+ \or \fontsize\CTEX@fs@sfour\CTEX@fs@sfourskip%
+ \or \fontsize\CTEX@fs@sfive\CTEX@fs@sfiveskip%
+ \or \fontsize\CTEX@fs@ssix\CTEX@fs@ssixskip%
+ \else \PackageError{ctex}{%
+ Undefined Chinese font size in command \protect\zihao}{%
+ The old font size is used if you continue.}%
+ \fi%
+ \else%
+ \@tempcnta=#1
+ \ifcase\@tempcnta%
+ \fontsize\CTEX@fs@zero\CTEX@fs@zeroskip%
+ \or \fontsize\CTEX@fs@one\CTEX@fs@oneskip%
+ \or \fontsize\CTEX@fs@two\CTEX@fs@twoskip%
+ \or \fontsize\CTEX@fs@three\CTEX@fs@threeskip%
+ \or \fontsize\CTEX@fs@four\CTEX@fs@fourskip%
+ \or \fontsize\CTEX@fs@five\CTEX@fs@fiveskip%
+ \or \fontsize\CTEX@fs@six\CTEX@fs@sixskip%
+ \or \fontsize\CTEX@fs@seven\CTEX@fs@sevenskip%
+ \or \fontsize\CTEX@fs@eight\CTEX@fs@eightskip%
+ \else \PackageError{ctex}{%
+ Undefined Chinese font size in command \protect\zihao}{%
+ The old font size is used if you continue.}%
+ \fi%
+ \fi%
+ \selectfont\ignorespaces}
+
+% About numbers
+
+\newif\ifCTEX@zero@
+\newif\ifCTEX@previous@
+\newif\ifCTEX@null@
+\newcount\CTEX@q
+\newcount\CTEX@r
+\def\CTEX@appendstring#1#2{%
+ \expandafter\def\expandafter#1\expandafter{#1#2}}
+\def\CTEX@appendnumber#1#2{%
+ \ifcase #2\relax
+ \ifCTEX@null@
+ \CTEX@appendstring{#1}{\CTEX@null}%
+ \else
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \fi
+ \or \CTEX@appendstring{#1}{\CTEX@one}%
+ \or \CTEX@appendstring{#1}{\CTEX@two}%
+ \or \CTEX@appendstring{#1}{\CTEX@three}%
+ \or \CTEX@appendstring{#1}{\CTEX@four}%
+ \or \CTEX@appendstring{#1}{\CTEX@five}%
+ \or \CTEX@appendstring{#1}{\CTEX@six}%
+ \or \CTEX@appendstring{#1}{\CTEX@seven}%
+ \or \CTEX@appendstring{#1}{\CTEX@eight}%
+ \or \CTEX@appendstring{#1}{\CTEX@nine}%
+ \fi}
+\def\CTEX@splitnumber#1{%
+ \CTEX@q #1\relax
+ \CTEX@r #1\relax
+ \divide\CTEX@q \@M
+ \begingroup
+ \multiply\CTEX@q \@M
+ \advance\CTEX@r -\CTEX@q
+ \ifnum\CTEX@r = \z@
+ \xdef\CTEX@low{}%
+ \else
+ \xdef\CTEX@low{\number\CTEX@r}%
+ \fi
+ \endgroup
+ \ifnum\CTEX@q > \z@
+ \CTEX@r \CTEX@q
+ \divide\CTEX@q \@M
+ \begingroup
+ \multiply\CTEX@q \@M
+ \advance\CTEX@r -\CTEX@q
+ \ifnum\CTEX@r = \z@
+ \xdef\CTEX@high{}%
+ \else
+ \xdef\CTEX@high{\number\CTEX@r}%
+ \fi
+ \endgroup
+ \ifnum\CTEX@q > \z@
+ \xdef\CTEX@yi{\number\CTEX@q}%
+ \else
+ \xdef\CTEX@yi{}%
+ \fi
+ \else
+ \xdef\CTEX@high{}%
+ \xdef\CTEX@yi{}%
+ \fi
+}
+\def\CTEX@processnumber#1#2{%
+ \CTEX@zero@false
+ \CTEX@q #2\relax
+ \CTEX@r #2\relax
+ \divide\CTEX@q \@m
+ \ifnum\CTEX@q = \z@
+ \ifCTEX@previous@
+ \CTEX@zero@true
+ \fi
+ \else
+ \ifCTEX@zero@
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \fi
+ \CTEX@appendnumber{#1}{\CTEX@q}%
+ \CTEX@appendstring{#1}{\CTEX@thousand}%
+ \CTEX@previous@true
+ \CTEX@zero@false
+ \fi
+ \multiply\CTEX@q \@m
+ \advance\CTEX@r -\CTEX@q
+ \CTEX@q \CTEX@r
+ \divide\CTEX@q 100\relax
+ \ifnum\CTEX@q = \z@
+ \ifCTEX@previous@
+ \CTEX@zero@true
+ \fi
+ \else
+ \ifCTEX@zero@
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \fi
+ \CTEX@appendnumber{#1}{\CTEX@q}%
+ \CTEX@appendstring{#1}{\CTEX@hundred}%
+ \CTEX@previous@true
+ \CTEX@zero@false
+ \fi
+ \multiply\CTEX@q 100
+ \advance\CTEX@r -\CTEX@q
+ \CTEX@q \CTEX@r
+ \divide \CTEX@q 10\relax
+ \ifnum\CTEX@q = \z@
+ \ifCTEX@previous@
+ \CTEX@zero@true
+ \fi
+ \else
+ \ifCTEX@zero@
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \fi
+ \ifnum\CTEX@q = \@ne
+ \ifCTEX@previous@
+ \CTEX@appendstring{#1}{\CTEX@one}%
+ \fi
+ \else
+ \CTEX@appendnumber{#1}{\CTEX@q}%
+ \fi
+ \CTEX@appendstring{#1}{\CTEX@ten}%
+ \CTEX@previous@true
+ \CTEX@zero@false
+ \fi
+ \multiply\CTEX@q 10
+ \advance\CTEX@r -\CTEX@q
+ \ifnum\CTEX@r = \z@
+ \else
+ \ifCTEX@zero@
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \fi
+ \CTEX@appendnumber{#1}{\CTEX@r}%
+ \CTEX@previous@true
+ \fi}
+\DeclareRobustCommand\CTEXnumber[2]{%
+ \def#1{}%
+ \CTEX@null@false
+ \CTEX@q #2\relax
+ \ifnum\CTEX@q < \z@
+ \multiply\CTEX@q \m@ne
+ \CTEX@appendstring{#1}{\CTEX@minus}%
+ \fi
+ \CTEX@previous@false
+ \CTEX@zero@false
+ \ifnum\CTEX@q = \z@
+ \CTEX@appendstring{#1}{\CTEX@zero}%
+ \else
+ \CTEX@splitnumber{\CTEX@q}%
+ \ifx\CTEX@yi \@empty
+ \else
+ \CTEX@processnumber{#1}{\CTEX@yi}%
+ \CTEX@appendstring{#1}{\CTEX@hundredmillion}%
+ \fi
+ \ifx\CTEX@high \@empty
+ \else
+ \CTEX@processnumber{#1}{\CTEX@high}%
+ \CTEX@appendstring{#1}{\CTEX@tenthousand}%
+ \fi
+ \ifx\CTEX@low \@empty
+ \else
+ \ifx\CTEX@yi \@empty
+ \else
+ \ifx\CTEX@high \@empty
+ \CTEX@appendstring{#1}{\CTEX@zero}% this catches 100002345
+ \fi
+ \fi
+ \CTEX@processnumber{#1}{\CTEX@low}%
+ \fi
+ \fi}
+\def\CTEX@getdigit#1#2\@nil{%
+ \edef\CTEX@tempa{#1}%
+ \edef\CTEX@tempb{#2}}
+\DeclareRobustCommand\CTEXdigits[2]{%
+ \def#1{}%
+ \CTEX@null@true
+ \edef\CTEX@tempa{}%
+ \edef\CTEX@tempb{#2}%
+ \ifx\CTEX@tempb \@empty
+ \else
+ \loop
+ \expandafter\CTEX@getdigit\CTEX@tempb\@nil
+ \CTEX@appendnumber{#1}{\CTEX@tempa}%
+ \ifx\CTEX@tempb \@empty
+ \else
+ \repeat
+ \fi}
+\DeclareRobustCommand\CTEXcounter[1]{%
+ \@ifundefined{c@#1}{}{%
+ \CTEXnumber{\reserved@a}{\@arabic\csname c@#1\endcsname}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\csname cc@#1\endcsname%
+ \expandafter{\reserved@a}}}
+\AtBeginDocument{%
+ \makeatletter%
+ \@ifundefined{CTEX@save@setcounter}{%
+ \let\CTEX@save@setcounter\setcounter%
+ \def\setcounter#1#2{%
+ \CTEX@save@setcounter{#1}{#2}%
+ \CTEXcounter{#1}}}{}
+ \@ifundefined{CTEX@save@addtocounter}{%
+ \let\CTEX@save@addtocounter\addtocounter%
+ \def\addtocounter#1#2{%
+ \CTEX@save@addtocounter{#1}{#2}%
+ \CTEXcounter{#1}}}{}
+ \@ifundefined{CTEX@save@stepcounter}{%
+ \let\CTEX@save@stepcounter\stepcounter%
+ \def\stepcounter#1{%
+ \CTEX@save@stepcounter{#1}%
+ \CTEXcounter{#1}}}{}
+ \makeatother}
+\def\chinese#1{%
+ \@ifundefined{cc@#1}{\CTEX@null}{\csname cc@#1\endcsname}}
+
+% About caption
+
+\ifCTEX@caption
+ \let\CTEX@save@refstepcounter\refstepcounter
+ \def\refstepcounter#1{\stepcounter{#1}%
+ \protected@edef\@currentlabel
+ {\csname p@#1\endcsname%
+ \@ifundefined{CTEX@the#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEX@the#1\endcsname}%
+ }}%
+\fi
+
+% `today' definitions
+
+\let\CTEX@todayold\today
+\ifCTEX@caption
+ \renewcommand*\today{\CTEX@todaysmall}
+\fi
+\CTEX@key{today}{\CTEX@settoday{#1}}
+\newcommand*\CTEX@settoday[1]{%
+ \@ifundefined{CTEX@today#1}
+ {\PackageError{ctex}{%
+ unknown today format}{%
+ Available today format are "old", "small", and "big".}}
+ {\renewcommand*\today{\csname CTEX@today#1\endcsname}}}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-gbk.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-gbk.def
new file mode 100644
index 00000000000..bfc00a39bf8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-gbk.def
@@ -0,0 +1,28 @@
+% ctex-gbk.def
+% vim:ft=tex
+
+\def\CTEXnullspace{0pt}
+\def\CTEX@null{\kern\CTEXnullspace{}\kern\CTEXnullspace}
+\def\CTEX@zero{}
+\def\CTEX@one{һ}
+\def\CTEX@two{}
+\def\CTEX@three{}
+\def\CTEX@four{}
+\def\CTEX@five{}
+\def\CTEX@six{}
+\def\CTEX@seven{}
+\def\CTEX@eight{}
+\def\CTEX@nine{}
+\def\CTEX@ten{ʮ}
+\def\CTEX@hundred{}
+\def\CTEX@thousand{ǧ}
+\def\CTEX@tenthousand{}
+\def\CTEX@hundredmillion{}
+\def\CTEX@minus{}
+
+\def\CTEX@todaysmall{~\the\year~~\the\month~~\the\day~}
+\def\CTEX@todaybig{%
+ \CJKdigits{\the\year}\CJKnumber{\the\month}\CJKnumber{\the\day}}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-loadclass.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-loadclass.def
new file mode 100644
index 00000000000..99a8bf14d63
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-loadclass.def
@@ -0,0 +1,16 @@
+% ctex-loadclass.def: load standard LaTeX class
+% vim:ft=tex
+
+\ProcessOptions
+
+\ifCTEX@sfoursize
+ \PassOptionsToClass{12pt}%
+ {\CTEX@classtoload}
+\fi
+\ifCTEX@fivesize
+ \PassOptionsToClass{10pt}%
+ {\CTEX@classtoload}
+\fi
+\LoadClass{\CTEX@classtoload}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-report.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-report.def
new file mode 100644
index 00000000000..b64c64990e3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-report.def
@@ -0,0 +1,242 @@
+% ctex-report.def: definitions for report class files
+% vim:ft=tex
+
+\def\CTEX@prepart{Part\space}
+\def\CTEX@prechapter{Chapter\space}
+\def\CTEX@part@format{\centering}
+\def\CTEX@part@nameformat{\huge\bfseries}
+\def\CTEX@part@aftername{\par\vskip 20\p@}
+\def\CTEX@part@titleformat{\Huge\bfseries}
+\def\CTEX@chapter@format{\raggedright}
+\def\CTEX@chapter@nameformat{\huge\bfseries}
+\def\CTEX@chapter@aftername{\par\nobreak\vskip 20\p@}
+\def\CTEX@chapter@titleformat{\Huge\bfseries}
+\def\CTEX@chapter@beforeskip{50\p@}
+\def\CTEX@chapter@afterskip{40\p@}
+\def\CTEX@chapter@indent{\z@}
+\def\CTEX@section@format{\Large\bfseries}
+\def\CTEX@section@aftername{\quad}
+\def\CTEX@section@beforeskip{-3.5ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@section@afterskip{2.3ex \@plus .2ex}
+\def\CTEX@section@indent{\z@}
+\def\CTEX@subsection@format{\large\bfseries}
+\def\CTEX@subsection@aftername{\quad}
+\def\CTEX@subsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsection@indent{\z@}
+\def\CTEX@subsubsection@format{\normalsize\bfseries}
+\def\CTEX@subsubsection@aftername{\quad}
+\def\CTEX@subsubsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+\def\CTEX@subsubsection@afterskip{1.5ex \@plus .2ex}
+\def\CTEX@subsubsection@indent{\z@}
+\def\CTEX@paragraph@format{\normalsize\bfseries}
+\def\CTEX@paragraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@paragraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@paragraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@paragraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@paragraph@afterskip{-1em}
+\fi
+\def\CTEX@paragraph@indent{\z@}
+\def\CTEX@subparagraph@format{\normalsize\bfseries}
+\def\CTEX@subparagraph@aftername{\quad}
+\ifnum\c@CTEX@sectiondepth>3
+ \def\CTEX@subparagraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
+ \def\CTEX@subparagraph@afterskip{1ex \@plus .2ex}
+\else
+ \def\CTEX@subparagraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
+ \def\CTEX@subparagraph@afterskip{-1em}
+\fi
+\ifnum\c@CTEX@sectiondepth>2
+ \def\CTEX@subparagraph@indent{\z@}
+\else
+ \def\CTEX@subparagraph@indent{\parindent}
+\fi
+\def\CTEX@appendixname{Appendix\space}
+\def\CTEX@appendixnumber{\@Alph\c@chapter}
+\let\CTEX@save@appendix\appendix
+\renewcommand*\appendix{\CTEX@save@appendix%
+ \gdef\CTEX@prechapter{\CTEX@appendixname}%
+ \gdef\CTEX@thechapter{\CTEX@appendixnumber}%
+ \gdef\CTEX@postchapter{}}%
+\def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ \markboth{}{}%
+ {\interlinepenalty \@M
+ \normalfont \CTEX@part@format
+ \ifnum \c@secnumdepth >-2\relax
+ \CTEX@partname
+ \fi
+ \CTEX@part@titleformat #2\par}%
+ \@endpart}
+\def\@spart#1{%
+ {\interlinepenalty \@M
+ \normalfont \CTEX@part@format
+ \CTEX@part@titleformat #1\par}%
+ \@endpart}
+\def\@chapter[#1]#2{%
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{chapter}%
+ \typeout{\CTEXthechapter}%
+ \addcontentsline{toc}{chapter}
+ {\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}
+\def\@makechapterhead#1{%
+ \vspace*{\CTEX@chapter@beforeskip}%
+ {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
+ \ifnum \c@secnumdepth >\m@ne
+ \CTEX@chaptername
+ \fi
+ \interlinepenalty\@M
+ \CTEX@chapter@titleformat #1\par\nobreak
+ \vskip \CTEX@chapter@afterskip
+ }}
+\def\@makeschapterhead#1{%
+ \vspace*{\CTEX@chapter@beforeskip}%
+ {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
+ \interlinepenalty\@M
+ \CTEX@chapter@titleformat #1\par\nobreak
+ \vskip \CTEX@chapter@afterskip
+ }}
+\def\@seccntformat#1{%
+ \@ifundefined{CTEX@#1name}%
+ {\csname the#1\endcsname\quad}%
+ {\csname CTEX@#1name\endcsname}}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M
+ \csname CTEX@#1@titleformat\endcsname #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec \csname CTEX@#1@titleformat\endcsname #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@ifundefined{CTEXthe#1}%
+ {\csname the#1\endcsname}%
+ {\csname CTEXthe#1\endcsname}}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+\def\numberline#1{%
+ \settowidth\@tempdimb{#1\hspace{0.5em}}%
+ \ifdim\@tempdima<\@tempdimb%
+ \@tempdima=\@tempdimb%
+ \fi%
+ \hb@xt@\@tempdima{#1\hfil}}
+\renewcommand\section{\@startsection{section}{1}%
+ {\CTEX@section@indent}%
+ {\CTEX@section@beforeskip}%
+ {\CTEX@section@afterskip}%
+ {\normalfont\CTEX@section@format}}
+\renewcommand\subsection{\@startsection{subsection}{2}%
+ {\CTEX@subsection@indent}%
+ {\CTEX@subsection@beforeskip}%
+ {\CTEX@subsection@afterskip}%
+ {\normalfont\CTEX@subsection@format}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}%
+ {\CTEX@subsubsection@indent}%
+ {\CTEX@subsubsection@beforeskip}%
+ {\CTEX@subsubsection@afterskip}%
+ {\normalfont\CTEX@subsubsection@format}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}%
+ {\CTEX@paragraph@indent}%
+ {\CTEX@paragraph@beforeskip}%
+ {\CTEX@paragraph@afterskip}%
+ {\normalfont\CTEX@paragraph@format}}
+\renewcommand\subparagraph{\@startsection{subparagraph}{5}%
+ {\CTEX@subparagraph@indent}%
+ {\CTEX@subparagraph@beforeskip}%
+ {\CTEX@subparagraph@afterskip}%
+ {\normalfont\CTEX@subparagraph@format}}
+\if@twoside
+ \def\ps@headings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \CTEXthechapter \quad %
+ \fi
+ ##1}}{}}%
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \CTEXthesection \quad %
+ \fi
+ ##1}}}}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \CTEXthechapter \quad %
+ \fi
+ ##1}}}}
+\fi
+\pagestyle{headings}
+\@ifundefined{ps@fancy}{}{%
+ \def\ps@fancy{%
+ \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
+ \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
+ \@ifundefined{chapter}{\def\sectionmark##1{\markboth
+ {\MakeUppercase{\ifnum \c@secnumdepth>\z@
+ \CTEXthesection\quad \fi ##1}}{}}%
+ \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
+ \CTEXthesubsection\quad \fi ##1}}}%
+ {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne
+ \ifCTEX@cls{book}{\if@mainmatter\CTEXthechapter \quad\fi}{\CTEXthechapter \quad}
+ \fi ##1}}{}}%
+ \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
+ \CTEXthesection \quad \fi ##1}}}}%
+ \ps@@fancy
+ \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
+ \ifdim\headwidth<0sp
+ \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
+ \fi}
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/def/ctex-utf8.def b/Master/texmf-dist/tex/latex/ctex/def/ctex-utf8.def
new file mode 100644
index 00000000000..5b106be224d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/def/ctex-utf8.def
@@ -0,0 +1,28 @@
+% ctex-utf8.def
+% vim:ft=tex
+
+\def\CTEXnullspace{0pt}
+\def\CTEX@null{\kern\CTEXnullspace{}〇\kern\CTEXnullspace}
+\def\CTEX@zero{零}
+\def\CTEX@one{一}
+\def\CTEX@two{二}
+\def\CTEX@three{三}
+\def\CTEX@four{四}
+\def\CTEX@five{五}
+\def\CTEX@six{六}
+\def\CTEX@seven{七}
+\def\CTEX@eight{八}
+\def\CTEX@nine{九}
+\def\CTEX@ten{十}
+\def\CTEX@hundred{百}
+\def\CTEX@thousand{千}
+\def\CTEX@tenthousand{万}
+\def\CTEX@hundredmillion{亿}
+\def\CTEX@minus{-}
+
+\def\CTEX@todaysmall{~\the\year~年~\the\month~月~\the\day~日}
+\def\CTEX@todaybig{%
+ \CJKdigits{\the\year}年\CJKnumber{\the\month}月\CJKnumber{\the\day}日}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cct-engine.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cct-engine.def
new file mode 100644
index 00000000000..cd54033ed97
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cct-engine.def
@@ -0,0 +1,82 @@
+% ctex-cct-engine.def: for LaTeX engine with CCT
+% vim:ft=tex
+
+\ifCTEX@cctfont
+ \RequirePackage{cctbase}[2003/04/05]
+\else
+ \RequirePackage[CJK]{cctbase}[2003/04/05]
+\fi
+\ifCTEX@punct
+ \CCTpuncttrue
+\else
+ \CCTpunctfalse
+\fi
+\ifCTEX@fntef
+ \RequirePackage{CCTfntef}
+ \normalem
+\fi
+\ifCTEX@space
+ \AtBeginDocument{\CCTspace}
+\else
+ \AtBeginDocument{\CCTnospace}
+\fi
+\def\CTEXspace{\CCTspace}
+\def\CTEXnospace{\CCTnospace}
+\ifCTEX@cctfont\else
+ \CCTdefziti A song song % 宋体
+ \CCTdefziti B hei song % 黑体
+ \CCTdefziti C kai song % 楷体
+ \CCTdefziti D fs song % 仿宋
+ \CCTdefziti E bs hei % 标宋
+ \CCTdefziti F li hei % 隶书
+ \CCTdefziti G you kai % 幼圆
+ \DeclareRobustCommand*{\songti}{\ziti{A}\relax} % 宋体
+ \DeclareRobustCommand*{\heiti}{\ziti{B}\relax} % 黑体
+ \DeclareRobustCommand*{\kaishu}{\ziti{C}\relax} % 楷书
+ \DeclareRobustCommand*{\fangsong}{\ziti{D}\relax} % 仿宋
+ \DeclareRobustCommand*{\biaosong}{\ziti{E}\relax} % 标宋
+ \DeclareRobustCommand*{\lishu}{\ziti{F}\relax} % 隶书
+ \DeclareRobustCommand*{\youyuan}{\ziti{G}\relax} % 幼圆
+\fi
+\ifx\CCT@set@fontsize\undefined
+ \let\CCT@set@fontsize\oset@fontsize
+\fi
+\let\CTEX@save@set@fontsize\set@fontsize
+\def\set@fontsize#1#2#3{%
+ \CCT@set@fontsize{#1}{#2}{#3}%
+ \zihaoAny{#2}%
+ \CTEXsetfont}
+\let\CTEX@save@ziju\ziju
+\renewcommand*\ziju[1]{% 字距
+ \CTEX@save@ziju{#1}%
+ \CTEXsetfont}
+\newcommand*\CTEXsetfont{%
+ \ifdim\parindent=0pt\else\parindent2\ccwd\fi}
+\ifCTEX@fntef
+ \def\CTEXunderdot{\CCTunderdot}
+ \def\CTEXunderline{\CCTunderline}
+ \def\CTEXunderdblline{\CCTunderdblline}
+ \def\CTEXunderwave{\CCTunderwave}
+ \def\CTEXsout{\CCTsout}
+ \def\CTEXxout{\CCTxout}
+ \def\CTEXfilltwosides{\CCTfilltwosides}
+ \def\endCTEXfilltwosides{\endCCTfilltwosides}
+ \CTEX@replacecommand{CTEX}{CCT}{underdotbasesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underdotsep}
+ \CTEX@replacecommand{CTEX}{CCT}{underlinebasesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underlinesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underdbllinebasesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underdbllinesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underwavebasesep}
+ \CTEX@replacecommand{CTEX}{CCT}{underwavesepa}
+ \CTEX@replacecommand{CTEX}{CCT}{underwavesep}
+ \CTEX@replacecommand{CTEX}{CCT}{southeight}
+ \CTEX@replacecommand{CTEX}{CCT}{xoutheight}
+ \CTEX@replacecommand{CTEX}{CCT}{underdotcolor}
+ \CTEX@replacecommand{CTEX}{CCT}{underwavecolor}
+ \CTEX@replacecommand{CTEX}{CCT}{underlinecolor}
+ \CTEX@replacecommand{CTEX}{CCT}{underdbllinecolor}
+ \CTEX@replacecommand{CTEX}{CCT}{soutcolor}
+ \CTEX@replacecommand{CTEX}{CCT}{xoutcolor}
+\fi
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
new file mode 100644
index 00000000000..3f76fe44d4a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
@@ -0,0 +1,50 @@
+% ctex-cjk-common.def: common definitions shared by cjk-engine and xecjk-engine
+% vim:ft=tex
+
+\ifCTEX@fntef
+ \RequirePackage{CJKfntef}
+ \normalem
+\fi
+
+\def\CTEXspace{\CJKspace}
+\def\CTEXnospace{\CJKnospace}
+
+\let\CTEX@save@set@fontsize\set@fontsize
+\def\set@fontsize#1#2#3{%
+ \CTEX@save@set@fontsize{#1}{#2}{#3}%
+ \CTEXsetfont}
+\newcommand*\ziju[1]{% 字距
+ \settowidth\@tempdima{\CTEX@spaceChar}%
+ \renewcommand{\CJKglue}{\hskip #1\@tempdima\@plus.08\baselineskip\relax}%
+ \CTEXsetfont} % is it a good definition?
+\newdimen\ccwd % 字宽
+\newcommand*\CTEXsetfont{%
+ \settowidth\ccwd{\CTEX@spaceChar\CJKglue}%
+ \ifdim\parindent=0pt\else\parindent2\ccwd\fi}
+\ifCTEX@fntef
+ \def\CTEXunderdot{\CJKunderdot}
+ \def\CTEXunderline{\CJKunderline}
+ \def\CTEXunderdblline{\CJKunderdblline}
+ \def\CTEXunderwave{\CJKunderwave}
+ \def\CTEXsout{\CJKsout}
+ \def\CTEXxout{\CJKxout}
+ \def\CTEXfilltwosides{\CJKfilltwosides}
+ \def\endCTEXfilltwosides{\endCJKfilltwosides}
+ \CTEX@replacecommand{CTEX}{CJK}{underdotbasesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underdotsep}
+ \CTEX@replacecommand{CTEX}{CJK}{underlinebasesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underlinesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underdbllinebasesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underdbllinesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underwavebasesep}
+ \CTEX@replacecommand{CTEX}{CJK}{underwavesep}
+ \CTEX@replacecommand{CTEX}{CJK}{southeight}
+ \CTEX@replacecommand{CTEX}{CJK}{underdotcolor}
+ \CTEX@replacecommand{CTEX}{CJK}{underwavecolor}
+ \CTEX@replacecommand{CTEX}{CJK}{underlinecolor}
+ \CTEX@replacecommand{CTEX}{CJK}{underdbllinecolor}
+ \CTEX@replacecommand{CTEX}{CJK}{soutcolor}
+ \CTEX@replacecommand{CTEX}{CJK}{xoutcolor}
+\fi
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
new file mode 100644
index 00000000000..ab3ebad6e3a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
@@ -0,0 +1,69 @@
+% ctex-cjk-engine.def: for LaTeX engine with CJK
+% vim:ft=tex
+
+\ifCTEX@GBK
+ \RequirePackage{CJK}[2003/03/28]
+\else
+ \RequirePackage{CJKutf8}[2003/03/28]
+\fi
+\RequirePackage{CJKnumb}[2003/03/28]
+
+\ifCTEX@punct
+ \RequirePackage{CJKpunct}[2009/05/06]
+\fi
+
+\AtEndOfPackage{\CJK@makeActive}
+
+\ifCTEX@space
+ \ifCTEX@GBK
+ \def\CTEX@beginCJK{\begin{CJK}{GBK}{rm}}
+ \else
+ \def\CTEX@beginCJK{\begin{CJK}{UTF8}{rm}}
+ \fi
+ \def\CTEX@endCJK{\clearpage\end{CJK}}
+\else
+ \ifCTEX@GBK
+ \def\CTEX@beginCJK{\begin{CJK*}{GBK}{rm}\CJKtilde}
+ \else
+ \def\CTEX@beginCJK{\begin{CJK*}{UTF8}{rm}\CJKtilde}
+ \fi
+ \def\CTEX@endCJK{\clearpage\end{CJK*}}
+\fi
+
+\let\CTEX@begindocumenthook\@begindocumenthook
+\let\CTEX@enddocumenthook\@enddocumenthook
+\def\AtBeginDocument{\g@addto@macro\CTEX@begindocumenthook}
+\def\AtEndDocument{\g@addto@macro\CTEX@enddocumenthook}
+\def\@begindocumenthook{\CTEX@begindocumenthook\CTEX@beginCJK}
+\def\@enddocumenthook{\CTEX@endCJK\CTEX@enddocumenthook}
+
+\input{ctex-cjk-common.def}
+
+\providecommand*\CTEX@rm@family{}
+\providecommand*\CTEX@sf@family{}
+\providecommand*\CTEX@tt@family{}
+
+\ifCTEX@nofonts
+ \renewcommand*\CTEX@rm@family{gbsn}
+ \renewcommand*\CTEX@sf@family{gbsn}
+ \renewcommand*\CTEX@tt@family{gbsn}
+\else
+ \ifCTEX@cjkfonts
+ \input{ctex-cjk-cjkfonts.def}
+ \else\ifCTEX@winfonts
+ \input{ctex-cjk-winfonts.def}
+ \else\ifCTEX@adobefonts
+ \input{ctex-cjk-adobefonts.def}
+ \fi\fi\fi
+\fi
+
+\let\CTEX@save@rmfamily\rmfamily
+\renewcommand*\rmfamily{\CTEX@save@rmfamily\CJKfamily{\CTEX@rm@family}}
+\let\CTEX@save@sffamily\sffamily
+\renewcommand*\sffamily{\CTEX@save@sffamily\CJKfamily{\CTEX@sf@family}}
+\let\CTEX@save@ttfamily\ttfamily
+\renewcommand*\ttfamily{\CTEX@save@ttfamily\CJKfamily{\CTEX@tt@family}}
+\let\CTEX@save@normalfont\normalfont
+\renewcommand*\normalfont{\CTEX@save@normalfont\CJKfamily{\CTEX@rm@family}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def
new file mode 100644
index 00000000000..2ccbf1d2dba
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def
@@ -0,0 +1,27 @@
+% ctex-xecjk-engine.def: for XeTeX engine with xeCJK
+% vim:ft=tex
+
+\CTEX@GBKfalse % XeTeX always use UTF-8 as default encoding
+
+\RequirePackage[BoldFont,CJKnumber]{xeCJK}
+\defaultfontfeatures{Mapping=tex-text}
+
+\ifCTEX@punct
+ \punctstyle{quanjiao}
+\else
+ \punctstyle{plain}
+\fi
+
+\input{ctex-cjk-common.def}
+
+\ifCTEX@nofonts\else
+ \ifCTEX@cjkfonts
+ \input{ctex-xecjk-cjkfonts.def}
+ \else\ifCTEX@winfonts
+ \input{ctex-xecjk-winfonts.def}
+ \else\ifCTEX@adobefonts
+ \input{ctex-xecjk-adobefonts.def}
+ \fi\fi\fi
+\fi
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fd
new file mode 100644
index 00000000000..290f1c9d1ea
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fd
@@ -0,0 +1,17 @@
+%% c19gbsn.fd
+\ProvidesFile{c19gbsn.fd}[2009/05/11 4.8.2]
+
+
+% simplified Chinese characters
+%
+% character set: GBK
+% font encoding: CJK (standard)
+
+% Arphic PL TrueType font AR PL SungtiL GB / BousungEG-Light-GB
+
+\DeclareFontFamily{C10}{gbsn}{\hyphenchar \font\m@ne}
+
+\DeclareFontShape{C10}{gbsn}{m}{n}{<-> CJK * gbsnlp}{\CJKnormal}
+\DeclareFontShape{C10}{gbsn}{bx}{n}{<-> CJKb * gbsnlp}{\CJKbold}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fdx b/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fdx
new file mode 100644
index 00000000000..25b455d4808
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19gbsn.fdx
@@ -0,0 +1,62 @@
+%% c19gbsn.fdx
+\ProvidesFile{c19gbsn.fdx}[2009/05/11 4.8.2]
+
+
+\CJKvdef{fullheight}{1em}
+\CJKvdef{height}{.88em}
+\CJKvdef{offset}{.5em}
+\CJKvdef{simpleoffset}{-.1em}
+
+\CJKvdef{m/n/01/1}{\raise .15em \hbox to 1em {\kern -.15em \CJKsymbol{1}\hss}}
+\CJKvdef{m/n/01/2}{\raise .15em \hbox to 1em {\kern -.15em \CJKsymbol{2}\hss}}
+\CJKvdef{m/n/01/17}{\CJKsymbolsimple{17}}
+\CJKvdef{m/n/01/18}{\CJKsymbolsimple{18}}
+\CJKvdef{m/n/01/19}{\CJKsymbolsimple{19}}
+\CJKvdef{m/n/01/20}{\CJKsymbolsimple{20}}
+\CJKvdef{m/n/01/21}{\CJKsymbolsimple{21}}
+\CJKvdef{m/n/01/22}{\CJKsymbolsimple{22}}
+\CJKvdef{m/n/01/23}{\CJKsymbolsimple{23}}
+\CJKvdef{m/n/01/24}{\CJKsymbolsimple{24}}
+\CJKvdef{m/n/01/25}{\CJKsymbolsimple{25}}
+\CJKvdef{m/n/01/26}{\CJKsymbolsimple{26}}
+\CJKvdef{m/n/01/27}{\CJKsymbolsimple{27}}
+\CJKvdef{m/n/01/28}{\CJKsymbolsimple{28}}
+\CJKvdef{m/n/01/29}{\CJKsymbolsimple{29}}
+\CJKvdef{m/n/01/30}{\CJKsymbolsimple{30}}
+\CJKvdef{m/n/01/195}{\CJKsymbolsimple{195}}
+\CJKvdef{m/n/01/196}{\CJKsymbolsimple{196}}
+\CJKvdef{m/n/01/199}{
+ \raise .25em \hbox to 1em {\kern -.35em \CJKsymbol{199}\hss}}
+\CJKvdef{m/n/01/201}{
+ \raise .25em \hbox to 1em {\kern -.35em \CJKsymbol{201}\hss}}
+\CJKvdef{m/n/01/246}{\CJKsymbolsimple{246}}
+\CJKvdef{m/n/01/248}{\CJKsymbolsimple{248}}
+\CJKvdef{m/n/02/22}{\CJKsymbolsimple{22}}
+\CJKvdef{m/n/02/24}{\CJKsymbolsimple{24}}
+
+\CJKvlet{bx/n/01/1}{m/n/01/1}
+\CJKvlet{bx/n/01/2}{m/n/01/2}
+\CJKvlet{bx/n/01/17}{m/n/01/17}
+\CJKvlet{bx/n/01/18}{m/n/01/18}
+\CJKvlet{bx/n/01/19}{m/n/01/19}
+\CJKvlet{bx/n/01/20}{m/n/01/20}
+\CJKvlet{bx/n/01/21}{m/n/01/21}
+\CJKvlet{bx/n/01/22}{m/n/01/22}
+\CJKvlet{bx/n/01/23}{m/n/01/23}
+\CJKvlet{bx/n/01/24}{m/n/01/24}
+\CJKvlet{bx/n/01/25}{m/n/01/25}
+\CJKvlet{bx/n/01/26}{m/n/01/26}
+\CJKvlet{bx/n/01/27}{m/n/01/27}
+\CJKvlet{bx/n/01/28}{m/n/01/28}
+\CJKvlet{bx/n/01/29}{m/n/01/29}
+\CJKvlet{bx/n/01/30}{m/n/01/30}
+\CJKvlet{bx/n/01/195}{m/n/01/195}
+\CJKvlet{bx/n/01/196}{m/n/01/196}
+\CJKvlet{bx/n/01/199}{m/n/01/199}
+\CJKvlet{bx/n/01/201}{m/n/01/201}
+\CJKvlet{bx/n/01/246}{m/n/01/246}
+\CJKvlet{bx/n/01/248}{m/n/01/248}
+\CJKvlet{bx/n/02/22}{m/n/02/22}
+\CJKvlet{bx/n/02/24}{m/n/02/24}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fd
new file mode 100644
index 00000000000..3f579ea4844
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fd
@@ -0,0 +1,17 @@
+%% c19gkai.fd
+\ProvidesFile{c19gkai.fd}[2009/05/11 4.8.2]
+
+
+% simplified Chinese characters
+%
+% character set: GBK
+% font encoding: CJK (standard)
+
+% Arphic PL TrueType font AR PL KaitiM GB / GBZenKai-Medium
+
+\DeclareFontFamily{C10}{gkai}{\hyphenchar \font\m@ne}
+
+\DeclareFontShape{C10}{gkai}{m}{n}{<-> CJK * gkaimp}{\CJKnormal}
+\DeclareFontShape{C10}{gkai}{bx}{n}{<-> CJKb * gkaimp}{\CJKbold}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fdx b/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fdx
new file mode 100644
index 00000000000..9462027bd64
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19gkai.fdx
@@ -0,0 +1,62 @@
+%% c19gkai.fdx
+\ProvidesFile{c19gkai.fdx}[2009/05/11 4.8.2]
+
+
+\CJKvdef{fullheight}{1em}
+\CJKvdef{height}{.88em}
+\CJKvdef{offset}{.5em}
+\CJKvdef{simpleoffset}{-.1em}
+
+\CJKvdef{m/n/01/1}{\raise .15em \hbox to 1em {\kern -.15em \CJKsymbol{1}\hss}}
+\CJKvdef{m/n/01/2}{\raise .15em \hbox to 1em {\kern -.15em \CJKsymbol{2}\hss}}
+\CJKvdef{m/n/01/17}{\CJKsymbolsimple{17}}
+\CJKvdef{m/n/01/18}{\CJKsymbolsimple{18}}
+\CJKvdef{m/n/01/19}{\CJKsymbolsimple{19}}
+\CJKvdef{m/n/01/20}{\CJKsymbolsimple{20}}
+\CJKvdef{m/n/01/21}{\CJKsymbolsimple{21}}
+\CJKvdef{m/n/01/22}{\CJKsymbolsimple{22}}
+\CJKvdef{m/n/01/23}{\CJKsymbolsimple{23}}
+\CJKvdef{m/n/01/24}{\CJKsymbolsimple{24}}
+\CJKvdef{m/n/01/25}{\CJKsymbolsimple{25}}
+\CJKvdef{m/n/01/26}{\CJKsymbolsimple{26}}
+\CJKvdef{m/n/01/27}{\CJKsymbolsimple{27}}
+\CJKvdef{m/n/01/28}{\CJKsymbolsimple{28}}
+\CJKvdef{m/n/01/29}{\CJKsymbolsimple{29}}
+\CJKvdef{m/n/01/30}{\CJKsymbolsimple{30}}
+\CJKvdef{m/n/01/195}{\CJKsymbolsimple{195}}
+\CJKvdef{m/n/01/196}{\CJKsymbolsimple{196}}
+\CJKvdef{m/n/01/199}{
+ \raise .25em \hbox to 1em {\kern -.35em \CJKsymbol{199}\hss}}
+\CJKvdef{m/n/01/201}{
+ \raise .25em \hbox to 1em {\kern -.35em \CJKsymbol{201}\hss}}
+\CJKvdef{m/n/01/246}{\CJKsymbolsimple{246}}
+\CJKvdef{m/n/01/248}{\CJKsymbolsimple{248}}
+\CJKvdef{m/n/02/22}{\CJKsymbolsimple{22}}
+\CJKvdef{m/n/02/24}{\CJKsymbolsimple{24}}
+
+\CJKvlet{bx/n/01/1}{m/n/01/1}
+\CJKvlet{bx/n/01/2}{m/n/01/2}
+\CJKvlet{bx/n/01/17}{m/n/01/17}
+\CJKvlet{bx/n/01/18}{m/n/01/18}
+\CJKvlet{bx/n/01/19}{m/n/01/19}
+\CJKvlet{bx/n/01/20}{m/n/01/20}
+\CJKvlet{bx/n/01/21}{m/n/01/21}
+\CJKvlet{bx/n/01/22}{m/n/01/22}
+\CJKvlet{bx/n/01/23}{m/n/01/23}
+\CJKvlet{bx/n/01/24}{m/n/01/24}
+\CJKvlet{bx/n/01/25}{m/n/01/25}
+\CJKvlet{bx/n/01/26}{m/n/01/26}
+\CJKvlet{bx/n/01/27}{m/n/01/27}
+\CJKvlet{bx/n/01/28}{m/n/01/28}
+\CJKvlet{bx/n/01/29}{m/n/01/29}
+\CJKvlet{bx/n/01/30}{m/n/01/30}
+\CJKvlet{bx/n/01/195}{m/n/01/195}
+\CJKvlet{bx/n/01/196}{m/n/01/196}
+\CJKvlet{bx/n/01/199}{m/n/01/199}
+\CJKvlet{bx/n/01/201}{m/n/01/201}
+\CJKvlet{bx/n/01/246}{m/n/01/246}
+\CJKvlet{bx/n/01/248}{m/n/01/248}
+\CJKvlet{bx/n/02/22}{m/n/02/22}
+\CJKvlet{bx/n/02/24}{m/n/02/24}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
new file mode 100644
index 00000000000..481dd8d23a2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
@@ -0,0 +1,49 @@
+%% c19rm.fd
+%%
+%% This is file `c19rm.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,rm')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c19rm.fd}
+ [2007/05/06 v0.8a ctex
+ font definition file]
+
+%% Chinese characters (extension of GB 2312)
+%%
+%% character set: GBK
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C19}{rm}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C19}{rm}{m}{n}{<-> CJK * gbksong}{}
+\DeclareFontShape{C19}{rm}{b}{n}{<-> CJK * gbkhei}{}
+\DeclareFontShape{C19}{rm}{bx}{n}{<-> CJK * gbkhei}{}
+\DeclareFontShape{C19}{rm}{m}{sl}{<-> CJK * gbksongsl}{}
+\DeclareFontShape{C19}{rm}{b}{sl}{<-> CJK * gbkheisl}{}
+\DeclareFontShape{C19}{rm}{bx}{sl}{<-> CJK * gbkheisl}{}
+\DeclareFontShape{C19}{rm}{m}{it}{<-> CJK * gbkkai}{}
+\DeclareFontShape{C19}{rm}{b}{it}{<-> CJKb * gbkkai}{\CJKbold}
+\DeclareFontShape{C19}{rm}{bx}{it}{<-> CJKb * gbkkai}{\CJKbold}
+\endinput
+%%
+%% End of file `c19rm.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd
new file mode 100644
index 00000000000..c3071ff2e87
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd
@@ -0,0 +1,49 @@
+%% c19sf.fd
+%%
+%% This is file `c19sf.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,sf')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c19sf.fd}
+ [2007/05/06 v0.8a ctex
+ font definition file]
+
+%% Chinese characters (extension of GB 2312)
+%%
+%% character set: GBK
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C19}{sf}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C19}{sf}{m}{n}{<-> CJK * gbkyou}{}
+\DeclareFontShape{C19}{sf}{b}{n}{<-> CJKb * gbkyou}{\CJKbold}
+\DeclareFontShape{C19}{sf}{bx}{n}{<-> CJKb * gbkyou}{\CJKbold}
+\DeclareFontShape{C19}{sf}{m}{sl}{<-> CJK * gbkyousl}{}
+\DeclareFontShape{C19}{sf}{b}{sl}{<-> CJKb * gbkyousl}{\CJKbold}
+\DeclareFontShape{C19}{sf}{bx}{sl}{<-> CJKb * gbkyousl}{\CJKbold}
+\DeclareFontShape{C19}{sf}{m}{it}{<-> CJK * gbkyou}{}
+\DeclareFontShape{C19}{sf}{b}{it}{<-> CJKb * gbkyou}{\CJKbold}
+\DeclareFontShape{C19}{sf}{bx}{it}{<-> CJKb * gbkyou}{\CJKbold}
+\endinput
+%%
+%% End of file `c19sf.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd
new file mode 100644
index 00000000000..d02ee63bdd8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd
@@ -0,0 +1,49 @@
+%% c19tt.fd
+%%
+%% This is file `c19tt.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,tt')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c19tt.fd}
+ [2007/05/06 v0.8a ctex
+ font definition file]
+
+%% Chinese characters (extension of GB 2312)
+%%
+%% character set: GBK
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C19}{tt}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C19}{tt}{m}{n}{<-> CJK * gbkfs}{}
+\DeclareFontShape{C19}{tt}{b}{n}{<-> CJKb * gbkfs}{\CJKbold}
+\DeclareFontShape{C19}{tt}{bx}{n}{<-> CJKb * gbkfs}{\CJKbold}
+\DeclareFontShape{C19}{tt}{m}{sl}{<-> CJK * gbkfssl}{}
+\DeclareFontShape{C19}{tt}{b}{sl}{<-> CJKb * gbkfssl}{\CJKbold}
+\DeclareFontShape{C19}{tt}{bx}{sl}{<-> CJKb * gbkfssl}{\CJKbold}
+\DeclareFontShape{C19}{tt}{m}{it}{<-> CJK * gbkfs}{}
+\DeclareFontShape{C19}{tt}{b}{it}{<-> CJKb * gbkfs}{\CJKbold}
+\DeclareFontShape{C19}{tt}{bx}{it}{<-> CJKb * gbkfs}{\CJKbold}
+\endinput
+%%
+%% End of file `c19tt.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd
new file mode 100644
index 00000000000..1c0ef069ddf
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd
@@ -0,0 +1,49 @@
+%% c70rm.fd
+%%
+%% This is file `c70rm.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,rm')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c70rm.fd}
+ [2007/05/06 v0.8a ctexutf8
+ font definition file]
+
+%% Chinese characters
+%%
+%% character set: UTF8
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C70}{rm}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C70}{rm}{m}{n}{<-> CJK * unisong}{}
+\DeclareFontShape{C70}{rm}{b}{n}{<-> CJK * unihei}{}
+\DeclareFontShape{C70}{rm}{bx}{n}{<-> CJK * unihei}{}
+\DeclareFontShape{C70}{rm}{m}{sl}{<-> CJK * unisongsl}{}
+\DeclareFontShape{C70}{rm}{b}{sl}{<-> CJK * uniheisl}{}
+\DeclareFontShape{C70}{rm}{bx}{sl}{<-> CJK * uniheisl}{}
+\DeclareFontShape{C70}{rm}{m}{it}{<-> CJK * unikai}{}
+\DeclareFontShape{C70}{rm}{b}{it}{<-> CJKb * unikai}{\CJKbold}
+\DeclareFontShape{C70}{rm}{bx}{it}{<-> CJKb * unikai}{\CJKbold}
+\endinput
+%%
+%% End of file `c70rm.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd
new file mode 100644
index 00000000000..b5f8da3e91c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd
@@ -0,0 +1,49 @@
+%% c70sf.fd
+%%
+%% This is file `c70sf.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,sf')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c70sf.fd}
+ [2007/05/06 v0.8a ctexutf8
+ font definition file]
+
+%% Chinese characters
+%%
+%% character set: UTF8
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C70}{sf}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C70}{sf}{m}{n}{<-> CJK * uniyou}{}
+\DeclareFontShape{C70}{sf}{b}{n}{<-> CJKb * uniyou}{\CJKbold}
+\DeclareFontShape{C70}{sf}{bx}{n}{<-> CJKb * uniyou}{\CJKbold}
+\DeclareFontShape{C70}{sf}{m}{sl}{<-> CJK * uniyousl}{}
+\DeclareFontShape{C70}{sf}{b}{sl}{<-> CJKb * uniyousl}{\CJKbold}
+\DeclareFontShape{C70}{sf}{bx}{sl}{<-> CJKb * uniyousl}{\CJKbold}
+\DeclareFontShape{C70}{sf}{m}{it}{<-> CJK * uniyou}{}
+\DeclareFontShape{C70}{sf}{b}{it}{<-> CJKb * uniyou}{\CJKbold}
+\DeclareFontShape{C70}{sf}{bx}{it}{<-> CJKb * uniyou}{\CJKbold}
+\endinput
+%%
+%% End of file `c70sf.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd
new file mode 100644
index 00000000000..0e9933d9a9e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd
@@ -0,0 +1,49 @@
+%% c70tt.fd
+%%
+%% This is file `c70tt.fd',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `fd,tt')
+%%
+%% This is a generated file.
+%%
+%% Copyright 2003-2006
+%% CTEX.ORG and any individual authors listed elsewhere in this file.
+%%
+%% This file was generated from file(s) of the ctex package project.
+%% -----------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% This is the font definition file of the ctex package with LaTeX2e.
+%%
+\ProvidesFile{c70tt.fd}
+ [2007/05/06 v0.8a ctexutf8
+ font definition file]
+
+%% Chinese characters
+%%
+%% character set: UTF8
+%% font encoding: CJK (extended)
+
+\DeclareFontFamily{C70}{tt}{\hyphenchar \font\m@ne}
+\DeclareFontShape{C70}{tt}{m}{n}{<-> CJK * unifs}{}
+\DeclareFontShape{C70}{tt}{b}{n}{<-> CJKb * unifs}{\CJKbold}
+\DeclareFontShape{C70}{tt}{bx}{n}{<-> CJKb * unifs}{\CJKbold}
+\DeclareFontShape{C70}{tt}{m}{sl}{<-> CJK * unifssl}{}
+\DeclareFontShape{C70}{tt}{b}{sl}{<-> CJKb * unifssl}{\CJKbold}
+\DeclareFontShape{C70}{tt}{bx}{sl}{<-> CJKb * unifssl}{\CJKbold}
+\DeclareFontShape{C70}{tt}{m}{it}{<-> CJK * unifs}{}
+\DeclareFontShape{C70}{tt}{b}{it}{<-> CJKb * unifs}{\CJKbold}
+\DeclareFontShape{C70}{tt}{bx}{it}{<-> CJKb * unifs}{\CJKbold}
+\endinput
+%%
+%% End of file `c70tt.fd'.
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-adobefonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-adobefonts.def
new file mode 100644
index 00000000000..168d4a69d4f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-adobefonts.def
@@ -0,0 +1,7 @@
+% ctex-cjk-adobefonts.def: Adobe 的 CJK 字体设置,为 Adobe 的四套字体
+% vim:ft=tex
+
+% 目前不可用
+\input{ctex-cjk-winfonts.def}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-cjkfonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-cjkfonts.def
new file mode 100644
index 00000000000..7441c883f56
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-cjkfonts.def
@@ -0,0 +1,11 @@
+% ctex-cjk-cjkfonts.def: CJKfonts 的 CJK 字体设置,文鼎的两套字体
+% vim:ft=tex
+
+\renewcommand*\CTEX@rm@family{gbsn}
+\renewcommand*\CTEX@sf@family{gbsn}
+\renewcommand*\CTEX@tt@family{gbsn}
+
+\newcommand*{\songti}{\CJKfamily{gbsn}} % 宋体
+\newcommand*{\kaishu}{\CJKfamily{gkai}} % 楷书
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-winfonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-winfonts.def
new file mode 100644
index 00000000000..12e956cf7cd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-cjk-winfonts.def
@@ -0,0 +1,78 @@
+% ctex-cjk-winfonts.def: Windows 的 CJK 字体设置,默认为 CTeX 套装的六种字体
+% vim:ft=tex
+
+\renewcommand*\CTEX@rm@family{rm}
+\renewcommand*\CTEX@sf@family{sf}
+\renewcommand*\CTEX@tt@family{tt}
+
+\ifCTEX@punct
+% see also: c19rm.fd
+ \CJKpunctmapfamily{C19}{rm}{m}{n}{song}
+ \CJKpunctmapfamily{C19}{rm}{b}{n}{hei}
+ \CJKpunctmapfamily{C19}{rm}{bx}{n}{hei}
+ \CJKpunctmapfamily{C19}{rm}{m}{sl}{song}
+ \CJKpunctmapfamily{C19}{rm}{b}{sl}{hei}
+ \CJKpunctmapfamily{C19}{rm}{bx}{sl}{hei}
+ \CJKpunctmapfamily{C19}{rm}{m}{it}{kai}
+ \CJKpunctmapfamily{C19}{rm}{b}{it}{kei}
+ \CJKpunctmapfamily{C19}{rm}{bx}{it}{kai}
+% see also: c19sf.fd
+ \CJKpunctmapfamily{C19}{sf}{m}{n}{you}
+ \CJKpunctmapfamily{C19}{sf}{b}{n}{you}
+ \CJKpunctmapfamily{C19}{sf}{bx}{n}{you}
+ \CJKpunctmapfamily{C19}{sf}{m}{sl}{you}
+ \CJKpunctmapfamily{C19}{sf}{b}{sl}{you}
+ \CJKpunctmapfamily{C19}{sf}{bx}{sl}{you}
+ \CJKpunctmapfamily{C19}{sf}{m}{it}{you}
+ \CJKpunctmapfamily{C19}{sf}{b}{it}{you}
+ \CJKpunctmapfamily{C19}{sf}{bx}{it}{you}
+% see also: c19tt.fd
+ \CJKpunctmapfamily{C19}{tt}{m}{n}{fs}
+ \CJKpunctmapfamily{C19}{tt}{b}{n}{fs}
+ \CJKpunctmapfamily{C19}{tt}{bx}{n}{fs}
+ \CJKpunctmapfamily{C19}{tt}{m}{sl}{fs}
+ \CJKpunctmapfamily{C19}{tt}{b}{sl}{fs}
+ \CJKpunctmapfamily{C19}{tt}{bx}{sl}{fs}
+ \CJKpunctmapfamily{C19}{tt}{m}{it}{fs}
+ \CJKpunctmapfamily{C19}{tt}{b}{it}{fs}
+ \CJKpunctmapfamily{C19}{tt}{bx}{it}{fs}
+% see also: c70rm.fd
+ \CJKpunctmapfamily{C70}{rm}{m}{n}{song}
+ \CJKpunctmapfamily{C70}{rm}{b}{n}{hei}
+ \CJKpunctmapfamily{C70}{rm}{bx}{n}{hei}
+ \CJKpunctmapfamily{C70}{rm}{m}{sl}{song}
+ \CJKpunctmapfamily{C70}{rm}{b}{sl}{hei}
+ \CJKpunctmapfamily{C70}{rm}{bx}{sl}{hei}
+ \CJKpunctmapfamily{C70}{rm}{m}{it}{kai}
+ \CJKpunctmapfamily{C70}{rm}{b}{it}{kei}
+ \CJKpunctmapfamily{C70}{rm}{bx}{it}{kai}
+% see also: c70sf.fd
+ \CJKpunctmapfamily{C70}{sf}{m}{n}{you}
+ \CJKpunctmapfamily{C70}{sf}{b}{n}{you}
+ \CJKpunctmapfamily{C70}{sf}{bx}{n}{you}
+ \CJKpunctmapfamily{C70}{sf}{m}{sl}{you}
+ \CJKpunctmapfamily{C70}{sf}{b}{sl}{you}
+ \CJKpunctmapfamily{C70}{sf}{bx}{sl}{you}
+ \CJKpunctmapfamily{C70}{sf}{m}{it}{you}
+ \CJKpunctmapfamily{C70}{sf}{b}{it}{you}
+ \CJKpunctmapfamily{C70}{sf}{bx}{it}{you}
+% see also: c70tt.fd
+ \CJKpunctmapfamily{C70}{tt}{m}{n}{fs}
+ \CJKpunctmapfamily{C70}{tt}{b}{n}{fs}
+ \CJKpunctmapfamily{C70}{tt}{bx}{n}{fs}
+ \CJKpunctmapfamily{C70}{tt}{m}{sl}{fs}
+ \CJKpunctmapfamily{C70}{tt}{b}{sl}{fs}
+ \CJKpunctmapfamily{C70}{tt}{bx}{sl}{fs}
+ \CJKpunctmapfamily{C70}{tt}{m}{it}{fs}
+ \CJKpunctmapfamily{C70}{tt}{b}{it}{fs}
+ \CJKpunctmapfamily{C70}{tt}{bx}{it}{fs}
+\fi
+
+\newcommand*{\songti}{\CJKfamily{song}} % 宋体
+\newcommand*{\heiti}{\CJKfamily{hei}} % 黑体
+\newcommand*{\kaishu}{\CJKfamily{kai}} % 楷书
+\newcommand*{\fangsong}{\CJKfamily{fs}} % 仿宋
+\newcommand*{\lishu}{\CJKfamily{li}} % 隶书
+\newcommand*{\youyuan}{\CJKfamily{you}} % 幼圆
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def
new file mode 100644
index 00000000000..d3af98f1225
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def
@@ -0,0 +1,19 @@
+% ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体
+% vim:ft=tex
+
+\setCJKmainfont[BoldFont=Adobe Heiti Std,ItalicFont=Adobe Kaiti Std]
+ {Adobe Song Std}
+\setCJKsansfont{Adobe Heiti Std}
+\setCJKmonofont{Adobe Fangsong Std}
+
+\setCJKfamilyfont{song}{Adobe Song Std}
+\setCJKfamilyfont{hei}{Adobe Heiti Std}
+\setCJKfamilyfont{fs}{Adobe Fangsong Std}
+\setCJKfamilyfont{kai}{Adobe Kaiti Std}
+
+\newcommand*{\songti}{\CJKfamily{song}} % 宋体
+\newcommand*{\heiti}{\CJKfamily{hei}} % 黑体
+\newcommand*{\kaishu}{\CJKfamily{kai}} % 楷书
+\newcommand*{\fangsong}{\CJKfamily{fs}} % 仿宋
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-cjkfonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-cjkfonts.def
new file mode 100644
index 00000000000..e1c67b5714f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-cjkfonts.def
@@ -0,0 +1,7 @@
+% ctex-xecjk-cjkfonts.def: CJKfonts 的 xeCJK 字体设置,文鼎的两套字体
+% vim:ft=tex
+
+% 暂缺
+\input{ctex-xecjk-adobefonts.def}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def
new file mode 100644
index 00000000000..638e23df611
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def
@@ -0,0 +1,23 @@
+% ctex-xecjk-winfonts.def: Windows 的 xeCJK 字体设置,默认为六种中易字体
+% vim:ft=tex
+
+\setCJKmainfont[BoldFont={SimHei},ItalicFont={[simkai.ttf]}]
+ {SimSun}
+\setCJKsansfont{YouYuan}
+\setCJKmonofont{[simfang.ttf]}
+
+\setCJKfamilyfont{song}{SimSun}
+\setCJKfamilyfont{hei}{SimHei}
+\setCJKfamilyfont{kai}{[simkai.ttf]}
+\setCJKfamilyfont{fs}{[simfang.ttf]}
+\setCJKfamilyfont{li}{LiSu}
+\setCJKfamilyfont{you}{YouYuan}
+
+\newcommand*{\songti}{\CJKfamily{song}} % 宋体
+\newcommand*{\heiti}{\CJKfamily{hei}} % 黑体
+\newcommand*{\kaishu}{\CJKfamily{kai}} % 楷书
+\newcommand*{\fangsong}{\CJKfamily{fs}} % 仿宋
+\newcommand*{\lishu}{\CJKfamily{li}} % 隶书
+\newcommand*{\youyuan}{\CJKfamily{you}} % 幼圆
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/opt/ctex-caption-opts.def b/Master/texmf-dist/tex/latex/ctex/opt/ctex-caption-opts.def
new file mode 100644
index 00000000000..4f91d9ac8b7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/opt/ctex-caption-opts.def
@@ -0,0 +1,11 @@
+% ctex-caption.opt: options just for ctexcap.sty and document classes
+% vim:ft=tex
+
+% section depths
+
+\newcounter{CTEX@sectiondepth}
+\setcounter{CTEX@sectiondepth}{2}
+\DeclareOption{sub3section}{\setcounter{CTEX@sectiondepth}{3}}
+\DeclareOption{sub4section}{\setcounter{CTEX@sectiondepth}{4}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/opt/ctex-class-opts.def b/Master/texmf-dist/tex/latex/ctex/opt/ctex-class-opts.def
new file mode 100644
index 00000000000..7e43247b92e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/opt/ctex-class-opts.def
@@ -0,0 +1,26 @@
+% ctex-class.opt: options for ctex class files
+% vim:ft=tex
+
+% font size
+
+\newif\ifCTEX@sfoursize \CTEX@sfoursizefalse
+\DeclareOption{cs4size}{\CTEX@sfoursizetrue\CTEX@fivesizefalse}
+\newif\ifCTEX@fivesize \CTEX@fivesizetrue
+\DeclareOption{c5size}{\CTEX@fivesizetrue\CTEX@sfoursizefalse}
+
+\DeclareOption{10pt}{%
+ \CTEX@sfoursizefalse\CTEX@fivesizefalse%
+ \PassOptionsToClass{\CurrentOption}%
+ {\CTEX@classtoload}}
+\DeclareOption{11pt}{%
+ \CTEX@sfoursizefalse\CTEX@fivesizefalse%
+ \PassOptionsToClass{\CurrentOption}%
+ {\CTEX@classtoload}}
+\DeclareOption{12pt}{%
+ \CTEX@sfoursizefalse\CTEX@fivesizefalse%
+ \PassOptionsToClass{\CurrentOption}%
+ {\CTEX@classtoload}}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}%
+ {\CTEX@classtoload}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ctex/opt/ctex-common-opts.def b/Master/texmf-dist/tex/latex/ctex/opt/ctex-common-opts.def
new file mode 100644
index 00000000000..c9ef2d9d1d2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/opt/ctex-common-opts.def
@@ -0,0 +1,59 @@
+% ctex-common.opt: options for all ctex packages/classes
+% vim:ft=tex
+
+% encoding
+\newif\ifCTEX@GBK \CTEX@GBKtrue
+\DeclareOption{GBK}{\CTEX@GBKtrue}
+\DeclareOption{UTF8}{\CTEX@GBKfalse}
+
+% fonts
+\newif\ifCTEX@nofonts \CTEX@nofontsfalse
+\newif\ifCTEX@cjkfonts \CTEX@cjkfontstrue
+\newif\ifCTEX@winfonts \CTEX@winfontsfalse
+\newif\ifCTEX@adobefonts \CTEX@adobefontsfalse
+\DeclareOption{nofonts}{\CTEX@nofontstrue
+ \CTEX@cjkfontsfalse
+ \CTEX@winfontsfalse
+ \CTEX@adobefontsfalse}
+\DeclareOption{cjkfonts}{\CTEX@cjkfontstrue
+ \CTEX@nofontsfalse
+ \CTEX@winfontsfalse
+ \CTEX@adobefontsfalse}
+\DeclareOption{winfonts}{\CTEX@winfontstrue
+ \CTEX@cjkfontsfalse
+ \CTEX@nofontsfalse
+ \CTEX@adobefontsfalse}
+\DeclareOption{adobefonts}{\CTEX@adobefontstrue
+ \CTEX@cjkfontsfalse
+ \CTEX@nofontsfalse
+ \CTEX@winfontsfalse}
+
+\newif\ifCTEX@cct \CTEX@cctfalse
+\DeclareOption{CCT}{\CTEX@ccttrue}
+
+\newif\ifCTEX@cctfont \CTEX@cctfontfalse
+\DeclareOption{CCTfont}{\CTEX@ccttrue\CTEX@cctfonttrue}
+
+\newif\ifCTEX@punct \CTEX@puncttrue
+\DeclareOption{punct}{\CTEX@puncttrue}
+\DeclareOption{nopunct}{\CTEX@punctfalse}
+
+\newif\ifCTEX@space \CTEX@spacefalse
+\DeclareOption{space}{\CTEX@spacetrue}
+\DeclareOption{nospace}{\CTEX@spacefalse}
+
+\newif\ifCTEX@caption \CTEX@captiontrue
+\DeclareOption{nocap}{\CTEX@captionfalse}
+\DeclareOption{cap}{\CTEX@captiontrue}
+
+\newif\ifCTEX@indent \CTEX@indenttrue
+\DeclareOption{noindent}{\CTEX@indentfalse}
+\DeclareOption{indent}{\CTEX@indenttrue}
+
+\newif\ifCTEX@fancyhdr \CTEX@fancyhdrfalse
+\DeclareOption{fancyhdr}{\CTEX@fancyhdrtrue}
+
+\newif\ifCTEX@fntef \CTEX@fnteffalse
+\DeclareOption{fntef}{\CTEX@fnteftrue}
+
+\endinput
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 79e0acb3e18..e3a2553e47d 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -66,8 +66,8 @@ my @WorkingTLP = qw(
context-typearea context-typescripts context-vim
cooking cool coollist coolstr cooltooltips
coordsys courier-scaled courseoutline coursepaper coverpage
- crop crossreference crosswrd cryst csbulletin csquotes ctex-faq
- csvtools ctable
+ crop crossreference crosswrd cryst csbulletin csquotes
+ csvtools ctable ctex ctex-faq
cursolatex cursor cuisine
currvita curve curve2e curves
custom-bib cv cweb-latex cyklop cyrillic
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 44c9d15a649..ca0a71a2551 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -584,6 +584,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'context-games' => '&POSTcontext_games',
'context-lilypond' => '&POSTcontext_lilypond',
'coordsys' => '&POSTcoordsys',
+ 'ctex' => '&POSTctex',
'datetime' => '&POSTlatex2html',
'doipubmed' => '&POSTlatex2html',
'elsarticle' => '&POSTelsarticle',
@@ -3550,6 +3551,15 @@ sub POSTcoordsys
&SYSTEM ("$MV putfile. putfile.maple");
}
+sub POSTctex
+{
+ print "POST$package - move subdirectories.\n";
+ my $dstdir = "$DEST/tex/latex/$package";
+ &xmkdir ($dstdir);
+ &SYSTEM ("$MV back cfg def engine fd fontset opt $dstdir/");
+ &SYSTEM ("$MV doc/* .; rmdir doc");
+}
+
sub POSTelsarticle
{
print "POST$package - move contrib and src/* to source\n";
diff --git a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
index 326769233df..c52afd7f631 100644
--- a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
@@ -5,14 +5,15 @@ depend arphic
depend c90
depend cjk
depend cjkpunct
+depend cjkutils
depend cns
+depend ctex
depend dnp
depend garuda-c90
+depend hyphen-chinese
depend norasi-c90
depend thaifonts
depend uhc
depend wadalab
-depend cjkutils
-depend hyphen-chinese
depend collection-basic
depend collection-documentation-chinese
diff --git a/Master/tlpkg/tlpsrc/ctex.tlpsrc b/Master/tlpkg/tlpsrc/ctex.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ctex.tlpsrc