From dedc32dddab93ec4661c4fa056255536198a9c3f Mon Sep 17 00:00:00 2001 From: imiyazaki Date: Mon, 9 Feb 2004 13:57:43 +0000 Subject: [PATCH] add possibility to preserve spaces. --- chise.sty | 180 ++++++++++++++++++++----------------------------------------- 1 file changed, 58 insertions(+), 122 deletions(-) diff --git a/chise.sty b/chise.sty index a8be35d..6339b10 100644 --- a/chise.sty +++ b/chise.sty @@ -7,139 +7,27 @@ %% options %% %% You must change the path of inCHISE, -%% if inCHISE is not located in the default directory. +%% if inCHISE is not located in the default directory. +%% Replace all "/usr/local/share/texmf/omega/ocp/local/chise/" +%% to the appropriate path. \DeclareOption{utf8mcs}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8mcsToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8mcsToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8mcsToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8mcsToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8mcsToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8mcs} } \DeclareOption{utf8gb}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8gbToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8gbToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8gbToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8gbToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8gbToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8gb} } \DeclareOption{utf8cns}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8cnsToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8cnsToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8cnsToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8cnsToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8cnsToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8cns} } \DeclareOption{utf8jis}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8jisToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8jisToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8jisToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8jisToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8jisToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8jis} } \DeclareOption{utf8ks}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8ksToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8ksToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8ksToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8ksToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8ksToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8ks} } \DeclareOption{utf8big5}{ - \externalocp\OCPuniGB=/usr/local/share/texmf/omega/ocp/local/chise/Utf8big5ToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \externalocp\OCPuniCNS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8big5ToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \externalocp\OCPuniJIS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8big5ToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \externalocp\OCPuniKS=/usr/local/share/texmf/omega/ocp/local/chise/Utf8big5ToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \externalocp\OCPuniMulti=/usr/local/share/texmf/omega/ocp/local/chise/Utf8big5ToUniMulti {} - \ocplist\uniMulti= - \addbeforeocplist 1 \OCPuniMulti - \nullocplist + \CHISEsetupOCP{Utf8big5} } \DeclareOption{gbfont}{ @@ -215,6 +103,55 @@ \def\ttdefault{uctt} % Settings for CJK + +\def\CHISEsetupOCP#1{ + \externalocp\OCPuniGBrmSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniGB {} + \ocplist\uniGBrmSP= + \addbeforeocplist 1 \OCPuniGBrmSP + \nullocplist + \externalocp\OCPuniCNSrmSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniCNS {} + \ocplist\uniCNSrmSP= + \addbeforeocplist 1 \OCPuniCNSrmSP + \nullocplist + \externalocp\OCPuniJISrmSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniJIS {} + \ocplist\uniJISrmSP= + \addbeforeocplist 1 \OCPuniJISrmSP + \nullocplist + \externalocp\OCPuniKSrmSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniKS {} + \ocplist\uniKSrmSP= + \addbeforeocplist 1 \OCPuniKSrmSP + \nullocplist + \externalocp\OCPuniMultirmSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniMulti {} + \ocplist\uniMultirmSP= + \addbeforeocplist 1 \OCPuniMultirmSP + \nullocplist + \externalocp\OCPuniGBwithSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniGBSp {} + \ocplist\uniGBwithSP= + \addbeforeocplist 1 \OCPuniGBwithSP + \nullocplist + \externalocp\OCPuniCNSwithSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniCNSSp {} + \ocplist\uniCNSwithSP= + \addbeforeocplist 1 \OCPuniCNSwithSP + \nullocplist + \externalocp\OCPuniJISwithSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniJISSp {} + \ocplist\uniJISwithSP= + \addbeforeocplist 1 \OCPuniJISwithSP + \nullocplist + \externalocp\OCPuniKSwithSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniKSSp {} + \ocplist\uniKSwithSP= + \addbeforeocplist 1 \OCPuniKSwithSP + \nullocplist + \externalocp\OCPuniMultiwithSP=/usr/local/share/texmf/omega/ocp/local/chise/#1ToUniMultiSp {} + \ocplist\uniMultiwithSP= + \addbeforeocplist 1 \OCPuniMultiwithSP + \nullocplist + \let\uniGB=\uniGBrmSP + \let\uniCNS=\uniCNSrmSP + \let\uniJIS=\uniJISrmSP + \let\uniKS=\uniKSrmSP + \let\uniMulti=\uniMultirmSP +} + \def\selectjisfont{\fontencoding{OT1}\fontfamily{omjis}\selectfont} \def\selectgbsfont{\fontencoding{OT1}\fontfamily{omgbs}\selectfont} \def\selectcnsfont{\fontencoding{OT1}\fontfamily{omcns}\selectfont} @@ -235,7 +172,6 @@ \newenvironment{CyrillicScript}{\pushocplist\CyrillicOCP\selectlgcfont}{} \newenvironment{LatinScript}{\pushocplist\LatinOCP\selectlgcfont}{} - \newcommand{\jisfont}[1]{\begingroup% \pushocplist\uniJIS #1\endgroup} \newcommand{\gbfont}[1]{\begingroup% -- 1.7.10.4