From befa55daf259a7f10fdcfe9bc77813d9d0c46abe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Jul 2009 00:38:10 +0000 Subject: new latex package cjkpunct (5jul09) git-svn-id: svn://tug.org/texlive/trunk@14328 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf | Bin 0 -> 197380 bytes Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa | 2 + Master/texmf-dist/doc/latex/cjkpunct/README | 13 + .../texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt | 21 + .../latex/cjkpunct/examples/example-CJKfntef.tex | 73 ++ .../doc/latex/cjkpunct/examples/example-gb.tex | 64 ++ .../doc/latex/cjkpunct/examples/example-gbk.tex | 64 ++ .../doc/latex/cjkpunct/examples/example-utf8.tex | 68 ++ .../latex/cjkpunct/setpunct/setpunct-macros.tex | 125 ++++ .../doc/latex/cjkpunct/setpunct/setpunct-main.tex | 30 + .../texmf-dist/source/latex/cjkpunct/CJKpunct.dtx | 821 +++++++++++++++++++++ Master/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty | 490 ++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/cjkpunct.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc | 1 + 15 files changed, 1773 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/README create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/examples/example-CJKfntef.tex create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/examples/example-gb.tex create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/examples/example-gbk.tex create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/examples/example-utf8.tex create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-macros.tex create mode 100644 Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-main.tex create mode 100644 Master/texmf-dist/source/latex/cjkpunct/CJKpunct.dtx create mode 100644 Master/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty create mode 100644 Master/tlpkg/tlpsrc/cjkpunct.tlpsrc diff --git a/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf new file mode 100644 index 00000000000..77795bb9cac Binary files /dev/null and b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf differ diff --git a/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa new file mode 100644 index 00000000000..e02cae56021 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa @@ -0,0 +1,2 @@ +\relax + diff --git a/Master/texmf-dist/doc/latex/cjkpunct/README b/Master/texmf-dist/doc/latex/cjkpunct/README new file mode 100644 index 00000000000..cd85131a25f --- /dev/null +++ b/Master/texmf-dist/doc/latex/cjkpunct/README @@ -0,0 +1,13 @@ +CJKpunct is a LaTeX2e macro package to be the companion +of CJK package by Werner Lemberg for punctuation location +and width adjustments. + +This package is licensed in LPPL. + +If you are interested in the process of development you +may observe + + http://code.google.com/p/ctex-kit/updates/list + +- Sun Wenchang + diff --git a/Master/texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt b/Master/texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt new file mode 100644 index 00000000000..7a2333df6b9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt @@ -0,0 +1,21 @@ +修改 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/Master/texmf-dist/doc/latex/cjkpunct/examples/example-CJKfntef.tex b/Master/texmf-dist/doc/latex/cjkpunct/examples/example-CJKfntef.tex new file mode 100644 index 00000000000..c27e3ae0773 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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} +其中不带*的宏对全角标点不起作用。 + +\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/Master/texmf-dist/doc/latex/cjkpunct/examples/example-gb.tex b/Master/texmf-dist/doc/latex/cjkpunct/examples/example-gb.tex new file mode 100644 index 00000000000..5556f142202 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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{ +话说宝玉来至院外,就有跟贾政的几个小厮上来拦腰抱住, 都说:“今儿亏我们, 老爷才喜欢,老太太打发人出来问了几遍,都亏我们回说喜欢,不然,若老太太叫 +你进去,就不得展才了。人人都说,你才那些诗比世人的都强。今儿得了这样的彩头。 该赏我们了。”宝玉笑道:“每人一吊钱。”众人道:“谁没见那一吊钱!把这荷包赏了罢。” 说着,一个上来解荷包, 那一个就解扇囊,不容分说,将宝玉所佩之物尽行解去。 又道:“好生送上去,罢。”一个抱了起来,几个围绕,送至贾母二门前。 +那时贾母已命人看了几次。 众奶娘丫鬟跟上来,见过贾母,知不曾难为着他,心中自是欢喜。 + +少时袭人倒了茶来,见身边佩物一件无存, +因笑道:“带的东西又是那起没脸的东西们解了去了。”林黛玉听说,走来瞧瞧, +果然一件无存,因向宝玉道:“我给的那个荷包也给他们了?你明儿再想我的东西, +可不能够了!”说毕,赌气回房,将前日宝玉所烦他作的那个香袋儿——才做了一 +半——赌气拿过来就铰。 宝玉见他生气,便知不妥, 忙赶过来,早剪破了。宝玉已见过这香囊,虽尚未完,却十分精巧,费了许多工夫。 +今见无故剪了, 却也可气。因忙把衣领解了,从里面红袄襟上将黛玉所给的那荷包解了下来, 递与黛玉瞧道:“你瞧瞧,这是什么!我那一回把你的东西给人了?” +林黛玉见他如此珍重,带在里面,可知是怕人拿去之意,因此又自悔莽撞, +未见皂白,就剪了香袋。因此又愧又气,低头一言不发。宝玉道:“你也不 +用剪,我知道你是懒待给我东西。我连这荷包奉还,何如?”说着,掷向他怀 +中便走。黛玉见如此,越发气起来,声咽气堵,又汪汪的滚下泪来,拿起荷包 +来又剪。宝玉见他如此,忙回身抢住,笑道:“好妹妹,饶了他罢!” 黛玉将剪子一摔,拭泪说道:“你不用同我好一阵歹一阵的,要恼,就撂开手。 +这当了什么。”说着,赌气上床,面向里倒下拭泪。禁不住宝玉上来“妹妹”长“妹妹”短赔不是。 + +前面贾母一片声找宝玉。众奶娘丫鬟们忙回说:“在林姑娘房里呢。”贾母听 +说道:“好,好,好!让他姊妹们一处顽顽罢。才他老子拘了他这半天,让他开 +心一会子罢。只别叫他们拌嘴, 不许扭了他。”众人答应着。黛玉被宝玉缠不过,只得起 +来道:“你的意思不叫我安生,我就离了你。”说着往外就走。宝玉笑道:“你到 +那里,我跟到那里。”一面仍拿起荷包来带上,黛玉伸手抢道:“你说不要了,这 +会子又带上,我也替你怪臊的!”说着,“嗤”的一声又笑了。宝玉道:“好妹妹, +明儿另替我作个香袋儿罢。”黛玉道:“那也只瞧我高兴罢了。”一面说,一面二人出 +房,到王夫人上房中去了,可巧宝钗亦在那里。 + +\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/Master/texmf-dist/doc/latex/cjkpunct/examples/example-gbk.tex b/Master/texmf-dist/doc/latex/cjkpunct/examples/example-gbk.tex new file mode 100644 index 00000000000..a173b5f3d5a --- /dev/null +++ b/Master/texmf-dist/doc/latex/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{ +话说宝玉来至院外,就有跟贾政的几个小厮上来拦腰抱住, 都说:“今儿亏我们, 老爷才喜欢,老太太打发人出来问了几遍,都亏我们回说喜欢,不然,若老太太叫 +你进去,就不得展才了。人人都说,你才那些诗比世人的都强。今儿得了这样的彩头。 该赏我们了。”宝玉笑道:“每人一吊钱。”众人道:“谁没见那一吊钱!把这荷包赏了罢。” 说着,一个上来解荷包, 那一个就解扇囊,不容分说,将宝玉所佩之物尽行解去。 又道:“好生送上去,罢。”一个抱了起来,几个围绕,送至贾母二门前。 +那时贾母已命人看了几次。 众奶娘丫鬟跟上来,见过贾母,知不曾难为着他,心中自是欢喜。 + +少时袭人倒了茶来,见身边佩物一件无存, +因笑道:“带的东西又是那起没脸的东西们解了去了。”林黛玉听说,走来瞧瞧, +果然一件无存,因向宝玉道:“我给的那个荷包也给他们了?你明儿再想我的东西, +可不能够了!”说毕,赌气回房,将前日宝玉所烦他作的那个香袋儿——才做了一 +半——赌气拿过来就铰。 宝玉见他生气,便知不妥, 忙赶过来,早剪破了。宝玉已见过这香囊,虽尚未完,却十分精巧,费了许多工夫。 +今见无故剪了, 却也可气。因忙把衣领解了,从里面红袄襟上将黛玉所给的那荷包解了下来, 递与黛玉瞧道:“你瞧瞧,这是什么!我那一回把你的东西给人了?” +林黛玉见他如此珍重,带在里面,可知是怕人拿去之意,因此又自悔莽撞, +未见皂白,就剪了香袋。因此又愧又气,低头一言不发。宝玉道:“你也不 +用剪,我知道你是懒待给我东西。我连这荷包奉还,何如?”说着,掷向他怀 +中便走。黛玉见如此,越发气起来,声咽气堵,又汪汪的滚下泪来,拿起荷包 +来又剪。宝玉见他如此,忙回身抢住,笑道:“好妹妹,饶了他罢!” 黛玉将剪子一摔,拭泪说道:“你不用同我好一阵歹一阵的,要恼,就撂开手。 +这当了什么。”说着,赌气上床,面向里倒下拭泪。禁不住宝玉上来“妹妹”长“妹妹”短赔不是。 + +前面贾母一片声找宝玉。众奶娘丫鬟们忙回说:“在林姑娘房里呢。”贾母听 +说道:“好,好,好!让他姊妹们一处顽顽罢。才他老子拘了他这半天,让他开 +心一会子罢。只别叫他们拌嘴, 不许扭了他。”众人答应着。黛玉被宝玉缠不过,只得起 +来道:“你的意思不叫我安生,我就离了你。”说着往外就走。宝玉笑道:“你到 +那里,我跟到那里。”一面仍拿起荷包来带上,黛玉伸手抢道:“你说不要了,这 +会子又带上,我也替你怪臊的!”说着,“嗤”的一声又笑了。宝玉道:“好妹妹, +明儿另替我作个香袋儿罢。”黛玉道:“那也只瞧我高兴罢了。”一面说,一面二人出 +房,到王夫人上房中去了,可巧宝钗亦在那里。 + +\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/Master/texmf-dist/doc/latex/cjkpunct/examples/example-utf8.tex b/Master/texmf-dist/doc/latex/cjkpunct/examples/example-utf8.tex new file mode 100644 index 00000000000..e9a23f01689 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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{ +璇濊瀹濈帀鏉ヨ嚦闄㈠锛屽氨鏈夎窡璐炬斂鐨勫嚑涓皬鍘笂鏉ユ嫤鑵版姳浣忥紝 閮借锛氣滀粖鍎夸簭鎴戜滑锛 鑰佺埛鎵嶅枩娆紝鑰佸お澶墦鍙戜汉鍑烘潵闂簡鍑犻亶锛岄兘浜忔垜浠洖璇村枩娆紝涓嶇劧锛岃嫢鑰佸お澶彨 +浣犺繘鍘伙紝灏变笉寰楀睍鎵嶄簡銆備汉浜洪兘璇达紝浣犳墠閭d簺璇楁瘮涓栦汉鐨勯兘寮恒備粖鍎垮緱浜嗚繖鏍风殑褰╁ご銆 璇ヨ祻鎴戜滑浜嗐傗濆疂鐜夌瑧閬擄細鈥滄瘡浜轰竴鍚婇挶銆傗濅紬浜洪亾锛氣滆皝娌¤閭d竴鍚婇挶锛佹妸杩欒嵎鍖呰祻浜嗙舰銆傗 璇寸潃锛屼竴涓笂鏉ヨВ鑽峰寘锛 閭d竴涓氨瑙f墖鍥婏紝涓嶅鍒嗚锛屽皢瀹濈帀鎵浣╀箣鐗╁敖琛岃В鍘汇 鍙堥亾锛氣滃ソ鐢熼佷笂鍘伙紝缃€傗濅竴涓姳浜嗚捣鏉ワ紝鍑犱釜鍥寸粫锛岄佽嚦璐炬瘝浜岄棬鍓嶃 +閭f椂璐炬瘝宸插懡浜虹湅浜嗗嚑娆° 浼楀ザ濞樹斧楝熻窡涓婃潵锛岃杩囪淳姣嶏紝鐭ヤ笉鏇鹃毦涓虹潃浠栵紝蹇冧腑鑷槸娆㈠枩銆 + +灏戞椂琚汉鍊掍簡鑼舵潵锛岃韬竟浣╃墿涓浠舵棤瀛橈紝 +鍥犵瑧閬擄細鈥滃甫鐨勪笢瑗垮張鏄偅璧锋病鑴哥殑涓滆タ浠В浜嗗幓浜嗐傗濇灄榛涚帀鍚锛岃蛋鏉ョ灖鐬э紝 +鏋滅劧涓浠舵棤瀛橈紝鍥犲悜瀹濈帀閬擄細鈥滄垜缁欑殑閭d釜鑽峰寘涔熺粰浠栦滑浜嗭紵浣犳槑鍎垮啀鎯虫垜鐨勪笢瑗匡紝 +鍙笉鑳藉浜嗭紒鈥濊姣曪紝璧屾皵鍥炴埧锛屽皢鍓嶆棩瀹濈帀鎵鐑︿粬浣滅殑閭d釜棣欒鍎库斺旀墠鍋氫簡涓 +鍗娾斺旇祵姘旀嬁杩囨潵灏遍摪銆 瀹濈帀瑙佷粬鐢熸皵锛屼究鐭ヤ笉濡ワ紝 蹇欒刀杩囨潵锛屾棭鍓牬浜嗐傚疂鐜夊凡瑙佽繃杩欓鍥婏紝铏藉皻鏈畬锛屽嵈鍗佸垎绮惧阀锛岃垂浜嗚澶氬伐澶 +浠婅鏃犳晠鍓簡锛 鍗翠篃鍙皵銆傚洜蹇欐妸琛i瑙d簡锛屼粠閲岄潰绾㈣瑗熶笂灏嗛粵鐜夋墍缁欑殑閭h嵎鍖呰В浜嗕笅鏉ワ紝 閫掍笌榛涚帀鐬ч亾锛氣滀綘鐬х灖锛岃繖鏄粈涔堬紒鎴戦偅涓鍥炴妸浣犵殑涓滆タ缁欎汉浜嗭紵鈥 +鏋楅粵鐜夎浠栧姝ょ弽閲嶏紝甯﹀湪閲岄潰锛屽彲鐭ユ槸鎬曚汉鎷垮幓涔嬫剰锛屽洜姝ゅ張鑷倲鑾芥挒锛 +鏈鐨傜櫧锛屽氨鍓簡棣欒銆傚洜姝ゅ張鎰у張姘旓紝浣庡ご涓瑷涓嶅彂銆傚疂鐜夐亾锛氣滀綘涔熶笉 +鐢ㄥ壀锛屾垜鐭ラ亾浣犳槸鎳掑緟缁欐垜涓滆タ銆傛垜杩炶繖鑽峰寘濂夎繕锛屼綍濡?鈥濊鐫锛屾幏鍚戜粬鎬 +涓究璧般傞粵鐜夎濡傛锛岃秺鍙戞皵璧锋潵锛屽0鍜芥皵鍫碉紝鍙堟豹姹殑婊氫笅娉潵锛屾嬁璧疯嵎鍖 +鏉ュ張鍓傚疂鐜夎浠栧姝わ紝蹇欏洖韬姠浣忥紝绗戦亾锛氣滃ソ濡瑰锛岄ザ浜嗕粬缃紒鈥 榛涚帀灏嗗壀瀛愪竴鎽旓紝鎷唱璇撮亾锛氣滀綘涓嶇敤鍚屾垜濂戒竴闃垫涓闃电殑锛岃鎭硷紝灏辨拏寮鎵嬨 +杩欏綋浜嗕粈涔堛傗濊鐫锛岃祵姘斾笂搴婏紝闈㈠悜閲屽掍笅鎷唱銆傜涓嶄綇瀹濈帀涓婃潵鈥滃濡光濋暱鈥滃濡光濈煭璧斾笉鏄 + +鍓嶉潰璐炬瘝涓鐗囧0鎵惧疂鐜夈備紬濂跺涓瑹浠繖鍥炶锛氣滃湪鏋楀濞樻埧閲屽憿銆傗濊淳姣嶅惉 +璇撮亾锛氣滃ソ锛屽ソ锛屽ソ锛佽浠栧濡逛滑涓澶勯〗椤界舰銆傛墠浠栬佸瓙鎷樹簡浠栬繖鍗婂ぉ锛岃浠栧紑 +蹇冧竴浼氬瓙缃€傚彧鍒彨浠栦滑鎷屽槾锛 涓嶈鎵簡浠栥傗濅紬浜虹瓟搴旂潃銆傞粵鐜夎瀹濈帀缂犱笉杩囷紝鍙緱璧 +鏉ラ亾锛氣滀綘鐨勬剰鎬濅笉鍙垜瀹夌敓锛屾垜灏辩浜嗕綘銆傗濊鐫寰澶栧氨璧般傚疂鐜夌瑧閬擄細鈥滀綘鍒 +閭i噷锛屾垜璺熷埌閭i噷銆傗濅竴闈粛鎷胯捣鑽峰寘鏉ュ甫涓婏紝榛涚帀浼告墜鎶㈤亾锛氣滀綘璇翠笉瑕佷簡锛岃繖 +浼氬瓙鍙堝甫涓婏紝鎴戜篃鏇夸綘鎬噴鐨勶紒鈥濊鐫锛屸滃棨鈥濈殑涓澹板張绗戜簡銆傚疂鐜夐亾锛氣滃ソ濡瑰锛 +鏄庡効鍙︽浛鎴戜綔涓琚嬪効缃€傗濋粵鐜夐亾锛氣滈偅涔熷彧鐬ф垜楂樺叴缃簡銆傗濅竴闈㈣锛屼竴闈簩浜哄嚭 +鎴匡紝鍒扮帇澶汉涓婃埧涓幓浜嗭紝鍙阀瀹濋挆浜﹀湪閭i噷銆 + +\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/Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-macros.tex b/Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-macros.tex new file mode 100644 index 00000000000..c02b653d75f --- /dev/null +++ b/Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-macros.tex @@ -0,0 +1,125 @@ +\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 + \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/Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-main.tex b/Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-main.tex new file mode 100644 index 00000000000..d0937c6fb20 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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 + + + + diff --git a/Master/texmf-dist/source/latex/cjkpunct/CJKpunct.dtx b/Master/texmf-dist/source/latex/cjkpunct/CJKpunct.dtx new file mode 100644 index 00000000000..654f2628a76 --- /dev/null +++ b/Master/texmf-dist/source/latex/cjkpunct/CJKpunct.dtx @@ -0,0 +1,821 @@ +% \iffalse +%<*internal> +\iffalse +% +%<*readme> + +CJKpunct is a LaTeX package for adjust spaces around full-width punctuation. + +% +%<*internal> +\fi +% +% +%<*internal> +\begingroup +% +%<*batchfile> +\input docstrip.tex +\keepsilent +\usedir{tex/latex/CJK/CJKpunct} +\preamble + + Version 4.8.1-2 (30-Aug-2008) + + This is the file CJKpunct.sty for the CJK package + + Authors: + Linbo Zhang (zlb@lsec.cc.ac.cn) + Wenchang Sun (sunwch@nankai.edu.cn) + + +\endpreamble +\askforoverwritefalse +\generate{\file{CJKpunct.sty}{\from{CJKpunct.dtx}{CJKpunct}}} +% +%\endbatchfile +%<*internal> +\generate{\file{CJKpunct.ins}{\from{CJKpunct.dtx}{batchfile}}} +\nopreamble\nopostamble +\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} +\endgroup +% +% +%<*driver> +\documentclass[12pt]{ltxdoc} +\usepackage{xcolor} +\usepackage[bookmarks=true,CJKbookmarks,bookmarksopen=true,dvipdfm,pdfstartview=FitH]{hyperref} +\usepackage{CJK} +\usepackage{CJKspace} +\usepackage{CJKpunct} +\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$}} + +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} +\begin{CJK*}{GB}{gbsn} + \DocInput{CJKpunct.dtx} + \makeatletter + \c@IndexColumns = 2 + \PrintIndex + \newpage +\end{CJK*} +\end{document} +% +% +%<*CJKpunct> +\def\fileversion{4.8.1-2} +\def\filedate{2008/08/30} +\ProvidesPackage{CJKpunct}[\filedate\space\fileversion] +% +% +% \fi +% +% \makeatletter ^^A% To document @-cmds +% \errorcontextlines=999 ^^A% Show up all my mistakes +% +% \GetFileInfo{CJKpunct.sty} +% +% \title{CJKpunct 使用说明} +% \author{张林波 \quad 孙文昌} +% \date{2008 年 8 月 12 日} +% \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 文件。请参考 +% source/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 保存了字体相关的标点符号宽度。制作方法请参考 source/REAME.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 +\let\CJKoglue\CJKglue +% \end{macrocode} +% +% \defmacro{CJKsymbol} 的定义中需要三重括号以保证兼容 CJKfntef 宏包。 +% +% \begin{macrocode} + +\let\CJKosymbol\CJKsymbol +\def\CJKpunct@CJKsymbol#1{ + {{{ + \ifnum\CJKpunct@lastkern>0\relax + \ifnum\CJKpunct@lastcharclass=0\relax + \CJKoglue + \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 + \CJKoglue % 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 + \edef\CJKpunct@family{\CJK@family} + \fi} + +\def\CJKpunctmapfamily#1#2#3#4#5{ + \expandafter\edef\csname #1@#2@#3@#4\endcsname{#5}} + +\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} + +\CJKpunctmapfamily{C19}{com}{m}{n}{song} +\CJKpunctmapfamily{C19}{com}{bx}{n}{hei} +\CJKpunctmapfamily{C19}{com}{m}{sl}{kai} +\CJKpunctmapfamily{C19}{com}{bx}{sl}{kai} +\CJKpunctmapfamily{C19}{com}{m}{it}{kai} +\CJKpunctmapfamily{C19}{com}{bx}{it}{kai} + +\CJKpunctmapfamily{C19}{sf}{m}{n}{you} +\CJKpunctmapfamily{C19}{sf}{bx}{n}{you} +\CJKpunctmapfamily{C19}{sf}{m}{sl}{you} +\CJKpunctmapfamily{C19}{sf}{bx}{sl}{you} +\CJKpunctmapfamily{C19}{sf}{m}{it}{you} +\CJKpunctmapfamily{C19}{sf}{bx}{it}{you} + +\CJKpunctmapfamily{C19}{tt}{m}{n}{fs} +\CJKpunctmapfamily{C19}{tt}{bx}{n}{fs} +\CJKpunctmapfamily{C19}{tt}{m}{sl}{fs} +\CJKpunctmapfamily{C19}{tt}{bx}{sl}{fs} +\CJKpunctmapfamily{C19}{tt}{m}{it}{fs} +\CJKpunctmapfamily{C19}{tt}{bx}{it}{fs} +% \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\CJKpunct@punctstyle + @\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#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\CJKglue\CJKoglue + \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\CJKglue\relax + \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} +\IfFileExists{CJKpunct.spa}{\input{CJKpunct.spa}}{} + +\endlinechar `\^^M +% \end{macrocode} +% +% +% +% \iffalse +% +% \fi + + +% +% \Finale +% +% \typeout{*************************************************************} +% \typeout{*} +% \typeout{* To finish the installation you have to move the following} +% \typeout{* files into a directory searched by LaTeX:} +% \typeout{*} +% \typeout{* \space\space\space CJKpunct.sty} +% \typeout{*} +% \typeout{*************************************************************} +% \Finale +\endinput diff --git a/Master/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty b/Master/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty new file mode 100644 index 00000000000..759da8b9554 --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty @@ -0,0 +1,490 @@ +%% +%% This is file `CJKpunct.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% CJKpunct.dtx (with options: `CJKpunct') +%% +%% Version 4.8.2 (06-May-2009) +%% +%% This is the file CJKpunct.sty for the CJK package +%% +%% Authors: +%% Linbo Zhang (zlb@lsec.cc.ac.cn) +%% Wenchang Sun (sunwch@nankai.edu.cn) +%% +%% +\def\fileversion{4.8.2} +\def\filedate{2009/05/06} +\ProvidesPackage{CJKpunct}[\filedate\space\fileversion] +\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 +\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 + +\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} +\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} +\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 + \edef\CJKpunct@family{\CJK@family} + \fi} + +\def\CJKpunctmapfamily#1#2#3#4#5{ + \expandafter\edef\csname #1@#2@#3@#4\endcsname{#5}} + +\def\CJKpunct@plainpunctsymbol#1#2{ + \CJKpunctsymbol{#2}} +\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\CJKpunct@punctstyle + @\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} +\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#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} + +\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} +\def\CJKpunctallowbreakbetweenpuncts{ + \def\CJKpunct@nobreak{ + \ifnum\CJKpunct@lastcharclass=2 + \hskip 0pt + \fi}} + +\def\CJKpunctnobreakbetweenpuncts{ + \let\CJKpunct@nobreak\nobreak} +\CJKpunctnobreakbetweenpuncts +\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 +\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}}} + +\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,, + +\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,, + +\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} +\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} +\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} +\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} +\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,,,} + +\IfFileExists{CJKpunct.spa}{\input{CJKpunct.spa}}{} + +\endlinechar `\^^M + +\endinput +%% +%% End of file `CJKpunct.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 51b2bb9ed45..7c1f77b802e 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -51,7 +51,7 @@ my @WorkingTLP = qw( chem-journal chembst chemcompounds chemstyle cherokee chess-problem-diagrams chessboard chessfss chicago-annote chletter circ circuitikz - cite citeref cjhebrew cjk cjw classicthesis + cite citeref cjhebrew cjk cjkpunct cjw classicthesis clefval cleveref clock clrscode cm-super cmap cmcyr cmdstring cmdtrack cmll cmpica codedoc codepage diff --git a/Master/tlpkg/tlpsrc/cjkpunct.tlpsrc b/Master/tlpkg/tlpsrc/cjkpunct.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc index 1975936cb99..326769233df 100644 --- a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc @@ -4,6 +4,7 @@ longdesc CJK (Chinese, Japanese, Korean) macros, fonts, documentation. depend arphic depend c90 depend cjk +depend cjkpunct depend cns depend dnp depend garuda-c90 -- cgit v1.2.3