diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-20 00:38:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-20 00:38:10 +0000 |
commit | befa55daf259a7f10fdcfe9bc77813d9d0c46abe (patch) | |
tree | 0bcfe069cefaebec52f196bc6b519cd70c561e6c /Master/texmf-dist/doc/latex/cjkpunct | |
parent | 936650002a466929f2dd9d479166da2083e168a7 (diff) |
new latex package cjkpunct (5jul09)
git-svn-id: svn://tug.org/texlive/trunk@14328 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cjkpunct')
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf | bin | 0 -> 197380 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.spa | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/README | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/README.zh-cn.txt | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/examples/example-CJKfntef.tex | 73 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/examples/example-gb.tex | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/examples/example-gbk.tex | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/examples/example-utf8.tex | 68 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-macros.tex | 125 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cjkpunct/setpunct/setpunct-main.tex | 30 |
10 files changed, 460 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf Binary files differnew file mode 100644 index 00000000000..77795bb9cac --- /dev/null +++ b/Master/texmf-dist/doc/latex/cjkpunct/CJKpunct.pdf 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 <sunwch@hotmail.com> + 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 + + + + |