summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
blob: dbd9fdc87abb4e16f1ac464ec5f71f902278e69d (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
% xetexko.sty
%
% Copyright (c) 2013 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.

\ifx\ProvidesPackage\relax \let\ProvidesPackage\undefined \fi
\ifx\ProvidesPackage\undefined
  \chardef\catcodeofATcharacter\catcode`@
  \catcode`\@ = 11

  \input xetexko-space.sty
  \input xetexko-josa.sty
  \input xetexko-vertical.sty

  % 한글 폰트
  \def\hangulfont{\font\hangfnt}
  \def\hanjafont {\font\hanifnt}
  %\hangulfont="[UnBatang]:mapping=tex-text" at 10pt
  %\let\hanifnt\hangfnt
  % 수식 한글
  \newfam\symmathhangul
  \def\setmathhangulfont#1#{\setmathhangulfont@}
  \def\setmathhangulfont@#1{%
    \font\tenhangul   = "#1" at 10pt
    \font\sevenhangul = "#1" at 7pt
    \font\fivehangul  = "#1" at 5pt
    \textfont\symmathhangul         = \tenhangul
    \scriptfont\symmathhangul       = \sevenhangul
    \scriptscriptfont\symmathhangul = \fivehangul
  }
  \setmathhangulblock{AC00}{D7A3}
  %\setmathhangulfont{[UnBatang]}

  \catcode`\@\catcodeofATcharacter
  \expandafter\endinput
\fi

\ProvidesPackage{xetexko}[2013/07/03 v2.1 Typesetting Korean with XeLaTeX]

\newif\if@hangul
\newif\if@hanja
\newif\if@unfonts
\DeclareOption{hangul}{\@hangultrue}
\DeclareOption{hanja}{\@hangultrue\@hanjatrue}
\DeclareOption{unfonts}{\@unfontstrue}
\ProcessOptions\relax

\RequirePackage{xetexko-space}
\RequirePackage{xetexko-josa}
\RequirePackage{xetexko-font}
\RequirePackage{xetexko-vertical}

\RequirePackage{kolabels-utf}
\if@hangul\AtBeginDocument{\RequirePackage{konames-utf}}\fi

\AtBeginDocument{
  % for ulem package
  \ifcsname UL@hook\endcsname \xetexkoulemsupport \fi
  % for hyperref package
  \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{%
	\let\dotemph\@firstofone
	\let\makejosa\@secondoftwo
	\let\jong\relax
	\let\jung\relax
	\let\rieul\relax
	\let\latinalphs\relax
	\let\hangulalphs\relax
	\let\hanjaalphs\relax
	\let\prevfontalphs\relax
	\let\latinnums\relax
	\let\hangulnums\relax
	\let\hanjanums\relax
	\let\prevfontnums\relax
	\let\latinparens\relax
	\let\hangulparens\relax
	\let\hanjaparens\relax
	\let\prevfontparens\relax
	\let\latinquotes\relax
	\let\hangulquotes\relax
	\let\hanjaquotes\relax
	\let\prevfontquotes\relax
	\let\latinpuncts\relax
	\let\hangulpuncts\relax
	\let\hanjapuncts\relax
	\let\prevfontpuncts\relax
	\let\latinmarks\relax
	\let\hangulmarks\relax
	\let\hanjamarks\relax
	\let\prevfontmarks\relax
	\let\latincolons\relax
	\let\hangulcolons\relax
	\let\hanjacolons\relax
	\let\prevfontcolons\relax
	\let\latinhyphens\relax
	\let\hangulhyphens\relax
	\let\hanjahyphens\relax
	\let\prevfonthyphens\relax
	\let\latincjksymbols\relax
	\let\hangulcjksymbols\relax
	\let\hanjacjksymbols\relax
	\let\prevfontcjksymbols\relax
	\let\disablekoreanfonts\relax
	\let\disablehangulspacing\relax
	\let\disablehangulspacingandlinebreak\relax
	\let\disableautojosa\relax
	\let\disablecjksymbolspacing\relax
	\let\japanese\relax
	\let\chinese\relax
	\let\Tchinese\relax
	\let\Schinese\relax
  }}{}
}

\endinput