From e734a40664c7c60da9a0193657ee2a437739897f Mon Sep 17 00:00:00 2001 From: imiyazaki Date: Sat, 18 Oct 2003 02:30:13 +0000 Subject: [PATCH] simplify file coding system option. add option of global environment. add multifont environment. duplicate font declareration to avoid bug of Omega. --- chise.sty | 498 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 288 insertions(+), 210 deletions(-) diff --git a/chise.sty b/chise.sty index 7a75781..ec215df 100644 --- a/chise.sty +++ b/chise.sty @@ -1,226 +1,144 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{chise}[2003/03/03 v.0.1 (Omega/CHISE Team)] +\ProvidesPackage{chise}[2003/10/18 v.0.2 (Omega/CHISE Team)] % based on mulambda and omega-japanese \RequirePackage{omega} \RequirePackage[UT1]{fontenc} -\newif\if@gbfont\@gbfontfalse -\newif\if@cnsfont\@cnsfontfalse -\newif\if@jisfont\@jisfontfalse -\newif\if@ksfont\@ksfontfalse - -\DeclareOption{gbfont}{ - \@gbfonttrue -} -\DeclareOption{cnsfont}{ - \@cnsfonttrue -} -\DeclareOption{jisfont}{ - \@jisfonttrue -} -\DeclareOption{ksfont}{ - \@ksfonttrue -} - \DeclareOption{utf8mcs}{ - \if@gbfont - \externalocp\OCPuniGB=Utf8mcsToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \else\if@cnsfont - \externalocp\OCPuniCNS=Utf8mcsToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \else\if@jisfont - \externalocp\OCPuniJIS=Utf8mcsToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \else\if@ksfont - \externalocp\OCPuniKS=Utf8mcsToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \else - \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 - \fi\fi\fi\fi + \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 } \DeclareOption{utf8gb}{ - \if@gbfont - \externalocp\OCPuniGB=Utf8gbToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \else\if@cnsfont - \externalocp\OCPuniCNS=Utf8gbToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \else\if@jisfont - \externalocp\OCPuniJIS=Utf8gbToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \else\if@ksfont - \externalocp\OCPuniKS=Utf8gbToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \else - \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 - \fi\fi\fi\fi + \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 } \DeclareOption{utf8cns}{ - \if@gbfont - \externalocp\OCPuniGB=Utf8cnsToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \else\if@cnsfont - \externalocp\OCPuniCNS=Utf8cnsToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \else\if@jisfont - \externalocp\OCPuniJIS=Utf8cnsToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \else\if@ksfont - \externalocp\OCPuniKS=Utf8cnsToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \else - \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 - \fi\fi\fi\fi + \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 } \DeclareOption{utf8jis}{ - \if@gbfont - \externalocp\OCPuniGB=Utf8jisToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \else\if@cnsfont - \externalocp\OCPuniCNS=Utf8jisToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \else\if@jisfont - \externalocp\OCPuniJIS=Utf8jisToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \else\if@ksfont - \externalocp\OCPuniKS=Utf8jisToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \else - \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 - \fi\fi\fi\fi + \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 } \DeclareOption{utf8ks}{ - \if@gbfont - \externalocp\OCPuniGB=Utf8ksToUniGB {} - \ocplist\uniGB= - \addbeforeocplist 1 \OCPuniGB - \nullocplist - \else\if@cnsfont - \externalocp\OCPuniCNS=Utf8ksToUniCNS {} - \ocplist\uniCNS= - \addbeforeocplist 1 \OCPuniCNS - \nullocplist - \else\if@jisfont - \externalocp\OCPuniJIS=Utf8ksToUniJIS {} - \ocplist\uniJIS= - \addbeforeocplist 1 \OCPuniJIS - \nullocplist - \else\if@ksfont - \externalocp\OCPuniKS=Utf8ksToUniKS {} - \ocplist\uniKS= - \addbeforeocplist 1 \OCPuniKS - \nullocplist - \else - \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 - \fi\fi\fi\fi + \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 +} + +\DeclareOption{gbfont}{ + \AtBeginDocument{ + \GBfont + } +} +\DeclareOption{cnsfont}{ + \AtBeginDocument{ + \CNSfont + } +} +\DeclareOption{jisfont}{ + \AtBeginDocument{ + \JISfont + } +} +\DeclareOption{ksfont}{ + \AtBeginDocument{ + \KSfont + } +} +\DeclareOption{multifont}{ + \AtBeginDocument{ + \Multifont + } } \ocp\CJKbreak=cjkbreak @@ -241,7 +159,7 @@ \pushocplist\inutf } -%%%%% dummy %%%%% +%%%%% to use KAGE server %%%%% \externalocp\OCPmkfont=makefonts.pl {} \ocplist\mkfontOCP= \addbeforeocplist 1 \OCPmkfont @@ -265,6 +183,7 @@ \newenvironment{GBfont}{\pushocplist\uniGB\selectgbsfont}{\pushocplist\inutf} \newenvironment{KSfont}{\pushocplist\uniKS\selectksxfont}{\pushocplist\inutf} \newenvironment{CNSfont}{\pushocplist\uniCNS\selectcnsfont}{\pushocplist\inutf} +\newenvironment{Multifont}{\pushocplist\uniMulti}{\pushocplist\inutf} \newcommand{\jisfont}[1]{\begingroup% \pushocplist\uniJIS\selectjisfont #1\endgroup} @@ -274,12 +193,171 @@ \pushocplist\uniKS\selectksxfont #1\endgroup} \newcommand{\cnsfont}[1]{\begingroup% \pushocplist\uniCNS\selectcnsfont #1\endgroup} +\newcommand{\multifont}[1]{\begingroup% + \pushocplist\uniMulti #1\endgroup} \newcommand{\noncjk}[1]{\begingroup% \normalfont\pushocplist\inutf #1\endgroup} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Font Declaration % ---------------- +%% omgbs +\DeclareFontFamily{OT1}{omgbs}{} +\DeclareFontShape{OT1}{omgbs}{m}{n}{ + <->omgbs +}{} +\DeclareFontShape{OT1}{omgbs}{m}{sc}{ + <-> ssub * omgbs/m/n +}{} +\DeclareFontShape{OT1}{omgbs}{m}{it}{ + <->omgb +}{} +\DeclareFontShape{OT1}{omgbs}{m}{sl}{ + <-> ssub * omgbs/m/it +}{} +\DeclareFontShape{OT1}{omgbs}{m}{itsc}{ + <-> ssub * omgbs/m/it +}{} +\DeclareFontShape{OT1}{omgbs}{m}{slsc}{ + <-> ssub * omgbs/m/it +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{n}{ + <->omgbsgt +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{sc}{ + <-> ssub * omgbs/bx/n +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{it}{ + <->omgbsgt +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{itsc}{ + <-> ssub * omgbs/bx/it +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{sl}{ + <-> ssub * omgbs/bx/it +}{} +\DeclareFontShape{OT1}{omgbs}{bx}{slsc}{ + <-> ssub * omgbs/bx/it +}{} + +%% omcns +\DeclareFontFamily{OT1}{omcns}{} +\DeclareFontShape{OT1}{omcns}{m}{n}{ + <->omcns +}{} +\DeclareFontShape{OT1}{omcns}{m}{sc}{ + <-> ssub * omcns/m/n +}{} +\DeclareFontShape{OT1}{omcns}{m}{it}{ + <->omcns +}{} +\DeclareFontShape{OT1}{omcns}{m}{sl}{ + <-> ssub * omcns/m/it +}{} +\DeclareFontShape{OT1}{omcns}{m}{itsc}{ + <-> ssub * omcns/m/it +}{} +\DeclareFontShape{OT1}{omcns}{m}{slsc}{ + <-> ssub * omcns/m/it +}{} +\DeclareFontShape{OT1}{omcns}{bx}{n}{ + <->omcnsgt +}{} +\DeclareFontShape{OT1}{omcns}{bx}{sc}{ + <-> ssub * omcns/bx/n +}{} +\DeclareFontShape{OT1}{omcns}{bx}{it}{ + <->omcnsgt +}{} +\DeclareFontShape{OT1}{omcns}{bx}{itsc}{ + <-> ssub * omcns/bx/it +}{} +\DeclareFontShape{OT1}{omcns}{bx}{sl}{ + <-> ssub * omcns/bx/it +}{} +\DeclareFontShape{OT1}{omcns}{bx}{slsc}{ + <-> ssub * omcns/bx/it +}{} + +%% +\DeclareFontFamily{OT1}{omjis}{} +\DeclareFontShape{OT1}{omjis}{m}{n}{ + <->omjis +}{} +\DeclareFontShape{OT1}{omjis}{m}{sc}{ + <-> ssub * omjis/m/n +}{} +\DeclareFontShape{OT1}{omjis}{m}{it}{ + <->omjis +}{} +\DeclareFontShape{OT1}{omjis}{m}{sl}{ + <-> ssub * omjis/m/it +}{} +\DeclareFontShape{OT1}{omjis}{m}{itsc}{ + <-> ssub * omjis/m/it +}{} +\DeclareFontShape{OT1}{omjis}{m}{slsc}{ + <-> ssub * omjis/m/it +}{} +\DeclareFontShape{OT1}{omjis}{bx}{n}{ + <->omjisgt +}{} +\DeclareFontShape{OT1}{omjis}{bx}{sc}{ + <-> ssub * omjis/bx/n +}{} +\DeclareFontShape{OT1}{omjis}{bx}{it}{ + <->omjisgt +}{} +\DeclareFontShape{OT1}{omjis}{bx}{itsc}{ + <-> ssub * omjis/bx/it +}{} +\DeclareFontShape{OT1}{omjis}{bx}{sl}{ + <-> ssub * omjis/bx/it +}{} +\DeclareFontShape{OT1}{omjis}{bx}{slsc}{ + <-> ssub * omjis/bx/it +}{} + +%% omksx +\DeclareFontFamily{OT1}{omksx}{} +\DeclareFontShape{OT1}{omksx}{m}{n}{ + <->omksx +}{} +\DeclareFontShape{OT1}{omksx}{m}{sc}{ + <-> ssub * omksx/m/n +}{} +\DeclareFontShape{OT1}{omksx}{m}{it}{ + <->omksx +}{} +\DeclareFontShape{OT1}{omksx}{m}{sl}{ + <-> ssub * omksx/m/it +}{} +\DeclareFontShape{OT1}{omksx}{m}{itsc}{ + <-> ssub * omksx/m/it +}{} +\DeclareFontShape{OT1}{omksx}{m}{slsc}{ + <-> ssub * omksx/m/it +}{} +\DeclareFontShape{OT1}{omksx}{bx}{n}{ + <->omksxgt +}{} +\DeclareFontShape{OT1}{omksx}{bx}{sc}{ + <-> ssub * omksx/bx/n +}{} +\DeclareFontShape{OT1}{omksx}{bx}{it}{ + <->omksxgt +}{} +\DeclareFontShape{OT1}{omksx}{bx}{itsc}{ + <-> ssub * omksx/bx/it +}{} +\DeclareFontShape{OT1}{omksx}{bx}{sl}{ + <-> ssub * omksx/bx/it +}{} +\DeclareFontShape{OT1}{omksx}{bx}{slsc}{ + <-> ssub * omksx/bx/it +}{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareFontFamily{OT1}{chise000}{} \DeclareFontShape{OT1}{chise000}{m}{n}{ <-> [.96] chise000min -- 1.7.10.4