%%% file `kotex.sty`
%%
%% (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.
%%
%% -------------------------------------------------
%%
%% main style of ko.TeX
%%
%% Usage : \usepackage{kotex}          \usepackage[hangul]{kotex}
%%         \usepackage[euc]{kotex}     \usepackage[euc,hangul]{kotex}
%%
\ProvidesPackage{kotex}[2007/07/15 v0.1.0 Korean TeX (ko.TeX)]

\def\use@with@euc@only{%
 \if@ko@euc
   \PassOptionsToPackage{\CurrentOption}{kotex-euc}%
 \else
   \OptionNotUsed
   \PackageWarningNoLine{kotex}{Option not used: \CurrentOption}%
 \fi}
\def\use@with@utf@only{%
 \if@ko@euc
   \OptionNotUsed
   \PackageWarningNoLine{kotex}{Option not used: \CurrentOption}%
 \else
   \PassOptionsToPackage{\CurrentOption}{dhucs}%
 \fi}
\def\use@with@euc@utf@both{%
 \PassOptionsToPackage{\CurrentOption}{dhucs}%
 \PassOptionsToPackage{\CurrentOption}{kotex-euc}%
}

\newif\if@ko@euc\@ko@eucfalse

\DeclareOption{euc}{\@ko@euctrue}
\DeclareOption{utf}{\@ko@eucfalse}
%
\DeclareOption{finemath}{\use@with@utf@only}
\DeclareOption{strictcharcheck}{\use@with@utf@only}
\DeclareOption{nonfrench}{\use@with@utf@only}
\DeclareOption{softbold}{\use@with@euc@only}
\DeclareOption{hardbold}{\use@with@euc@only}
\DeclareOption{hfont}{\use@with@euc@only}
\DeclareOption{nojosa}{\use@with@euc@utf@both}
\DeclareOption{hangul}{\use@with@euc@utf@both}
\DeclareOption{hanja}{\use@with@euc@utf@both}
\DeclareOption*{\PackageWarningNoLine{kotex}{Option not used: \CurrentOption}}

\InputIfFileExists{kotex.cfg}{}{}
\ProcessOptions\relax

\if@ko@euc \RequirePackage{kotex-euc}\else \RequirePackage{dhucs}\fi

%%% compatibility
\if@ko@euc
 \newcommand*\SetHangulFonts[3]{%
    \PackageWarningNoLine{kotex}{SetHangulFonts command not used}}
 \newcommand*\SetHanjaFonts[3]{%
    \PackageWarningNoLine{kotex}{SetHanjaFonts command not used}}
 \newcommand*\SetSerifFonts[2]{%
    \PackageWarningNoLine{kotex}{SetSerifFonts command not used}}
 \newcommand*\SetSansFonts[2]{%
    \PackageWarningNoLine{kotex}{SetSansFonts command not used}}
 \newcommand*\SetAdhocFonts[2]{%
    \PackageWarningNoLine{kotex}{SetAdhocFonts command not used}}
 \let\usehangulfontspec\@gobble
 \let\setInterHangulSkip\hangulskip
\else
 \let\gtfamily\sffamily
 \DeclareTextFontCommand{\textgt}{\gtfamily}
 \let\hfontfamily\@gobble
 \let\hfontseries\@gobble
 \newcommand*\MapHangulFamily[2]{%
    \PackageWarningNoLine{kotex}{MapHangulFamily command not used}}
\fi

\endinput

%%% 한글라텍 ko.TeX 2007
%% 한글라텍 ko.TeX은 HLaTeX 1.0.1과 hangul-ucs 4.0.7의 이후 버전입니다.
%%
