%%% file `kotex-euc.sty` ( a part of ko.TeX )
%%
%% (C) Copyright 2007 Koaunghi Un <koaunghi@kornet.net>
%%                    Dohyun Kim  <nomos@ktug.or.kr>
%%                    Kangsoo Kim <karnes@ktug.or.kr>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%  http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2006/05/20 or later.
%%
%% Read LICENSE included in the package.
%%
\NeedsTeXFormat{LaTeX2e}
\def\filename{kotex-euc.sty}
\def\filedate{2007/07/15}
\def\fileversion{1.0.2}

\ProvidesPackage{kotex-euc}%
   [\filedate\space\fileversion\space Typesetting Korean Documents (hlatex)]
%%\typeout{�ѱ� ���� �ٷ��� `\filename'. <\filedate>.}

%% for compatibility
\DeclareOption{finemath}{%
  \PackageWarningNoLine{kotex}{finemath option will be ignored under euc}{}
}
\DeclareOption{strictcharcheck}{%
  \PackageWarningNoLine{kotex}{strictcharcheck option will be ignored under euc}{}
}
\DeclareOption{nonfrench}{%
  \PackageWarningNoLine{kotex}{nonfrench option will be ignored under euc}{}
}

%% hfont option : works as if hfont.sty
%% hfont mode is default
\newif\if@hangulmode\@hangulmodefalse
\DeclareOption{hfont}{%
  \@hangulmodefalse
}
\DeclareOption{hangul}{%
  \@hangulmodetrue
}

%% �߰� ���� ó��
%% --------------
%%
%% �߰� ���� "hanja"�� �ܿ��� �̸����� ���ڷ� ǥ���Ѵ�.

\newif\if@hanja\@hanjafalse

\DeclareOption{hanja}{\@hanjatrue}

%% Lambda�� ���� hangul-k-cp949.tex�� �а� �ٷ��� ó���� ��ģ��.
%\ifx\nullocplist\undefined\else
%  \input hangul-k-cp949.tex
%\fi
%\@nameuse{hangul-k-cp949.tex}

%% LaTeX�� �� ������ ������ ���� �߰� ������ �� �ִ�.
%% �߰� ���� "nojosa"�� �ڵ�����ó������� �����Ų��.
%% �߰� ���� "hardbold"�� �̹� ������� bfseries �ѱ� ����ü�� ����ϰ�,
%% �߰� ���� "softbold"�� bfseries ����ü�� ��ġ���� ���� ���¿���
%%   mdseries ����ü�� ����Ͽ� �������� ���� bfseries��
%%   ����������� �Ѵ�.
%%   �� ���� �ƹ� �͵� �������� ������ "softbold"�� �ȴ�.
%%
%% �߰� ������ ������ ������ ���� �Ѵ�.
%%       \documentclass[hanja,...]{...}
%%       \usepackage{hangul,...}
%% Ȥ�� \documentclass�� ������
%%       \usepackage[hanja]{hangul}
\newif\if@makebold
\newif\if@josa
\@hanjafalse \@makeboldfalse \@josatrue

\DeclareOption{hardbold}{\@makeboldfalse}
\DeclareOption{softbold}{\@makeboldtrue}
\DeclareOption{nojosa}{\@josafalse}

\ProcessOptions

%%% hangulmode
\if@hangulmode
  \@namedef{hfont.sty}{}
\else
  \@namedef{hfont.sty}{\endinput}
\fi

%% �ѱ� ����ü�� ����
\input hfont.tex

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

%%% From File: ltfsstrc.dtx
\def\@font@warning#1{\let\protect\relax%
         \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
                        {LaTeX Font Warning: #1}}%

%%% From File: ltmiscen.dtx
\expandafter\def\expandafter\centering\expandafter{\centering\ks@break}
\expandafter\def\expandafter\raggedright\expandafter{\raggedright\ks@break}
\expandafter\def\expandafter\raggedleft\expandafter{\raggedleft\ks@break}

%%% From File: ltsect.dtx
\def\thanks#1{\footnotemark\let\KSC@\noexpand
    \protected@xdef\@thanks{\@thanks
        \protect\footnotetext[\the\c@footnote]{#1}}%
}

%%% From File: ltpage.dtx
\def\markboth#1#2{\gdef\@themark{{#1}{#2}}{%
     \let\protect\@unexpandable@protect \let\KSC@\noexpand
     \let\label\relax \let\index\relax \let\glossary\relax
     \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
\def\@markright#1#2#3{\let\KSC@\noexpand \gdef\@themark{{#1}{#3}}}

%% hfont.sty�� ���⼭ ������.
\@nameuse{hfont.sty}

%% EUC-KR ��ȣ�� �����ϴµ����� ���ǰ� �䱸�ȴ�.
\def\ks@noexpand{\ifx\protect\@typeset@protect\relax\else
  \expandafter\noexpand\fi}

%% konames
\input konames-euc.tex

%% kosections
\input kosections-euc.tex

%% interface with hyperref
%\if@nojosa\else\RequirePackage{hyperref}\fi

%%% End of file `euc-kr.tex'.

%% �ѱ� ������ �ʿ��� ���� 
\renewcommand{\baselinestretch}{1.333}  %%% baseline=1.333 (kotex)
%\emergencystretch1.5\@ptsize pt
\ifx\@ptsize\undefined\def\@ptsize{0}\fi
\emergencystretch=1\@ptsize pt
\@ifclassloaded{slides}{\emergencystretch=3\@ptsize pt}{}

%% �츮���� ���ڴ� �����ں��� �� ũ�Ƿ� ���� ��ħ ��ȣ�� ������
%% ������� �� �ְ� �ܾ� ���ݵ� �ø���.
%\if@nonfrench
\if@hangulmode
  \xspaceskip=.5em plus .111em minus .1em
\else
  \xspaceskip=0pt plus .1em minus .1em
\fi
%\fi
%%\spaceskip=.4em plus.2em minus.2em

% \sfcode x=1000 (initial)
% \sfcode X=999
% \sfcode )']=0
% \sfcode .?!:;,=1000 (french)
% \sfcode .?!=3000 :=2000 ;=1500 ,=1250 (nonfrench)

%% �ڰ� ������ ���ʰ�
%\hangulskip=0pt
\if@hangulmode
  \hangulskip=-0.55pt  % kotex interhchar default
%  \hangulskip=-0.0852em  % kotex interhchar default
\else
%  \hangulskip=0pt
  \hangulskip=-0.0852em
\fi

%% A bug in latex.ltx (see
%% http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3460)
\def\thempfootnote{\textit{\@alph\c@mpfootnote}}

%% hmakeindex�� ����ϸ� \hindexhead�� ���˴ϴ�.  \hindexhead��
%% ���� �Ӹ������� �ڼ� ������ ���� ��ȣ�� ������ ����մϴ�.
%% �ʱⰪ�� ������ ��� ���� �ణ�� �ణ ������ �ִ�
%% \indexspace�Դϴ�.  "�����ٶ�"�� ������ �Ӹ����ڸ� ������ �ֱ�
%% ���ؼ��� ������ ���� \hindexhead�� ������ �մϴ�.
%% \renewcommand\hindexhead[1]{\indexspace
%%   {\bfseries
%%     ��\ifcase#1 �ɹ�\or ��\or ��\or ��\or ��\or ��\or ��\or
%%     ��\or ��\or ��\or ��\or ��\or ��\or ��\or ¥\or
%%     ��\or ī\or Ÿ\or ��\or ��\or ����\fi ��}
%%   \nopagebreak
%% }

\def\hindexhead#1{\indexspace}

\endinput
