summaryrefslogtreecommitdiff
path: root/language/chinese/cjkpunct
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /language/chinese/cjkpunct
Initial commit
Diffstat (limited to 'language/chinese/cjkpunct')
-rw-r--r--language/chinese/cjkpunct/CJKpunct.dtx876
-rw-r--r--language/chinese/cjkpunct/CJKpunct.ins111
-rw-r--r--language/chinese/cjkpunct/CJKpunct.pdfbin0 -> 141092 bytes
-rw-r--r--language/chinese/cjkpunct/CJKpunct.spa1
-rw-r--r--language/chinese/cjkpunct/README.md50
-rw-r--r--language/chinese/cjkpunct/examples/example-CJKfntef.tex73
-rw-r--r--language/chinese/cjkpunct/examples/example-gb.tex64
-rw-r--r--language/chinese/cjkpunct/examples/example-gbk.tex64
-rw-r--r--language/chinese/cjkpunct/examples/example-utf8.tex68
-rw-r--r--language/chinese/cjkpunct/setpunct/README.txt22
-rw-r--r--language/chinese/cjkpunct/setpunct/setpunct-macros.tex128
-rw-r--r--language/chinese/cjkpunct/setpunct/setpunct-main.tex30
12 files changed, 1487 insertions, 0 deletions
diff --git a/language/chinese/cjkpunct/CJKpunct.dtx b/language/chinese/cjkpunct/CJKpunct.dtx
new file mode 100644
index 0000000000..a402c47458
--- /dev/null
+++ b/language/chinese/cjkpunct/CJKpunct.dtx
@@ -0,0 +1,876 @@
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+CJKpunct
+========
+
+`CJKpunct` is a LaTeX2e macro package to be the companion
+of `CJK` package by Werner Lemberg for punctuation location
+and width adjustments.
+
+Contributing
+------------
+
+This package is a part of the [ctex-kit](https://github.com/CTeX-org/ctex-kit) project.
+
+Issues and pull requests are welcome.
+
+Copyright and Licence
+---------------------
+
+ Copyright (C) 2003--2010 by Linbo Zhang <zlb@lsec.cc.ac.cn>
+ Copyright (C) 2003--2010 by Wenchang Sun <sunwch@nankai.edu.cn>
+ Copyright (C) 2010 by Leo Liu <leoliu.pku@gmail.com>
+ Copyright (C) 2016 by Qing Lee <sobenlee@gmail.com>
+ ----------------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Qing Lee.
+
+ This package consists of the files CJKpunct.dtx,
+ CJKpunct.spa,
+ setpunct-main.tex,
+ setpunct-macros.tex,
+ example-CJKfntef.tex,
+ example-gb.tex,
+ example-gbk.tex,
+ example-utf8.tex,
+ README.txt,
+ and the derived files CJKpunct.sty,
+ CJKpunct.pdf,
+ CJKpunct.ins, and
+ README.md (this file).
+%</readme>
+%<*internal>
+\fi
+\begingroup
+ \def\temp{LaTeX2e}
+\expandafter\endgroup\ifx\temp\fmtname\else
+\csname fi\endcsname
+%</internal>
+%<*batchfile>
+
+\input docstrip %
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+ Copyright (C) 2003--2010 by Linbo Zhang <zlb@lsec.cc.ac.cn>
+ Copyright (C) 2003--2010 by Wenchang Sun <sunwch@nankai.edu.cn>
+ Copyright (C) 2010 by Leo Liu <leoliu.pku@gmail.com>
+ Copyright (C) 2016 by Qing Lee <sobenlee@gmail.com>
+--------------------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Qing Lee.
+
+--------------------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+ This package consists of the files CJKpunct.dtx,
+ CJKpunct.spa,
+ setpunct-main.tex,
+ setpunct-macros.tex,
+ example-CJKfntef.tex,
+ example-gb.tex,
+ example-gbk.tex,
+ example-utf8.tex,
+ README.txt,
+ and the derived files CJKpunct.sty,
+ CJKpunct.pdf,
+ CJKpunct.ins, and
+ README.md (this file).
+\endpostamble
+
+\generate
+ {
+ \usedir{tex/latex/cjkpunct}
+ \file{CJKpunct.sty} {\from{\jobname.dtx}{CJKpunct}}
+ \usedir{doc/latex/cjkpunct}
+ \nopreamble\nopostamble
+ \file{README.md} {\from{\jobname.dtx}{readme}}
+ }
+%</batchfile>
+%<batchfile>\Msg{*************************************************************}
+%<batchfile>\Msg{*}
+%<batchfile>\Msg{* To finish the installation you have to move the following}
+%<batchfile>\Msg{* files into a directory searched by LaTeX:}
+%<batchfile>\Msg{*}
+%<batchfile>\Msg{* \space\space\space CJKpunct.sty}
+%<batchfile>\Msg{*}
+%<batchfile>\Msg{*************************************************************}
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{CJKpunct.ins}{\from{\jobname.dtx}{batchfile}}}
+\endbatchfile
+\fi
+%</internal>
+%<*driver>
+\documentclass[a4paper,12pt]{ltxdoc}
+\usepackage{xcolor}
+\usepackage{CJKutf8}
+\usepackage{CJKspace}
+\usepackage{CJKpunct}
+\PassOptionsToPackage{driverfallback=dvipdfmx}{hyperref}
+\usepackage{hypdoc}
+\hypersetup{pdfencoding=unicode,bookmarksopen=true,pdfstartview=FitH}
+\AtBeginShipoutFirst{{%
+ \MakePercentComment
+ \input{zhwindowsfonts}}}
+\textheight 210mm
+\textwidth 150mm
+\oddsidemargin 0pt
+\evensidemargin 0pt
+
+% macros
+{\catcode`\|=0 \catcode`\\=12
+ |gdef|bslash{\}}
+
+\newcommand{\defmacro}[1]{% % Define a macro.
+ \textcolor{macrocolor}{$\backslash$#1}\index{\string\verb+\bslash#1+}%
+}
+
+\newcommand{\usemacro}[1]{% % Define a macro.
+ \textcolor{macrocolor}{\string#1}%
+ #1\index{\string\verb+\string#1+}%
+}
+
+\definecolor{parametercolor}{rgb}{1,0,1}
+\definecolor{optioncolor}{rgb}{0,0,1}
+\definecolor{macrocolor}{rgb}{0,0,0.63}
+
+\newcommand{\usepmacro}[3][]{%
+ \edef\tempa{#1}%
+ \textcolor{macrocolor}{\string#2}%
+ \string{\textcolor{parametercolor}{#3}\string}%
+ \ifx\tempa\@empty\else (#1)\fi%
+ #2{#3}\index{\string\verb+\string#2+}%
+}
+
+\newenvironment{decl}[1][]%
+ {\par\small\addvspace{4.5ex plus 1ex}%
+ \vskip -\parskip
+ \ifx\relax#1\relax
+ \def\@decl@date{}%
+ \else
+ \def\@decl@date{\NEWfeature{#1}}%
+ \fi
+ \noindent\hspace{-\leftmargini}%
+ \begin{tabular}{|l|}\hline\ignorespaces}%
+ {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
+ \vspace{2.3ex}\vskip -\parskip}
+
+\renewcommand{\arg}[1]{{\tt\string{}\m{#1}{\tt\string}}}
+\newcommand{\m}[1]{\mbox{\color{parametercolor}$\langle$\it #1\/$\rangle$}}
+\setcounter{IndexColumns}{2}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+\begin{CJK*}{UTF8}{rm}
+ \DocInput{CJKpunct.dtx}
+ \PrintIndex
+ \newpage
+\end{CJK*}
+\end{document}
+%</driver>
+%
+%<*CJKpunct>
+\def\fileversion{4.8.4}
+\def\filedate{2016/05/14}
+\ProvidesPackage{CJKpunct}[\filedate\space\fileversion]
+%</CJKpunct>
+%
+% \fi
+%
+% \makeatletter ^^A% To document @-cmds
+% \errorcontextlines=999 ^^A% Show up all my mistakes
+%
+% \CheckSum{936}
+% \GetFileInfo{CJKpunct.sty}
+%
+% \title{CJKpunct 使用说明}
+% \author{张林波 \quad 孙文昌}
+% \date{2016 年 5 月 14 日}
+% \maketitle
+%
+%
+% \def\CJKpunct{{\textcolor{blue}{\texttt{CJKpunct}}}}
+% \CJKpunct\ 是一个 \LaTeX\ 宏包, 用于排版中文标点,提供多种标点样式,以实现行末对齐、
+% 标点挤压等效果。 其基本方法来自 CCT。
+% \section{调用方式}
+% \parindent 2em
+% \parskip 5pt
+% \begin{decl}
+% \defmacro{usepackage}\{\textcolor{parametercolor}{CJKpunct}\}
+% \end{decl}
+%
+% \section{常用宏命令}
+% \begin{decl}
+% \defmacro{punctstyle}\arg{punct style}
+% \end{decl}
+%
+% 设置标点格式,有效值分别为
+%
+% \begin{tabular}{ll}
+% punct style & \\
+% \textcolor{parametercolor}{banjiao} & 半角式 \\
+% \textcolor{parametercolor}{quanjiao} & 全角式\\
+% \textcolor{parametercolor}{kaiming} & 开明式\\
+% \textcolor{parametercolor}{hangmobanjiao}& 行末半角式\\
+% \textcolor{parametercolor}{CCT} & CCT 格式\\
+% \textcolor{parametercolor}{plain} & CJK 缺省格式
+% \end{tabular}
+%
+%
+% 注意:为了得到最好的排版效果,需要制作字体相关的 CJKpunct.spa 文件。请参考
+% \nolinkurl{TDS/doc/latex/cjkpunct/setpunct/README.txt}。
+%
+%
+% \begin{decl}
+% \defmacro{CJKpunctallowbreakbetweenpuncts} \\
+% \defmacro{CJKpunctnobreakbetweenpuncts}
+% \end{decl}
+%
+% 缺省状态下,\CJKpunct\ 禁止在相邻的标点间换行(行末半角和 CJK 缺省格式除外)。 使用
+%
+% \defmacro{CJKpunctallowbreakbetweenpuncts}\newline
+% 改变这一设置。注意:行末半角和 CJK 缺省格式总是允许相邻标点间换行。
+%
+% \begin{decl}
+% \defmacro{CJKpunctsetkern}\arg{标点1}\arg{标点2}\arg{间距}
+% \end{decl}
+%
+% 设置标点 1 与标点 2 之间的距离。 例如,\defmacro{CJKpunctsetkern}\{:\}\{“\}\{0.4em\}
+%
+% \begin{decl}
+% \defmacro{CJKpunctmapfamily}\arg{font encoding}\arg{font family}\arg{font series}\arg{font shape}
+% \arg{punct family}
+% \end{decl}
+%
+% 缺省状态下, \CJKpunct\ 根据 CJKfamily 确定当前标点符号的实际字体。 但这对C19com等组合字体
+% 不适用。此命令提供一个解决方案:用户可以指定 \arg{font encoding}/ \arg{font family}/
+% \arg{font series}/ \arg{font shape} 所对应的标点符号字体。例如,对于C19rm, 可以做如下设置:
+%
+% \begin{verbatim}
+% \CJKpunctmapfamily{C19}{rm}{m}{n}{song}
+% \CJKpunctmapfamily{C19}{rm}{bx}{n}{hei}
+% \CJKpunctmapfamily{C19}{rm}{m}{sl}{song}
+% \CJKpunctmapfamily{C19}{rm}{bx}{sl}{hei}
+% \CJKpunctmapfamily{C19}{rm}{m}{it}{kai}
+% \CJKpunctmapfamily{C19}{rm}{bx}{it}{kai}
+% \end{verbatim}
+%
+% \section{制作 CJKpunct.spa 文件}
+%
+% 文件 CJKpunct.spa 保存了字体相关的标点符号宽度。制作方法请参考
+% \nolinkurl{TDS/doc/latex/cjkpunct/setpunct/README.txt}。
+%
+% \StopEventually{}
+%
+%
+% \clearpage
+% \part{CJKpunct.sty}
+%
+%
+% \iffalse
+%<*CJKpunct>
+% \fi
+% \fontsize{10pt}{10pt}\selectfont
+% CJKpunct
+% \begin{macrocode}
+\endlinechar \m@ne
+
+\newif\if@CJKpunct
+\newif\if@CJKpunct@dokerning
+\newcount\CJKpunct@cnta
+\newcount\CJKpunct@cntb
+\newcount\CJKpunct@cntc
+\newcount\CJKpunct@cntd
+\newcount\CJKpunct@cnte
+% \end{macrocode}
+%
+% 为使 \CJKpunct\ 起作用,重定义一些 CJK 宏。
+%
+% \begin{macrocode}
+\let\CJKo@testLastCJK\CJK@testLastCJK
+\def\CJKpunct@testLastCJK{
+ \global\CJK@false
+ \global\edef\CJKpunct@lastkern{\number\lastkern}}
+
+\let\CJKo@testLastKern\CJK@testLastKern
+\def\CJKpunct@testLastKern{
+ \global\CJK@false}
+
+\let\CJKo@testPrePunct\CJK@testPrePunct
+\let\CJKo@testPostPunct\CJK@testPostPunct
+\def\CJKpunct@testPrePunct#1#2#3{}
+\def\CJKpunct@testPostPunct#1#2#3{}
+
+
+\let\CJKo@nobreakglue\CJK@nobreakglue
+% \end{macrocode}
+%
+% \defmacro{CJKsymbol} 的定义中需要三重括号以保证兼容 CJKfntef 宏包。
+%
+% \begin{macrocode}
+
+\let\CJKosymbol\CJKsymbol
+\def\CJKpunct@CJKsymbol#1{
+ {{{
+ \ifnum\CJKpunct@lastkern>0\relax
+ \ifnum\CJKpunct@lastcharclass=0\relax
+ \CJKglue
+ \else
+ \CJKpunct@ULspecials
+ \fi
+ \fi
+ \CJKosymbol{#1}
+ \gdef\CJKpunct@lastcharclass{0}}}}}
+
+\def\CJKpunct@lastcharclass{0}
+\def\CJKpunct@lastkern{0}
+% \end{macrocode}
+%
+% 标点符号的排版规则:
+%
+% \begin{macrocode}
+\let\CJKopunctsymbol\CJKpunctsymbol
+\def\CJKpunct@CJKpunctsymbol#1{
+ \CJKpunct@setfamily
+ \CJKpunct@setmarginkerning
+ \edef\CJKpunct@currentpunct{\CJK@plane/\the#1}
+ \ifcsname CJKpunct@\CJK@enc @\CJKpunct@currentpunct\endcsname
+ \edef\CJKpunct@currentcharclass{
+ \csname CJKpunct@\CJK@enc @\CJKpunct@currentpunct\endcsname}
+ {{{% We need three braces for CJKulem to work
+ \@CJKpunctfalse
+ \ifnum\CJKpunct@lastkern>0\relax
+ \ifnum\CJKpunct@lastcharclass>0\relax
+ \unkern
+ \unkern
+ \ifnum\CJKpunct@punctstyle>0\relax
+ \@CJKpuncttrue
+ \else
+ \ifcsname CJKpunct@specialpunct\CJK@enc \CJKpunct@currentpunct\endcsname
+ \@CJKpuncttrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@CJKpunct
+ \CJKpunct@unskip
+ \CJKpunct@setkern{\CJKpunct@lastpunct}{\CJKpunct@currentpunct}
+ \kern \csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @kern\CJKpunct@lastpunct @\CJKpunct@currentpunct\endcsname
+ \CJKpunct@nobreak
+ \else
+ \CJKpunct@ULspecials
+ \ifnum\CJKpunct@currentcharclass=1\relax
+ \hskip \csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @lglue@\CJKpunct@currentpunct\endcsname plus 0.1em minus 0.1 em
+ \else
+ \ifcsname CJKpunct@specialpunct\CJK@enc \CJKpunct@currentpunct\endcsname
+ \CJKglue % breakable
+ \else
+ \nobreak
+ \fi
+ \fi
+ \fi
+ \global\edef\CJKpunct@lastpunct{\CJKpunct@currentpunct}
+
+ \vrule width \csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @lrule@\CJKpunct@currentpunct\endcsname depth \z@ height \z@
+
+ \CJKopunctsymbol{#1}
+ \vrule width \csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @rrule@\CJKpunct@currentpunct\endcsname depth \z@ height \z@
+
+ \ifnum\CJKpunct@currentcharclass=2\relax
+ \hskip \csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @rglue@\CJKpunct@currentpunct\endcsname plus 0.1em minus 0.1 em
+ \fi
+ \global\let\CJKpunct@lastcharclass\CJKpunct@currentcharclass}}}
+ \else
+ \CJKsymbol{#1}
+ \global\def\CJKpunct@lastcharclass{0}
+ \fi}
+% \end{macrocode}
+%
+% 设置当前 font family.
+%
+% \begin{macrocode}
+\def\CJKpunct@setfamily{
+ \ifcsname \CJK@enc @\CJK@family @\f@series @\f@shape\endcsname
+ \global\edef\CJKpunct@family{\csname \CJK@enc @\CJK@family @\f@series @\f@shape\endcsname}
+ \else
+ \global\edef\CJKpunct@family{\CJK@family}
+ \fi}
+
+\def\CJKpunctmapfamily#1#2#3#4#5{
+ \expandafter\edef\csname #1@#2@#3@#4\endcsname{#5}}
+
+% \end{macrocode}
+%
+% CJK 缺省标点符号格式
+%
+% \begin{macrocode}
+\def\CJKpunct@plainpunctsymbol#1#2{
+ \CJKpunctsymbol{#2}}
+% \end{macrocode}
+%
+% 设置标点符号边界宽度。
+%
+% \begin{macrocode}
+\def\CJKpunct@setmarginkerning{
+ \ifcsname CJKpunct @\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family\endcsname
+ \else
+ \expandafter\gdef\csname CJKpunct @\CJKpunct@punctstyle @\CJK@enc
+ @\CJKpunct@family\endcsname{}
+ \ifcsname CJKpunct@\CJKpunct@family @spaces\endcsname
+ \PackageInfo{CJKpunct}{use punctuation spaces for family '\CJKpunct@family'
+ \space with punctstyle (\CJKpunct@currentpunctstyle)}\relax
+ \edef\CJKpunct@spaces{\csname CJKpunct@\CJKpunct@family @spaces\endcsname}
+ \else
+ \ifcsname CJKpunct@spaces@\CJKpunct@family\endcsname
+ \else
+ \PackageInfo{CJKpunct}{punctuation spaces for family '\CJKpunct@family' do not exist.
+ \space Use family 'def' instead.}\relax
+ \global\expandafter\def\csname CJKpunct@spaces@\CJKpunct@family\endcsname{}
+ \fi
+ \edef\CJKpunct@spaces{\csname CJKpunct@def@spaces\endcsname}
+ \fi
+ \CJKpunct@cnta=0\relax
+ \expandafter\CJKpunct@@setmarginkerning\CJKpunct@spaces
+ \fi}
+
+\def\CJKpunct@@setmarginkerning#1,#2,{
+ \edef\CJKpunct@temp{#1}
+ \ifx\CJKpunct@temp\@empty
+ \def\CJKpunct@temp{}
+ \else
+ \def\CJKpunct@temp{\CJKpunct@@setmarginkerning}
+ \ifnum\CJKpunct@cnta<12
+ \def\CJKpunct@lr{l}
+ \else
+ \def\CJKpunct@lr{r}
+ \fi
+ \edef\CJKpunct@encpn{\csname CJKpunct@pn@\CJK@enc @\the\CJKpunct@cnta\endcsname}
+ \if l\CJKpunct@lr
+ \expandafter\gdef\csname CJKpunct@\CJK@enc @\CJKpunct@encpn\endcsname{1}
+ \else
+ \expandafter\gdef\csname CJKpunct@\CJK@enc @\CJKpunct@encpn\endcsname{2}
+ \fi
+
+ \@CJKpunct@dokerningtrue
+ \ifnum\CJKpunct@punctstyle=\CJKpunct@ps@plain\relax
+ \@CJKpunct@dokerningfalse
+ \else
+ \ifcsname CJKpunct@specialpunct\CJK@enc\CJKpunct@encpn\endcsname
+ \@CJKpunct@dokerningfalse
+ \fi
+ \fi
+
+ \ifnum\CJKpunct@punctstyle=\CJKpunct@ps@banjiao
+ \def\CJKpunct@sidespaces{12}
+ \else
+ \def\CJKpunct@sidespaces{15}
+ \fi
+
+ \ifnum\CJKpunct@cnta=12\relax
+ {\CJKpunct@cntb=#1\relax
+ \advance\CJKpunct@cntb #2\relax
+ \advance\CJKpunct@cntb 2\relax
+ \CJKpunct@numtostring{\CJKpunct@cntb}
+ \edef\CJKpunct@temp{\csname CJKpunct@pn@\CJK@enc @12\endcsname}
+ \CJKpunct@cntc=0\relax
+ \loop
+ \global\expandafter\edef\csname CJKpunct\the\CJKpunct@cntc
+ @\CJK@enc @\CJKpunct@family @kern\CJKpunct@temp @\CJKpunct@temp\endcsname{
+ -0.\CJKpunct@decimal em}
+ \advance \CJKpunct@cntc 1\relax
+ \ifnum\CJKpunct@cntc<6\repeat}
+ \fi
+ \if@CJKpunct@dokerning
+ \CJKpunct@cntb=#1\relax
+ \advance\CJKpunct@cntb -\CJKpunct@sidespaces\relax
+ \ifnum\CJKpunct@cntb<0\relax
+ \CJKpunct@cntb=0\relax
+ \fi
+ \CJKpunct@cntc=#2\relax
+ \advance\CJKpunct@cntc -\CJKpunct@sidespaces\relax
+ \ifnum\CJKpunct@cntc<0\relax
+ \CJKpunct@cntc=0\relax
+ \fi
+
+ \CJKpunct@cntd=\CJKpunct@cntb
+ \advance\CJKpunct@cntd\CJKpunct@cntc\relax
+
+ \ifcase\CJKpunct@punctstyle
+ % hangmobanjiao
+ \or % quanjiao
+ \or % banjiao
+ \advance\CJKpunct@cntd -50\relax
+ \or % kaiming
+ \ifcsname CJKpunct@kaiming\CJK@enc\CJKpunct@encpn\endcsname
+ \else
+ \advance\CJKpunct@cntd -50\relax
+ \fi
+ \or %CCT
+ \advance\CJKpunct@cntd -20\relax
+ \fi
+ \CJKpunct@cnte=\CJKpunct@cntd
+ \ifnum\CJKpunct@cntd<0\relax
+ \CJKpunct@cntd=0\relax
+ \fi
+ \else
+ \CJKpunct@cntb=0\relax
+ \CJKpunct@cntc=0\relax
+ \CJKpunct@cntd=0\relax
+ \CJKpunct@cnte=0\relax
+ \fi
+ \CJKpunct@numtostring{\CJKpunct@cntb}
+ \global\expandafter\edef\csname CJKpunct\CJKpunct@punctstyle
+ @\CJK@enc @\CJKpunct@family @lrule@\CJKpunct@encpn\endcsname{
+ -0.\CJKpunct@decimal em}
+ \CJKpunct@numtostring{\CJKpunct@cntc}
+ \global\expandafter\edef\csname CJKpunct\CJKpunct@punctstyle
+ @\CJK@enc @\CJKpunct@family @rrule@\CJKpunct@encpn\endcsname{
+ -0.\CJKpunct@decimal em}
+ \CJKpunct@numtostring{\CJKpunct@cntd}
+ \global\expandafter\edef\csname CJKpunct\CJKpunct@punctstyle
+ @\CJK@enc @\CJKpunct@family @\CJKpunct@lr glue@\CJKpunct@encpn\endcsname{
+ 0.\CJKpunct@decimal em}
+ \global\expandafter\edef\csname CJKpunct\CJKpunct@punctstyle
+ @\CJK@enc @\CJKpunct@family @\CJKpunct@lr oglue@\CJKpunct@encpn\endcsname{
+ \the\CJKpunct@cnte}
+ \fi
+ \advance \CJKpunct@cnta 1\relax
+ \CJKpunct@temp}
+
+\def\CJKpunct@numtostring#1{
+ \edef\CJKpunct@decimal{\the#1}
+ \ifnum\CJKpunct@decimal<10\relax
+ \edef\CJKpunct@decimal{0\CJKpunct@decimal}
+ \fi}
+% \end{macrocode}
+%
+% 设置相邻标点之间的距离
+%
+% \begin{macrocode}
+\def\CJKpunct@setkern#1#2{
+ \ifcsname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @kern#1@#2\endcsname
+ \else
+ \CJKpunct@cnta=0\relax
+ \ifcsname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @roglue@#1\endcsname
+ \advance\CJKpunct@cnta\csname
+ CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @roglue@#1\endcsname
+ \fi
+ \ifcsname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @loglue@#2\endcsname
+ \advance\CJKpunct@cnta\csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @loglue@#2\endcsname
+ \fi
+ \relax
+ \ifcase\CJKpunct@punctstyle
+ % hangmobanjiao
+ \or % quanjiao
+ \advance\CJKpunct@cnta -50\relax
+ \or % banjiao
+ \or % kaiming
+ \ifcsname CJKpunct@kaiming\CJK@enc#1\endcsname
+ \advance\CJKpunct@cnta -\csname CJKpunct\CJKpunct@punctstyle @\CJK@enc
+ @\CJKpunct@family @roglue@#1\endcsname
+ \ifcsname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @loglue@#2\endcsname
+ \advance\CJKpunct@cnta -50\relax
+ \fi
+ \fi
+ \fi
+ \ifnum\CJKpunct@cnta<0\relax
+ \CJKpunct@cnta=0\relax
+ \fi
+ \CJKpunct@numtostring{\CJKpunct@cnta}
+ \global\expandafter\edef\csname
+ CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family @kern#1@#2\endcsname{
+ 0.\CJKpunct@decimal em}
+ \fi}
+% \end{macrocode}
+%
+% CJKfntef 宏包兼容命令:
+%
+% \begin{macrocode}
+
+\let\CJKpunct@unskip\unskip
+\def\CJKpunct@UL@unskip{
+ \ifcsname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @rglue@\CJKpunct@lastpunct\endcsname
+ \hskip -\csname CJKpunct\CJKpunct@punctstyle @\CJK@enc @\CJKpunct@family
+ @rglue@\CJKpunct@lastpunct\endcsname \relax
+ \fi}
+
+\@ifundefined{UL@hskip}{\let\UL@hskip\relax}{}
+
+\def\CJKpunct@punctUL@group{
+ \ifx\hskip\UL@hskip
+ \egroup
+ \UL@stop
+ \UL@start
+ \bgroup
+ \fi}
+
+\def\CJKpunct@ULspecials{}
+
+\AtBeginDocument{
+ \ifcsname UL@hook\endcsname
+ \addto@hook\UL@hook{\let\CJK@ignorespaces\ignorespaces
+ \let\CJKpunct@unskip\CJKpunct@UL@unskip
+ \let\CJKpunct@ULspecials\CJKpunct@punctUL@group}
+ \fi}
+% \end{macrocode}
+%
+% 设置相邻标点间是否允许换行(缺省不允许)。
+%
+% \begin{macrocode}
+\def\CJKpunctallowbreakbetweenpuncts{
+ \def\CJKpunct@nobreak{
+ \ifnum\CJKpunct@lastcharclass=2
+ \hskip 0pt
+ \fi}}
+
+\def\CJKpunctnobreakbetweenpuncts{
+ \let\CJKpunct@nobreak\nobreak}
+\CJKpunctnobreakbetweenpuncts
+% \end{macrocode}
+%
+% 标点符号样式:
+%
+% \begin{macrocode}
+\def\CJKpunctstyle#1{
+ \ifcsname CJKpunct@ps@#1\endcsname
+ \edef\CJKpunct@currentpunctstyle{#1}
+ \edef\CJKpunct@punctstyle{\csname CJKpunct@ps@#1\endcsname}
+ \ifnum\CJKpunct@punctstyle=\CJKpunct@ps@plain\relax
+ \CJKpunctallowbreakbetweenpuncts
+ \let\CJK@testLastCJK\CJKo@testLastCJK
+ \let\CJK@testLastKern\CJKo@testLastKern
+ \let\CJK@testPrePunct\CJKo@testPrePunct
+ \let\CJK@testPostPunct\CJKo@testPostPunct
+ \let\CJKpunct@punctsymbol\CJKpunct@plainpunctsymbol
+ \let\CJKsymbol\CJKosymbol
+ \let\CJKpunctsymbol\CJKopunctsymbol
+ \let\CJK@nobreakglue\CJKo@nobreakglue
+ \let\CJKpunct@utfsymbol\CJKpunct@utfbsymbol
+ \else
+ \let\CJK@testLastCJK\CJKpunct@testLastCJK
+ \let\CJK@testLastKern\CJKpunct@testLastKern
+ \let\CJK@testPrePunct\CJKpunct@testPrePunct
+ \let\CJK@testPostPunct\CJKpunct@testPostPunct
+ \let\CJKpunct@punctsymbol\CJKpunct@@punctsymbol
+ \let\CJKsymbol\CJKpunct@CJKsymbol
+ \let\CJKpunctsymbol\CJKpunct@CJKpunctsymbol
+ \let\CJK@nobreakglue\relax
+ \let\CJKpunct@utfsymbol\CJKpunct@utfasymbol
+ \fi
+ \else
+ \PackageWarning{CJKpunct}{Punctstyle #1\space is not defined.}\relax
+ \fi}
+
+\let\punctstyle\CJKpunctstyle
+\def\CJKpunct@ps@hangmobanjiao{0}
+\def\CJKpunct@ps@marginkerning{0}
+\def\CJKpunct@ps@quanjiao{1}
+\def\CJKpunct@ps@fullwidth{1}
+\def\CJKpunct@ps@banjiao{2}
+\def\CJKpunct@ps@halfwidth{2}
+\def\CJKpunct@ps@kaiming{3}
+\def\CJKpunct@ps@mixedwidth{3}
+\def\CJKpunct@ps@CCT{4}
+\def\CJKpunct@ps@plain{5}
+\AtBeginDocument{\punctstyle{quanjiao}}
+
+\def\CJKplainout{\punctstyle{plain}}
+\let\CJKnormalout\relax
+% \end{macrocode}
+%
+% 允许用户使用 \defmacro{CJKpunctsetkern} 调整相邻标点之间的距离
+%
+% \begin{macrocode}
+\def\CJKpunctsetkern#1#2#3{
+ \CJKpunct@setplanenumber{#1}
+ \edef\CJKpunct@pna{\CJKpunct@char@pn}
+ \CJKpunct@setplanenumber{#2}
+ \edef\CJKpunct@pnb{\CJKpunct@char@pn}
+ \global\expandafter\edef\csname CJKpunct\CJKpunct@punctstyle
+ @\CJK@enc @\CJKpunct@family @kern\CJKpunct@pna @\CJKpunct@pnb\endcsname{
+ #3}}
+
+\def\CJKpunct@setplanenumber#1{{
+ \def\CJK@testPrePunct##1##2##3{
+ \global\edef\CJKpunct@charplane{\CJK@plane}
+ \global\edef\CJKpunct@charnumber{\the\@tempcnta}}
+ \savebox\voidb@x{#1}
+ \global\edef\CJKpunct@char@pn{\CJKpunct@charplane/\CJKpunct@charnumber}}}
+
+%
+% 标点符号表, 不能改变顺序!!
+% pre ‘“「『〔([{〈《〖【
+% post —…、。,.:;!?%〕)]}〉》〗】’”」』
+% \end{macrocode}
+%
+% 设置标点符号所对应 CJKplane 和 字符序号, 与编码有关。
+%
+% \begin{macrocode}
+\def\CJKpunct@punctlist#1{
+ \CJKpunct@cnta=0\relax
+ \def\CJKpunct@enc{#1}
+ \CJKpunct@setpunctfamilynumber}
+
+\def\CJKpunct@setpunctfamilynumber#1,{
+ \edef\CJKpunct@temp{#1}
+ \ifx\CJKpunct@temp\@empty
+ \def\CJKpunct@temp{}
+ \else
+ \expandafter\def\csname CJKpunct@pn@\CJKpunct@enc @\the\CJKpunct@cnta\endcsname{#1}
+ \advance \CJKpunct@cnta 1\relax
+ \def\CJKpunct@temp{\CJKpunct@setpunctfamilynumber}
+ \fi
+ \CJKpunct@temp}
+
+\CJKpunct@punctlist{C70}20/24,20/28,30/12,30/14,30/20,ff/8,ff/59,ff/91,%
+30/8,30/10,30/22,30/16,%
+20/20,20/38,30/1,30/2,ff/12,ff/14,ff/26,ff/27,ff/1,ff/31,ff/5,30/21,ff/9,%
+ff/61,ff/93,30/9,30/11,30/23,30/17,20/25,20/29,30/13,30/15,,
+
+%gb
+\CJKpunct@punctlist{C10}01/13,01/15,01/23,01/25,01/17,01/195,01/246,02/22,01/19,%
+01/21,01/27,01/29,%
+01/9,01/12,01/1,01/2,01/199,01/201,01/213,01/214,01/188,01/218,01/192,01/18,%
+01/196,01/248,02/24,01/20,01/22,01/28,01/30,01/14,01/16,01/24,01/26,,
+
+%gbk
+\CJKpunct@punctlist{C19}25/45,25/47,25/55,25/57,25/49,26/163,26/214,26/246,25/51,%
+25/53,25/59,25/61,%
+25/41,25/44,25/33,25/34,26/167,26/169,26/181,26/182,26/156,26/186,26/160,%
+25/50,26/164,26/216,26/248,25/52,25/54,25/60,25/62,25/46,25/48,25/56,25/58,,
+
+\def\CJKpunct@totalpuncts{35}
+% \end{macrocode}
+%
+% 恢复 CJKutf8 重定义的引号
+%
+% \begin{macrocode}
+\ifcsname DeclareUnicodeCharacter\endcsname
+ \DeclareUnicodeCharacter{2018}{\CJKpunct@utfsymbol{"80}{"98}}
+ \DeclareUnicodeCharacter{2019}{\CJKpunct@utfsymbol{"80}{"99}}
+ \DeclareUnicodeCharacter{201C}{\CJKpunct@utfsymbol{"80}{"9C}}
+ \DeclareUnicodeCharacter{201D}{\CJKpunct@utfsymbol{"80}{"9D}}
+ \DeclareUnicodeCharacter{2014}{\CJKpunct@utfsymbol{"80}{"94}}
+ \DeclareUnicodeCharacter{2026}{\CJKpunct@utfsymbol{"80}{"A6}}
+\fi
+\def\CJKpunct@utfasymbol#1#2{
+ \CJK@punctchar{\CJK@uniPunct}{0}{#1}{#2}}
+\def\CJKpunct@utfbsymbol#1#2{
+ \ifnum #2=148 %
+ \textemdash
+ \else
+ \ifnum #2=166 %
+ \textellipsis
+ \else
+ \ifnum #2=152 %
+ \textquoteleft
+ \else
+ \ifnum #2=153 %
+ \textquoteright
+ \else
+ \ifnum #2=156 %
+ \textquotedblleft
+ \else
+ \ifnum #2=157 %
+ \textquotedblright
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+% \end{macrocode}
+%
+% 省略号和破折号:
+%
+% \begin{macrocode}
+\def\CJKpunct@setspecialpunct#1#2{
+ \expandafter\def\csname CJKpunct@specialpunct#1#2\endcsname{}}
+\CJKpunct@setspecialpunct{C70}{20/20}
+\CJKpunct@setspecialpunct{C70}{20/38}
+\CJKpunct@setspecialpunct{C19}{25/41}
+\CJKpunct@setspecialpunct{C19}{25/44}
+\CJKpunct@setspecialpunct{C10}{01/9}
+\CJKpunct@setspecialpunct{C10}{01/12}
+% \end{macrocode}
+%
+% 开明式中的全角标点。
+%
+% \begin{macrocode}
+\def\CJKpunct@setkaimingpunct#1#2{
+ \expandafter\def\csname CJKpunct@kaiming#1#2\endcsname{}}
+\CJKpunct@setkaimingpunct{C70}{30/02}
+\CJKpunct@setkaimingpunct{C70}{ff/1}
+\CJKpunct@setkaimingpunct{C70}{ff/31}
+\CJKpunct@setkaimingpunct{C19}{25/34}
+\CJKpunct@setkaimingpunct{C19}{26/156}
+\CJKpunct@setkaimingpunct{C19}{26/186}
+\CJKpunct@setkaimingpunct{C10}{01/2}
+\CJKpunct@setkaimingpunct{C10}{01/188}
+\CJKpunct@setkaimingpunct{C10}{01/218}
+% \end{macrocode}
+%
+% 缺省标点符号宽度
+%
+% \begin{macrocode}
+\def\CJKpunct@def@spaces{69,18,60,6,63,2,63,3,69,8,69,6,69,1,39,%
+37,63,4,56,2,63,5,63,6,6,6,12,11,23,50,24,54,16,71,20,69,12,76,13,%
+74,26,61,3,50,3,4,8,69,6,69,2,69,38,39,4,62,2,55,5,62,7,62,16,71,9,%
+58,3,62,3,62,,,}
+% \end{macrocode}
+%
+% 调入字体相关的设置
+%
+% \begin{macrocode}
+\InputIfFileExists{CJKpunct.spa}{}{}
+
+\endlinechar `\^^M
+% \end{macrocode}
+%
+% \iffalse
+%</CJKpunct>
+% \fi
+%
+% \Finale
+\endinput
diff --git a/language/chinese/cjkpunct/CJKpunct.ins b/language/chinese/cjkpunct/CJKpunct.ins
new file mode 100644
index 0000000000..724c71ab46
--- /dev/null
+++ b/language/chinese/cjkpunct/CJKpunct.ins
@@ -0,0 +1,111 @@
+%%
+%% This is file `CJKpunct.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% CJKpunct.dtx (with options: `batchfile')
+%%
+%% Copyright (C) 2003--2010 by Linbo Zhang <zlb@lsec.cc.ac.cn>
+%% Copyright (C) 2003--2010 by Wenchang Sun <sunwch@nankai.edu.cn>
+%% Copyright (C) 2010 by Leo Liu <leoliu.pku@gmail.com>
+%% Copyright (C) 2016 by Qing Lee <sobenlee@gmail.com>
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Qing Lee.
+%%
+%% --------------------------------------------------------------------------
+%%
+
+\input docstrip %
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+ Copyright (C) 2003--2010 by Linbo Zhang <zlb@lsec.cc.ac.cn>
+ Copyright (C) 2003--2010 by Wenchang Sun <sunwch@nankai.edu.cn>
+ Copyright (C) 2010 by Leo Liu <leoliu.pku@gmail.com>
+ Copyright (C) 2016 by Qing Lee <sobenlee@gmail.com>
+--------------------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Qing Lee.
+
+--------------------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+ This package consists of the files CJKpunct.dtx,
+ CJKpunct.spa,
+ setpunct-main.tex,
+ setpunct-macros.tex,
+ example-CJKfntef.tex,
+ example-gb.tex,
+ example-gbk.tex,
+ example-utf8.tex,
+ README.txt,
+ and the derived files CJKpunct.sty,
+ CJKpunct.pdf,
+ CJKpunct.ins, and
+ README.md (this file).
+\endpostamble
+
+\generate
+ {
+ \usedir{tex/latex/cjkpunct}
+ \file{CJKpunct.sty} {\from{\jobname.dtx}{CJKpunct}}
+ \usedir{doc/latex/cjkpunct}
+ \nopreamble\nopostamble
+ \file{README.md} {\from{\jobname.dtx}{readme}}
+ }
+\Msg{*************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by LaTeX:}
+\Msg{*}
+\Msg{* \space\space\space CJKpunct.sty}
+\Msg{*}
+\Msg{*************************************************************}
+\endbatchfile
+%%
+%% This package consists of the files CJKpunct.dtx,
+%% CJKpunct.spa,
+%% setpunct-main.tex,
+%% setpunct-macros.tex,
+%% example-CJKfntef.tex,
+%% example-gb.tex,
+%% example-gbk.tex,
+%% example-utf8.tex,
+%% README.txt,
+%% and the derived files CJKpunct.sty,
+%% CJKpunct.pdf,
+%% CJKpunct.ins, and
+%% README.md (this file).
+%%
+%% End of file `CJKpunct.ins'.
diff --git a/language/chinese/cjkpunct/CJKpunct.pdf b/language/chinese/cjkpunct/CJKpunct.pdf
new file mode 100644
index 0000000000..024589536d
--- /dev/null
+++ b/language/chinese/cjkpunct/CJKpunct.pdf
Binary files differ
diff --git a/language/chinese/cjkpunct/CJKpunct.spa b/language/chinese/cjkpunct/CJKpunct.spa
new file mode 100644
index 0000000000..f5d5fef42e
--- /dev/null
+++ b/language/chinese/cjkpunct/CJKpunct.spa
@@ -0,0 +1 @@
+\relax
diff --git a/language/chinese/cjkpunct/README.md b/language/chinese/cjkpunct/README.md
new file mode 100644
index 0000000000..ccac0787cd
--- /dev/null
+++ b/language/chinese/cjkpunct/README.md
@@ -0,0 +1,50 @@
+CJKpunct
+========
+
+`CJKpunct` is a LaTeX2e macro package to be the companion
+of `CJK` package by Werner Lemberg for punctuation location
+and width adjustments.
+
+Contributing
+------------
+
+This package is a part of the [ctex-kit](https://github.com/CTeX-org/ctex-kit) project.
+
+Issues and pull requests are welcome.
+
+Copyright and Licence
+---------------------
+
+ Copyright (C) 2003--2010 by Linbo Zhang <zlb@lsec.cc.ac.cn>
+ Copyright (C) 2003--2010 by Wenchang Sun <sunwch@nankai.edu.cn>
+ Copyright (C) 2010 by Leo Liu <leoliu.pku@gmail.com>
+ Copyright (C) 2016 by Qing Lee <sobenlee@gmail.com>
+ ----------------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Qing Lee.
+
+ This package consists of the files CJKpunct.dtx,
+ CJKpunct.spa,
+ setpunct-main.tex,
+ setpunct-macros.tex,
+ example-CJKfntef.tex,
+ example-gb.tex,
+ example-gbk.tex,
+ example-utf8.tex,
+ README.txt,
+ and the derived files CJKpunct.sty,
+ CJKpunct.pdf,
+ CJKpunct.ins, and
+ README.md (this file).
diff --git a/language/chinese/cjkpunct/examples/example-CJKfntef.tex b/language/chinese/cjkpunct/examples/example-CJKfntef.tex
new file mode 100644
index 0000000000..c27e3ae077
--- /dev/null
+++ b/language/chinese/cjkpunct/examples/example-CJKfntef.tex
@@ -0,0 +1,73 @@
+\documentclass[11pt]{article}
+\textheight 220mm
+\textwidth 150mm
+\oddsidemargin 0pt
+\evensidemargin 0pt
+\usepackage{xcolor}
+\usepackage{CJK}
+\usepackage{CJKfntef}
+
+\usepackage{CJKpunct}
+\begin{document}
+\baselineskip 16pt
+\parindent 22pt
+\pagestyle{myheadings}
+\begin{CJK*}{GBK}{song}
+
+
+ \section{б}
+ṩ˷ɢ뻷
+
+\verb|CJKfilltwosides|
+
+\noindent
+º
+\begin{verbatim}
+ \CJKunderdot{...}
+ \CJKunderline[*]{...}
+ \CJKunderdblline[*]{...}
+ \CJKunderwave[*]{...}
+ \CJKsout[*]{...}
+ \CJKxout[*]{...}
+ʽǶף
+ \CJKunderdot[..]{...\CJKunderline[*]{...}...}
+ \CJKunderdot[..]{...\CJKunderdblline[*]{...}...}
+ \CJKunderdot[..]{...\CJKunderwave[*]{...}...}
+ \CJKunderdot[..]{...\CJKsout[*]{...}...}
+ \CJKunderdot[..]{...\CJKxout[*]{...}...}
+
+ \CJKunderline[*]{...\CJKunderdot[..]{...}...}
+ \CJKunderdblline[*]{...\CJKunderdot[..]{...}...}
+ \CJKunderwave[*]{...\CJKunderdot[..]{...}...}
+ \CJKsout[*]{...\CJKunderdot[..]{...}...}
+ \CJKxout[*]{...\CJKunderdot[..]{...}...}
+\end{verbatim}
+в*ĺȫDZ㲻á
+
+\verb+\CJKunderdot+һѡԸıηȱʡΪӵ㣬
+ԸҪΪַǣСԲȦȡ
+
+
+Ըı»ߺͼӵɫ ȱʡãҪȵxcolor
+
+\begin{verbatim}
+ \newcommand{\CJKunderdotcolor}{\color{red}}
+ \newcommand{\CJKunderwavecolor}{\color{blue}}
+ \newcommand{\CJKunderlinecolor}{\color{blue}}
+ \newcommand{\CJKunderdbllinecolor}{\color{blue}}
+ \newcommand{\CJKsoutcolor}{\color{red}}
+ \newcommand{\CJKxoutcolor}{\color{blue}}
+\end{verbatim}
+
+\CJKunderline{ּ»ߣ\CJKunderdot{ͬʱӵ}}
+
+\CJKunderline*{ּ»ߣ\CJKunderdot{ͬʱӵ}}
+
+
+\CJKunderdot{ּӵ㣬\CJKunderline{ͬʱ»}}
+
+
+ \newpage
+\end{CJK*}
+
+\end{document}
diff --git a/language/chinese/cjkpunct/examples/example-gb.tex b/language/chinese/cjkpunct/examples/example-gb.tex
new file mode 100644
index 0000000000..5556f14220
--- /dev/null
+++ b/language/chinese/cjkpunct/examples/example-gb.tex
@@ -0,0 +1,64 @@
+\documentclass{article}
+\usepackage{CJK}
+\usepackage{CJKpunct}
+\begin{document}
+
+\begin{CJK*}{GB}{gbsn}
+\parindent 2em
+\long\def\sometexts{
+˵Ժ⣬иļСס ˵ǣ үϲ̫̫˳˼飬ǻ˵ϲȻ̫̫
+ȥͲչˡ˶˵Щʫ˵ĶǿIJͷ ˡЦÿһǮ˵˭ûһǮɰ˰ա ˵ţһɰ һͽңݷ˵֮ᄀнȥ ֵȥաһΧƣĸǰ
+ʱĸ˿˼Ρ Ѿ߸ĸ֪Ϊǻϲ
+
+ʱϮ˵˲һ޴棬
+ЦĶûĶǽȥˡ˵ƣ
+Ȼһ޴棬ҸǸɰҲˣҵĶ
+ɲܹˣ˵ϣطǰձǸһ
+롪ùͽ¡ ֪ף æϹˡѼңδ꣬ȴʮ־ɣ๤
+޹ʼˣ ȴҲæˣϽǺɰ ƵƣʲôһذĶˣ
+أ棬֪ȥ֮⣬Իçײ
+δףͼͷһԲҲ
+ü֪Ҷɰ?˵ţ
+бߡˣԽ£Ĺɰ
+ּˣæסЦãգ 񽫼һˤ˵㲻ͬҺһһģҪգ̿֡
+⵱ʲô˵ţϴﵹᡣסááⲻǡ
+
+ǰĸһƬұѾæ˵ֹ﷿ءĸ
+˵ãããһաӾ죬
+һӰաֻǰ죬 Ť˴Ӧš񱻱ֻ
+˼ҰҾ㡣˵ߡЦ㵽
+Ҹһɰϣ˵Ҫˣ
+ִϣҲģ˵ţ͡һЦˡã
+աҲֻҸ˰ˡһ˵һ˳
+Ϸȥˣɱ
+
+\hfill
+ѩۡ¥Ρ\unkern\unkern
+}
+
+
+
+\long\def\showexample#1{\par------ #1 ------\par \punctstyle{#1}\sometexts}
+
+
+\showexample{quanjiao}
+
+
+\showexample{banjiao}
+
+\showexample{hangmobanjiao}
+
+\showexample{CCT}
+
+\showexample{kaiming}
+
+ \showexample{plain}
+
+
+
+
+\end{CJK*}
+
+
+\end{document}
+
diff --git a/language/chinese/cjkpunct/examples/example-gbk.tex b/language/chinese/cjkpunct/examples/example-gbk.tex
new file mode 100644
index 0000000000..a173b5f3d5
--- /dev/null
+++ b/language/chinese/cjkpunct/examples/example-gbk.tex
@@ -0,0 +1,64 @@
+\documentclass{article}
+\usepackage{CJK}
+\usepackage{CJKpunct}
+\begin{document}
+
+\begin{CJK*}{GBK}{song}
+\parindent 2em
+\long\def\sometexts{
+˵Ժ⣬иļСס ˵ǣ үϲ̫̫˳˼飬ǻ˵ϲȻ̫̫
+ȥͲչˡ˶˵Щʫ˵ĶǿIJͷ ˡЦÿһǮ˵˭ûһǮɰ˰ա ˵ţһɰ һͽңݷ˵֮ᄀнȥ ֵȥաһΧƣĸǰ
+ʱĸ˿˼Ρ Ѿ߸ĸ֪Ϊǻϲ
+
+ʱϮ˵˲һ޴棬
+ЦĶûĶǽȥˡ˵ƣ
+Ȼһ޴棬ҸǸɰҲˣҵĶ
+ɲܹˣ˵ϣطǰձǸһ
+롪ùͽ¡ ֪ף æϹˡѼңδ꣬ȴʮ־ɣ๤
+޹ʼˣ ȴҲæˣϽǺɰ ƵƣʲôһذĶˣ
+أ棬֪ȥ֮⣬Իçײ
+δףͼͷһԲҲ
+ü֪Ҷɰ?˵ţ
+бߡˣԽ£Ĺɰ
+ּˣæסЦãգ 񽫼һˤ˵㲻ͬҺһһģҪգ̿֡
+⵱ʲô˵ţϴﵹᡣסááⲻǡ
+
+ǰĸһƬұѾæ˵ֹ﷿ءĸ
+˵ãããһաӾ죬
+һӰաֻǰ죬 Ť˴Ӧš񱻱ֻ
+˼ҰҾ㡣˵ߡЦ㵽
+Ҹһɰϣ˵Ҫˣ
+ִϣҲģ˵ţ͡һЦˡã
+աҲֻҸ˰ˡһ˵һ˳
+Ϸȥˣɱ
+
+\hfill
+ѩۡ¥Ρ\unkern\unkern
+}
+
+
+
+\long\def\showexample#1{\par------ #1 ------\par \punctstyle{#1}\sometexts}
+
+
+\showexample{quanjiao}
+
+
+\showexample{banjiao}
+
+\showexample{hangmobanjiao}
+
+\showexample{CCT}
+
+\showexample{kaiming}
+
+ \showexample{plain}
+
+
+
+
+\end{CJK*}
+
+
+\end{document}
+
diff --git a/language/chinese/cjkpunct/examples/example-utf8.tex b/language/chinese/cjkpunct/examples/example-utf8.tex
new file mode 100644
index 0000000000..e9a23f0168
--- /dev/null
+++ b/language/chinese/cjkpunct/examples/example-utf8.tex
@@ -0,0 +1,68 @@
+% -*- coding: utf-8 -*-
+\documentclass{article}
+\usepackage{CJKutf8}
+\usepackage{CJKpunct}
+
+
+\begin{document}
+
+\begin{CJK*}{UTF8}{gbsn}
+\parindent 2em
+
+
+\long\def\sometexts{
+话说宝玉来至院外,就有跟贾政的几个小厮上来拦腰抱住, 都说:“今儿亏我们, 老爷才喜欢,老太太打发人出来问了几遍,都亏我们回说喜欢,不然,若老太太叫
+你进去,就不得展才了。人人都说,你才那些诗比世人的都强。今儿得了这样的彩头。 该赏我们了。”宝玉笑道:“每人一吊钱。”众人道:“谁没见那一吊钱!把这荷包赏了罢。” 说着,一个上来解荷包, 那一个就解扇囊,不容分说,将宝玉所佩之物尽行解去。 又道:“好生送上去,罢。”一个抱了起来,几个围绕,送至贾母二门前。
+那时贾母已命人看了几次。 众奶娘丫鬟跟上来,见过贾母,知不曾难为着他,心中自是欢喜。
+
+少时袭人倒了茶来,见身边佩物一件无存,
+因笑道:“带的东西又是那起没脸的东西们解了去了。”林黛玉听说,走来瞧瞧,
+果然一件无存,因向宝玉道:“我给的那个荷包也给他们了?你明儿再想我的东西,
+可不能够了!”说毕,赌气回房,将前日宝玉所烦他作的那个香袋儿——才做了一
+半——赌气拿过来就铰。 宝玉见他生气,便知不妥, 忙赶过来,早剪破了。宝玉已见过这香囊,虽尚未完,却十分精巧,费了许多工夫。
+今见无故剪了, 却也可气。因忙把衣领解了,从里面红袄襟上将黛玉所给的那荷包解了下来, 递与黛玉瞧道:“你瞧瞧,这是什么!我那一回把你的东西给人了?”
+林黛玉见他如此珍重,带在里面,可知是怕人拿去之意,因此又自悔莽撞,
+未见皂白,就剪了香袋。因此又愧又气,低头一言不发。宝玉道:“你也不
+用剪,我知道你是懒待给我东西。我连这荷包奉还,何如?”说着,掷向他怀
+中便走。黛玉见如此,越发气起来,声咽气堵,又汪汪的滚下泪来,拿起荷包
+来又剪。宝玉见他如此,忙回身抢住,笑道:“好妹妹,饶了他罢!” 黛玉将剪子一摔,拭泪说道:“你不用同我好一阵歹一阵的,要恼,就撂开手。
+这当了什么。”说着,赌气上床,面向里倒下拭泪。禁不住宝玉上来“妹妹”长“妹妹”短赔不是。
+
+前面贾母一片声找宝玉。众奶娘丫鬟们忙回说:“在林姑娘房里呢。”贾母听
+说道:“好,好,好!让他姊妹们一处顽顽罢。才他老子拘了他这半天,让他开
+心一会子罢。只别叫他们拌嘴, 不许扭了他。”众人答应着。黛玉被宝玉缠不过,只得起
+来道:“你的意思不叫我安生,我就离了你。”说着往外就走。宝玉笑道:“你到
+那里,我跟到那里。”一面仍拿起荷包来带上,黛玉伸手抢道:“你说不要了,这
+会子又带上,我也替你怪臊的!”说着,“嗤”的一声又笑了。宝玉道:“好妹妹,
+明儿另替我作个香袋儿罢。”黛玉道:“那也只瞧我高兴罢了。”一面说,一面二人出
+房,到王夫人上房中去了,可巧宝钗亦在那里。
+
+\hfill
+——曹雪芹《红楼梦》\unkern\unkern
+}
+
+
+\long\def\showexample#1{\par------ #1 ------\par \punctstyle{#1}\sometexts}
+
+
+\showexample{quanjiao}
+
+
+\showexample{banjiao}
+
+\showexample{hangmobanjiao}
+
+\showexample{CCT}
+
+\showexample{kaiming}
+
+ \showexample{plain}
+
+
+
+
+\end{CJK*}
+
+
+\end{document}
+
diff --git a/language/chinese/cjkpunct/setpunct/README.txt b/language/chinese/cjkpunct/setpunct/README.txt
new file mode 100644
index 0000000000..69d79caba7
--- /dev/null
+++ b/language/chinese/cjkpunct/setpunct/README.txt
@@ -0,0 +1,22 @@
+修改 CJKpunct.spa
+
+ 打开文件 setpunct\setpunct-main.tex,
+
+ 1. 根据操作系统修改 \ghostscript 的定义
+
+ 2. 修改 \setpunctfamilies, 添加你所使用的CJKfamily
+
+ 3. 对于miktex, 运行
+
+ latex --enable-write18 setpunct-main
+
+ 对于texlive, 运行
+
+ latex --shell-escape setpunct-main
+
+ 4. 把文件 CJKpunct.spa 复制到 CJKpunct.sty 所在文件夹, 然后运行
+
+ Texhash
+
+ ------ 安装完成
+ \ No newline at end of file
diff --git a/language/chinese/cjkpunct/setpunct/setpunct-macros.tex b/language/chinese/cjkpunct/setpunct/setpunct-macros.tex
new file mode 100644
index 0000000000..2036a0878a
--- /dev/null
+++ b/language/chinese/cjkpunct/setpunct/setpunct-macros.tex
@@ -0,0 +1,128 @@
+\documentclass{article}
+\usepackage{CJK}
+\begin{document}
+\begin{CJK*}{GBK}{song}
+
+
+\makeatletter
+\pagestyle{empty}
+
+\def\puncts{ۣݣ}
+
+\bgroup
+\catcode`\%=11
+\catcode`\{=11
+\catcode`\}=11
+\catcode`\(=1
+\catcode`\)=2
+\catcode`\#=11
+\gdef\sharp(#)
+\global\def\percent(%)
+\global\def\lbrace({)
+\global\def\rbrace(})
+\egroup
+
+\newwrite\fdrubisha
+\newwrite\fdspa
+\newread\fdin
+
+\def\makefile@rubisha{
+\immediate\openout\fdrubisha=rubisha.tex\relax
+\immediate\write\fdrubisha{\string\documentclass{article}}
+\immediate\write\fdrubisha{\string\usepackage{CJK} }
+\immediate\write\fdrubisha{\string\textwidth 200pt }
+\immediate\write\fdrubisha{\string\textheight 200pt }
+\immediate\write\fdrubisha{\string\begin{document} }
+\immediate\write\fdrubisha{\string\begin{CJK*}{GBK}{song}}
+\immediate\write\fdrubisha{\string\makeatletter }
+\immediate\write\fdrubisha{\string\pagestyle{empty} }
+\immediate\write\fdrubisha{\string\def\string\punctlist\sharp1\sharp2\lbrace
+ \sharp1\sharp2\string\rule{0.5pt}{40pt}\string\newpage}
+\immediate\write\fdrubisha{\string\rule{0.5pt}{20pt}\sharp1\sharp2\string\newpage}
+\immediate\write\fdrubisha{\string\@ifnextchar[{\string\xeCJK@gobble@a}{\string\punctlist}\rbrace}
+\immediate\write\fdrubisha{}
+\immediate\write\fdrubisha{\string\def\string\xeCJK@gobble@a[]{} }
+\immediate\write\fdrubisha{}
+\immediate\write\fdrubisha{\string\CJKfamily{\CJKpunct@family}}
+\immediate\write\fdrubisha{\string\fontsize{100pt}{120pt}\string\selectfont}
+{
+\let\protect\@unexpandable@protect
+\immediate\write\fdrubisha{\string\punctlist\space\puncts []}
+}
+\immediate\write\fdrubisha{\string\newpage }
+\immediate\write\fdrubisha{\string\end{CJK*} }
+\immediate\write\fdrubisha{\string\end{document}}
+\immediate\closeout\fdrubisha\relax}
+
+
+
+\newcount\cnta
+\newcount\cntb
+
+\newcommand{\CJKpunctsetfamily}[1]{
+ \edef\CJKpunct@family{#1}
+ \makefile@rubisha
+ \immediate\write18{pdflatex rubisha}
+ \immediate\write18{\ghostscript}
+ \epstobbox
+ }
+
+\catcode`\%=11\relax
+
+\def\epstobbox{
+ \cntb=0
+ \def\CJKpunctspaces{}
+ \immediate\openin\fdin=rubishb.tex\relax
+ \ifeof\fdin
+ \@latex@error{setpunct: file rubishb.tex not found}{}\relax
+ \fi
+ \loop
+ \getxyspace
+ \edef\CJKpunctspaces{\CJKpunctspaces\temp@xspace,}
+ \getxyspace
+ \edef\CJKpunctspaces{\CJKpunctspaces\temp@xspace,}
+ \advance\cntb 1
+ \ifnum\cntb<35\repeat
+ \immediate\closein\fdin
+ \immediate\write\fdspa{\string\def\string\CJKpunct@\CJKpunct@family
+ @spaces{\CJKpunctspaces,,}\string\relax}}
+
+\def\getxyspace{
+ \read\fdin to\tempa
+ \edef\:{\tempa}
+ \expandafter\getleftupdimen\: {} %%BoundingBox: 1 1 0 0 \relax
+ \ifnum\temp@xwidth<0\relax
+ \read\fdin to\tempa
+ \edef\:{\tempa}
+ \expandafter\getleftupdimen\: {} %%BoundingBox: 1 1 0 0 \relax
+ \fi
+ \ifnum\temp@xwidth<1
+ \@latex@error{error in setting punct bbox \tempa}{}\relax
+ \fi
+ \cnta=-\temp@xwidth\relax
+ \advance\cnta 100\relax
+ \ifnum\cnta<0
+ \cnta=0\relax
+ \fi
+ \edef\temp@xspace{\the\cnta}}
+
+\long\def\getleftupdimen#1%%BoundingBox: #2 #3 #4 #5 {
+ \cnta=#4\relax
+ \advance\cnta -#2\relax
+ \edef\temp@xwidth{\the\cnta}
+ \cnta=#5\relax
+ \advance\cnta -#3\relax
+ \edef\temp@yheight{\the\cnta}
+ \gobblerest}
+
+\long\def\gobblerest#1\relax{}
+
+\immediate\openout\fdspa=CJKpunct.spa\relax
+
+\setpunctfamilies
+
+\immediate\closeout\fdspa
+\end{CJK*}
+\end{document}
+
+
diff --git a/language/chinese/cjkpunct/setpunct/setpunct-main.tex b/language/chinese/cjkpunct/setpunct/setpunct-main.tex
new file mode 100644
index 0000000000..d0937c6fb2
--- /dev/null
+++ b/language/chinese/cjkpunct/setpunct/setpunct-main.tex
@@ -0,0 +1,30 @@
+% Linux
+%
+%\def\ghostscript{gs -dBATCH -dEPSCrop -dNOPAUSE \space
+% -sDEVICE=bbox rubisha.pdf 2>rubishb.tex}
+
+% windows
+%
+\def\ghostscript{"gswin32c.exe -dBATCH -dEPSCrop -dNOPAUSE \space
+ -sDEVICE=bbox rubisha.pdf 2>rubishb.tex"}
+
+
+\def\setpunctfamilies{
+ \CJKpunctsetfamily{song}
+ \CJKpunctsetfamily{hei}
+ \CJKpunctsetfamily{fs}
+ \CJKpunctsetfamily{kai}
+ \CJKpunctsetfamily{you}
+ \CJKpunctsetfamily{li}
+}
+
+
+\input{setpunct-macros.tex}
+
+
+
+\endinput
+
+
+
+