% hfontplain.tex -- HLaTeX font use for plain TeX.    -*-plain-tex-*-
% Copyright (C) 1996, 1997 Changwoo Ryu

% This program is free software; you can redistribute it and'or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.

% this program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA */

% Written by Changwoo Ryu <cwryu@eve.kaist.ac.kr>. */

\message{Package for using HLaTeX font in plain TeX [version 0.4]:}

% Some codes are come from nfont.tex in n3ftex package written 
% by Lee yongjae <setup@arirang.snu.ac.kr>

\newcount\KOstate
\KOstate = -1
\newcount\KOtemp
\newcount\KOtemptwo
\newcount\KOtempthree

% set catcodes of KSC-5601 (0xa1 ~ 0xfe) to active.
\def\KOactivate{%
  \KOtemp=161
  \loop
  \chardef\kchar=\KOtemp
  \catcode\kchar=13
  \advance\KOtemp by 1\ifnum\KOtemp<254
  \repeat}

% set catcodes of KSC-5601 (0xa1 ~ 0xfe) to letter.
\def\KOdeactivate{%
  \KOtemp=161
  \loop
  \chardef\kchar=\KOtemp
  \catcode\kchar=11
  \advance\KOtemp by 1\ifnum\KOtemp<254
  \repeat}

\def\KOcode#1.{%
  \ifnum \KOstate < 0%
    \KOstate = #1%
    \multiply\KOstate by 94\relax
  \else
    \KOtemp = #1%
    % KSC 5601 8836°³Áß ¸î¹øÂ°ÀÎ°¡
    \advance\KOtemp by \KOstate \relax%
    \KOtemptwo = \KOtemp
    \KOstate = -1%
    %
    % KSC 5601 ÄÚµå ¿µ¿ª ºÐ¸®
    % 0xa1a1 ~ 0xacfe 0 ¹øÂ°ºÎÅÍ 1127 ¹øÂ°±îÁö 1128°³ ºÎÈ£, ÀÏº»¾î, ·¯½Ã¾Æ¾î µî
    % 0xb0a1 ~ 0xc8fe 1410 ¹øÂ°ºÎÅÍ 3759 ¹øÂ°±îÁö 2350°³ ÇÑ±Û
    % 0xcaa1 ~ 0xfdfe 3854 ¹øÂ°ºÎÅÍ 8741 ¹øÂ°±îÁö 4888°³ ÇÑÀÚ
    \ifnum \KOtemptwo < 1128%
      \KOsymbolchar\KOtemptwo
    \else\ifnum \KOtemptwo <3760%
      \advance\KOtemptwo by -1410%
      \KOhangulchar\KOtemptwo
    \else\ifnum \KOtemptwo < 8741%
      \advance \KOtemptwo by -3854%
      \KOhanjachar\KOtemp
    \fi\fi\fi
  \fi}

\def\KOhangulchar#1{{%
  \KOtempthree = #1%
  \KOtemptwo = #1%
  \divide\KOtemptwo by 256%
    \KOsethangulfont\KOtemptwo
    \multiply\KOtemptwo by -256%
    \advance\KOtemptwo by \KOtempthree%
    \char\KOtemptwo%
    \hskip 0pt plus 0pt}}

\def\KOsethangulfont#1{
  \ifcase #1%
  \KOhangulfontA\or\KOhangulfontB\or\KOhangulfontC\or\KOhangulfontD\or
  \KOhangulfontE\or\KOhangulfontF\or\KOhangulfontG\or\KOhangulfontH\or
  \KOhangulfontI\else\KOhangulfontJ
  \fi}

\def\KOhanjachar#1{{%
  \KOtempthree = #1%
  \KOtemptwo = #1%
  \divide\KOtemptwo by 256%
    \KOsethanjafont\KOtemptwo
    \multiply\KOtemptwo by -256%
    \advance\KOtemptwo by \KOtempthree%
    \char\KOtemptwo}}

\def\KOsethanjafont#1{%
  \ifcase #1%
  \KOhanjafontA\or\KOhanjafontB\or\KOhanjafontC\or\KOhanjafontD\or
  \KOhanjafontE\or\KOhanjafontF\or\KOhanjafontG\or\KOhanjafontH\or
  \KOhanjafontI\or\KOhanjafontJ\or\KOhanjafontK\or\KOhanjafontL\or
  \KOhanjafontM\or\KOhanjafontN\or\KOhanjafontO\or\KOhanjafontP\or
  \KOhanjafontQ\or\KOhanjafontR\or\KOhanjafontS\else\KOhanjafontT
  \fi}

\def\KOsymbolchar#1{{%
  \KOtempthree = #1%
  \KOtemptwo = #1%
  \advance\KOtemptwo by -282%
  \KOsetsymbolfont
  \char\KOtemptwo}}

\def\KOsetsymbolfont{%
  \KOsymbolfontK}

\def\KOcodeAOne{^^a1}
\def\KOcodeATwo{^^a2}  
\def\KOcodeAThree{^^a3}  
\def\KOcodeAFour{^^a4}
\def\KOcodeAFive{^^a5} 
\def\KOcodeASix{^^a6} 
\def\KOcodeASeven{^^a7}  
\def\KOcodeAEight{^^a8}
\def\KOcodeANine{^^a9}
\def\KOcodeAA{^^aa} 
\def\KOcodeAB{^^ab}     
\def\KOcodeAC{^^ac}    
\def\KOcodeAD{^^ad}    
\def\KOcodeAE{^^ae}
\def\KOcodeAF{^^af}    
\def\KOcodeBZero{^^b0}
\def\KOcodeBOne{^^b1} 
\def\KOcodeBTwo{^^b2}  
\def\KOcodeBThree{^^b3}  
\def\KOcodeBFour{^^b4}
\def\KOcodeBFive{^^b5} 
\def\KOcodeBSix{^^b6} 
\def\KOcodeBSeven{^^b7}  
\def\KOcodeBEight{^^b8}
\def\KOcodeBNine{^^b9}
\def\KOcodeBA{^^ba} 
\def\KOcodeBB{^^bb}    
\def\KOcodeBC{^^bc}    
\def\KOcodeBD{^^bd}    
\def\KOcodeBE{^^be}    
\def\KOcodeBF{^^bf}    
\def\KOcodeCZero{^^c0}
\def\KOcodeCOne{^^c1} 
\def\KOcodeCTwo{^^c2}  
\def\KOcodeCThree{^^c3}  
\def\KOcodeCFour{^^c4}
\def\KOcodeCFive{^^c5} 
\def\KOcodeCSix{^^c6} 
\def\KOcodeCSeven{^^c7}  
\def\KOcodeCEight{^^c8}
\def\KOcodeCNine{^^c9}
\def\KOcodeCA{^^ca} 
\def\KOcodeCB{^^cb}    
\def\KOcodeCC{^^cc}    
\def\KOcodeCD{^^cd}    
\def\KOcodeCE{^^ce}    
\def\KOcodeCF{^^cf}    
\def\KOcodeDZero{^^d0}
\def\KOcodeDOne{^^d1} 
\def\KOcodeDTwo{^^d2}  
\def\KOcodeDThree{^^d3}  
\def\KOcodeDFour{^^d4}
\def\KOcodeDFive{^^d5} 
\def\KOcodeDSix{^^d6} 
\def\KOcodeDSeven{^^d7}  
\def\KOcodeDEight{^^d8}
\def\KOcodeDNine{^^d9}
\def\KOcodeDA{^^da} 
\def\KOcodeDB{^^db}    
\def\KOcodeDC{^^dc}    
\def\KOcodeDD{^^dd}    
\def\KOcodeDE{^^de}    
\def\KOcodeDF{^^df}    
\def\KOcodeEZero{^^e0}
\def\KOcodeEOne{^^e1} 
\def\KOcodeETwo{^^e2}  
\def\KOcodeEThree{^^e3}  
\def\KOcodeEFour{^^e4}
\def\KOcodeEFive{^^e5} 
\def\KOcodeESix{^^e6} 
\def\KOcodeESeven{^^e7}  
\def\KOcodeEEight{^^e8}
\def\KOcodeENine{^^e9}
\def\KOcodeEA{^^ea} 
\def\KOcodeEB{^^eb}    
\def\KOcodeEC{^^ec}    
\def\KOcodeED{^^ed}    
\def\KOcodeEE{^^ee}    
\def\KOcodeEF{^^ef}    
\def\KOcodeFZero{^^f0}
\def\KOcodeFOne{^^f1} 
\def\KOcodeFTwo{^^f2}  
\def\KOcodeFThree{^^f3}  
\def\KOcodeFFour{^^f4}
\def\KOcodeFFive{^^f5} 
\def\KOcodeFSix{^^f6} 
\def\KOcodeFSeven{^^f7}  
\def\KOcodeFEight{^^f8}
\def\KOcodeFNine{^^f9}
\def\KOcodeFA{^^fa} 
\def\KOcodeFB{^^fb}       
\def\KOcodeFC{^^fc}    
\def\KOcodeFD{^^fd}    
\def\KOcodeFE{^^fe}   

\KOactivate

\def\KOon{%
  \def^^a1{\KOcode0.}\def^^a2{\KOcode1.}\def^^a3{\KOcode2.}%
  \def^^a4{\KOcode3.}\def^^a5{\KOcode4.}\def^^a6{\KOcode5.}%
  \def^^a7{\KOcode6.}\def^^a8{\KOcode7.}\def^^a9{\KOcode8.}%
  \def^^aa{\KOcode9.}\def^^ab{\KOcode10.}\def^^ac{\KOcode11.}%
  \def^^ad{\KOcode12.}\def^^ae{\KOcode13.}\def^^af{\KOcode14.}%
  \def^^b0{\KOcode15.}\def^^b1{\KOcode16.}\def^^b2{\KOcode17.}%
  \def^^b3{\KOcode18.}\def^^b4{\KOcode19.}\def^^b5{\KOcode20.}%
  \def^^b6{\KOcode21.}\def^^b7{\KOcode22.}\def^^b8{\KOcode23.}%
  \def^^b9{\KOcode24.}\def^^ba{\KOcode25.}\def^^bb{\KOcode26.}%
  \def^^bc{\KOcode27.}\def^^bd{\KOcode28.}\def^^be{\KOcode29.}%
  \def^^bf{\KOcode30.}\def^^c0{\KOcode31.}\def^^c1{\KOcode32.}%
  \def^^c2{\KOcode33.}\def^^c3{\KOcode34.}\def^^c4{\KOcode35.}%
  \def^^c5{\KOcode36.}\def^^c6{\KOcode37.}\def^^c7{\KOcode38.}%
  \def^^c8{\KOcode39.}\def^^c9{\KOcode40.}\def^^ca{\KOcode41.}%
  \def^^cb{\KOcode42.}\def^^cc{\KOcode43.}\def^^cd{\KOcode44.}%
  \def^^ce{\KOcode45.}\def^^cf{\KOcode46.}\def^^d0{\KOcode47.}%
  \def^^d1{\KOcode48.}\def^^d2{\KOcode49.}\def^^d3{\KOcode50.}%
  \def^^d4{\KOcode51.}\def^^d5{\KOcode52.}\def^^d6{\KOcode53.}%
  \def^^d7{\KOcode54.}\def^^d8{\KOcode55.}\def^^d9{\KOcode56.}%
  \def^^da{\KOcode57.}\def^^db{\KOcode58.}\def^^dc{\KOcode59.}%
  \def^^dd{\KOcode60.}\def^^de{\KOcode61.}\def^^df{\KOcode62.}%
  \def^^e0{\KOcode63.}\def^^e1{\KOcode64.}\def^^e2{\KOcode65.}%
  \def^^e3{\KOcode66.}\def^^e4{\KOcode67.}\def^^e5{\KOcode68.}%
  \def^^e6{\KOcode69.}\def^^e7{\KOcode70.}\def^^e8{\KOcode71.}%
  \def^^e9{\KOcode72.}\def^^ea{\KOcode73.}\def^^eb{\KOcode74.}%
  \def^^ec{\KOcode75.}\def^^ed{\KOcode76.}\def^^ee{\KOcode77.}%
  \def^^ef{\KOcode78.}\def^^f0{\KOcode79.}\def^^f1{\KOcode80.}%
  \def^^f2{\KOcode81.}\def^^f3{\KOcode82.}\def^^f4{\KOcode83.}%
  \def^^f5{\KOcode84.}\def^^f6{\KOcode85.}\def^^f7{\KOcode86.}%
  \def^^f8{\KOcode87.}\def^^f9{\KOcode88.}\def^^fa{\KOcode89.}%
  \def^^fb{\KOcode90.}\def^^fc{\KOcode91.}\def^^fd{\KOcode92.}%
  \def^^fe{\KOcode93.}}



\def\KOoff{%
  \edef^^a1{\KOcodeAOne}%
  \edef^^a2{\KOcodeATwo}%
  \edef^^a3{\KOcodeAThree}%
  \edef^^a4{\KOcodeAFour}%
  \edef^^a5{\KOcodeAFive}%
  \edef^^a6{\KOcodeASix}%
  \edef^^a7{\KOcodeASeven}%
  \edef^^a8{\KOcodeAEight}%
  \edef^^a9{\KOcodeANine}%
  \edef^^aa{\KOcodeAA}%
  \edef^^ab{\KOcodeAB}%
  \edef^^ac{\KOcodeAC}%
  \edef^^ad{\KOcodeAD}%
  \edef^^ae{\KOcodeAE}%
  \edef^^af{\KOcodeAF}%
  \edef^^b0{\KOcodeBZero}%
  \edef^^b1{\KOcodeBOne}%
  \edef^^b2{\KOcodeBTwo}%
  \edef^^b3{\KOcodeBThree}%
  \edef^^b4{\KOcodeBFour}%
  \edef^^b5{\KOcodeBFive}%
  \edef^^b6{\KOcodeBSix}%
  \edef^^b7{\KOcodeBSeven}%
  \edef^^b8{\KOcodeBEight}%
  \edef^^b9{\KOcodeBNine}%
  \edef^^ba{\KOcodeBA}%
  \edef^^bb{\KOcodeBB}%
  \edef^^bc{\KOcodeBC}%
  \edef^^bd{\KOcodeBD}%
  \edef^^be{\KOcodeBE}%
  \edef^^bf{\KOcodeBF}%
  \edef^^c0{\KOcodeCZero}%
  \edef^^c1{\KOcodeCOne}%
  \edef^^c2{\KOcodeCTwo}%
  \edef^^c3{\KOcodeCThree}%
  \edef^^c4{\KOcodeCFour}%
  \edef^^c5{\KOcodeCFive}%
  \edef^^c6{\KOcodeCSix}%
  \edef^^c7{\KOcodeCSeven}%
  \edef^^c8{\KOcodeCEight}%
  \edef^^c9{\KOcodeCNine}%
  \edef^^ca{\KOcodeCA}%
  \edef^^cb{\KOcodeCB}%
  \edef^^cc{\KOcodeCC}%
  \edef^^cd{\KOcodeCD}%
  \edef^^ce{\KOcodeCE}%
  \edef^^cf{\KOcodeCF}%
  \edef^^d0{\KOcodeDZero}%
  \edef^^d1{\KOcodeDOne}%
  \edef^^d2{\KOcodeDTwo}%
  \edef^^d3{\KOcodeDThree}%
  \edef^^d4{\KOcodeDFour}%
  \edef^^d5{\KOcodeDFive}%
  \edef^^d6{\KOcodeDSix}%
  \edef^^d7{\KOcodeDSeven}%
  \edef^^d8{\KOcodeDEight}%
  \edef^^d9{\KOcodeDNine}%
  \edef^^da{\KOcodeDA}%
  \edef^^db{\KOcodeDB}%
  \edef^^dc{\KOcodeDC}%
  \edef^^dd{\KOcodeDD}%
  \edef^^de{\KOcodeDE}%
  \edef^^df{\KOcodeDF}%
  \edef^^e0{\KOcodeEZero}%
  \edef^^e1{\KOcodeEOne}%
  \edef^^e2{\KOcodeETwo}%
  \edef^^e3{\KOcodeEThree}%
  \edef^^e4{\KOcodeEFour}%
  \edef^^e5{\KOcodeEFive}%
  \edef^^e6{\KOcodeESix}%
  \edef^^e7{\KOcodeESeven}%
  \edef^^e8{\KOcodeEEight}%
  \edef^^e9{\KOcodeENine}%
  \edef^^ea{\KOcodeEA}%
  \edef^^eb{\KOcodeEB}%
  \edef^^ec{\KOcodeEC}%
  \edef^^ed{\KOcodeED}%
  \edef^^ee{\KOcodeEE}%
  \edef^^ef{\KOcodeEF}%
  \edef^^f0{\KOcodeFZero}%
  \edef^^f1{\KOcodeFOne}%
  \edef^^f2{\KOcodeFTwo}%
  \edef^^f3{\KOcodeFThree}%
  \edef^^f4{\KOcodeFFour}%
  \edef^^f5{\KOcodeFFive}%
  \edef^^f6{\KOcodeFSix}%
  \edef^^f7{\KOcodeFSeven}%
  \edef^^f8{\KOcodeFEight}%
  \edef^^f9{\KOcodeFNine}%
  \edef^^fa{\KOcodeFA}%
  \edef^^fb{\KOcodeFB}%
  \edef^^fc{\KOcodeFC}%
  \edef^^fd{\KOcodeFD}%
  \edef^^fe{\KOcodeFE}}%


% TeXÀÇ 256ÆùÆ® Á¦ÇÑ¶§¹®¿¡ ²À ¾²ÀÌ´Â ÆùÆ®¸¸ loadÇÏµµ·Ï ÇÔ.  256 ÆùÆ®
% Á¦ÇÑÀ» ³ÑÁö ¾Ê±â¸¦ ±âµµÇÏ±â¸¦...
% `TeX in Practice' I±Ç 265ÆäÀÌÁö ÂüÁ¶.

\def\KOfontondemand#1#2#3{%
  \def#1{\global\font#1=#2 scaled #3\relax
    \wlog{Korean Font On Demand: #2 scaled #3}%
    #1}%
}
 
\def\KOfontopen#1#2#3#4{%
  \expandafter\KOfontondemand\expandafter{\csname#1#3\endcsname}{#2#3}{#4}}

\def\KOhangulfontsetopen#1#2#3{%
  \KOfontopen{#1}{#2}{0}{#3}%
  \KOfontopen{#1}{#2}{1}{#3}%
  \KOfontopen{#1}{#2}{2}{#3}%
  \KOfontopen{#1}{#2}{3}{#3}%
  \KOfontopen{#1}{#2}{4}{#3}%
  \KOfontopen{#1}{#2}{5}{#3}%
  \KOfontopen{#1}{#2}{6}{#3}%
  \KOfontopen{#1}{#2}{7}{#3}%
  \KOfontopen{#1}{#2}{8}{#3}%
  \KOfontopen{#1}{#2}{9}{#3}%
  %
  \expandafter\def\csname #1\endcsname{%
    \def\KOhangulfontA{\csname#10\endcsname}%
    \def\KOhangulfontB{\csname#11\endcsname}%
    \def\KOhangulfontC{\csname#12\endcsname}%
    \def\KOhangulfontD{\csname#13\endcsname}%
    \def\KOhangulfontE{\csname#14\endcsname}%
    \def\KOhangulfontF{\csname#15\endcsname}%
    \def\KOhangulfontG{\csname#16\endcsname}%
    \def\KOhangulfontH{\csname#17\endcsname}%
    \def\KOhangulfontI{\csname#18\endcsname}%
    \def\KOhangulfontJ{\csname#19\endcsname}}%
}

\def\KOhanjafontsetopen#1#2#3{%
  \KOfontopen{#1}{#2}{10}{#3}%
  \KOfontopen{#1}{#2}{11}{#3}%
  \KOfontopen{#1}{#2}{12}{#3}%
  \KOfontopen{#1}{#2}{13}{#3}%
  \KOfontopen{#1}{#2}{14}{#3}%
  \KOfontopen{#1}{#2}{15}{#3}%
  \KOfontopen{#1}{#2}{16}{#3}%
  \KOfontopen{#1}{#2}{17}{#3}%
  \KOfontopen{#1}{#2}{18}{#3}%
  \KOfontopen{#1}{#2}{19}{#3}%
  \KOfontopen{#1}{#2}{20}{#3}%
  \KOfontopen{#1}{#2}{21}{#3}%
  \KOfontopen{#1}{#2}{22}{#3}%
  \KOfontopen{#1}{#2}{23}{#3}%
  \KOfontopen{#1}{#2}{24}{#3}%
  \KOfontopen{#1}{#2}{25}{#3}%
  \KOfontopen{#1}{#2}{26}{#3}%
  \KOfontopen{#1}{#2}{27}{#3}%
  \KOfontopen{#1}{#2}{28}{#3}%
  \KOfontopen{#1}{#2}{29}{#3}%
  %
  \expandafter\def\csname #1\endcsname{%
    \def\KOhanjafontA{\csname#110\endcsname}%
    \def\KOhanjafontB{\csname#111\endcsname}%
    \def\KOhanjafontC{\csname#112\endcsname}%
    \def\KOhanjafontD{\csname#113\endcsname}%
    \def\KOhanjafontE{\csname#114\endcsname}%
    \def\KOhanjafontF{\csname#115\endcsname}%
    \def\KOhanjafontG{\csname#116\endcsname}%
    \def\KOhanjafontH{\csname#117\endcsname}%
    \def\KOhanjafontI{\csname#118\endcsname}%
    \def\KOhanjafontJ{\csname#119\endcsname}%
    \def\KOhanjafontK{\csname#120\endcsname}%
    \def\KOhanjafontL{\csname#121\endcsname}%
    \def\KOhanjafontM{\csname#122\endcsname}%
    \def\KOhanjafontN{\csname#123\endcsname}%
    \def\KOhanjafontO{\csname#124\endcsname}%
    \def\KOhanjafontP{\csname#125\endcsname}%
    \def\KOhanjafontQ{\csname#126\endcsname}%
    \def\KOhanjafontR{\csname#127\endcsname}%
    \def\KOhanjafontS{\csname#128\endcsname}%
    \def\KOhanjafontT{\csname#129\endcsname}}%
}

\def\KOsymbolfontsetopen#1#2#3{%
  \KOfontopen{#1}{#2}{10}{#3}%
  %
  \expandafter\def\csname #1\endcsname{%
    \def\KOsymbolfontK{\csname #104\endcsname}}%
}

% ¹ÞÄ§ÀÌ ¾øÀ¸¸é #1, ÀÖÀ¸¸é #2
\def\KOchosa#1#2{%
  \ifnum\KOtemp < 1410\else % 0xb0a1(1410) ~ 0xc8fe(3759) ÇÑ±Û¸¸ °¡´É
  \ifnum\KOtemp > 3759\else %
  %
  \ifnum\KOtemp < 2914
    \ifnum\KOtemp < 2162
      \ifnum\KOtemp < 1786
        \ifnum\KOtemp < 1598
          \ifnum\KOtemp < 1504
            %% 1410 ~ 1503 (0xb0a1 ~ 0xb0fe)
            \ifnum\KOtemp = 1410 #1% °¡
            \else\ifnum\KOtemp = 1428 #1% °³
            \else\ifnum\KOtemp = 1437 #1% °¼
            \else\ifnum\KOtemp = 1443 #1% °Â
            \else\ifnum\KOtemp = 1446 #1% °Å
            \else\ifnum\KOtemp = 1461 #1% °Ô
            \else\ifnum\KOtemp = 1469 #1% °Ü
            \else\ifnum\KOtemp = 1481 #1% °è
            \else\ifnum\KOtemp = 1486 #1% °í 
            \else\ifnum\KOtemp = 1499 #1% °ú
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 1504 ~ 1597 (0xb1a1 ~ 0xb1fe)
            \ifnum\KOtemp = 1508 #1% ±¥
            \else\ifnum\KOtemp = 1514 #1%±«
            \else\ifnum\KOtemp = 1522 #1%±³
            \else\ifnum\KOtemp = 1527 #1%±¸
            \else\ifnum\KOtemp = 1540 #1%±Å
            \else\ifnum\KOtemp = 1546 #1%±Ë
            \else\ifnum\KOtemp = 1548 #1%±Í
            \else\ifnum\KOtemp = 1555 #1%±Ô
            \else\ifnum\KOtemp = 1558 #1%±×
            \else\ifnum\KOtemp = 1568 #1%±á
            \else\ifnum\KOtemp = 1569 #1%±â
            \else\ifnum\KOtemp = 1581 #1%±î
            \else\ifnum\KOtemp = 1593 #1%±ú
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \else % \ifnum\KOtemp < 1598
          \ifnum\KOtemp < 1692
            %% 1598 ~ 1691 (0xb2a1 ~ 0xb2fe)
            \ifnum\KOtemp = 1602 #1%²¥
            \else\ifnum\KOtemp = 1605 #1%²¨
            \else\ifnum\KOtemp = 1615 #1%²²
            \else\ifnum\KOtemp = 1621 #1%²¸
            \else\ifnum\KOtemp = 1627 #1%²¾
            \else\ifnum\KOtemp = 1628 #1%²¿
            \else\ifnum\KOtemp = 1639 #1%²Ê
            \else\ifnum\KOtemp = 1644 #1%²Ï
            \else\ifnum\KOtemp = 1647 #1%²Ò
            \else\ifnum\KOtemp = 1653 #1%²Ø
            \else\ifnum\KOtemp = 1654 #1%²Ù
            \else\ifnum\KOtemp = 1664 #1%²ã
            \else\ifnum\KOtemp = 1668 #1%²ç
            \else\ifnum\KOtemp = 1675 #1%²î
            \else\ifnum\KOtemp = 1680 #1%²ó
            \else\ifnum\KOtemp = 1681 #1%²ô
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 1692 ~ 1785 (0xb3a1 ~ 0xb3fe)
            \ifnum\KOtemp = 1693 #1%³¢
            \else\ifnum\KOtemp = 1701 #1%³ª
            \else\ifnum\KOtemp = 1718 #1%³»
            \else\ifnum\KOtemp = 1727 #1%³Ä
            \else\ifnum\KOtemp = 1733 #1%³Ê
            \else\ifnum\KOtemp = 1746 #1%³×
            \else\ifnum\KOtemp = 1755 #1%³à
            \else\ifnum\KOtemp = 1764 #1%³é
            \else\ifnum\KOtemp = 1766 #1%³ë
            \else\ifnum\KOtemp = 1777 #1%³ö
            \else\ifnum\KOtemp = 1781 #1%³ú
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \fi
      \else % \ifnum\KOtemp < 1786
        \ifnum\KOtemp < 1974
          \ifnum\KOtemp < 1880
            %% 1786 ~ 1879 (0xb4a1 ~ 0xb4fe)
            \ifnum\KOtemp = 1787 #1%´¢
            \else\ifnum\KOtemp = 1794 #1%´©
            \else\ifnum\KOtemp = 1803 #1%´²
            \else\ifnum\KOtemp = 1805 #1%´´
            \else\ifnum\KOtemp = 1806 #1%´µ
            \else\ifnum\KOtemp = 1817 #1%´À
            \else\ifnum\KOtemp = 1829 #1%´Ì
            \else\ifnum\KOtemp = 1832 #1%´Ï
            \else\ifnum\KOtemp = 1842 #1%´Ù
            \else\ifnum\KOtemp = 1860 #1%´ë
            \else\ifnum\KOtemp = 1869 #1%´ô
            \else\ifnum\KOtemp = 1870 #1%´õ
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 1880 ~ 1973 (0xb5a1 ~ 0xb5fe)
            \ifnum\KOtemp = 1884 #1%µ¥
            \else\ifnum\KOtemp = 1893 #1%µ®
            \else\ifnum\KOtemp = 1898 #1%µ³
            \else\ifnum\KOtemp = 1900 #1%µµ
            \else\ifnum\KOtemp = 1913 #1%µÂ
            \else\ifnum\KOtemp = 1918 #1%µÇ
            \else\ifnum\KOtemp = 1924 #1%µÍ
            \else\ifnum\KOtemp = 1925 #1%µÎ
            \else\ifnum\KOtemp = 1933 #1%µÖ
            \else\ifnum\KOtemp = 1935 #1%µØ
            \else\ifnum\KOtemp = 1937 #1%µÚ
            \else\ifnum\KOtemp = 1943 #1%µà
            \else\ifnum\KOtemp = 1948 #1%µå
            \else\ifnum\KOtemp = 1958 #1%µï
            \else\ifnum\KOtemp = 1959 #1%µð
            \else\ifnum\KOtemp = 1970 #1%µû
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \else
          \ifnum\KOtemp < 2068
            %% 1974 ~ 2067 (0xb6a1 ~ 0xb6fe)
            \ifnum\KOtemp = 1980 #1%¶§
            \else\ifnum\KOtemp = 1989 #1%¶°
            \else\ifnum\KOtemp = 2001 #1%¶¼
            \else\ifnum\KOtemp = 2010 #1%¶Å
            \else\ifnum\KOtemp = 2012 #1%¶Ç
            \else\ifnum\KOtemp = 2017 #1%¶Ì
            \else\ifnum\KOtemp = 2019 #1%¶Î
            \else\ifnum\KOtemp = 2020 #1%¶Ï
            \else\ifnum\KOtemp = 2022 #1%¶Ñ
            \else\ifnum\KOtemp = 2029 #1%¶Ø
            \else\ifnum\KOtemp = 2030 #1%¶Ù
            \else\ifnum\KOtemp = 2036 #1%¶ß
            \else\ifnum\KOtemp = 2044 #1%¶ç
            \else\ifnum\KOtemp = 2049 #1%¶ì
            \else\ifnum\KOtemp = 2056 #1%¶ó
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 2068 ~ 2161 (0xb7a1 ~ 0xb7fe)
            \ifnum\KOtemp = 2068 #1%·¡
            \else\ifnum\KOtemp = 2077 #1%·ª
            \else\ifnum\KOtemp = 2082 #1%·¯
            \else\ifnum\KOtemp = 2092 #1%·¹
            \else\ifnum\KOtemp = 2100 #1%·Á
            \else\ifnum\KOtemp = 2109 #1%·Ê
            \else\ifnum\KOtemp = 2113 #1%·Î
            \else\ifnum\KOtemp = 2121 #1%·Ö
            \else\ifnum\KOtemp = 2125 #1%·Ú
            \else\ifnum\KOtemp = 2132 #1%·á
            \else\ifnum\KOtemp = 2138 #1%·ç
            \else\ifnum\KOtemp = 2146 #1%·ï
            \else\ifnum\KOtemp = 2149 #1%·ò
            \else\ifnum\KOtemp = 2156 #1%·ù
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \fi
      \fi
    \else
      \ifnum\KOtemp < 2538
        \ifnum\KOtemp < 2350
          \ifnum\KOtemp < 2256
            %% 2162 ~ 2255 (0xb8a1 ~ 0xb8fe)
            \ifnum\KOtemp = 2164 #1%¸£
            \else\ifnum\KOtemp = 2175 #1%¸®
            \else\ifnum\KOtemp = 2183 #1%¸¶
            \else\ifnum\KOtemp = 2198 #1%¸Å
            \else\ifnum\KOtemp = 2208 #1%¸Ï
            \else\ifnum\KOtemp = 2212 #1%¸Ó
            \else\ifnum\KOtemp = 2223 #1%¸Þ
            \else\ifnum\KOtemp = 2232 #1%¸ç
            \else\ifnum\KOtemp = 2240 #1%¸ï
            \else\ifnum\KOtemp = 2241 #1%¸ð
            \else\ifnum\KOtemp = 2251 #1%¸ú
            \else\ifnum\KOtemp = 2255 #1%¸þ
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 2256 ~ 2349 (0xb9a1 ~ 0xb9fe)
            \ifnum\KOtemp = 2261 #1%¹¦
            \else\ifnum\KOtemp = 2266 #1%¹«
            \else\ifnum\KOtemp = 2280 #1%¹¹
            \else\ifnum\KOtemp = 2285 #1%¹¾
            \else\ifnum\KOtemp = 2286 #1%¹¿
            \else\ifnum\KOtemp = 2289 #1%¹Â
            \else\ifnum\KOtemp = 2294 #1%¹Ç
            \else\ifnum\KOtemp = 2299 #1%¹Ì
            \else\ifnum\KOtemp = 2312 #1%¹Ù
            \else\ifnum\KOtemp = 2327 #1%¹è
            \else\ifnum\KOtemp = 2337 #1%¹ò
            \else\ifnum\KOtemp = 2341 #1%¹ö
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \else
          \ifnum\KOtemp < 2444
            %% 2350 ~ 2443 (0xbaa1 ~ 0xbafe)
            \ifnum\KOtemp = 2352 #1%º£
            \else\ifnum\KOtemp = 2362 #1%º­
            \else\ifnum\KOtemp = 2371 #1%º¶
            \else\ifnum\KOtemp = 2373 #1%º¸
            \else\ifnum\KOtemp = 2382 #1%ºÁ
            \else\ifnum\KOtemp = 2385 #1%ºÄ
            \else\ifnum\KOtemp = 2387 #1%ºÆ
            \else\ifnum\KOtemp = 2393 #1%ºÌ
            \else\ifnum\KOtemp = 2395 #1%ºÎ
            \else\ifnum\KOtemp = 2408 #1%ºÛ
            \else\ifnum\KOtemp = 2411 #1%ºÞ
            \else\ifnum\KOtemp = 2412 #1%ºß
            \else\ifnum\KOtemp = 2417 #1%ºä
            \else\ifnum\KOtemp = 2423 #1%ºê
            \else\ifnum\KOtemp = 2430 #1%ºñ
            \else\ifnum\KOtemp = 2441 #1%ºü
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 2444 ~ 2537 (0xbba1 ~ 0xbbfe)
            \ifnum\KOtemp = 2452 #1%»©
            \else\ifnum\KOtemp = 2461 #1%»²
            \else\ifnum\KOtemp = 2464 #1%»µ
            \else\ifnum\KOtemp = 2473 #1%»¾
            \else\ifnum\KOtemp = 2475 #1%»À
            \else\ifnum\KOtemp = 2482 #1%»Ç
            \else\ifnum\KOtemp = 2490 #1%»Ï
            \else\ifnum\KOtemp = 2499 #1%»Ø
            \else\ifnum\KOtemp = 2501 #1%»Ú
            \else\ifnum\KOtemp = 2506 #1%»ß
            \else\ifnum\KOtemp = 2514 #1%»ç
            \else\ifnum\KOtemp = 2528 #1%»õ
            \else\ifnum\KOtemp = 2537 #1%»þ
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \fi
      \else
        \ifnum\KOtemp < 2726
          \ifnum\KOtemp < 2632
            %% 2538 ~ 2631 (0xbca1 ~ 0xbcfe)
            \ifnum\KOtemp = 2545 #1%¼¨
            \else\ifnum\KOtemp = 2550 #1%¼­
            \else\ifnum\KOtemp = 2565 #1%¼¼
            \else\ifnum\KOtemp = 2574 #1%¼Å
            \else\ifnum\KOtemp = 2583 #1%¼Î
            \else\ifnum\KOtemp = 2587 #1%¼Ò
            \else\ifnum\KOtemp = 2598 #1%¼Ý
            \else\ifnum\KOtemp = 2603 #1%¼â
            \else\ifnum\KOtemp = 2609 #1%¼è
            \else\ifnum\KOtemp = 2615 #1%¼î
            \else\ifnum\KOtemp = 2623 #1%¼ö
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 2632 ~ 2725 (0xbda1 ~ 0xbdfe)
            \ifnum\KOtemp = 2635 #1%½¤
            \else\ifnum\KOtemp = 2637 #1%½¦
            \else\ifnum\KOtemp = 2643 #1%½¬
            \else\ifnum\KOtemp = 2651 #1%½´
            \else\ifnum\KOtemp = 2657 #1%½º
            \else\ifnum\KOtemp = 2666 #1%½Ã
            \else\ifnum\KOtemp = 2677 #1%½Î
            \else\ifnum\KOtemp = 2687 #1%½Ø
            \else\ifnum\KOtemp = 2696 #1%½á
            \else\ifnum\KOtemp = 2705 #1%½ê
            \else\ifnum\KOtemp = 2709 #1%½î
            \else\ifnum\KOtemp = 2718 #1%½÷
            \else\ifnum\KOtemp = 2722 #1%½û
            \else\ifnum\KOtemp = 2724 #1%½ý
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \else
          \ifnum\KOtemp < 2820
            %% 2726 ~ 2819 (0xbea1 ~ 0xbefe)
            \ifnum\KOtemp = 2729 #1%¾¤
            \else\ifnum\KOtemp = 2730 #1%¾¥
            \else\ifnum\KOtemp = 2739 #1%¾®
            \else\ifnum\KOtemp = 2740 #1%¾¯
            \else\ifnum\KOtemp = 2743 #1%¾²
            \else\ifnum\KOtemp = 2751 #1%¾º
            \else\ifnum\KOtemp = 2755 #1%¾¾
            \else\ifnum\KOtemp = 2763 #1%¾Æ
            \else\ifnum\KOtemp = 2779 #1%¾Ö
            \else\ifnum\KOtemp = 2788 #1%¾ß
            \else\ifnum\KOtemp = 2799 #1%¾ê
            \else\ifnum\KOtemp = 2803 #1%¾î
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 2820 ~ 2913 (0xbfa1 ~ 0xbffe)
            \ifnum\KOtemp = 2820 #1%¿¡
            \else\ifnum\KOtemp = 2828 #1%¿©
            \else\ifnum\KOtemp = 2844 #1%¿¹
            \else\ifnum\KOtemp = 2851 #1%¿À
            \else\ifnum\KOtemp = 2864 #1%¿Í
            \else\ifnum\KOtemp = 2873 #1%¿Ö
            \else\ifnum\KOtemp = 2879 #1%¿Ü
            \else\ifnum\KOtemp = 2887 #1%¿ä
            \else\ifnum\KOtemp = 2895 #1%¿ì
            \else\ifnum\KOtemp = 2905 #1%¿ö
            \else\ifnum\KOtemp = 2913 #1%¿þ
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \fi
      \fi
    \fi
  \else
    \ifnum\KOtemp < 3290
      \ifnum\KOtemp < 3102
        \ifnum\KOtemp < 3008
          %% 2914 ~ 3007 (0xc0a1 ~ 0xc0fe)
          \ifnum\KOtemp = 2920 #1%À§
          \else\ifnum\KOtemp = 2928 #1%À¯
          \else\ifnum\KOtemp = 2937 #1%À¸
          \else\ifnum\KOtemp = 2952 #1%ÀÇ
          \else\ifnum\KOtemp = 2957 #1%ÀÌ
          \else\ifnum\KOtemp = 2971 #1%ÀÚ
          \else\ifnum\KOtemp = 2984 #1%Àç
          \else\ifnum\KOtemp = 2993 #1%Àð
          \else\ifnum\KOtemp = 3000 #1%À÷
          \else\ifnum\KOtemp = 3003 #1%Àú
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \else
          %% 3008 ~ 3101 (0xc1a1 ~ 0xc1fe)
          \ifnum\KOtemp = 3013 #1%Á¦
          \else\ifnum\KOtemp = 3021 #1%Á®
          \else\ifnum\KOtemp = 3028 #1%Áµ
          \else\ifnum\KOtemp = 3029 #1%Á¶
          \else\ifnum\KOtemp = 3041 #1%ÁÂ
          \else\ifnum\KOtemp = 3047 #1%ÁÈ
          \else\ifnum\KOtemp = 3050 #1%ÁË
          \else\ifnum\KOtemp = 3057 #1%ÁÒ
          \else\ifnum\KOtemp = 3061 #1%ÁÖ
          \else\ifnum\KOtemp = 3071 #1%Áà
          \else\ifnum\KOtemp = 3073 #1%Áâ
          \else\ifnum\KOtemp = 3074 #1%Áã
          \else\ifnum\KOtemp = 3081 #1%Áê
          \else\ifnum\KOtemp = 3085 #1%Áî
          \else\ifnum\KOtemp = 3093 #1%Áö
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \fi
      \else
        \ifnum\KOtemp < 3196
          %% 3102 ~ 3195 (0xc2a1 ~ 0xc2fe)
          \ifnum\KOtemp = 3106 #1%Â¥
          \else\ifnum\KOtemp = 3117 #1%Â°
          \else\ifnum\KOtemp = 3126 #1%Â¹
          \else\ifnum\KOtemp = 3129 #1%Â¼
          \else\ifnum\KOtemp = 3138 #1%ÂÅ
          \else\ifnum\KOtemp = 3142 #1%ÂÉ
          \else\ifnum\KOtemp = 3151 #1%ÂÒ
          \else\ifnum\KOtemp = 3155 #1%ÂÖ
          \else\ifnum\KOtemp = 3157 #1%ÂØ
          \else\ifnum\KOtemp = 3163 #1%ÂÞ
          \else\ifnum\KOtemp = 3170 #1%Âå
          \else\ifnum\KOtemp = 3173 #1%Âè
          \else\ifnum\KOtemp = 3174 #1%Âé
          \else\ifnum\KOtemp = 3175 #1%Âê
          \else\ifnum\KOtemp = 3179 #1%Âî
          \else\ifnum\KOtemp = 3188 #1%Â÷
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \else
          %% 3196 ~ 3289 (0xc3a1 ~ 0xc3fe)
          \ifnum\KOtemp = 3199 #1%Ã¤
          \else\ifnum\KOtemp = 3208 #1%Ã­
          \else\ifnum\KOtemp = 3214 #1%Ã³
          \else\ifnum\KOtemp = 3223 #1%Ã¼
          \else\ifnum\KOtemp = 3231 #1%ÃÄ
          \else\ifnum\KOtemp = 3234 #1%ÃÇ
          \else\ifnum\KOtemp = 3237 #1%ÃÊ
          \else\ifnum\KOtemp = 3245 #1%ÃÒ
          \else\ifnum\KOtemp = 3249 #1%ÃÖ
          \else\ifnum\KOtemp = 3256 #1%ÃÝ
          \else\ifnum\KOtemp = 3258 #1%Ãß
          \else\ifnum\KOtemp = 3266 #1%Ãç
          \else\ifnum\KOtemp = 3270 #1%Ãë
          \else\ifnum\KOtemp = 3277 #1%Ãò
          \else\ifnum\KOtemp = 3282 #1%Ã÷
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \fi
      \fi
    \else
      \ifnum\KOtemp < 3478
        \ifnum\KOtemp < 3384
          %% 3290 ~ 3383 (0xc4a1 ~ 0xc4fe)
          \ifnum\KOtemp = 3290 #1%Ä¡
          \else\ifnum\KOtemp = 3300 #1%Ä«
          \else\ifnum\KOtemp = 3300 #1%Ä«
          \else\ifnum\KOtemp = 3308 #1%Ä³
          \else\ifnum\KOtemp = 3317 #1%Ä¼
          \else\ifnum\KOtemp = 3320 #1%Ä¿
          \else\ifnum\KOtemp = 3330 #1%ÄÉ
          \else\ifnum\KOtemp = 3338 #1%ÄÑ
          \else\ifnum\KOtemp = 3346 #1%ÄÙ
          \else\ifnum\KOtemp = 3347 #1%ÄÚ
          \else\ifnum\KOtemp = 3355 #1%Äâ
          \else\ifnum\KOtemp = 3361 #1%Äè
          \else\ifnum\KOtemp = 3363 #1%Äê
          \else\ifnum\KOtemp = 3365 #1%Äì
          \else\ifnum\KOtemp = 3366 #1%Äí
          \else\ifnum\KOtemp = 3374 #1%Äõ
          \else\ifnum\KOtemp = 3378 #1%Äù
          \else\ifnum\KOtemp = 3380 #1%Äû
          \else#2% 
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \else
          %% 3384 ~ 3477 (0xc5a1 ~ 0xc5fe)
          \ifnum\KOtemp = 3388 #1%Å¥
          \else\ifnum\KOtemp = 3392 #1%Å©
          \else\ifnum\KOtemp = 3399 #1%Å°
          \else\ifnum\KOtemp = 3407 #1%Å¸
          \else\ifnum\KOtemp = 3417 #1%ÅÂ
          \else\ifnum\KOtemp = 3426 #1%ÅË
          \else\ifnum\KOtemp = 3428 #1%ÅÍ
          \else\ifnum\KOtemp = 3438 #1%Å×
          \else\ifnum\KOtemp = 3446 #1%ÅÍ
          \else\ifnum\KOtemp = 3449 #1%Åâ
          \else\ifnum\KOtemp = 3451 #1%Åä
          \else\ifnum\KOtemp = 3460 #1%Åí
          \else\ifnum\KOtemp = 3462 #1%Åï
          \else\ifnum\KOtemp = 3463 #1%Åð
          \else\ifnum\KOtemp = 3467 #1%Åô
          \else\ifnum\KOtemp = 3468 #1%Åõ
          \else\ifnum\KOtemp = 3476 #1%Åý
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \fi
      \else
        \ifnum\KOtemp < 3572
          %% 3478 ~ 3571 (0xc6a1 ~ 0xc6fe)
          \ifnum\KOtemp = 3479 #1%Æ¢
          \else\ifnum\KOtemp = 3486 #1%Æ©
          \else\ifnum\KOtemp = 3491 #1%Æ®
          \else\ifnum\KOtemp = 3500 #1%Æ·
          \else\ifnum\KOtemp = 3505 #1%Æ¼
          \else\ifnum\KOtemp = 3513 #1%ÆÄ
          \else\ifnum\KOtemp = 3525 #1%ÆÐ
          \else\ifnum\KOtemp = 3534 #1%ÆÙ
          \else\ifnum\KOtemp = 3536 #1%ÆÛ
          \else\ifnum\KOtemp = 3545 #1%Æä
          \else\ifnum\KOtemp = 3553 #1%Æì
          \else\ifnum\KOtemp = 3560 #1%Æó
          \else\ifnum\KOtemp = 3564 #1%Æ÷
          \else#2%
          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
        \else
          \ifnum\KOtemp < 3666
            %% 3572 ~ 3665 (0xc7a1 ~ 0xc7fe)
            \ifnum\KOtemp = 3572 #1%Ç¡
            \else\ifnum\KOtemp = 3574 #1%Ç£
            \else\ifnum\KOtemp = 3576 #1%Ç¥
            \else\ifnum\KOtemp = 3581 #1%Çª
            \else\ifnum\KOtemp = 3591 #1%Ç´
            \else\ifnum\KOtemp = 3593 #1%Ç¶
            \else\ifnum\KOtemp = 3598 #1%Ç»
            \else\ifnum\KOtemp = 3604 #1%ÇÁ
            \else\ifnum\KOtemp = 3610 #1%ÇÇ
            \else\ifnum\KOtemp = 3618 #1%ÇÏ
            \else\ifnum\KOtemp = 3627 #1%ÇØ
            \else\ifnum\KOtemp = 3636 #1%Çá
            \else\ifnum\KOtemp = 3638 #1%Çã
            \else\ifnum\KOtemp = 3647 #1%Çì
            \else\ifnum\KOtemp = 3655 #1%Çô
            \else\ifnum\KOtemp = 3664 #1%Çý
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \else
            %% 3666 ~ 3759 (0xc8a1 ~ 0xc8fe)
            \ifnum\KOtemp = 3668 #1%È£
            \else\ifnum\KOtemp = 3678 #1%È­
            \else\ifnum\KOtemp = 3684 #1%È³
            \else\ifnum\KOtemp = 3689 #1%È¸
            \else\ifnum\KOtemp = 3696 #1%È¿
            \else\ifnum\KOtemp = 3701 #1%ÈÄ
            \else\ifnum\KOtemp = 3709 #1%ÈÌ
            \else\ifnum\KOtemp = 3714 #1%ÈÑ
            \else\ifnum\KOtemp = 3719 #1%ÈÖ
            \else\ifnum\KOtemp = 3727 #1%ÈÞ
            \else\ifnum\KOtemp = 3734 #1%Èå
            \else\ifnum\KOtemp = 3746 #1%Èñ
            \else\ifnum\KOtemp = 3752 #1%È÷
            \else#2%
            \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
          \fi
        \fi
      \fi
    \fi
  \fi
  %
  \fi\fi}

\KOon

% Á¶»çÃ³¸®

% HLaTeX 0.98ÀÇ hangul.styÀ» ¼öÁ¤ÇÔ.
% HLaTeX, by Koaunghi Eun <koaunghi.un@zdv.uni-tuebingen.de> 
% (distributed under the GNU General Public License)

\def\^^c0#1{%
  \ifx#1^^cc\KOchosa{°¡}{ÀÌ}\else% \ÀÌ(yi)
  \ifx#1^^ba\KOchosa{´Â}{Àº}\else% \Àº(eun)
  \ifx#1^^bb\KOchosa{¸¦}{À»}\else% \À»(eul)
  \ifx#1^^b8\KOchosa{}{À¸}% \À¸(·Î)(eu)
  \fi\fi\fi\fi}
\def\´Â{\Àº}% \´Â(neun)
\def\·Î{\KOchosa{}{À¸}·Î}% \·Î(ro)
\def\¿Í{\KOchosa{¿Í}{°ú}}
\def\¸¦{\KOchosa{¸¦}{À»}}
\def\°¡{\KOchosa{°¡}{ÀÌ}}
\def\°ú{\KOchosa{¿Í}{°ú}}

