summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty
blob: c6d37042c226a0ec4106b59a1f31fc882926a46d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
% $Id: kotex.sty,v 1.3 2013/02/22 10:23:16 nomos Exp $
%
% (C) Copyright 2007-2013 Koaunghi Un <koaunghi at kornet net>
%                         Kangsoo Kim <karnes at ktug or kr>
%                         Dohyun Kim  <nomos at ktug org>
%
% 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.
%
% -------------------------------------------------
%
% main style of ko.TeX
%
% Usage : \usepackage{kotex}          \usepackage[hangul]{kotex}
%         \usepackage[euc]{kotex}     \usepackage[euc,hangul]{kotex}
%         \usepackage[cjk]{kotex}     \usepackage[cjk,hangul]{kotex}

\ProvidesPackage{kotex}[2013/03/23 v1.1 Korean TeX (ko.TeX)]

\newif\if@ko@euc
\let\@ko@cjk\undefined

\ifx\directlua\relax \let\directlua\undefined \fi
\ifx\eTeXversion\relax \let\eTeXversion\undefined \fi
\ifx\eTeXversion\undefined \let\@ko@cjk\empty \fi
\IfFileExists{kotexutf.sty}{}{\let\@ko@cjk\empty}

\DeclareOption{utf}{}
\DeclareOption{euc}{\@ko@euctrue}
\DeclareOption{cjk}{\let\@ko@cjk\empty}
\DeclareOption*{
  \ifx가가%
    \ifx\directlua\undefined
      \PassOptionsToPackage{\CurrentOption}{xetexko}
    \else
      \PassOptionsToPackage{\CurrentOption}{luatexko}
    \fi
  \else
    \if@ko@euc
      \PassOptionsToPackage{\CurrentOption}{kotex-euc}
    \else
      \ifx\@ko@cjk\undefined
	\PassOptionsToPackage{\CurrentOption}{kotexutf}
      \else
	\PassOptionsToPackage{\CurrentOption}{cjkutf8-ko}
      \fi
    \fi
  \fi}
\InputIfFileExists{kotex.cfg}{}{}
\ProcessOptions\relax

%%% compatibility
\if@ko@euc \else
 \let\gtfamily\sffamily
 \DeclareTextFontCommand{\textgt}{\gtfamily}
\fi

%%% load one of ko.TeX packages
\ifx가가%
  \ifx\directlua\undefined
    \RequirePackage{xetexko}
  \else
    \RequirePackage{luatexko}
  \fi
\else
  \if@ko@euc
    \RequirePackage{kotex-euc}
  \else
    \ifx\@ko@cjk\undefined
      \RequirePackage{kotexutf}
    \else
      \RequirePackage{cjkutf8-ko}
    \fi
  \fi
\fi

\endinput