2
%% This is file `ekanji.sty' for eKanji fonts
3
%% by Hirotsugu Kakugawa (h.kakugwa@computer.org)
5
\NeedsTeXFormat{LaTeX2e}%
6
\ProvidesPackage{ekanji}[1999/12/07 ver 1.0]%
8
\DeclareKanjiEncodingDefaults{}{}
9
\DeclareYokoKanjiEncoding{JY1}{ekan}{}
10
\DeclareTateKanjiEncoding{JT1}{ekan}{}
13
\newcommand{\EKU}[1]{\ek@char{#1}{10}}
15
\newcommand{\EKK}[1]{\ek@char{#1}{20}}
17
\newcommand{\EKM}[1]{\ek@char{#1}{30}}
20
\newcommand{\ek@char}[2]{%
21
\@tempcnta#1\relax\advance\@tempcnta-1\relax\divide\@tempcnta5640\relax%
23
\xdef\ek@block{0\the\@tempcnta}%
25
\xdef\ek@block{\the\@tempcnta}%
28
\multiply\@tempcntb5640\relax\@tempcntb-\@tempcntb%
29
\@tempcnta#1\relax\advance\@tempcnta-1\relax\advance\@tempcntb\@tempcnta%
30
\xdef\ek@inblock{\the\@tempcntb}%
31
%\typeout{\ek@block, \ek@inblock}
32
\ek@@char{\ek@inblock}%
33
%\typeout{0x\ek@Ku\ek@Ten}
35
\kanjiencoding{JT1}\kanjifamily{ekan}%
36
\kanjishape{#2\ek@block}\kanjiseries{m}%
38
\kanjiencoding{JY1}\kanjifamily{ekan}%
39
\kanjishape{#2\ek@block}\kanjiseries{m}%
41
\selectfont\char\kuten"\ek@Ku\ek@Ten\relax}%
44
\newcommand{\ek@@char}[1]{%
46
\@tempcnta#1\relax\divide\@tempcnta94\relax%
48
\multiply\@tempcntb94\relax\@tempcntb-\@tempcntb\advance\@tempcntb#1%
50
\advance\@tempcnta16\relax%
52
\advance\@tempcnta18\relax%
54
\advance\@tempcntb1\relax%
55
%\typeout{Font \ek@block, Row \the\@tempcnta, Cell \the\@tempcntb}%
56
\ek@dtoh{\the\@tempcnta}\xdef\ek@Ku{\ek@hexH\ek@hexL}%
57
\ek@dtoh{\the\@tempcntb}\xdef\ek@Ten{\ek@hexH\ek@hexL}%
60
\newcommand{\ek@dtoh}[1]{%
62
\@tempcnta#1\relax\@tempcntb#1\relax%
63
\divide\@tempcntb16\relax%
64
\xdef\ek@hexH{\ek@@dtoh{\the\@tempcntb}}%
65
\multiply\@tempcntb16\relax\@tempcntb-\@tempcntb\advance\@tempcntb\@tempcnta%
66
\xdef\ek@hexL{\ek@@dtoh{\the\@tempcntb}}%
69
\newcommand{\ek@@dtoh}[1]{%
71
0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or%
72
8\or 9\or A\or B\or C\or D\or E\or F%