%% -*- TeX -*-
%%
%% This is `hfont.tex' written by zraun01@hpserv.zdv.uni-tuebingen.de.
%%
%% 이 파일은 우리말을 \TeX에서 사용하는데 필요한 KS5601코드의 글꼴정의에
%% 그 역할을 두고 있읍니다. 한글의 글꼴은 \LaTeX2e의 NFSS2(New Font
%% Selection Scheme2)에 의해 선택되는데, 일반의 한글문서와는 달리
%% 문서에 한글글꼴만 포함하기 위해서는 단독으로 사용될 수 있읍니다.
%%
%% \LaTeX3는 아직도 발표되지 않고 있읍니다. 그러나 \LaTeX2e가 현재
%% \LaTeX3가 나오기 전까지 standard \LaTeX으로 사용되고 있으므로
%% 우리는 한글문서작성시 \LaTeX2e를 사용하는 것으로 규정합니다.
%%

\NeedsTeXFormat{LaTeX2e}
\def\filedate{1996/04/04}
\def\fileversion{0.95}
\def\filename{hfont.tex}

\typeout{Hangul/Hanja/Hsymbol Font Definition `\filename' <\filedate>}

%% 0.95 scheme

\newcount\ksc@shape \newcount\ks@break \ks@break=999

%%%% From File: ltxref.dtx
\def\@setref#1#2#3{%
  \let\protect\relax
  \ifx#1\relax
   \protect\G@refundefinedtrue
   \nfss@text{\reset@font\bfseries ??}%
   \@latex@warning{Reference `#3' on page \thepage \space
             undefined}%
  \else
   \expandafter#2#1\null
  \fi}
\def\ref#1{\let\protect\string
        \expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
\def\pageref#1{\let\protect\string
        \expandafter\@setref\csname r@#1\endcsname\@secondoftwo{#1}}
\def\@newl@bel#1#2#3{%
  \@ifundefined{#1@#2}%
    \relax
    {\gdef \@multiplelabels {%
       \@latex@warning@no@line{There were multiply-defined labels}}%
     \@latex@warning@no@line{Label `#2' multiply defined}}%
  \global\@namedef{#1@#2}{#3}\let\protect\@typeset@protect}
\def\newlabel{\let\protect\string\@newl@bel r}%

%% BibTeX
\def\bibcite{\let\protect\string\@newl@bel b}
\def\@citex[#1]#2{\let\protect\string%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@m\ }%
     \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \let\protect\@typeset@protect
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {\hbox{\csname b@\@citeb\endcsname}}}}{#1}%
       \let\protect\@typeset@protect}
\def\nocite#1{\@bsphack\let\protect\string%
  \@for\@citeb:=#1\do{%
    \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
    \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
    \let\protect\relax
    \@ifundefined{b@\@citeb}{\G@refundefinedtrue
        \@latex@warning{Citation `\@citeb' undefined}}{}}%
  \@esphack}

%%% From File: lterror.dtx
\def\@latex@warning@no@line#1{%
   \let\protect\relax\@latex@warning{#1\@gobble}}

%%% From File: ltmiscen.dtx
\def\centering{\ks@break\@m%
  \let\\\@centercr\rightskip\@flushglue\leftskip\@flushglue
  \parindent\z@\parfillskip\z@skip}
\def\raggedright{\ks@break\@m%
  \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
  \leftskip\z@skip
  \parindent\z@}
\def\raggedleft{\ks@break\@m%
  \let\\\@centercr\rightskip\z@skip\leftskip\@flushglue
  \parindent\z@\parfillskip\z@skip}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 우리말 글꼴의 정의 %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%
%% EUC
%%

\def\reserved@a#1#2{%
  \@tempcnta#1\relax
  \@tempcntb#2\relax
  \reserved@b
}

\def\reserved@b{%
  \ifnum\@tempcnta>\@tempcntb\else
    \reserved@c\@tempcnta
    \advance\@tempcnta\@ne
    \expandafter\reserved@b
  \fi
}

\def\reserved@c#1{%
  \uccode#1=#1
  \lccode#1=#1
  \catcode#1=\active
}

\reserved@a{`�}{`�}

%%%%%%%%%%%%%%%%%%%%%%%%
%% 우리말 글꼴 매크로 %%
%%%%%%%%%%%%%%%%%%%%%%%%

%%
%% 우리말의 encoding
%% -----------------
%% 포스트스크립트글꼴은 다른 집의 식솔로 합니다.
%%

\if@pshan
   \def\h@ngulencoding{\h@ngulf@nt\fontencoding{U}\fontfamily{phangul}}
   \def\h@njaencoding{\h@ngulf@nt\fontencoding{U}\fontfamily{phanja}}
%   \def\hsymb@lenc@ding{\h@ngulf@nt\fontencoding{U}\fontfamily{phsymb}}
   \def\hsymb@lenc@ding{\h@ngulf@nt\fontencoding{U}\fontfamily{hsymbol}}
\else
   \def\h@ngulencoding{\h@ngulf@nt\fontencoding{U}\fontfamily{hangul}}
   \def\h@njaencoding{\h@ngulf@nt\fontencoding{U}\fontfamily{hanja}}
   \def\hsymb@lenc@ding{\h@ngulf@nt\fontencoding{U}\fontfamily{hsymbol}}
\fi

%%
%% 우리말 기울이기
%% ---------------
%%

\def\h@slshape{}

\let\@upshape\upshape
\def\upshape{\@upshape\def\h@slshape{}}
\let\@slshape\slshape
\def\slshape{\@slshape\def\h@slshape{sl}}
\let\@scshape\scshape
\def\scshape{\@scshape\def\h@slshape{}}
\let\@itshape\itshape
\def\itshape{\@itshape\def\h@slshape{sl}}

%%
%% 우리말의 두께
%% -------------
%% 여기에 \if@KSCbold를 導入하여 KSC글꼴의 境遇는 mdseries의 글꼴을
%% 세번 printout함으로서 bfseries의 效果를 나타나게 합니다.
%% 한글 포스트스크립트 글꼴을 使用할 境遇에도 이런 效果를 얻지 못하면
%% 글씨가 너무 가늘게 프린트 되는 것들이 있읍니다. -- 明朝體(한글,漢字)
%% 이런 글꼴들은 당분간 使用을 않도록 하고 있읍니다.
%%
\newif\if@KSCbold
\if@makebold
  \renewcommand\bfseries
        {\not@math@alphabet\bfseries\mathbf
         \@KSCboldtrue\fontseries\bfdefault\selectfont}
  \renewcommand\mdseries
        {\not@math@alphabet\mdseries\relax
         \@KSCboldfalse\fontseries\mddefault\selectfont}

  \def\h@C#1{\fontseries{m}\selectfont\@Hyphen%
            \sfcode#1=\ks@break\if@KSCbold%
              \char#1\hbox to0.03ex{\hss\char#1}\hbox to0.03ex{\hss\char#1}%
            \else\char#1\fi}
\else
  \@KSCboldfalse
  \def\h@C#1{\ifnum\ksc@shape>\thr@@\fontseries{bx}\fi%
            \selectfont\@Hhyphen\sfcode#1=\ks@break\char#1}
\fi

%%
%% 전문서의 한글 글꼴
%% ------------------
%% 아무것도 지정하지 않으면 \명조(\mj)가 됩니다.
%%
\DeclareRobustCommand{\normalh@ngul}{\if@makebold\@KSCboldfalse\fi
  \h@nguldefault}

\def\mjdefault{\def\h@nguldefault{\ksc@shape=\z@}}
\def\gtdefault{\def\h@nguldefault{\ksc@shape=\@ne}}
\def\gsdefault{\def\h@nguldefault{\ksc@shape=\tw@}}
\def\grdefault{\def\h@nguldefault{\ksc@shape=4}}
\def\mgdefault{\def\h@nguldefault{\ksc@shape=5}}
\mjdefault
\def\drdefault{}
\def\pgdefault{}

%%
%% 우리말의 글꼴 바꾸기
%% --------------------
%%
\def\h@ngulf@nt{\h@nguldefault}
\def\mj{\def\h@ngulf@nt{\ksc@shape=\z@}}
\def\gt{\def\h@ngulf@nt{\ksc@shape=\@ne}}
\def\gs{\def\h@ngulf@nt{\ksc@shape=\tw@}}
\def\ol{\def\h@ngulf@nt{\ksc@shape=\thr@@}}
\def\gr{\def\h@ngulf@nt{\ksc@shape=4}}
\def\mg{\def\h@ngulf@nt{\ksc@shape=5}}
\def\yt{\def\h@ngulf@nt{\ksc@shape=6}}
\def\mjb{\mj\bf}
\def\dr{}
\def\pg{}
\def\gj{}

\def\고딕 {\gt}                     %고딕
\def\�#1#2#3 {\ifx#1�\gr\else\gs\fi}%그래픽,궁서
\def\�#1#2#3 {\ifx#1�\mj\else\mg\fi}%명조,목각
\def\�#1#2#3 {\ifx#1�\yt\else\ol\fi}%옛글,외곽

%%
%% 우리말의 분철
%% -------------
%% 우리말은 \hyphenchar가 없고 어느 곳에서나 分綴이
%% 可能합니다. 일단 우리는 한글의 分綴을 억제하고
%% (\hyphenchar\font\m@ne) 한글의 사이에 \hskip 0pt plus 0pt를
%% 揷入함으로서 分綴을 可能하게 합니다.
%%

\def\@Hyphen{\ifhmode\ifnum\spacefactor=999\hskip\z@skip\fi\fi}
\def\noHyphen{}%% Compatibility

%%
%% 우리말 찾기
%% -----------
%%
\newif\if@KSCbold
\if@makebold
  \renewcommand\bfseries
        {\not@math@alphabet\bfseries\mathbf
         \@KSCboldtrue\fontseries\bfdefault\selectfont}
  \renewcommand\mdseries
        {\not@math@alphabet\mdseries\relax
         \@KSCboldfalse\fontseries\mddefault\selectfont}

  \def\�#1#2{\begingroup
    \@tempcnta`#1
    \ifnum\@tempcnta<201\h@ngulencoding\advance\@tempcnta-`�
    \else\h@njaencoding\advance\@tempcnta-`�
      \ifnum\ksc@shape>\@ne
        \ifnum\ksc@shape>\thr@@\ksc@shape=\@ne
        \else\ksc@shape=\z@
    \fi\fi\fi
    \@tempcntb`#2\advance\@tempcntb-`�\multiply\@tempcnta`^
    \advance\@tempcnta\@tempcntb\divide\@tempcnta\@cclvi
    \fontshape{\ifcase\ksc@shape mj\or gt\or gs\or ol\or gr\or mg\or
    yt\fi\h@slshape\ifcase\@tempcnta A\or B\or C\or D\or E\or F\or G\or
    H\or I\or J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\fi}%
    \fontseries{m}\selectfont\sfcode`#2=\ks@break\@Hyphen
    \string#1\string#2\if@KSCbold
      \setbox\@tempboxa\hbox{\string#1\string#2}%
      \hbox to0.03ex{\hss\copy\@tempboxa}%
      \hbox to0.03ex{\hss\box\@tempboxa}\fi
    \endgroup}
\else
  \def\�#1#2{\begingroup
    \@tempcnta`#1
    \ifnum\@tempcnta<201\h@ngulencoding\advance\@tempcnta-`�
    \else\h@njaencoding\advance\@tempcnta-`�
      \ifnum\ksc@shape>\@ne
        \ifnum\ksc@shape>\thr@@\ksc@shape=\@ne
        \else\ksc@shape=\z@
    \fi\fi\fi
    \@tempcntb`#2\advance\@tempcntb-`�\multiply\@tempcnta`^
    \advance\@tempcnta\@tempcntb\divide\@tempcnta\@cclvi
    \fontshape{\ifcase\ksc@shape mj\or gt\or gs\or ol\or gr\or mg\or
    yt\fi\h@slshape\ifcase\@tempcnta A\or B\or C\or D\or E\or F\or G\or
    H\or I\or J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\fi}%
    \ifnum\ksc@shape=\tw@@\fontseries{bx}\fi
    \ifnum\ksc@shape>4\fontsereies{bx}\fi\selectfont
    \sfcode`#2=\ks@break\@Hyphen\string#1\string#2%
    \endgroup}
\fi

%% 한글, 漢字

\def�#1{\def#1##1{%
  \ifx\protect\@typeset@protect\�#1##1\else\string#1\string##1\fi}}

%% 고어, 현대어, 심벌

\def�#1{\def#1##1{%
    \ifx\protect\@typeset@protect
      \@tempcnta`#1\advance\@tempcnta-`�\relax\csname
      H@nSym\ifcase\@tempcnta A\or B\or C\or D\or\or\or\or
      H\or I\or J\or K\or L\fi\endcsname{`##1}%
    \else\string#1\string##1\fi}}

\def\@bad@hsymbol{%
  \GenericError{%
      \space\space\space\@spaces\@spaces\@spaces
    }{%
      HLaTeX Error: KSC Symbol on line \the\inputlineno \space not available%
    }{%
      See HLaTeX guide for valid input symbols.%
    }{\@ehc}}
\def\H@nSym#1{\@bad@hsymbol}

\def\hsK@shape{\fontshape{mjK}}

\DeclareRobustCommand{\H@nSymA}[1]{%
\@tempcnta#1\relax
\ifnum\@tempcnta>177
  \ifnum\@tempcnta<190 \advance\@tempcnta54
    \ifodd\@tempcnta\spacefactor\@m\relax\else\ks@break\@m\fi
  \else \ifnum\@tempcnta>204
          \ifnum\@tempcnta<208 \advance\@tempcnta39
          \else \ifnum\@tempcnta=216 \@tempcnta247
                \else\@tempcnta\@m\fi
          \fi
        \else\@tempcnta\@m\fi
  \fi
\else\@tempcnta\@m\fi
\ifnum\@tempcnta=\@m\@bad@hsymbol
\else{\hsymb@lenc@ding\hsK@shape\h@C\@tempcnta}\fi\ks@break=999}

\DeclareRobustCommand{\H@nSymB}[1]{%
\@tempcnta#1\relax
\ifnum\@tempcnta=182 \@tempcnta248
\else \ifnum\@tempcnta>204
        \ifnum\@tempcnta<210 \advance\@tempcnta44
        \else \ifnum\@tempcnta>221
                \ifnum\@tempcnta<224 \advance\@tempcnta32
                \else\@tempcnta\@m\fi
              \else\@tempcnta\@m\fi
        \fi
      \else\@tempcnta\@m\fi
\fi
\ifnum\@tempcnta=\@m \@bad@hsymbol
\else{\hsymb@lenc@ding\hsK@shape\h@C\@tempcnta}\fi}

\DeclareRobustCommand{\H@nSymC}[1]{%
\@tempcnta#1\relax
\ifnum\@tempcnta=220%
{\hsymb@lenc@ding\hsK@shape\h@C51}
\else\@bad@hsymbol\fi}

\DeclareRobustCommand{\H@nSymD}[1]{%Jaso
\@tempcnta#1\relax
\advance\@tempcnta-161%
{\hsymb@lenc@ding\hsK@shape\h@C\@tempcnta}}

\DeclareRobustCommand{\H@nSymH}[1]{%
\@tempcnta#1\relax
\ifnum\@tempcnta>176
  \ifnum\@tempcnta<246 \advance\@tempcnta-83
  \else\@tempcnta\@m\fi
\else\@tempcnta\@m\fi
\ifnum\@tempcnta=\@m \@bad@hsymbol
\else{\hsymb@lenc@ding\hsK@shape\h@C\@tempcnta}\fi}

\DeclareRobustCommand{\H@nSymI}[1]{%
\@tempcnta#1\relax
\ifnum\@tempcnta>176
  \ifnum\@tempcnta<246 \advance\@tempcnta-14
  \else\@tempcnta\@m\fi
\else\@tempcnta\@m\fi
\ifnum\@tempcnta=\@m \@bad@hsymbol
\else{\hsymb@lenc@ding\hsK@shape\h@C\@tempcnta}\fi}

\def\hsJ@shape{\fontshape{mjJ}}

\DeclareRobustCommand{\H@nSymJ}[1]{%Hiragana
\@tempcnta#1\relax
\advance\@tempcnta-162
{\hsymb@lenc@ding\hsJ@shape\h@C\@tempcnta}}

\DeclareRobustCommand{\H@nSymK}[1]{%Katagana
\@tempcnta#1\relax
\advance\@tempcnta-79
{\hsymb@lenc@ding\hsJ@shape\h@C\@tempcnta}}

\DeclareRobustCommand{\H@nSymL}[1]{%Russian
\@tempcnta#1\relax
\advance\@tempcnta 8
\ifnum\@tempcnta>215 \advance\@tempcnta-15\fi
{\hsymb@lenc@ding\hsJ@shape\h@C\@tempcnta}}

%% 本論이 始作됩니다.

�∼˛－ㄽ��┃㎛Þþきキ�
�걸궜꽃냥능될똔령맴믈뵐뽄셤심앉옵읠좼쪼촁케탰팖핀훔�
�漑俓苽炚鉤筋騏虜譚燉狼禮慄茉貌緡排潽憤司床禪紹隋蓍�
�煬挻詠梡踊偉玧匿爵菹摺條註振餐哲撮蚩擇弊壑許湖惶諱�

%%
%% End of file `hfont.tex'.

%%% Local Variables: 
%%% mode: plain-tex
%%% TeX-master: t
%%% End: 
