\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{chise}[2003/10/18 v.0.2 (Omega/CHISE Team)]
+\ProvidesPackage{chise}[2003/11/26 v.0.2 (Omega/CHISE Team)]
% based on mulambda and omega-japanese
-\RequirePackage{omega}
-\RequirePackage[UT1]{fontenc}
+%\RequirePackage{omega}
+\RequirePackage[OT1]{fontenc}
+
+%% options %%
+
+%% You must change the path of inCHISE,
+%% 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=Utf8mcsToUniGB {}
- \ocplist\uniGB=
- \addbeforeocplist 1 \OCPuniGB
- \nullocplist
- \externalocp\OCPuniCNS=Utf8mcsToUniCNS {}
- \ocplist\uniCNS=
- \addbeforeocplist 1 \OCPuniCNS
- \nullocplist
- \externalocp\OCPuniJIS=Utf8mcsToUniJIS {}
- \ocplist\uniJIS=
- \addbeforeocplist 1 \OCPuniJIS
- \nullocplist
- \externalocp\OCPuniKS=Utf8mcsToUniKS {}
- \ocplist\uniKS=
- \addbeforeocplist 1 \OCPuniKS
- \nullocplist
- \externalocp\OCPuniMulti=Utf8mcsToUniMulti {}
- \ocplist\uniMulti=
- \addbeforeocplist 1 \OCPuniMulti
- \nullocplist
+ \CHISEsetupOCP{Utf8mcs}
}
\DeclareOption{utf8gb}{
- \externalocp\OCPuniGB=Utf8gbToUniGB {}
- \ocplist\uniGB=
- \addbeforeocplist 1 \OCPuniGB
- \nullocplist
- \externalocp\OCPuniCNS=Utf8gbToUniCNS {}
- \ocplist\uniCNS=
- \addbeforeocplist 1 \OCPuniCNS
- \nullocplist
- \externalocp\OCPuniJIS=Utf8gbToUniJIS {}
- \ocplist\uniJIS=
- \addbeforeocplist 1 \OCPuniJIS
- \nullocplist
- \externalocp\OCPuniKS=Utf8gbToUniKS {}
- \ocplist\uniKS=
- \addbeforeocplist 1 \OCPuniKS
- \nullocplist
- \externalocp\OCPuniMulti=Utf8mcsToUniMulti {}
- \ocplist\uniMulti=
- \addbeforeocplist 1 \OCPuniMulti
- \nullocplist
+ \CHISEsetupOCP{Utf8gb}
}
\DeclareOption{utf8cns}{
- \externalocp\OCPuniGB=Utf8cnsToUniGB {}
- \ocplist\uniGB=
- \addbeforeocplist 1 \OCPuniGB
- \nullocplist
- \externalocp\OCPuniCNS=Utf8cnsToUniCNS {}
- \ocplist\uniCNS=
- \addbeforeocplist 1 \OCPuniCNS
- \nullocplist
- \externalocp\OCPuniJIS=Utf8cnsToUniJIS {}
- \ocplist\uniJIS=
- \addbeforeocplist 1 \OCPuniJIS
- \nullocplist
- \externalocp\OCPuniKS=Utf8cnsToUniKS {}
- \ocplist\uniKS=
- \addbeforeocplist 1 \OCPuniKS
- \nullocplist
- \externalocp\OCPuniMulti=Utf8mcsToUniMulti {}
- \ocplist\uniMulti=
- \addbeforeocplist 1 \OCPuniMulti
- \nullocplist
+ \CHISEsetupOCP{Utf8cns}
}
\DeclareOption{utf8jis}{
- \externalocp\OCPuniGB=Utf8jisToUniGB {}
- \ocplist\uniGB=
- \addbeforeocplist 1 \OCPuniGB
- \nullocplist
- \externalocp\OCPuniCNS=Utf8jisToUniCNS {}
- \ocplist\uniCNS=
- \addbeforeocplist 1 \OCPuniCNS
- \nullocplist
- \externalocp\OCPuniJIS=Utf8jisToUniJIS {}
- \ocplist\uniJIS=
- \addbeforeocplist 1 \OCPuniJIS
- \nullocplist
- \externalocp\OCPuniKS=Utf8jisToUniKS {}
- \ocplist\uniKS=
- \addbeforeocplist 1 \OCPuniKS
- \nullocplist
- \externalocp\OCPuniMulti=Utf8mcsToUniMulti {}
- \ocplist\uniMulti=
- \addbeforeocplist 1 \OCPuniMulti
- \nullocplist
+ \CHISEsetupOCP{Utf8jis}
}
\DeclareOption{utf8ks}{
- \externalocp\OCPuniGB=Utf8ksToUniGB {}
- \ocplist\uniGB=
- \addbeforeocplist 1 \OCPuniGB
- \nullocplist
- \externalocp\OCPuniCNS=Utf8ksToUniCNS {}
- \ocplist\uniCNS=
- \addbeforeocplist 1 \OCPuniCNS
- \nullocplist
- \externalocp\OCPuniJIS=Utf8ksToUniJIS {}
- \ocplist\uniJIS=
- \addbeforeocplist 1 \OCPuniJIS
- \nullocplist
- \externalocp\OCPuniKS=Utf8ksToUniKS {}
- \ocplist\uniKS=
- \addbeforeocplist 1 \OCPuniKS
- \nullocplist
- \externalocp\OCPuniMulti=Utf8mcsToUniMulti {}
- \ocplist\uniMulti=
- \addbeforeocplist 1 \OCPuniMulti
- \nullocplist
+ \CHISEsetupOCP{Utf8ks}
+}
+\DeclareOption{utf8big5}{
+ \CHISEsetupOCP{Utf8big5}
}
\DeclareOption{gbfont}{
}
}
-\ocp\CJKbreak=cjkbreak
-%% \ocplist\CJKadjust=
-%% \addbeforeocplist 1 \CJKbreak
-%% \nullocplist
-\def\cjkglue{\hskip 0pt plus 1pt minus .5pt}
+\DeclareOption{kage}{
+ % to use KAGE server
+ \externalocp\OCPmkfont=/usr/local/share/texmf/omega/ocp/local/chise/makefonts.pl {}
+ \ocplist\mkfontOCP=
+ \addbeforeocplist 1 \OCPmkfont
+ \nullocplist
+
+ \AtEndDocument{
+ \pushocplist\mkfontOCP
+ }
+}
+
+%% end options %%
-\ocp\OCPutf=inutf8
+\ocp\OCPutf=inutf8fix
\ocplist\inutf
+\addbeforeocplist 1 \OCPutf
+\nullocplist
+
+\ocp\OCPTeX=omtex
+\ocp\OCPGrUniToFont=uni2greekfix
+\ocp\OCPCyrUniToFont=uni2latfix
+\ocp\OCPLatinUniToFont=uni2latfix
+\ocplist\GreekOCP
+ \addbeforeocplist 1 \OCPutf
+ \addbeforeocplist 1 \OCPTeX
+ \addbeforeocplist 1 \OCPGrUniToFont
+ \nullocplist
+\ocplist\CyrillicOCP
\addbeforeocplist 1 \OCPutf
+ \addbeforeocplist 1 \OCPTeX
+ \addbeforeocplist 1 \OCPCyrUniToFont
\nullocplist
+\ocplist\LatinOCP
+ \addbeforeocplist 1 \OCPutf
+ \addbeforeocplist 1 \OCPTeX
+ \addbeforeocplist 1 \OCPLatinUniToFont
+ \nullocplist
+
\AtBeginDocument{
-% \DefaultInputMode onebyte
-% \InputMode currentfile onebyte
-% \DefaultInputTranslation onebyte \OCPutf
-% \InputTranslation currentfile \OCPutf
- \pushocplist\inutf
+ \LatinScript
}
-%%%%% to use KAGE server %%%%%
-\externalocp\OCPmkfont=makefonts.pl {}
-\ocplist\mkfontOCP=
-\addbeforeocplist 1 \OCPmkfont
-\nullocplist
+\def\rmdefault{omlgc}
+\def\ttdefault{uctt}
-\AtEndDocument{
- \pushocplist\mkfontOCP
+% 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
}
-% Settings for CJK
\def\selectjisfont{\fontencoding{OT1}\fontfamily{omjis}\selectfont}
\def\selectgbsfont{\fontencoding{OT1}\fontfamily{omgbs}\selectfont}
\def\selectcnsfont{\fontencoding{OT1}\fontfamily{omcns}\selectfont}
\def\selectksxfont{\fontencoding{OT1}\fontfamily{omksx}\selectfont}
-%\def\JIS{\pushocplist\CJKadjust\selectjisfont}
-%\def\GB{\pushocplist\CJKadjust\selectgbsfont}
-%\def\KS{\pushocplist\CJKadjust\selectksxfont}
-%\def\CNS{\pushocplist\CJKadjust\selectcnsfont}
-
-\newenvironment{JISfont}{\pushocplist\uniJIS\selectjisfont}{}
-\newenvironment{GBfont}{\pushocplist\uniGB\selectgbsfont}{}
-\newenvironment{KSfont}{\pushocplist\uniKS\selectksxfont}{}
-\newenvironment{CNSfont}{\pushocplist\uniCNS\selectcnsfont}{}
+\def\selectlgcfont{\fontencoding{OT1}\fontfamily{omlgc}\selectfont}
+
+\newenvironment{JISfont}{\pushocplist\uniJIS}{}
+\newenvironment{GBfont}{\pushocplist\uniGB}{}
+\newenvironment{KSfont}{\pushocplist\uniKS}{}
+\newenvironment{CNSfont}{\pushocplist\uniCNS}{}
\newenvironment{Multifont}{\pushocplist\uniMulti}{}
-\newenvironment{ASCII}{\pushocplist\NilOCP\fontencoding{T1}\fontfamily{\rmdefault}\selectfont}{}
+\newenvironment{NonCJK}{\pushocplist\inutf\selectlgcfont}{}
+\newenvironment{ASCII}{\clearocplists\fontencoding{T1}\selectnormalfont}{}
+
+\newenvironment{GreekScript}{\pushocplist\GreekOCP\selectlgcfont%
+\language=3\lefthyphenmin=2\righthyphenmin=2}{%
+}
+\newenvironment{CyrillicScript}{\pushocplist\CyrillicOCP\selectlgcfont}{}
+\newenvironment{LatinScript}{\pushocplist\LatinOCP\selectlgcfont}{}
\newcommand{\jisfont}[1]{\begingroup%
- \pushocplist\uniJIS\selectjisfont #1\endgroup}
+ \pushocplist\uniJIS #1\endgroup}
\newcommand{\gbfont}[1]{\begingroup%
- \pushocplist\uniGB\selectgbsfont #1\endgroup}
+ \pushocplist\uniGB #1\endgroup}
\newcommand{\ksfont}[1]{\begingroup%
- \pushocplist\uniKS\selectksxfont #1\endgroup}
+ \pushocplist\uniKS #1\endgroup}
\newcommand{\cnsfont}[1]{\begingroup%
- \pushocplist\uniCNS\selectcnsfont #1\endgroup}
+ \pushocplist\uniCNS #1\endgroup}
\newcommand{\multifont}[1]{\begingroup%
\pushocplist\uniMulti #1\endgroup}
\newcommand{\noncjk}[1]{\begingroup%
- \normalfont\pushocplist\inutf #1\endgroup}
+ \pushocplist\inutf\selectlgcfont #1\endgroup}
+% \normalfont\pushocplist\inutf #1\endgroup}
\newcommand{\ascii}[1]{\begingroup%
- \pushocplist\NilOCP\fontencoding{T1}\fontfamily{\rmdefault}\selectfont #1\endgroup}
+ \clearocplists\selectlgcfont #1\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Entity Reference
% ----------------
\def\ER#1{amp#1;}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% IDC shorthand
+% IDC for print
% -------------
\def\idc@#1{{\selectgbsfont\clearocplists\char"#1}}
\def\idcltr{\idc@{2FF0}}
% line break definition ends.
+%%%% redundant font definition to avoid bug of omega.
+
+\DeclareFontFamily{OT1}{omlgc}{}
+
+\DeclareFontShape{OT1}{omlgc}{m}{n}{
+ <->omlgc
+}{}
+\DeclareFontShape{OT1}{omlgc}{m}{sc}{
+ <-> ssub * omlgc/m/n
+}{}
+\DeclareFontShape{OT1}{omlgc}{m}{it}{
+ <->omlgci
+}{}
+\DeclareFontShape{OT1}{omlgc}{m}{sl}{
+ <-> ssub * omlgc/m/it
+}{}
+\DeclareFontShape{OT1}{omlgc}{m}{itsc}{
+ <-> ssub * omlgc/m/it
+}{}
+\DeclareFontShape{OT1}{omlgc}{m}{slsc}{
+ <-> ssub * omlgc/m/it
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{n}{
+ <->omlgcb
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{sc}{
+ <-> ssub * omlgc/bx/n
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{it}{
+ <->omlgcbi
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{itsc}{
+ <-> ssub * omlgc/bx/it
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{sl}{
+ <-> ssub * omlgc/bx/it
+}{}
+\DeclareFontShape{OT1}{omlgc}{bx}{slsc}{
+ <-> ssub * omlgc/bx/it
+}{}
+
+% The declaration below should be in ot1enc.def.
+\DeclareTextSymbol{\textbullet}{OT1}{"2022}
+
\ProcessOptions
\endinput