summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs')
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/10_5.sty82
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/fapapersize.sty141
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontsel.sty88
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontspec.nanum11
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-common.sty949
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-patch.sty189
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-ucs.sty680
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-enumerate.sty49
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-gremph.sty114
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-interword.sty160
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-setspace.sty587
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/nanumfontsel.sty29
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-koreanappendix.sty94
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-nokoreanappendix.sty96
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-toclof.sty144
15 files changed, 3413 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/10_5.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/10_5.sty
new file mode 100644
index 00000000000..401c569ff9a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/10_5.sty
@@ -0,0 +1,82 @@
+%% File `10_5.sty`
+%%
+%% Copyright (c) 2006-2013 Kangsoo Kim <karnes 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.
+%%
+%% default font sizes 10.5
+%% 폰트 사이즈 설정.
+%%
+\def\@xvarpt{10.5}
+\def\@ixvarpt{9.5}
+\def\@vvarpt{5.5}
+\def\@vivarpt{6.5}
+\def\@viivarpt{7.5}
+\def\@viiivarpt{8.6}
+\def\@xivarpt{11.65}
+\def\@xiivarpt{12.5}
+\def\@xiiipt{13}
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xvarpt\@xiipt
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\renewcommand{\small}{%
+ \@setfontsize\small\@ixvarpt{11}%
+ \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus2\p@
+ \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 4\p@ \@plus2\p@ \@minus2\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep
+%% \itemindent\z@
+ }%
+ \belowdisplayskip \abovedisplayskip
+}
+\renewcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@viiivarpt{9.5}%
+ \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus\p@
+ \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 3\p@ \@plus\p@ \@minus\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep
+%% \itemindent\z@
+ }%
+ \belowdisplayskip \abovedisplayskip
+}
+\renewcommand{\miniscule}{\@setfontsize\miniscule\@vipt{6}}
+\renewcommand{\tiny}{\@setfontsize\tiny\@viipt{7.5}}
+\renewcommand{\scriptsize}{\@setfontsize\scriptsize\@viivarpt{8}}
+\renewcommand{\large}{\@setfontsize\large\@xivarpt{13.6}}
+\renewcommand{\Large}{\@setfontsize\Large\@xiiipt{14.5}}
+\renewcommand{\LARGE}{\@setfontsize\LARGE\@xivpt{18}}
+\renewcommand{\huge}{\@setfontsize\huge\@xviipt{22}}
+\renewcommand{\Huge}{\@setfontsize\Huge\@xxpt{25}}
+\renewcommand{\HUGE}{\@setfontsize\HUGE\@xxvpt{30}}
+\setlength{\onelineskip}{\@xiipt\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{15\p@}
+\fi
+
+\if@twocolumn
+ \setlength\marginparsep{11\p@}
+\else
+ \setlength\marginparsep{6\p@}
+\fi
+\setlength{\marginparpush}{7\p@}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/fapapersize.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/fapapersize.sty
new file mode 100644
index 00000000000..4cb7d1ffd6b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/fapapersize.sty
@@ -0,0 +1,141 @@
+%% File `fapapersize.sty`
+%%
+%% Copyright (c) 2006-2013 Kangsoo Kim <karnes 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.
+%%
+%% ver 0.031 (2006/12/04)
+%% trivial bug fix.
+%% ver 0.03 (2006/11/24)
+%% stocksize를 별도 지정할 수 있게 함
+%% option [stock], command \usefastocksize{<width>}{<height>}
+%% ver 0.02
+%% 사륙배판, 국판, 신국판 정의.
+%% marginnote 영역 설정은 제외되어 있음.
+\ProvidesPackage{fapapersize}
+%%%
+%%% 옵션
+%%% dbl4x6 : 사륙배판
+%%% mum : 국판
+%%% newmum : 신국판
+\DeclareOption{dbl4x6}{%
+ \AtEndOfPackage{\usefapapersize{190mm,260mm,30mm,*,30mm,*}}%
+}
+\DeclareOption{mum}{%
+ \AtEndOfPackage{\usefapapersize{148mm,210mm,25mm,*,25mm,*}}%
+}
+\DeclareOption{newmum}{%
+ \AtEndOfPackage{\usefapapersize{154mm,225mm,25mm,*,25mm,*}}%
+}
+\newif\ifStockSize@\StockSize@false
+\DeclareOption{stock}{%
+ \StockSize@true
+}
+\newif\if@showtrim\@showtrimfalse
+%\DeclareOption{trimmark}{\@showtrimtrue}
+\DeclareOption{showtrims}{\@showtrimtrue}
+\ProcessOptions
+
+\newlength\fa@stockheight\newlength\fa@stockwidth
+\newlength\fa@paperheight\newlength\fa@paperwidth
+\newlength\fa@leftmargin\newlength\fa@rightmargin
+\newlength\fa@uppermargin\newlength\fa@lowermargin
+\newlength\fa@tmplenwd\newlength\fa@tmplenht
+
+\newdimen\tmp@dim
+
+\def\set@paper@size{%
+ \ifnum\fa@paperwidth>\fa@tmplenwd
+ \if@showtrim
+ \typeout{the page size is too small. Trim mark will not be shown.}
+ \@showtrimfalse\trimNone
+ \fi
+ \fi
+ \if@showtrim
+ \setstocksize{\fa@tmplenht}{\fa@tmplenwd}
+ \settrimmedsize{\fa@paperheight}{\fa@paperwidth}{*}
+ \setlrmarginsandblock{\fa@leftmargin}{\fa@rightmargin}{*}
+ \setulmarginsandblock{\fa@uppermargin}{\fa@lowermargin}{*}
+ \setlength{\trimtop}{\stockheight}
+ \addtolength{\trimtop}{-\paperheight}
+ \setlength{\trimedge}{\stockwidth}
+ \addtolength{\trimedge}{-\paperwidth}
+ \settrims{.5\trimtop}{.5\trimedge}
+ \trimLmarks
+ \else
+ \setstocksize{\fa@paperheight}{\fa@paperwidth}
+ \settrimmedsize{\stockheight}{\stockwidth}{*}
+ \setlrmarginsandblock{\fa@leftmargin}{\fa@rightmargin}{*}
+ \setulmarginsandblock{\fa@uppermargin}{\fa@lowermargin}{*}
+ \trimNone
+ \fi
+ \tmp@dim=\headheight\advance\tmp@dim by\headsep\advance\tmp@dim by1mm
+ \ifdim\fa@uppermargin<\tmp@dim
+ \setheaderspaces{*}{10pt}{*}
+ \tmp@dim=\fa@uppermargin\advance\tmp@dim by-\headsep\advance\tmp@dim by-1mm
+ \setheadfoot{\tmp@dim}{\tmp@dim}
+ \fi
+ \checkandfixthelayout
+}
+
+\def\@usefastocksize#1#2{%
+ \setlength\fa@stockheight{#2}%
+ \setlength\fa@stockwidth{#1}%
+}
+
+\newcommand*{\usefastocksize}[1]{%
+ \set@fa@stocksizeparameters#1\@nil
+}
+
+\def\set@fa@stocksizeparameters#1,#2\@nil{%
+ \setlength{\fa@stockwidth}{#1}%
+ \setlength{\fa@stockheight}{#2}%
+}
+
+\def\@usefapapersize#1#2#3[#4]#5[#6]{%
+ \setlength\fa@paperwidth{#1}
+ \setlength\fa@paperheight{#2}
+ \setlength\fa@leftmargin{#3}
+ \setlength\fa@rightmargin{#4}
+ \setlength\fa@uppermargin{#5}
+ \setlength\fa@lowermargin{#6}
+}
+
+\newcommand*\usefapapersize[1]{%
+ \get@stocksize
+ \set@fa@papersizeparameters#1\@nil
+ \set@paper@size
+}
+
+\def\get@stocksize{%
+ \ifStockSize@
+ \def\fa@tmplenwd{\fa@stockwidth}\def\fa@tmplenht{\fa@stockheight}
+ \else
+ \def\fa@tmplenwd{\stockwidth}\def\fa@tmplenht{\stockheight}
+ \fi
+}
+
+\def\set@fa@papersizeparameters#1,#2,#3,#4,#5,#6\@nil{%
+ \ifx*#1\def\@tmp@pgwidth{\fa@tmplenwd}\else\def\@tmp@pgwidth{#1}\fi
+ \ifx*#2\def\@tmp@pgheight{\fa@tmplenht}\else\def\@tmp@pgheight{#2}\fi
+ \ifx*#4
+ \ifx*#6
+ \@usefapapersize{\@tmp@pgwidth}{\@tmp@pgheight}{#3}[{#3}]{#5}[{#5}]
+ \else
+ \@usefapapersize{\@tmp@pgwidth}{\@tmp@pgheight}{#3}[{#3}]{#5}[{#6}]
+ \fi\else
+ \ifx*#6
+ \@usefapapersize{\@tmp@pgwidth}{\@tmp@pgheight}{#3}[{#4}]{#5}[{#5}]
+ \else
+ \@usefapapersize{\@tmp@pgwidth}{\@tmp@pgheight}{#3}[{#4}]{#5}[{#6}]
+ \fi
+ \fi
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontsel.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontsel.sty
new file mode 100644
index 00000000000..93ecf2ca975
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontsel.sty
@@ -0,0 +1,88 @@
+%% File `hfontsel.sty`
+%%
+%% Copyright (c) 2006-2013 Kangsoo Kim <karnes 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.
+%%
+%% 사용법은 다음과 같음
+%% * 전체 정의
+%% \SelectHfonts{utbt,utgt,uttz}{utbt,utgt,utgt}
+%% * 한자 부분을 한글 부분과 같게. 주의.
+%% 은타자는 한자가 없으므로 타자체로 은타자를 설정한 경우
+%% 이 방식을 쓰면 ttfamily에서 오류.
+%% \SelectHfonts{utbt,utgt,utgt}{*}
+%% * 몇 개만 바꿀 때. 별표 부분은 모두 기본폰트(은글꼴)로 설정됨.
+%% \SelectHfonts{utbt,*,*}{*,*,utgt}
+%%
+%% 2007/06/03
+%% \SelectHfonts 명령에 의해 생성되는 \hfontfamilynameprefix (2letters)를
+%% [hfontspec] 옵션에 의하여 \usehangulfontspec의 인자로 사용한다. oblivoir
+%% 에서는 이 방법을 쓰지 않음.
+%% 2007/05/25
+%% dhucs 4.0 compatible
+%% \hfontfamilynameprefix는 사용되지 않을 것이나, 하위호환성을 위해 유지함.
+%% 2006/12/15
+%% bug fix. thanks to Dohyun Kim.
+%% 2006/09/06
+%% unfonts-type1을 쓸 때 \hfontfamilynameprefix가 {ut}로 되돌려지던 문제점 수정.
+%% non-default 상태에서는 hanja/roman의 설정에 영향을 받는다.
+%%
+\ProvidesPackage{hfontsel}[2013/09/27]
+
+\newif\if@pshfont\@pshfonttrue
+\DeclareOption{ps}{\@pshfonttrue}
+\DeclareOption{unttf}{\@pshfontfalse}
+\newif\if@hfontspec\@hfontspecfalse
+\DeclareOption{hfontspec}{\@hfontspectrue}
+\ProcessOptions
+
+\newif\if@defaulthfnt\@defaulthfnttrue
+\if@pshfont
+\def\defaulthfntprefix{ut}
+\else
+\def\defaulthfntprefix{un}
+\fi
+
+\def\FirstTwoOfFour#1#2#3#4{#1#2}
+\newcommand*\SelectHfonts[2]{%
+ \def\reserved@a{#2}\def\reserved@b{*}%
+ \ifx\reserved@a\reserved@b
+ \hangul@fontmap#1\@nil\hanja@fontmap#1\@nil
+ \else
+ \hangul@fontmap#1\@nil\hanja@fontmap#2\@nil
+ \fi
+ \if@hfontspec
+ \expandafter\usehangulfontspec\expandafter{\hfontfamilynameprefix}
+ \fi
+}
+\def\hangul@fontmap#1,#2,#3\@nil{%
+ \ifx*#1\def\h@ng@ls@rif{\defaulthfntprefix bt}\else\def\h@ng@ls@rif{#1}\fi
+ \ifx*#2\def\h@ng@ls@ns{\defaulthfntprefix gt}\else\def\h@ng@ls@ns{#2}\fi
+ \ifx*#3\def\h@ng@lt@z@{\defaulthfntprefix tz}\else\def\h@ng@lt@z@{#3}\fi
+ \SetHangulFonts{\h@ng@ls@rif}{\h@ng@ls@ns}{\h@ng@lt@z@}%
+}
+\def\hanja@fontmap#1,#2,#3\@nil{%
+ \ifx*#1\def\h@nj@s@rif{\defaulthfntprefix bt}\else\def\h@nj@s@rif{#1}\@defaulthfntfalse\fi
+ \ifx*#2\def\h@nj@s@ns{\defaulthfntprefix gt}\else\def\h@nj@s@ns{#2}\fi
+ \ifx*#3\def\h@nj@t@z@{\defaulthfntprefix gt}\else\def\h@nj@t@z@{#3}\fi
+ \SetHanjaFonts{\h@nj@s@rif}{\h@nj@s@ns}{\h@nj@t@z@}%
+%%%% 2006/09/06, 2007/05/25 downward compatibility
+ \if@defaulthfnt\def\hfontfamilynameprefix{ut}\else
+ \def\hfontfamilynameprefix{\expandafter\FirstTwoOfFour\h@nj@s@rif}\fi
+}
+
+%%% hangul font spec
+\if@hfontspec
+\usehangulfontspec{\defaulthfntprefix}
+\fi
+
+%%% default setting
+%\SelectHfonts{\defaulthfntprefix bt,\defaulthfntprefix gt,\defaulthfntprefix tz}{*}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontspec.nanum b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontspec.nanum
new file mode 100644
index 00000000000..0e6179f292b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/hfontspec.nanum
@@ -0,0 +1,11 @@
+hu = \z@
+interhchar = \z@
+fullstoplower = \z@
+exclamationlower = \z@
+questionlower = \z@
+serifhangulfont = nanummj
+sanshangulfont = nanumgt
+monohangulfont = nanumgt
+serifhanjafont = uhcmj
+sanshanjafont = nanumgt
+monohanjafont = nanumgt
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-common.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-common.sty
new file mode 100644
index 00000000000..f4681e39a9f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-common.sty
@@ -0,0 +1,949 @@
+%% File `memhangul-common.sty`
+%%
+%% (C) Copyright 2013 Kangsoo Kim <karnes 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.
+%%
+%%%
+%%% part of kotex-oblivoir
+%%%
+%%% =====================
+%%% 편, 장 섹션 타이틀 재설정
+%%% 절의 섹션 타이틀은 수정하지 않음.
+%%
+\ProvidesPackage{memhangul-common}[2013/10/22]
+
+\let\@CHAPAPP\@chapapp
+\def\refreshprepostchapters{%
+ \if@hanja
+ \def\pre@chapter{第}%
+ \else
+ \def\pre@chapter{제}%
+ \fi
+ \let\@chapapp\@CHAPAPP
+ \def\post@chapter{\@chapapp}%
+}
+\refreshprepostchapters
+%\renewcommand\@chapapp{장}
+\def\prechapternum{\pre@chapter}
+\def\postchapternum{\post@chapter}
+\newcommand\hchaptertitlehead{\pre@chapter\,\thechapter\,\post@chapter}
+\providecommand\partmark[1]{}
+
+\let\pre@part\pre@chapter
+\let\post@part\partname
+%\renewcommand{\printpartname}{\partnamefont \pre@part}
+\renewcommand{\printpartname}{} % disabled.
+\renewcommand{\partnamenum}{\space}
+\def\prepartnum{\partnamefont \pre@part}
+\def\postpartnum{\partnamefont \post@part}
+\newcommand\hparttitlehead{\pre@part\partnamenum\thepart\partnamenum\post@part}
+
+%% PART
+\long\def\@part[#1]#2{%
+ \M@gettitle{#1}%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}%
+ {\protect\partnumberline{\hparttitlehead}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+% \markboth{}{}%
+ \ifx#1\@empty\partmark{#2}\else\partmark{#1}\fi
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-2\relax
+ \prepartnum \partnamenum \printpartnum \partnamenum \postpartnum
+ \midpartskip
+ \fi
+ \printparttitle{#2}\par}%
+ \@endpart}
+
+\def\@spart#1{%
+ \M@gettitle{#1}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \printparttitle{#1}\par}%
+ \@endpart}
+
+\def\@endpart{\afterpartskip
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi}
+
+%% CHAPTER
+%%%%%%%%%%%
+%% we don't adapt mempatch 3.6, just retrieved to memoir-original manner.
+\renewcommand{\@m@mchapter}[1][\@empty]{%
+ \def\ch@pt@c{#1}% capture first optional arg
+ \@dblarg{\@chapter}}
+%%\def\m@m@empty{\@empty}
+
+\def\@chapter[#1]#2{%
+ \ifx\ch@pt@c\m@m@empty % no optional args
+ \def\f@rtoc{#1}%
+ \def\f@rhdr{#1}%
+ \else % at least one opt arg
+ \def\f@rtoc{\ch@pt@c}%
+ \nametest{#1}{#2}%
+ \ifsamename % one opt arg
+ \def\f@rhdr{\ch@pt@c}%
+ \else % two opt args
+ \def\f@rhdr{#1}%
+ \fi
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \fi
+ \fi
+ \chaptermark{\f@rhdr}%
+ \ifartopt
+ \@makechapterhead{#2}%
+ \@afterheading
+ \else
+ \insertchapterspace
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \fi
+ \@afterheading
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \addcontentsline{toc}{chapter}{%
+% \protect\chapternumberline{\thechapter}\f@rtoc}%
+ \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
+ \else
+ \addcontentsline{toc}{chapter}{\f@rtoc}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{\f@rtoc}%
+ \fi
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
+}
+
+\def\@makechapterhead#1{%
+ \chapterheadstart% \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \memucsinterwordchapterskiphook
+% \printchaptername \chapternamenum \printchapternum \chapternamenum \postchapternum
+ \prechapternum \chapternamenum \printchapternum \chapternamenum \postchapternum
+ \afterchapternum % \par\nobreak \vskip 20\p@
+ \else
+ \printchapternonum
+ \fi
+ \else
+ \printchapternonum
+ \fi
+ \interlinepenalty\@M
+ \printchaptertitle{#1} % \Huge \bfseries #1
+ \afterchaptertitle % \par\nobreak \vskip 40\p@
+ }}
+
+\def\@makeschapterhead#1{%
+ \chapterheadstart
+ {\parindent \z@ \raggedright \normalfont \memucsinterwordchapterskiphook
+ \printchapternonum
+ \interlinepenalty\@M
+ \printchaptertitle{#1}
+ \afterchaptertitle
+ }
+}
+
+\renewcommand{\@chs@def@ult}{%
+ \def\chapterheadstart{\vspace*{\beforechapskip}}
+% \def\printchaptername{\chapnamefont \@chapapp}
+% \def\printchaptername{\chapnamefont \pre@chapter}
+ \def\printchaptername{} % disabled.
+% \def\chapternamenum{\space}
+ \def\chapternamenum{\,}
+ \def\printchapternum{\chapnumfont \thechapter}
+ \def\prechapternum{\chapnamefont \pre@chapter}
+ \def\postchapternum{\chapnamefont \post@chapter}
+ \def\afterchapternum{\par\nobreak\vskip \midchapskip}
+ \def\printchapternonum{}
+ \def\printchaptertitle##1{\chaptitlefont ##1}
+ \def\postchaptertitle{\post@chapter}
+ \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
+}
+
+%% l@chapter, l@part
+
+\setlength{\cftpartnumwidth}{4.5em}
+\setlength{\cftchapternumwidth}{4.0em}
+%% for compatibility with mempatch 3.12
+\def\@chapapp@head{}%
+
+%% SECTION
+
+\renewcommand{\section}{%
+ \sechook\memucsinterwordhook%
+ \@startsection{section}{1}% level 1
+ {\secindent}% heading indent
+ {\beforesecskip}% skip before the heading
+ {\aftersecskip}% skip after the heading
+ {\normalfont\secheadstyle}} % font
+
+%% PAGESTYLES
+%% headings, ruled, Ruled, companioin을 수정함
+
+%% pagestyle headings
+\if@twoside
+ \makepagestyle{headings}
+ \makepsmarks{headings}{%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth{\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \hchaptertitlehead \enskip\ %
+ \fi
+ \fi
+ ##1}}{}}%
+ \def\tocmark{\markboth{\MakeUppercase{\contentsname}}{}}%
+ \def\lofmark{\markboth{\MakeUppercase{\listfigurename}}{}}%
+ \def\lotmark{\markboth{\MakeUppercase{\listtablename}}{}}%
+ \def\bibmark{\markboth{\MakeUppercase{\bibname}}{}}%
+ \def\indexmark{\markboth{\MakeUppercase{\indexname}}{}}%
+ \def\sectionmark##1{%
+ \markright{\MakeUppercase{%
+ \ifnum \c@secnumdepth > \z@
+ \thesection \enskip\ %
+ \fi
+ ##1}}}%
+ }
+ \makeevenhead{headings}{\thepage}{}{\normalfont\slshape\leftmark}
+ \makeoddhead{headings}{\normalfont\slshape\rightmark}{}{\thepage}
+\else
+ \makepagestyle{headings}
+ \makepsmarks{headings}{%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markright{\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \hchaptertitlehead \enskip\ %
+ \fi
+ \fi
+ ##1}}}%
+ \def\tocmark{\markright{\MakeUppercase{\contentsname}}}%
+ \def\lofmark{\markright{\MakeUppercase{\listfigurename}}}%
+ \def\lotmark{\markright{\MakeUppercase{\listtablename}}}%
+ \def\bibmark{\markright{\MakeUppercase{\bibname}}}%
+ \def\indexmark{\markright{\MakeUppercase{\indexname}}}%
+ }
+ \makeoddhead{headings}{\normalfont\slshape\rightmark}{}{\thepage}
+\fi
+
+%% Pagestyle ruled
+
+\makepagestyle{ruled}
+\makeevenfoot{ruled}{\thepage}{}{}
+\makeoddfoot{ruled}{}{}{\thepage}
+\makeheadrule{ruled}{\textwidth}{\normalrulethickness}
+\renewcommand{\@ruledmarks}{%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \hchaptertitlehead \enskip\ %
+ \fi
+ \fi
+ ##1}{}}
+ \def\sectionmark##1{\markright{##1}}
+ \def\tocmark{\markboth{\contentsname}{}}
+ \def\lofmark{\markboth{\listfigurename}{}}
+ \def\lotmark{\markboth{\listtablename}{}}
+ \def\bibmark{\markboth{\bibname}{}}
+ \def\indexmark{\markboth{\indexname}{}}
+}
+\makepsmarks{ruled}{\@ruledmarks}
+\makeevenhead{ruled}{\normalfont\scshape\leftmark}{}{}
+\makeoddhead{ruled}{}{}{\normalfont\rightmark}
+
+%% Pagestyle Ruled
+
+\makepagestyle{Ruled}
+\makerunningwidth{Ruled}{1.1\textwidth}
+\makeheadposition{Ruled}{flushright}{flushleft}{flushright}{flushleft}
+\makeevenfoot{Ruled}{\thepage}{}{}
+\makeoddfoot{Ruled}{}{}{\thepage}
+\makeheadrule{Ruled}{1.1\textwidth}{\normalrulethickness}
+\makepsmarks{Ruled}{\@ruledmarks}
+\makeevenhead{Ruled}{\normalfont\scshape\leftmark}{}{}
+\makeoddhead{Ruled}{}{}{\normalfont\rightmark}
+
+%% Pagestyle companion
+
+%\makepagestyle{companion}
+%\setlength{\headwidth}{\textwidth}
+% \addtolength{\headwidth}{\marginparsep}
+% \addtolength{\headwidth}{\marginparwidth}
+%\makerunningwidth{companion}{\headwidth}
+%\makeheadrule{companion}{\headwidth}{\normalrulethickness}
+%\makeheadposition{companion}{flushright}{flushleft}{}{}
+%\makepsmarks{companion}{%
+% \let\@mkboth\markboth
+% \def\chaptermark##1{\markboth{##1}{##1}} % left mark & right marks
+% \def\sectionmark##1{\markright{%
+% \ifnum \c@secnumdepth>\z@
+% \thesection. \ %
+% \fi
+% ##1}}
+% \def\tocmark{\markboth{\contentsname}{\contentsname}}
+% \def\lofmark{\markboth{\listfigurename}{\listfigurename}}
+% \def\lotmark{\markboth{\listtablename}{\listtablename}}
+% \def\bibmark{\markboth{\bibname}{\bibname}}
+% \def\indexmark{\markboth{\indexname}{\indexname}}
+%}
+%\makeevenhead{companion}{\normalfont\bfseries\thepage}{}%
+% {\normalfont\bfseries\leftmark}
+%\makeoddhead{companion}{\normalfont\bfseries\rightmark}{}%
+% {\normalfont\bfseries\thepage}
+
+%% 한글 pagestyle hangul
+\makepagestyle{hangul}
+\newdimen\pghgheadwidth\let\pghgheadwidth=\textwidth
+\makerunningwidth{hangul}{\pghgheadwidth}
+%\makeheadrule{hangul}{\pghgheadwidth}{0pt}
+\makeheadposition{hangul}{flushleft}{flushright}{flushleft}{flushright}
+\def\@hgpsmarks{%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth{\scshape
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \hchaptertitlehead \enskip\ %
+ \fi
+ \fi
+ ##1}{}}%
+ \def\tocmark{\markboth{\scshape\contentsname}{}}%
+ \def\lofmark{\markboth{\scshape\listfigurename}{}}%
+ \def\lotmark{\markboth{\scshape\listtablename}{}}%
+ \def\bibmark{\markboth{\scshape\bibname}{}}%
+ \def\indexmark{\markboth{\scshape\indexname}{}}%
+ \def\sectionmark##1{%
+ \markright{\scshape
+%% disabled printing \thesection.
+% \ifnum \c@secnumdepth >\z@
+% \thesection \enskip\ %
+% \fi
+ ##1}}%
+ }
+\makepsmarks{hangul}{\@hgpsmarks}
+\makeoddhead{hangul}{}{}{\normalfont\small\rightmark~\makebox[2em][r]{\normalfont\normalsize\sffamily\thepage}}
+\makeevenhead{hangul}{\makebox[2em][l]{\normalfont\normalsize\sffamily\thepage}~\normalfont\small\leftmark}{}{}
+
+%%% CHAPTERSTYLE
+
+\makechapterstyle{default}{%
+ \renewcommand{\post@chapter}{장}%
+ \renewcommand{\chapnamefont}{\normalfont\huge\bfseries}
+ \renewcommand{\chapnumfont}{\normalfont\huge\bfseries}
+ \renewcommand{\chaptitlefont}{\normalfont\Huge\bfseries}
+ \setlength{\beforechapskip}{50pt}
+ \setlength{\midchapskip}{20pt}
+ \setlength{\afterchapskip}{40pt}
+}
+\chapterstyle{default}
+
+%% for Appendix
+\makechapterstyle{appendixdefault}{%
+ \renewcommand{\chapnamefont}{\normalfont\huge\bfseries}
+ \renewcommand{\chapnumfont}{\normalfont\huge\bfseries}
+ \renewcommand{\chaptitlefont}{\normalfont\Huge\bfseries}
+% \renewcommand{\printchaptername}{\chapnumfont\@chapapp}
+ \renewcommand{\prechapternum}{\chapnumfont\@chapapp}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\chapternamenum}{\enskip}
+ \setlength{\beforechapskip}{50pt}
+ \setlength{\midchapskip}{20pt}
+ \setlength{\afterchapskip}{40pt}
+}
+
+\makechapterstyle{section}{%
+% \renewcommand{\printchaptername}{}
+ \renewcommand{\chapternamenum}{\enskip}
+ \renewcommand{\prechapternum}{}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\chapnumfont}{\normalfont\Huge\bfseries}
+ \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
+ \renewcommand{\afterchapternum}{}
+}
+
+%% for appendix
+\makechapterstyle{appendixsection}{%
+% \renewcommand{\printchaptername}{\chapnumfont\@chapapp}
+ \renewcommand{\chapternamenum}{\enskip}
+ \renewcommand{\prechapternum}{\chapnumfont\@chapapp}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\chapnumfont}{\normalfont\Huge\bfseries}
+ \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
+ \renewcommand{\afterchapternum}{}
+}
+
+\makechapterstyle{article}{%
+ \renewcommand{\chapterheadstart}{\vspace{\beforechapskip}}
+ \setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}
+ \setlength{\afterchapskip}{2.3ex \@plus .2ex}
+% \renewcommand{\printchaptername}{}
+ \renewcommand{\prechapternum}{}
+ \renewcommand{\chapternamenum}{}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\chaptitlefont}{\normalfont\Large\bfseries}
+ \renewcommand{\chapnumfont}{\normalfont\Large\bfseries}
+ \renewcommand{\printchapternum}{\chapnumfont \thechapter\quad}
+ \renewcommand{\afterchapternum}{}
+}
+
+\makechapterstyle{hangnum}{%
+ \renewcommand{\chapnumfont}{\chaptitlefont}
+ \settowidth{\chapindent}{\chapnumfont 999}
+% \renewcommand{\printchaptername}{}
+ \renewcommand{\chapternamenum}{}
+ \renewcommand{\prechapternum}{}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\printchapternum}{%
+ \noindent\llap{\makebox[\chapindent][l]{\chapnumfont \thechapter}}}
+ \renewcommand{\afterchapternum}{}
+}
+
+%\newlength{\chapindent}
+
+\makechapterstyle{companion}{%
+ \chapterstyle{default}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\scshape}
+ \renewcommand*{\printchaptername}{\raggedleft\chapnamefont \@chapapp}
+ \renewcommand*{\prechapternum}{\raggedleft\chapnamefont \pre@chapter}
+ \renewcommand*{\chapnumfont}{\normalfont\Huge}
+ \setlength{\chapindent}{\marginparsep}
+ \addtolength{\chapindent}{\marginparwidth}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \begin{adjustwidth}{}{-\chapindent}
+ \raggedleft \chaptitlefont ##1\par\nobreak
+ \end{adjustwidth}}}
+
+%% for appendix.
+\makechapterstyle{appendixcompanion}{%
+ \renewcommand{\chapnamefont}{\normalfont\LARGE\scshape}
+ \renewcommand{\prechapternum}{\raggedleft\chapnamefont \@chapapp}
+% \renewcommand{\printchaptername}{\raggedleft\chapnamefont \pre@chapter}
+ \renewcommand{\chapnumfont}{\normalfont\Huge}
+ \renewcommand{\postchapternum}{}
+ \setlength{\chapindent}{\marginparsep}
+ \addtolength{\chapindent}{\marginparwidth}
+ \renewcommand{\printchaptertitle}[1]{%
+ \begin{adjustwidth}{}{-\chapindent}
+ \raggedleft \chaptitlefont ##1\par\nobreak
+ \end{adjustwidth}}
+}
+
+\makechapterstyle{demo}{
+% \renewcommand{\printchaptername}{\centering}
+ \renewcommand{\prechapternum}{\centering}
+ \renewcommand{\printchapternum}{\chapnumfont \numtoName{\c@chapter}}
+ \renewcommand{\postchapternum}{}
+ \renewcommand{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
+ \renewcommand{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip \afterchapskip}
+}
+
+\makechapterstyle{demovar}{
+% \renewcommand{\printchaptername}{\centering}
+ \renewcommand{\prechapternum}{\centering}
+ \renewcommand{\printchapternum}{\chapnumfont \hNum{chapter}}
+ \renewcommand{\postchapternum}{\post@chapter}
+ \renewcommand{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
+ \renewcommand{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip \afterchapskip}
+}
+
+%% for appendix
+\makechapterstyle{appendixdemo}{
+% \renewcommand{\printchaptername}{\centering\chapnumfont\@chapapp}
+ \renewcommand{\prechapternum}{\centering\chapnumfont\@chapapp}
+ \renewcommand{\printchapternum}{\chapnumfont \@Alph\c@chapter}
+ \renewcommand{\postchapternum}{\ }
+ \renewcommand{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
+ \renewcommand{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip \afterchapskip}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%% appendix %%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\set@appendix@chapsec{%
+ %%% SECTION in APPENDIX
+ \renewcommand{\section}{%
+ \sechook\memucsinterwordhook%
+ \@startsection{section}{1}% level 1
+ {\secindent}% heading indent
+ {\beforesecskip}% skip before the heading
+ {\aftersecskip}% skip after the heading
+ {\normalfont\secheadstyle}} % font
+ \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
+ \ifheadnameref\M@gettitle{##8}\else\M@gettitle{##7}\fi
+ \ifnum ##2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{APP##1}%
+ \protected@edef\@svsec{\@seccntformat{##1}\relax}%
+ \fi
+ \@tempskipa ##5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ ##6{%
+ \@hangfrom{\hskip ##3\relax\@svsec}%
+ \interlinepenalty \@M ##9\@@par}%
+ \endgroup
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\noexpand\protect\csname the##1\endcsname}%
+ \fi
+ ##7}%
+ \else
+ \def\@svsechd{%
+ ##6{\hskip ##3\relax
+ \@svsec ##9}%
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\csname the##1\endcsname}%
+ \fi
+ ##7}}%
+ \fi
+ \@xsect{##5}}%
+}
+
+\def\restorechapsec{%
+ %%% SECTION in APPENDIX
+ \renewcommand{\section}{%
+ \sechook\memucsinterwordhook%
+ \@startsection{section}{1}% level 1
+ {\secindent}% heading indent
+ {\beforesecskip}% skip before the heading
+ {\aftersecskip}% skip after the heading
+ {\normalfont\secheadstyle}} % font
+ \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
+ \ifheadnameref\M@gettitle{##8}\else\M@gettitle{##7}\fi
+ \ifnum ##2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{##1}%
+ \protected@edef\@svsec{\@seccntformat{##1}\relax}%
+ \fi
+ \@tempskipa ##5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ ##6{%
+ \@hangfrom{\hskip ##3\relax\@svsec}%
+ \interlinepenalty \@M ##9\@@par}%
+ \endgroup
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\noexpand\protect\csname the##1\endcsname}%
+ \fi
+ ##7}%
+ \else
+ \def\@svsechd{%
+ ##6{\hskip ##3\relax
+ \@svsec ##9}%
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\csname the##1\endcsname}%
+ \fi
+ ##7}}%
+ \fi
+ \@xsect{##5}}
+}
+
+\renewcommand{\appendix}{\par
+% \setcounter{chapter}{0}%
+% \setcounter{section}{0}%
+% \gdef\@chapapp{\appendixname}%
+% \gdef\thechapter{\@Alph\c@chapter}%
+ \set@appendix@chapter
+ \anappendixtrue
+ \chapterstyle{appendixdefault}%
+}
+
+\newcounter{APPchapter}\setcounter{APPchapter}{0}%
+\newcounter{APPsection}[APPchapter]\setcounter{APPsection}{0}%
+\newcounter{APPsubsection}[APPsection]\setcounter{APPsubsection}{0}%
+
+\def\set@appendix@chapter{%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\Alph{APPchapter}}%
+ \gdef\thesection{\thechapter.\arabic{APPsection}}%
+% \counterwithout{figure}{chapter}\counterwithout{table}{chapter}%
+ \counterwithin{figure}{APPchapter}\counterwithin{table}{APPchapter}%
+ \counterwithin{equation}{APPchapter}%
+ \renewcommand\thefigure{\thechapter.\arabic{figure}}%
+ \renewcommand\thetable{\thechapter.\arabic{table}}%
+ \renewcommand\theequation{\thechapter.\arabic{equation}}%
+ \set@appendix@chapsec
+ \renewcommand\hchaptertitlehead{\appendixname\:\thechapter}%
+}
+
+%%% here, I will renewcommand chapterstyle,
+%%% to recover chapterstyle after appendices.
+\renewcommand{\chapterstyle}[1]{%
+ \@nameuse{chs@#1}%
+ \ifanappendix\else\gdef\CURR@chpstyle{#1}\fi
+}
+
+\def\restore@appendices@chapter{%
+ \refreshprepostchapters
+ \gdef\thechapter{\arabic{chapter}}%
+ \gdef\thesection{\thechapter.\arabic{section}}%
+ \def\hchaptertitlehead{\pre@chapter\:\thechapter}%
+ \counterwithin{figure}{chapter}\counterwithin{table}{chapter}%
+ \restorechapsec
+ \@ifundefined{CURR@chapstyle}{\chapterstyle{default}}%
+ {\expandafter\expandafter\chapterstyle{\CURR@chapstyle}}%
+}
+
+\renewcommand{\@resets@pp}{%
+ \par
+ \@ppsavesec
+% \setcounter{section}{0}%
+% \setcounter{chapter}{0}%
+% \renewcommand\@chapapp{\appendixname}%
+% \renewcommand\thechapter{\@Alph\c@chapter}%
+ \set@appendix@chapter
+ \chapterstyle{appendixdefault}
+ \restoreapp
+}
+
+\renewenvironment{appendices}%
+ {\@resets@pp\anappendixtrue}%
+ {\@ppsaveapp\@pprestoresec\restore@appendices@chapter\anappendixfalse}
+
+\renewenvironment{subappendices}{%
+ \@resets@ppsub
+ \def\addappheadtotoc{\phantomsection\addcontentsline{toc}{section}{\appendixtocname}} % <- mempatch 2.3
+ \ifnamesubappendix
+ \def\sectionname{\protect\subappendixname}%
+ \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }%
+ \csname the##1\endcsname\quad}
+ \fi
+ }{}
+
+%%% References
+\renewcommand\Cref[1]{%
+ \pre@chapter\,\ref{#1}\,\chapterrefname%
+}
+\renewcommand\Pref[1]{%
+ \pre@part\,\ref{#1}\,\partrefname%
+}
+\renewcommand\pref[1]{%
+ \pageref{#1}~\pagerefname
+}
+\renewcommand\tref[1]{%
+ \tablerefname~\ref{#1}%
+}
+\renewcommand\fref[1]{%
+ \figurerefname~\ref{#1}%
+}
+
+%% arabic, roman... etc.
+%%\def\HArabic#1{\arabic{#1}}
+\def\HAlph#1{\Alph{#1}}
+\def\Halph#1{\alph{#1}}
+\def\HROMAN#1{\hRoman{#1}}
+\def\Hroman#1{\hroman{#1}}
+%%
+
+%% phantomchapter = phantomsection
+\def\phantomchapter{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{chapter*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
+}
+
+%%% index
+\renewcommand{\@wrindexm@m}[1]{\@@wrindexhyp#1||\\}
+
+
+%%% 한글 문장부호 관련 명령
+%%% \hfontfamilynameprefix is deprecated. (ver1.5.0)
+\def\hfontfamilynameprefix{ut} % for compatibility only
+
+\def\cnm@char@open{〈}
+\def\cnm@char@close{〉}
+\def\ccnm@char@open{《}
+\def\ccnm@char@close{》}
+\def\snm@char@open{「}
+\def\snm@char@close{」}
+\def\bnm@char@open{『}
+\def\bnm@char@close{』}
+
+\def\memx@make@bnmcmd#1#2{%
+ \leavevmode
+ \unhbox0\memx@bnmcmd@prekern\csname #1@char@open\endcsname
+ #2\csname #1@char@close\endcsname\memx@bnmcmd@postkern
+}
+
+\protected\def\cnm{%
+ \@ifnextchar*\cnm@star\cnm@nostar
+}
+
+\def\cnm@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{cnm}{#1}%
+}
+
+\def\cnm@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{cnm}{#1}%
+}
+
+\protected\def\ccnm{%
+ \@ifnextchar*\ccnm@star\ccnm@nostar
+}
+
+\def\ccnm@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{ccnm}{#1}%
+}
+
+\def\ccnm@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{ccnm}{#1}%
+}
+
+
+\protected\def\snm{%
+ \@ifnextchar*\snm@star\snm@nostar
+}
+
+\def\snm@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{snm}{#1}%
+}
+
+\def\snm@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{snm}{#1}%
+}
+
+
+\protected\def\bnm{%
+ \@ifnextchar*\bnm@star\bnm@nostar
+}
+
+\def\bnm@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{bnm}{#1}%
+}
+
+\def\bnm@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{bnm}{#1}%
+}
+
+\AtBeginDocument{
+ \@ifpackageloaded{hyperref}{%
+ \pdfstringdefDisableCommands{%
+ \def\cnm#1{\ifx#1*\expandafter\@@cnm\else <#1>\fi}
+ \def\@@cnm#1{<#1>}
+ \def\snm#1{\ifx#1*\expandafter\@@cnm\else <#1>\fi}
+ \def\ccnm#1{\ifx#1*\expandafter\@@cnm\else <#1>\fi}
+ \def\bnm#1{\ifx#1*\expandafter\@@cnm\else <#1>\fi}
+ \def\oblivoirdblquote#1{\ifx#1*\expandafter\@@obquote\else "#1"\fi}
+ \def\@@obquote#1{"#1"}
+ \def\oblivoirquote#1{\ifx#1*\expandafter\@@obsquote\else '#1'\fi}
+ \def\@@obsquote#1{'#1'}
+ \def\cntrdots{…}
+ }%
+ }{}
+}
+
+%%%% 따옴표
+\def\oblivoirdblquote@char@open{“}
+\def\oblivoirdblquote@char@close{”}
+\def\oblivoirquote@char@open{‘}
+\def\oblivoirquote@char@close{’}
+
+\protected\def\oblivoirdblquote{%
+ \@ifnextchar*\oblivoirdblquote@star\oblivoirdblquote@nostar
+}
+
+\def\oblivoirdblquote@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{oblivoirdblquote}{#1}%
+}
+
+\def\oblivoirdblquote@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{oblivoirdblquote}{#1}%
+}
+
+\protected\def\oblivoirquote{%
+ \@ifnextchar*\oblivoirquote@star\oblivoirquote@nostar
+}
+
+\def\oblivoirquote@star*#1{%
+ \def\memx@bnmcmd@prekern{\kern-.35em}%
+ \def\memx@bnmcmd@postkern{\kern-.4em}%
+ \memx@make@bnmcmd{oblivoirquote}{#1}%
+}
+
+\def\oblivoirquote@nostar#1{%
+ \let\memx@bnmcmd@prekern\relax
+ \let\memx@bnmcmd@postkern\relax
+ \memx@make@bnmcmd{oblivoirquote}{#1}%
+}
+
+%%%% cntrdots
+
+\ifx\cntrdot\undefined
+\DeclareRobustCommand{\cntrdot}{%
+ \@ifnextchar*\@cntrd@t\@@cntrd@t
+}
+\else
+\renewcommand{\cntrdot}{%
+ \@ifnextchar*\@cntrd@t\@@cntrd@t
+}
+\fi
+
+\ifx\oblivoirallowbreak\undefined
+\let\oblivoirallowbreak\allowbreak
+\fi
+
+\def\@cntrd@t*{%
+ \leavevmode\kern.2em\@@cntrd@t\hskip.2em\oblivoirallowbreak
+}
+\def\@@cntrd@t{%
+ \leavevmode\nobreak\raise.02ex\hbox{·}\oblivoirallowbreak
+}
+
+\DeclareRobustCommand{\cntrdots}{%
+ \leavevmode…%\oblivoirallowbreak
+}
+
+\DeclareRobustCommand{\cntrdotss}{%
+ \leavevmode ……%
+}
+
+%% Punctuation Explanation Rule.
+%% usage: \explpunc.Some_running_texts.\ % last space must not be succeeded by ^M.
+\protected\def\explpunc.#1.\ {\leavevmode\,\XBrule#1\XErule\,}
+\protected\def\expldash{\leavevmode\,\XBrule\,}
+%
+\newsavebox\togetheightoffont\sbox\togetheightoffont{!}
+\newlength\htoffnt\setlength\htoffnt{\ht\togetheightoffont}
+\addtolength\htoffnt{\dp\togetheightoffont}
+\def\XBrule{\raise.45\htoffnt\hbox{\rule{1.25em}{.25pt}}}
+\def\XErule{\raise.45\htoffnt\hbox{\hskip1pt\rule{1.25em}{.25pt}}}
+
+%% Misc def.
+%\def\PageName{페이지}
+%\def\AltPageName{쪽}
+
+%% \titleref
+%% -- 2009/02/11. revert to original definition.
+\let\M@TitleReference\@firstoftwo
+\let\M@M@TitleReference\@firstoftwo
+\def\@mem@theTR{\let\M@M@TitleReference\@firstoftwo\theTitleReference}
+
+%% vertical distance of math display
+\if@mathdisp
+\addtodef{\normalsize}{}{\abovedisplayskip 6\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 3\p@ \@plus3\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip}
+\fi
+
+%% arabic frontmatter numbering
+\if@arabicfrontmatter
+\renewcommand{\@memfront}{%
+ \@smemfront\pagenumbering{arabic}}
+\fi
+
+%% default pagestyle
+\if@defaulthangulpagestyle
+ \pagestyle{hangul}
+\fi
+
+%% 할주.
+%% still experimental not complete.
+%% \hbox로 처리하기 때문에 행끝에서 할주 행나눔은 이루어지지 않는다.
+%% 글꼴이 \tiny로 고정. \footnotesize를 쓰면 행간이 흐트러짐.
+%% TODO: 현재 설정은 10pt 문서에서 1pt정도가 행간에 추가됨.
+%% \lineskiplimit를 이용해서 행간을 고정시켜둘 것인지는 아직
+%% 결정하지 못하였음.
+\newskip\divnoteskip
+\divnoteskip = .18em plus .02em minus .02em
+\def\divnotestyle{%
+ \spaceskip\divnoteskip\normalfont\tiny}
+\def\divnote#1{%
+ \settowidth{\@tempdima}{\divnotestyle #1}%
+ \hskip.1em$\big($\raise.2em\hbox{\parbox{.525\@tempdima}{\divnotestyle\singlespace #1}}$\big)$\hskip.1em%
+}
+
+%% 각주 설정을 위한 추가 매크로
+\def\SetFnmark#1#2{%
+ \expandafter\def\csname @makefnmark\endcsname{\bgroup #1\@thefnmark#2\egroup}%
+}
+
+%% chapter의 첫 단락 들여쓰기.
+\newcommand*\chapterindentfirst{%
+ \addtodef{\@afterheading}{\@afterindenttrue}{}
+}
+
+%% memhangul-patch
+\InputIfFileExists{memhangul-patch.sty}{}{}
+
+%%% fig, tab caption
+\def\obCaptionFont#1{\def\@figtabcaptfont@{#1}}
+\providecommand\@figtabcaptfont@{\normalfont}
+\if@figtabcapt@
+\precaption{{\@figtabcaptfont@\cnm@char@open}}
+\captiondelim{{\@figtabcaptfont@\cnm@char@close}\quad}
+\renewcommand\cfttablepresnum{\cnm@char@open\tablename\space}
+\renewcommand\cfttableaftersnum{\cnm@char@close}
+\renewcommand\cfttablenumwidth{3.8em}
+\renewcommand\cftfigurepresnum{\cnm@char@open\figurename\space}
+\renewcommand\cftfigureaftersnum{\cnm@char@close}
+\renewcommand\cftfigurenumwidth{4.5em}
+\fi
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-patch.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-patch.sty
new file mode 100644
index 00000000000..260e711ffe4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-patch.sty
@@ -0,0 +1,189 @@
+%% File `memhangul-patch.sty`
+%%
+%% Copyright (c) 2005-2013 Kangsoo Kim <karnes 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.
+%%
+%% 2005/10/15
+%% some day, this patch has to be weaved into memhangul-use, 1.4, I hope.
+%% 2005/12/28
+%% appendix-related minor fix
+%% 2006/04/27
+%% remove redundant prerenderunicodes according to dhucs 3.0.0
+%%
+\typeout{memhangul-ucs patch for memoir 1.618, 2006/04/27}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% PART
+\long\def\@part[#1]#2{%
+% \ifx#1\@empty\PrerenderUnicode{#2}\else\PrerenderUnicode{#1}\fi
+ \M@gettitle{#1}%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}%
+% {\protect\partnumberline{\thepart}#1}%
+ {\protect\partnumberline{\hparttitlehead}#1}%
+ \mempartinfo{\thepart}{#1}{#2}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \mempartinfo{}{#1}{#2}%
+ \fi
+ \partmark{#1}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-2\relax
+% \printpartname \partnamenum \printpartnum
+% \midpartskip
+ \prepartnum \partnamenum \printpartnum \partnamenum \postpartnum
+ \midpartskip
+ \fi
+ \printparttitle{#2}\par}%
+ \@endpart}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% CHAPTER
+%% memhangul : opt args : different from memoir 1.618
+%% \chapter[toc][hdr]{title}
+%% \chapter[toc]{hdr/title}
+%% \chapter{toc/hdr/title}
+\def\@chapter[#1]#2{%
+% \ifx\ch@pt@c\@empty % no optional args
+% \def\f@rtoc{#2}%
+% \def\f@rhdr{#2}%
+% \PrerenderUnicode{#2}%
+% \else % at least one opt arg
+% \let\f@rtoc\ch@pt@c
+% \ifx\@empty#1\@empty
+% \let\f@rhdr\ch@pt@c
+% \PrerenderUnicode{#1#2}%
+% \else
+% \def\f@rhdr{#1}%
+% \PrerenderUnicode{#1}%
+% \fi
+% \fi
+ \ifx\ch@pt@c\m@m@empty % no optional args
+ \def\f@rtoc{#1}%
+ \def\f@rhdr{#1}%
+% \PrerenderUnicode{#1}%
+ \else % at least one opt arg
+ \def\f@rtoc{\ch@pt@c}%
+ \nametest{#1}{#2}%
+ \ifsamename % one opt arg
+ \def\f@rhdr{\ch@pt@c}%
+% \PrerenderUnicode{#1#2}%
+ \else % two opt args
+ \def\f@rhdr{#1}%
+% \PrerenderUnicode{#1}%
+ \fi
+ \fi
+ \m@m@Andfalse
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \m@m@Andtrue
+ \fi
+ \fi
+ \ifm@m@And
+ \ifanappendix
+ \refstepcounter{APPchapter}%
+ \else
+ \refstepcounter{chapter}%
+ \fi
+ \fi
+ \chaptermark{\f@rhdr}
+ \ifartopt
+ \@makechapterhead{#2}%
+ \@afterheading
+ \else
+ \insertchapterspace
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \fi
+ \@afterheading
+ \fi
+ \ifm@m@And
+ \ifanappendix
+ \addcontentsline{toc}{appendix}{%
+% \protect\chapternumberline{\thechapter}\f@rtoc}%
+ \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
+% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
+ \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
+ \else
+ \addcontentsline{toc}{chapter}{%
+% \protect\chapternumberline{\thechapter}\f@rtoc}%
+ \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
+% \memchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
+ \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{\f@rtoc}%
+ \ifanappendix
+ \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
+ \else
+ \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
+ \fi
+ \fi
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
+%%% for chapter
+ \ifanappendix
+ \protected@edef\@currentlabel{\thechapter}%
+ \fi
+}
+
+\def\@makechapterhead#1{%
+ \chapterheadstart% \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifm@m@And
+ \memucsinterwordchapterskiphook
+% \printchaptername \chapternamenum \printchapternum
+% \afterchapternum % \par\nobreak \vskip 20\p@
+ \prechapternum \chapternamenum \printchapternum \chapternamenum \postchapternum
+ \afterchapternum % \par\nobreak \vskip 20\p@
+ \else
+ \printchapternonum
+ \fi
+ \interlinepenalty\@M
+ \printchaptertitle{#1} % \Huge \bfseries #1
+ \afterchaptertitle % \par\nobreak \vskip 40\p@
+ }}
+
+
+\renewcommand{\@m@mschapter}[2][\@empty]{%
+ \@schapter{#2}%
+ \ifx \@empty#1
+ \def\f@rhdr{#2}%
+% \PrerenderUnicode{#2}%
+ \else % opt arg
+ \def\f@rhdr{#1}%
+% \PrerenderUnicode{#1}%
+ \setcounter{secnumdepth}{-10}%
+ \chaptermark{#1}%
+ \setcounter{secnumdepth}{\value{maxsecnumdepth}}%
+ \fi
+ \ifanappendix
+ \memappchapstarinfo{\f@rhdr}{#2}%
+ \else
+ \memchapstarinfo{\f@rhdr}{#2}%
+ \fi}
+
+\def\@makeschapterhead#1{%
+ \chapterheadstart
+% {\parindent \z@ \raggedright \normalfont
+ {\parindent \z@ \raggedright \normalfont \memucsinterwordchapterskiphook
+ \printchapternonum
+ \interlinepenalty\@M
+ \printchaptertitle{#1}
+ \afterchaptertitle
+ }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-ucs.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-ucs.sty
new file mode 100644
index 00000000000..d624cf26562
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memhangul-ucs.sty
@@ -0,0 +1,680 @@
+%%% file `memhangul-ucs.sty`
+%%
+%% (C) Copyright 2006-2013 Kangsoo Kim <karnes 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.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{2013/10/22}
+\def\fileversion{1.7.6}
+\ProvidesPackage{memhangul-ucs}[\filedate UCS Hangul Package for memoir class]
+\typeout{memhangul-ucs\space v\fileversion\space \filedate}
+
+%% Options :
+%% interwordHWP, interworddefault
+%% nosetspace, quotespacing,
+%% gremph
+%% nonfrench
+%% arabicfront, hangulpagestyle
+%% adjustmath
+%% finemath
+\newif\if@interwordHWP\@interwordHWPfalse
+\DeclareOption{interwordHWP}{\@interwordHWPtrue}
+
+\newif\if@interworddefault\@interworddefaultfalse
+\DeclareOption{interworddefault}{\@interworddefaulttrue}
+
+\newif\if@hsspace\@hsspacetrue
+\DeclareOption{nosetspace}{\@hsspacefalse}
+
+\newcommand\nosetspace{%
+ \@hsspacefalse
+}
+
+\newif\if@hsspacenoquote\@hsspacenoquotetrue
+\DeclareOption{quotespacing}{\@hsspacenoquotefalse}
+
+\newif\if@nonfrench\@nonfrenchfalse
+\DeclareOption{nonfrench}{\PassOptionsToPackage{\CurrentOption}{dhucs}\@nonfrenchtrue}
+
+\newif\if@nojosa\@nojosafalse
+\DeclareOption{nojosa}{\PassOptionsToPackage{\CurrentOption}{dhucs}\@nojosatrue}
+
+\newif\if@hanja\@hanjafalse
+\DeclareOption{hanja}{\PassOptionsToPackage{\CurrentOption}{dhucs}\@hanjatrue}
+
+\newif\if@finemath\@finemathfalse
+\DeclareOption{finemath}{\PassOptionsToPackage{\CurrentOption}{dhucs}\@finemathtrue}
+
+\newif\if@gremph\@gremphfalse
+\DeclareOption{gremph}{\@gremphtrue}
+
+\newif\if@mathdisp\@mathdispfalse
+\DeclareOption{adjustmath}{\@mathdisptrue}
+
+\newif\if@arabicfrontmatter{\@arabicfrontmatterfalse}
+\DeclareOption{arabicfront}{\@arabicfrontmattertrue}
+
+\newif\if@defaulthangulpagestyle{\@defaulthangulpagestylefalse}
+\DeclareOption{hangulpagestyle}{\@defaulthangulpagestyletrue}
+
+\newif\if@pdfbookmark{\@pdfbookmarkfalse}
+\DeclareOption{pdfbookmark}{\@pdfbookmarktrue}
+
+\newif\if@dvips{\@dvipsfalse}
+\DeclareOption{dvips}{\@dvipstrue}
+
+\DeclareOption{strictcharcheck}{\PassOptionsToPackage{\CurrentOption}{dhucs}}
+
+%%% figtabcapt
+\newif\if@figtabcapt@\@figtabcapt@false
+\DeclareOption{figtabcapt}{\@figtabcapt@true}
+
+%%% dhucs, cjk
+\DeclareOption{dhucs}{}
+\DeclareOption{cjk}{}
+
+\ProcessOptions
+
+\RequirePackage{dhucs}[2007/06/26]
+
+%% define memh@hu
+%hu=0.059375em % 1jw=.95em, 1hu=1/16jw
+\newdimen\memh@hu\memh@hu=\dhucs@hu
+
+\newif\if@inthekoreancontext\@inthekoreancontexttrue
+
+\AtBeginDocument{%
+ \@ifpackageloaded{dhucs-trivcj}{%
+ \newdimen\japparindent\japparindent=1em%
+% \def\cjksymbolextraspace{\hskip4em\relax}%
+ \renewenvironment{japanese}{%
+ \@inthekoreancontextfalse
+ \let\ORIGparindent=\parindent
+ \parindent=\japparindent
+ \if@afterindent\let\ORIG@afterindent\@afterindenttrue\else
+ \let\ORIG@afterindent\@afterindentfalse\fi % advised by SUGAI Y.
+ \let\@afterindentfalse\@afterindenttrue\@afterindenttrue
+ \SetHanjaFonts{min}{min}{min}\trivcjtypesetting}%
+ {\@inthekoreancontexttrue
+ \parindent=\ORIGparindent
+ \ORIG@afterindent}
+ \renewenvironment{chinese}{%
+ \@inthekoreancontextfalse
+ \let\ORIGparindent=\parindent
+ \parindent=\japparindent
+ \SetHanjaFonts{gbsn}{gbsn}{gbsn}\trivcjtypesetting}%
+ {\@inthekoreancontexttrue
+ \parindent=\ORIGparindent}
+ }{}%
+}
+
+%%%% from lucenc.dfu of dhucs
+\AtBeginDocument{% not to be affected by textcomp
+\DeclareUnicodeCharacter{00B7}% ·
+ {\leavevmode\hbox to.7em{\hss\textperiodcentered\hss}\postcjksymbol}%
+}
+%\DeclareUnicodeCharacter{3001}% 、
+% {\unkern\hbox to.5em{\unihangulchar{"3001}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3002}% 。
+% {\unkern\hbox to.6em{\unihangulchar{"3002}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3008}% 〈
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3008}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{3009}% 〉
+% {\unkern\hbox to.5em{\unihangulchar{"3009}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{300A}% 《
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"300A}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{300B}% 》
+% {\unkern\hbox to.5em{\unihangulchar{"300B}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{300C}% 「
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"300C}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{300D}% 」
+% {\unkern\hbox to.5em{\unihangulchar{"300D}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{300E}% 『
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"300E}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{300F}% 』
+% {\unkern\hbox to.5em{\unihangulchar{"300F}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3010}% 【
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3010}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{3011}% 】
+% {\unkern\hbox to.5em{\unihangulchar{"3011}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3014}% 〔
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3014}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{3015}% 〕
+% {\unkern\hbox to.5em{\unihangulchar{"3015}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3016}% 〖
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3016}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{3017}% 〗
+% {\unkern\hbox to.5em{\unihangulchar{"3017}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{3018}% 〘
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3018}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{3019}% 〙
+% {\unkern\hbox to.5em{\unihangulchar{"3019}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{301A}% 〚
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"301A}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{301B}% 〛
+% {\unkern\hbox to.5em{\unihangulchar{"301B}\hss}\memh@postcjksymkern}
+%\DeclareUnicodeCharacter{FF08}% (
+% {\memh@cjksymbolskip\hbox to.5em{\hss\unihangulchar{"FF08}}\postcjksymnobreak}
+%\DeclareUnicodeCharacter{FF09}% )
+% {\unkern\hbox to.5em{\unihangulchar{"FF09}\hss}\memh@postcjksymkern}
+
+%% We will use E-TEX
+%\RequirePackage{etex}
+
+%% memoir [ms] option
+\ifmsdoc
+\newcommand*\MSNormalSize{
+ \let\large\normalsize
+ \let\Large\normalsize
+ \let\LARGE\normalsize
+ \let\huge\normalsize
+ \let\Huge\normalsize
+ \let\HUGE\normalsize
+ \let\small\normalsize
+ \let\scriptsize\normalsize
+ \let\footnotesize\normalsize
+ \let\tiny\normalsize
+ }
+\AtBeginDocument{
+ \let\dhucs@serifhangulfont\dhucs@monohangulfont
+ \let\dhucs@sanshangulfont\dhucs@monohangulfont
+ \let\dhucs@serifhanjafont\dhucs@monohanjafont
+ \let\dhucs@sanshanjafont\dhucs@monohanjafont
+ \setInterHangulSkip{\z@}
+ \renewcommand{\msdoublespacing}{%
+ \renewcommand{\baselinestretch}{1.75}\large\normalsize}
+ \renewcommand{\mssinglespacing}{%
+ \renewcommand{\baselinestretch}{1.1}\large\normalsize}
+ \renewcommand{\familydefault}{cmtt}
+ \renewcommand{\rmdefault}{cmtt}
+ \renewcommand{\sfdefault}{cmtt}
+ \renewcommand{\bfdefault}{m}
+ \renewcommand{\itdefault}{n}
+ \renewcommand{\sldefault}{n}
+ \renewcommand{\scdefault}{n}
+ \renewcommand{\baselinestretch}{1.75}
+ \@twocolumnfalse
+ \onecolumn
+ \sloppy
+ \@twosidefalse
+ \raggedbottom
+ \pagestyle{plain}
+}
+\fi
+
+%% load hyperref for pdf bookmarks.
+%% to configure hyperref, you can use \hypersetup command.
+%%%%% 1.4.4b -> disable CJKbookmarks, just use dhucs-ucshyper
+%% 2007/06/03. drop dhucs-ucshyper
+\if@pdfbookmark
+ \@ifpackageloaded{hyperref}{% hyperref is already loaded
+ \typeout{hyperref is already loaded!}%
+ \RequirePackage{memhfixc}}%
+ {%
+ \if@dvips
+ \RequirePackage[dvips,unicode]{hyperref}%
+ \else
+ \ifpdf
+ \RequirePackage[pdftex,unicode]{hyperref}%
+ \else
+ \RequirePackage[dvipdfm,unicode]{hyperref}%
+ \fi
+ \fi
+ \RequirePackage{memhfixc}}
+\fi
+
+%% from ucs-hangul.tex
+% \def\hNum#1{\@hNum{\@nameuse{c@#1}}}
+% \def\@hNum#1{\ifcase#1\or 일\or 이\or 삼\or 사\or 오\or 육\or 칠\or
+ % 팔\or 구\or 십\or 십일\or 십이\or 십삼\or 십사\or 십오\or 십육\or
+ % 십칠\or 십팔\or 십구\or 이십\or 이십일\or 이십이\or 이십삼\or
+ % 이십사\else\@ctrerr\fi}
+% \def\hanjanum#1{\@hanjanum{\@nameuse{c@#1}}}
+% \def\@hanjanum#1{\ifcase#1\or 一\or 二\or 三\or
+ % 四\or 五\or 六\or 七\or 八\or 九\or 十\or
+ % 十一\or 十二\or 十三\or 十四\or 十五\or
+ % 十六\or 十七\or 十八\or 十九\or 二十\or
+ % 二十一\or 二十二\or 二十三\or 二十四\else\@ctrerr\fi}
+% \def\HArabic#1{\@HArabic{\@nameuse{c@#1}}}
+% \def\@HArabic#1{\ifcase#1\or 1\rieul\or 2\jung\or 3\jong\or 4\jung\or 5\jung\or
+ % 6\jong\or 7\rieul\or 8\rieul\or 9\jung\or 10\jong\or 11\rieul\or 12\jung\or
+ % 13\jong\or 14\jung\or 15\jung\or 16\jong\or 17\rieul\or 18\rieul\or 19\jung\or
+ % 20\jong\or 21\rieul\or 22\jung\or 23\jong\or 24\jung\else\@ctrerr\fi}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 한글 관련 이름 설정 (not from hangul.sty)
+
+\if@hanja
+\def\today{\number\year 年~\number\month 月~\number\day 日}
+\def\enclname{同封物}
+\def\ccname{寫本}
+\def\headtoname{受信人}
+\def\seename{\을~參照}
+\def\alsoname{\을~參照}
+\def\contentsname{目~次}
+\def\listfigurename{圖~目次}
+\def\listtablename{表~目次}
+\def\refname{參考~文獻}
+\def\indexname{索~引}
+\def\tablename{表}
+\def\figurename{圖}
+\def\abstractname{要~約}
+\def\bibname{參考~圖書}
+\def\appendixname{附錄}
+\def\subappendixname{附錄}
+\def\appendixtocname{附~錄}
+\def\appendixpagename{附~錄}
+\def\partname{篇}
+\def\chaptername{章}
+\def\sectionname{節}
+\def\colorlayer{色相레이어}
+\def\glossaryname{語彙}
+\def\figurerefname{圖}
+\def\tablerefname{表}
+\def\pagename{面}
+\def\pagerefname{面}
+\def\partrefname{篇}
+\def\chapterrefname{章}
+\def\sectionrefname{\S}
+\else
+\def\today{\number\year 년~\number\month 월~\number\day 일}
+\def\enclname{동봉물}
+\def\ccname{사본}
+\def\headtoname{받는이}
+\def\seename{\을~참조}
+\def\alsoname{\을~함께~참조}
+\def\contentsname{차~례}
+\def\listfigurename{그림~차례}
+\def\listtablename{표~차례}
+\def\refname{참고~문헌}
+\def\indexname{찾아보기}
+\def\tablename{표}
+\def\figurename{그림}
+\def\abstractname{요~약}
+\def\bibname{참고~문헌}
+\def\appendixname{부록}
+\def\subappendixname{부록}
+\def\appendixtocname{부~록}
+\def\appendixpagename{부~록}
+\def\partname{편}
+\def\chaptername{장}
+\def\sectionname{절}
+\def\colorlayer{환등판~색상}
+\def\glossaryname{용어집}
+\def\figurerefname{그림}
+\def\tablerefname{표}
+\def\pagename{페이지}
+\def\pagerefname{페이지}
+\def\partrefname{편}
+\def\chapterrefname{장}
+\def\sectionrefname{\S}
+\fi
+
+%% \marginparswitchtrue/false
+\providecommand{\marginparswitchtrue}{\@mparswitchtrue}
+\providecommand{\marginparswitchfalse}{\@mparswitchfalse}
+\providecommand{\reversemargintrue}{\@reversemargintrue}
+\providecommand{\reversemarginfalse}{\@reversemarginfalse}
+
+%% select textwidth with chars
+\def\testh@ng@lch@r@cters{가갸거겨고교구규그기}
+\newlength\t@nch@ars
+\newcommand*\setxxxlength[2]{%
+ \setbox0\hbox{\testh@ng@lch@r@cters}\setlength\t@nch@ars{\wd0}%
+ \@ifundefined{#1length}{\expandafter\newlength\csname #1length\endcsname}{}%
+ \expandafter\setlength\csname #1length\endcsname{#2\t@nch@ars}%
+ \expandafter\divide\csname #1length\endcsname by 10%
+}
+
+%%% kscntformat
+%%% HLaTeX의 \kscntformat 명령을 흉내냄
+%%% \kscntformat{section}{제}{절} 형식으로 쓴다.
+\newsavebox{\tmp@XXbox}
+\newdimen\tmp@XXdim
+\def\kscntformat#1#2#3{%
+ \sbox{\tmp@XXbox}{#2\expandafter\number\csname c@#1\endcsname#3}%
+ \setlength\tmp@XXdim{\wd\tmp@XXbox}\advance\tmp@XXdim by1em%
+ \expandafter\def\csname the#1\endcsname{#2\expandafter\number\csname c@#1\endcsname#3}%
+ \expandafter\renewcommand\csname cft#1numwidth\endcsname{\tmp@XXdim}%
+ \expandafter\renewcommand\csname cft#1presnum\endcsname{}%
+ \expandafter\renewcommand\csname cft#1aftersnum\endcsname{}%
+}
+
+\AtBeginDocument{%
+\ifnokorean\else
+\ifkosection
+\kscntformat{section}{제\,}{\,절}
+\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}}
+\fi\fi
+}
+
+\RequirePackage{memhangul-common}
+
+%%% default linespacing for Hangul Documents
+%%% interword
+\if@interwordHWP
+ \RequirePackage[HWP]{memucs-interword}
+\else
+\if@interworddefault
+ \RequirePackage[default]{memucs-interword}
+\else
+\if@nonfrench
+ \RequirePackage[nonfrench]{memucs-interword}
+\else
+ \RequirePackage{memucs-interword}
+\fi\fi\fi
+\AtBeginDocument{\memucsinterwordhook}
+
+%%% hsetspace for memucs
+\if@hsspace
+ \RequirePackage[hangul,adjustverbatim,adjustfootnotesep]{memucs-setspace}
+ \if@hsspacenoquote\else\adjustquotespacing\fi
+\else
+ \RequirePackage{memucs-setspace}
+ \linespread{1.333}
+\fi
+%\SetHangulspace{1.333}{1.1}
+
+%% GrEmph
+\newif\if@bfem\@bfemfalse
+\def\bfemtrue{\@bfemtrue}
+\def\bfemfalse{\@bfemfalse}
+
+\if@unfonts
+\if@bfem
+ \def\GrEmphFont{outbt}
+ \def\GrEmphHanjaFont{outbt}
+\else
+ \def\GrEmphFont{outgr}
+ \def\GrEmphHanjaFont{outgt}
+\fi
+\else
+\if@bfem
+ \def\GrEmphFont{nanummj}
+ \def\GrEmphHanjaFont{uhcmj}
+\else
+ \def\GrEmphFont{nanumgt}
+ \def\GrEmphHanjaFont{nanumgt}
+\fi
+\fi
+\def\SetGremphFonts#1#2{%
+ \def\GrEmphFont{#1}%
+ \def\GrEmphHanjaFont{#2}%
+}
+\@onlypreamble\SetGremphFonts
+
+\AtBeginDocument{%
+\if@gremph\if@bfem
+ \RequirePackage[gremphhangul=\GrEmphFont,gremphhanja=\GrEmphHanjaFont,bfemph]{memucs-gremph}
+\else
+ \RequirePackage[gremphhangul=\GrEmphFont,gremphhanja=\GrEmphHanjaFont]{memucs-gremph}
+\fi\fi
+}
+
+%% 한글 기호문자
+\DeclareUnicodeCharacter{00BC}% 1/4
+ {\textsuperscript1\kern-.45em\unichar{65295}\kern-.45em\textsubscript4}% uni-0.def
+\DeclareUnicodeCharacter{00BD}% 1/2
+ {\textsuperscript1\kern-.45em\unichar{65295}\kern-.45em\textsubscript2}% uni-0.def
+\DeclareUnicodeCharacter{00BE}% 3/4
+ {\textsuperscript3\kern-.45em\unichar{65295}\kern-.45em\textsubscript4}% uni-0.def
+\DeclareUnicodeCharacter{02D0}% ː
+ {\unihangulchar{"02D0}}
+\DeclareUnicodeCharacter{2025}% ‥
+ {\unihangulchar{"2025}}
+\DeclareUnicodeCharacter{2026}% …
+ {\unihangulchar{"2026}}
+\DeclareUnicodeCharacter{2015}% ―
+ {\nobreak\hskip\memh@hu\unihangulchar{"2015}\hskip\memh@hu\relax}
+\DeclareUnicodeCharacter{2312}% ⌒
+ {\unihangulchar{"2312}}
+
+%% BANGJEOM emphasis : extension. (inspired from hangul.sty)
+
+\def\circemphchar{˚}
+\def\dotemphchar{˙}
+\def\bfdotemphchar{\textbf{˙}}
+\let\useremphchar\circemphchar
+\newdimen\raisedotdim\raisedotdim\z@
+\newdimen\dhucs@emph@width
+
+\def\put@dhucs@mphch@r#1{%
+ \ifnum\thish@ngul>\z@\ifnum\thish@ngul<\thr@@ % hangul or hanja
+ \rlap{\raise\dhucs@emph@raise
+ \hb@xt@\dhucs@emph@width{\normalfont\hss#1\hss}}%
+ \fi\fi
+}
+\def\get@dhucs@mphheight#1{%
+ \ifdim\raisedotdim=\z@\relax
+ \settoheight{\dhucs@emph@raise}{#1}%
+ \addtolength{\dhucs@emph@raise}{-.4em}%
+ \else\let\dhucs@emph@raise\raisedotdim\fi
+}
+
+\protected\def\dotemph#1{\begingroup
+ \get@dhucs@mphheight{#1}%
+ \let\dhucs@emph\dhucs@dot@emph
+ #1\endgroup}
+
+\def\dhucs@dot@emph#1{%
+ \settowidth{\dhucs@emph@width}{#1}%
+ \put@dhucs@mphch@r{\dotemphchar}%
+}
+
+\protected\def\bfdotemph#1{\begingroup
+ \get@dhucs@mphheight{#1}%
+ \let\dhucs@emph\dhucs@bfdot@emph
+ #1\endgroup}
+
+\def\dhucs@bfdot@emph#1{%
+ \settowidth{\dhucs@emph@width}{#1}%
+ \put@dhucs@mphch@r{\bfdotemphchar}%
+}
+
+%\ifx\hfontfamilynameprefix\UnPrefix\let\dotemph\bfdotemph\fi
+
+\protected\def\circemph#1{\begingroup
+ \get@dhucs@mphheight{#1}%
+ \let\dhucs@emph\dhucs@circ@emph
+ #1\endgroup}
+
+\def\dhucs@circ@emph#1{\leavevmode
+ \settowidth{\dhucs@emph@width}{#1}%
+ \put@dhucs@mphch@r{\circemphchar}%
+}
+
+\newdimen\useremphraisedim\useremphraisedim\z@
+
+\protected\def\useremph#1{\begingroup
+ \ifdim\useremphraisedim=\z@\relax
+ \settoheight{\dhucs@emph@raise}{#1}%
+ \addtolength{\dhucs@emph@raise}{-.4em}%
+ \else\let\dhucs@emph@raise\useremphraisedim\fi
+ \let\dhucs@emph\dhucs@user@emph
+ #1\endgroup}
+
+\def\dhucs@user@emph#1{%
+ \settowidth{\dhucs@emph@width}{#1}%
+ \put@dhucs@mphch@r{\useremphchar}%
+}
+
+\g@addto@macro\pdfstringdefPreHook{%
+ \let\circemph\@firstofone
+ \let\useremph\@firstofone
+}
+
+\endinput
+
+% CHANGE LOG
+%
+% 2013/10/22: introduce memhangul-common.sty
+% 2013/10/16: [kosection] bug fix
+% 2013/09/27: xoblivoir-related fixes.
+% 2012/12/02: drop shipout hacking codes. (problem solved)
+% 2012/11/22. [figtabcapt]
+% 2009/04/02. redefine mem@shipii.
+% 2009/02/11. memoir v1.6180339e compatibility mend 1.
+% titleref, hangul page style.
+% 2007/11/18. add \alsoname definition
+% 2007/09/09. remove test code
+% 2007/08/06. add \expldash command
+% 2007/07/15. no changes. part of ko.TeX
+% 2007/06/26. introduce [strictcharcheck], acc. dhucs 4.0.6
+% 2007/06/14. follow up dhucs 4.0.1, rename a few cs.
+% 2007/06/07. indent first in japanese env.
+% 2007/06/03. dhucs hfontspec etc.
+% 2007/05/20. memh@cjksymbolskip & memh@postcjksymkern, cntrdot etc.
+% 2007/05/16. ver 1.5.0 (dhucs 4.0)
+% ==================================
+%
+% 2004/12/30. dhhangul-ucs-test 2004/12/30 버전을 반영함.
+% 폰트 설정 명령을 \DeclareRobustCommand로 함.
+% 한글 section 카운터 관련 수정.
+%
+% 2004/12/31. dhhangul-ucs-test 2004/12/31 버전을 반영함.
+%
+% 2005/01/02.
+% * heading, ruled, Ruled의 헤딩 폰트가 달라지는 것을 수정.
+% * slshape, itshape의 폰트 교란을 수정.
+% * \hanjanum, \hNum 카운터 포맷, demovar chapter style 추가.
+%
+% 2005/01/04
+% * dhucs 2005/01/04 반영.
+% * nonfrench 괄호 문제 개선.
+% * 확장한자 개선.
+%
+% 2005/01/05
+% * \unichar 재정의(dhucs 20050105)
+% * .aux에 \PrerenderUnicode를 씀.
+% * \GrEmph 옵션 도입.
+%
+% 2005/01/07
+% * \GrEmph 수정. \bfemtrue, \bfemfalse
+% * \josa@hyper@link 수정(dhucs 1.1)
+% * \utf@viii@undeferr의 경우 \jobname.pru에 \PrerenderUnicode를 씀(after dhucs)
+% * renew \makeindex because of conflicts between \utf@viii@undeferr and \@index
+% * \HArabic counter added.
+%
+% 2005/01/15
+% * require dhucs.
+% * drop including kshangul.prerenders
+% * release.
+%
+% 2005/01/20
+% * \index를 memoir의 3-pass 방식으로 되돌림
+%
+% 2005/01/29
+% * memucs-setspace 변경
+% * companion pagestyle 변경
+%
+% 2005/01/31
+% * 한글 특수문자 정의
+%
+% 2005/02/08
+% * mempatch 3.5 적용.
+% * revive interwordchapterskiphook
+% * minor fixes.
+%
+% 2005/02/11
+% * marginparswitch added.
+%
+% 2005/02/14
+% * disable \MakeUppercase redefinition after dhucs 2.0
+% * release 1.0
+%
+% 2005/02/22
+% * \chapter definition retrieved to original memoir manner.
+% * \titleref bug(memoir) fixed.
+% * \appendix chapter PDF bookmarks hyperlink problem improved.
+%
+% 2005/02/23
+% * revised 1.1v
+% * PROBLEM unsolved :
+%
+% 2005/02/23
+% * revised. 1.1x
+% * dhucs (plain)1.6과 함께 사용함.
+%
+% 2005/04/22
+% * gremph 관련 수정. 1.1x1
+% * memucs-gremph.sty 추가
+%
+% 2005/04/24
+% * 드러냄표 구현.
+% * dhucs-plain 1.7.
+% * \normalfont로 고침.
+%
+% 2005/04/26
+% * 드러냄표. dhucs 2.2를 따름.
+%
+% 2005/06/06
+% * pdf bookmark hyperlink to APPENDIX sections problem fixed.
+%
+% 2005/06/28
+% * drop dhucs-plain, dhucs 2.4
+%
+% 2005/07/08
+% * improve \titleref
+%
+% 2005/07/17
+% * reintroduce chapter \PrerenderUnicode's
+%
+% 2005/07/30
+% * fix the bug that [noquotespacing] option has no effects.
+%
+% 2005/08/05
+% * change after dhucs 2.6
+% * adjustmath option added.
+%
+% 2005/08/09
+% * pagestyle hangul added.
+% * [hangulpagestyle], [arabicfront] options.
+% * \explpunc defined.
+% * \partmark added.
+% * \bfdotemph added.
+%
+% 2005/08/12. ver 1.3
+% * \divnote test version.
+% * \chapterindentfirst added.
+% * \cntrdots added.
+%
+% 2005/09/09. ver 1.31
+% * memucs-setspace default changed. quote/quotation normal interline.
+%
+% 2005/09/21. ver 1.32
+% * [ms] option.
+%
+% 2005/10/15. ver 1.4.1
+% * introduce memhangul-patch.sty to make compatible with memoir 1.618
+%
+% 2005/10/19 ver 1.4.2
+% * appendix-related bug fix
+%
+% 2005/10/29 ver 1.4.3
+% * mended appendix-related problems
+% * introduced [pdfbookmark] option.
+% * TODO. figs & tables in appendix hyperlinks have problems.
+%
+% 2005/10/30 ver 1.4.4
+% * CJKbookmark option added to hyperref
+%
+% 2006/04/19 ver 1.4.4b
+% * drop CJKbookmarks hyperref option, just use dhucs-ucshyper
+% * [dvips] option added.
+% * reject dhucs 2.7.2 autojosa routine, adopt previous version
+%
+% 2006/04/27 ver 1.4.4f
+% * adopt dhucs 3.0.0
+%
+% 2006/06/25 ver 1.4.4g
+% * suppress auto loading etex.sty
+%
+%% end of file `memhangul-ucs.sty`
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-enumerate.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-enumerate.sty
new file mode 100644
index 00000000000..c3fd53f85ed
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-enumerate.sty
@@ -0,0 +1,49 @@
+%% File `memucs-enumerate.sty`
+%%
+%% (C) Copyright 2006-2013 Dohyun Kim <nomos at ktug org>
+%% Kangsoo Kim <karnes 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.
+%%
+\ProvidesPackage{memucs-enumerate}
+ [2006/07/01 partially support enumrate in memoir under memhangul]
+
+%\@ifpackageloaded{enumerate}{}{\RequirePackage{enumerate}}
+
+\g@addto@macro\@enhook{%
+ \ifx^^ea\@entemp % 가,
+ \let\@memtempa\@dhucs@enumerate\else %%%%%
+ \ifx^^e2\@entemp % ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ
+ \let\@memtempa\@dhucs@enumerate\else %%%%%
+ \ifx^^e3\@entemp % ㄱ, ㉠, ㉮, ㈀, ㈎
+ \let\@memtempa\@dhucs@enumerate
+ \fi\fi\fi}
+\def\@dhucs@enumerate#1#2#3{%
+ \bgroup\let\unihangulchar\@firstofone
+ \xdef\@dhucs@enum@temp{#1#2#3}\egroup
+ \ifnum\@dhucs@enum@temp=44032 \def\@tempa{\@enLabel\gana}\else
+ \ifnum\@dhucs@enum@temp=8560 \def\@tempa{\@enLabel\hroman}\else
+ \ifnum\@dhucs@enum@temp=8544 \def\@tempa{\@enLabel\hRoman}\else
+ \ifnum\@dhucs@enum@temp=9372 \def\@tempa{\@enLabel\peng}\else
+ \ifnum\@dhucs@enum@temp=9424 \def\@tempa{\@enLabel\oeng}\else
+ \ifnum\@dhucs@enum@temp=9332 \def\@tempa{\@enLabel\pnum}\else
+ \ifnum\@dhucs@enum@temp=9312 \def\@tempa{\@enLabel\onum}\else
+ \ifnum\@dhucs@enum@temp=12814 \def\@tempa{\@enLabel\pgana}\else
+ \ifnum\@dhucs@enum@temp=12910 \def\@tempa{\@enLabel\ogana}\else
+ \ifnum\@dhucs@enum@temp=12896 \def\@tempa{\@enLabel\ojaso}\else
+ \ifnum\@dhucs@enum@temp=12593 \def\@tempa{\@enLabel\jaso}\else
+ \ifnum\@dhucs@enum@temp=12800 \def\@tempa{\@enLabel\pjaso}\else
+ \PackageError{dhucs-enumerate}
+ {You can't use `\unexpanded{#1#2#3}' as enum label}
+ {Legal enum labels of hangul-ucs are: \MessageBreak\space\space
+ \unexpanded{가, ㄱ, ㉠, ㉮, ㈀, ㈎, ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ}.}
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi
+ \@tempa\relax}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-gremph.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-gremph.sty
new file mode 100644
index 00000000000..24268f96710
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-gremph.sty
@@ -0,0 +1,114 @@
+%% File `memucs-gremph.sty`
+%%
+%% Copyright (c) 2006-2013 Kangsoo Kim <karnes 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.
+%%
+\ProvidesPackage{memucs-gremph}
+
+\RequirePackage{xkeyval}
+
+\newif\if@bfemph\@bfemphfalse
+%\DeclareOption{bfemph}{\@bfemphtrue}
+%\ProcessOptions
+\DeclareOptionX{bfemph}[]{\@bfemphtrue}
+%\newif\if@gremph\@gremphtrue
+
+\newif\if@vargremphhangulfont\@vargremphhangulfontfalse
+\newif\if@vargremphhanjafont\@vargremphhanjafontfalse
+\DeclareOptionX{gremphhangul}[nanumgt]{\@vargremphhangulfonttrue\def\GrEmphFont{#1}}
+\DeclareOptionX{gremphhanja}[nanumgt]{\@vargremphhanjafonttrue\def\GrEmphHanjaFont{#1}}
+%\define@key{dhucs-gremph.sty}{gremphhangulfont}[utgr]{\@vargremphhangulfonttrue\def\GremphFont{#1}}
+%\define@key{dhucs-gremph.sty}{gremphhanjafont}[utgt]{\@vargremphhanjafonttrue\def\GrEmphHanjaFont{#1}}
+
+\ProcessOptionsX
+
+%\if@bfemph
+% \def\GrEmphFont{utbt}
+% \def\GrEmphHanjaFont{utbt}
+%\else
+\if@unfonts
+ \if@vargremphhangulfont\else
+ \def\GrEmphFont{outgr}\fi
+ \if@vargremphhanjafont\else
+ \def\GrEmphHanjaFont{outgt}\fi
+\else
+ \if@vargremphhangulfont\else
+ \def\GrEmphFont{nanumgt}\fi
+ \if@vargremphhanjafont\else
+ \def\GrEmphHanjaFont{nanumgt}\fi
+\fi
+%\fi
+%\def\SetGremphFonts#1#2{%
+% \def\GrEmphFont{#1}%
+% \def\GrEmphHanjaFont{#2}%
+%}
+
+\if@bfem
+\DeclareFontFamily{LUC}{grem}{\hyphenchar \font\m@ne}
+\DeclareFontShape{LUC}{grem}{m}{n}{<-> LUC * \GrEmphFont b}{}
+\DeclareFontShape{LUC}{grem}{m}{it}{<-> LUC * \GrEmphFont b}{}
+\DeclareFontShape{LUC}{grem}{m}{sl}{<-> LUC * \GrEmphFont b}{}
+\DeclareFontFamily{LUC}{gremhj}{\hyphenchar \font\m@ne}
+\DeclareFontShape{LUC}{gremhj}{m}{n}{<-> LUC * \GrEmphHanjaFont b}{}
+\DeclareFontShape{LUC}{gremhj}{m}{it}{<-> LUC * \GrEmphHanjaFont b}{}
+\DeclareFontShape{LUC}{gremhj}{m}{sl}{<-> LUC * \GrEmphHanjaFont b}{}
+\else
+\DeclareFontFamily{LUC}{grem}{\hyphenchar \font\m@ne}
+\DeclareFontShape{LUC}{grem}{m}{n}{<-> LUC * \GrEmphFont m}{}
+\DeclareFontShape{LUC}{grem}{m}{it}{<-> LUC * \GrEmphFont m}{}
+\DeclareFontShape{LUC}{grem}{m}{sl}{<-> LUC * \GrEmphFont m}{}
+\DeclareFontFamily{LUC}{gremhj}{\hyphenchar \font\m@ne}
+\DeclareFontShape{LUC}{gremhj}{m}{n}{<-> LUC * \GrEmphHanjaFont m}{}
+\DeclareFontShape{LUC}{gremhj}{m}{it}{<-> LUC * \GrEmphHanjaFont m}{}
+\DeclareFontShape{LUC}{gremhj}{m}{sl}{<-> LUC * \GrEmphHanjaFont m}{}
+\fi
+
+\if@gremph
+\DeclareRobustCommand\itshape
+ {\not@math@alphabet\itshape\mathit
+ \fontshape\itdefault\selectfont\SetAdhocFonts{grem}{gremhj}}
+%\DeclareRobustCommand\slshape\itshape
+\DeclareRobustCommand\slshape
+ {\not@math@alphabet\slshape\relax
+ \fontshape\sldefault\selectfont\SetAdhocFonts{grem}{gremhj}}
+\else\fi
+\def\regremph{%
+ \@gremphtrue
+ \DeclareRobustCommand*{\itshape}%
+ {\not@math@alphabet\itshape\mathit
+ \fontshape\itdefault\selectfont\SetAdhocFonts{grem}{gremhj}}%
+% \DeclareRobustCommand\slshape\itshape
+ \DeclareRobustCommand\slshape
+ {\not@math@alphabet\slshape\relax
+ \fontshape\sldefault\selectfont\SetAdhocFonts{grem}{gremhj}}%
+}
+\def\ungremph{%
+ \@gremphfalse
+ \DeclareRobustCommand*{\itshape}%
+ {\not@math@alphabet\itshape\mathit
+ \fontshape\itdefault\selectfont}%
+ \DeclareRobustCommand\slshape
+ {\not@math@alphabet\slshape\relax
+ \fontshape\sldefault\selectfont}%
+}
+% \slhangul
+\def\slhangul#1{%
+ \bgroup
+ \fontshape{sl}\selectfont #1\egroup
+}
+
+\endinput
+
+% end of style.
+%
+% CHANGE LOG.
+% * 2007/08/02. redundant space bug fix
+% * 2007/06/08. \slshape independent from \itshape
+% * 2005/08/17. \slhangul added.
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-interword.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-interword.sty
new file mode 100644
index 00000000000..e4e3f2f3ea0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-interword.sty
@@ -0,0 +1,160 @@
+%% File `memucs-interword.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{memucs-interword}[2007/09/22]
+
+\def\memucsinterwordskip{}
+\def\memucsinterwordchapterskip{}
+\def\memucshangulskips{}
+
+\newif\if@nonfrench\@nonfrenchfalse
+\DeclareOption{nonfrench}{%
+ \@nonfrenchtrue}
+\DeclareOption{HWP}{%
+ \def\memucsinterwordskip{\HWPinterwordskip}}
+\DeclareOption{default}{%
+ \@nonfrenchtrue\def\memucsinterwordskip{\DEFAULTskips}\interHchar{0pt}}
+\DeclareOption{wider}{%
+ \def\memucshangulskips{\widerhangul}}
+\DeclareOption{narrower}{%
+ \def\memucshangulskips{\narrowerhangul}}
+%\DeclareOption*{%
+% \def\memucsinterwordskip{\DEFAULTskips}%
+%}
+
+%\newlength\dimen@skip
+%\setlength\dimen@skip{.1pt}
+
+%% finemath active.
+\if@dhucsfinemath\else\@dhucsfinemathtrue\fi
+
+%\let\interhchar\setInterHangulSkip
+\newcommand*\interHchar[1]{\setInterHangulSkip{#1}}
+\let\interhchar\interHchar
+
+\newcommand*\interhword[4][\@empty]{%
+ \ifx#1\@empty\setinterwordskip{#2}{#3}{#4}\else
+ \setinterwordskip[#1]{#2}{#3}{#4}\fi
+}
+
+\def\narrowerhangul{%
+ \def\memucshangulskips{%
+ \interHchar{-.5pt}%
+ }%
+}
+\def\widerhangul{%
+ \def\memucshangulskips{%
+ \interHchar{1pt}%
+ }%
+}
+
+\newdimen\BASE@FONTsize
+\BASE@FONTsize=\f@size\p@
+
+\def\HWPinterwordskip{%
+ \def\memucshangulskips{%
+ \interHchar{0pt}%
+ }%
+ \def\memucsinterwordskip{%
+ \spaceskip = .475\BASE@FONTsize plus .25\BASE@FONTsize minus .1331\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = .6\BASE@FONTsize plus .2\BASE@FONTsize minus .1\BASE@FONTsize
+ \fi
+ }%
+ \def\memucsinterwordchapterskip{%
+ \spaceskip = .5\BASE@FONTsize plus .1\BASE@FONTsize minus .05\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = .65\BASE@FONTsize plus .2\BASE@FONTsize minus .1\BASE@FONTsize
+ \fi
+ }%
+}
+
+\def\setinterwordskip{\@ifnextchar[\setinterwordskip@\setinterwordskip@@}
+\def\setinterwordskip@[#1]#2#3#4{%
+ \def\memucsinterwordskip{%
+ \spaceskip = #2\BASE@FONTsize plus #3\BASE@FONTsize minus #4\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = #1\BASE@FONTsize plus #3\BASE@FONTsize minus #4\BASE@FONTsize
+ \fi
+ }%
+}
+
+\def\setinterwordskip@@#1#2#3{%
+ \def\memucsinterwordskip{%
+ \spaceskip = #1\BASE@FONTsize plus #2\BASE@FONTsize minus #3\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = .6\BASE@FONTsize plus #2\BASE@FONTsize minus #3\BASE@FONTsize
+ \fi
+ }%
+}
+
+\def\DEFAULTskips{%
+ \def\memucshangulskips{%
+% \interHchar{0pt}%
+ }%
+ \def\memucsinterwordskip{%
+ \spaceskip = .413\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = .55\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize
+ \fi
+ }%
+ \def\memucsinterwordchapterskip{%
+ \spaceskip = .46\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip = .575\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize
+ \fi
+ }%
+}
+
+\ProcessOptions\relax
+
+\def\verbatim@font{\m@mverbfont\spaceskip\z@
+ \hyphenchar\font\m@ne
+ \let\do\do@noligs
+ \verbatim@nolig@list}
+
+\def\narrowerinterhword{%
+ \spaceskip=.331\BASE@FONTsize plus .111\BASE@FONTsize minus .1\BASE@FONTsize
+ \if@nonfrench
+ \xspaceskip=.466\BASE@FONTsize plus .05\BASE@FONTsize minus .05\BASE@FONTsize
+ \fi
+}
+
+\def\memucsinterwordhook{\memucsinterwordskip\memucshangulskips}%
+\def\memucsinterwordchapterskiphook{\memucsinterwordchapterskip\memucshangulskips}%
+\def\memucsfninterwordhook{\narrowerinterhword}%
+
+% engtext env
+\@ifundefined{engtext}%
+ {%
+ \newenvironment{engtext}%
+ {\begingroup\spaceskip=\fontdimen2\font plus\fontdimen3\font minus\fontdimen4\font}%
+ {\endgroup}%
+ }{}
+
+% engtxt
+\newskip\ORIG@spaceskip
+\def\engtxt{\ORIG@spaceskip=\spaceskip
+ \spaceskip=\fontdimen2\font plus\fontdimen3\font minus\fontdimen4\font}
+\def\endengtxt{\spaceskip=\ORIG@spaceskip}
+
+\endinput
+
+%% CHANGE LOG
+% 2005/01/07. code clearance
+% 2005/02/08. reset interwordchapterskip values
+% 2005/05/17. engtext env. added.
+% 2005/07/30. replace em by \BASE@FONTsize
+% 2005/08/05. nonfrench option introduced.
+% 2005/11/17. \interhword bug fixed.
+% 2007/06/03. dhucs 4.0 hfontspec applied
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-setspace.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-setspace.sty
new file mode 100644
index 00000000000..8db9d17acfa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/memucs-setspace.sty
@@ -0,0 +1,587 @@
+%% File `memucs-setspace.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+%% =======================
+%%
+%% 이 스타일은 setspace 6.7을 바탕으로, memoir의
+%% 출력루틴을 hooking하여 거의 동일하게 동작하도록
+%% 수정한 스타일이다.
+%% memoir 클래스에서 memhangul 스타일을 사용했을 때
+%% 불린다. 다른 용도로는 사용할 수 없음.
+%%
+%% This style is a modified version of SETSTYLE ver 6.7 by Erica M. S. Harris
+%% modified by Karnes Kim
+%%
+%% FEATURES:
+%% all the features of setstyle package
+%%
+%% NEW FEATURES:
+%%
+%% 1. [nofloatspacing] option
+%% disables the feature of SETSTYLE, turning off all the line spacing
+%% in the floats(figures, tables) and footnotes.
+%% \noadjustfloatfnspacing, \adjustfloatfnspacing
+%% 2. [hangul] option
+%% When [hangul] option is on, the basic line spreading is set to
+%% a proper line spacing in Korean(Hangul) documents, which has
+%% a wider gap between the lines.
+%% \SetHangulspace
+%% 3. quote and quotation environment
+%% quote and quotation environment have the same line spacing
+%% with the floats and footnotes, verse.
+%% \noadjustquotespacing, \adjustquotespacing
+%% 4. [adjustfootnotesep] option
+%% this option is meaningful only when [hangul] is on and
+%% [nofloatspacing] off.
+%% 5. [adjustverbatim] option.
+%% verbatim environment.
+%% \SetHangulVerbatimSpace.
+%% 6. \ResetHangulspace, \RestoreHangulspace
+%%
+
+\NeedsTeXFormat {LaTeX2e}[1994/12/09]
+\def \filename {memucs-setspace.sty}
+\def \filedate {2007/09/21}
+\def \fileversion {6.7-memucs8}
+\ProvidesPackage {memucs-setspace}[\filedate\space\fileversion\space
+ Contributed and Supported LaTeX2e package]
+\typeout {Package: `memucs-setspace', a modified version of `setspace', \fileversion\space <\filedate>}
+
+% BP: add nodisplayskipstretch option and \setdisplayskipstretch command.
+
+\newcommand{\displayskipstretch}{\baselinestretch}
+\newcommand{\setdisplayskipstretch}[1]{\renewcommand{\displayskipstretch}{#1}}
+\DeclareOption{nodisplayskipstretch}{\setdisplayskipstretch{1.0}}
+
+% GT: add George Pearsons' suggested options.
+
+%% Karnes'
+\newif\if@singlespacefn
+\DeclareOption{nofloatspacing}{\@singlespacefnfalse}
+\newif\if@singlespacequote
+\DeclareOption{quotespacing}{\@singlespacequotetrue}
+\newif\if@hangul
+\DeclareOption{hangul}{\@hangultrue\AtEndOfPackage{\hangulspacing}}
+\newif\if@adjustfootnotesep
+\DeclareOption{adjustfootnotesep}{\@adjustfootnoteseptrue}
+\newif\if@adjustverbatim
+\DeclareOption{adjustverbatim}{\@adjustverbatimtrue}
+
+\DeclareOption{singlespacing}{\AtEndOfPackage{\singlespacing}}
+\DeclareOption{onehalfspacing}{\AtEndOfPackage{\onehalfspacing}}
+\DeclareOption{doublespacing}{\AtEndOfPackage{\doublespacing}}
+
+\@singlespacefntrue
+\@singlespacequotefalse
+\@hangulfalse
+\@adjustfootnotesepfalse
+\@adjustverbatimfalse
+\ProcessOptions
+
+%%% provide memucsfninterwordhook
+\ifx\undefined\memucsfninterwordhook
+ \providecommand\memucsfninterwordhook{}%
+\fi
+
+\def\@floatfnspacinghook{%
+ \if@singlespacefn
+ \hangulfspacing
+ \else
+ \hangulspacing
+ \fi
+}
+
+\newcommand\noadjustquotespacing{%
+ \@singlespacequotefalse
+}
+
+\newcommand\adjustquotespacing{%
+ \@singlespacequotetrue
+}
+
+\newcommand\adjustfloatfnspacing{%
+ \@singlespacefntrue
+}
+
+\newcommand\noadjustfloatfnspacing{%
+ \@singlespacefnfalse
+}
+
+% GT: Sat 28 Sep 1996: Widely using \newcommand, \renewcommand, and
+% \newenvironment, instead of \def.
+
+% ** Line space commands.
+
+\newcommand{\setstretch}[1]{%
+ \def\baselinestretch{#1}%
+ \@currsize
+}
+
+% GT: Sat 28 Sep 1996: spacing commands and environments modified to
+% use \setstretch instead of \baselinestretch.
+%
+% GT: Sat 28 Sep 1996: No, I don't know understand the line spacing
+% algorithms! If someone (LaTeX team) can enlighten me as to the
+% general rule, please do! It would be very pleasant if setspace.sty
+% were suited for document font sizes other than 10, 11 and 12 pt.
+%
+% GT: Tue 10 Dec 1996: Instead of fixing singlespacing to exact unity,
+% allow user to redefine it (only slightly, please!) from its initial
+% value of unity, in the case when a particular font is slightly larger
+% or slightly smaller than its point size would indicate. This change
+% affects setspace's single spacing commands, and LaTeX's footnote and
+% float environments. The one and a half, double, and arbitrary
+% spacing commands are unaltered.
+
+\newcommand{\SetSinglespace}[1]{%
+ \def\setspace@singlespace{#1}%
+}
+
+%% Karnes.
+\newcommand{\Set@Hangulspace}[2]{%
+ \def\setspace@hangulspace{#1}%
+ \def\setspace@hangulfspace{#2}%
+ \setstretch{#1}%
+}
+
+\def\SetHangulspace#1#2{%
+ \AtBeginDocument{%
+ \gdef\setspace@hangulspace{#1}%
+ \gdef\setspace@hangulfspace{#2}%
+ }%
+ \setstretch{#1}%
+}
+
+\newcommand{\SetHangulVerbatimSpace}[1]{%
+ \def\setspace@hangulverbspace{#1}%
+}
+
+\let\tmp@current@hangulspace\setspace@hangulspace
+\let\tmp@current@hangulfspace\setspace@hangulfspace
+
+\newcommand{\ResetHangulspace}[2]{%
+ \let\tmp@current@hangulspace\setspace@hangulspace%
+ \let\tmp@current@hangulfspace\setspace@hangulfspace%
+ \Set@Hangulspace{#1}{#2}%
+}
+
+\newcommand{\RestoreHangulspace}{%
+ \Set@Hangulspace{\tmp@current@hangulspace}{\tmp@current@hangulfspace}%
+}
+
+% Here's the default single line spacing value.
+\SetSinglespace{1}
+
+%% Karnes.
+\if@hangul
+\Set@Hangulspace{1.333}{1.1}
+\else
+\Set@Hangulspace{1.0}{1.0}
+\fi
+
+\newcommand{\singlespacing}{%
+ \setstretch {\setspace@singlespace}% normally 1
+ \vskip \baselineskip % Correction for coming into singlespace
+}
+
+%% Karnes.
+\newcommand{\hangulspacing}{%
+ \setstretch{\setspace@hangulspace}% default
+}
+
+\newcommand{\hangulfspacing}{%
+ \setstretch{\setspace@hangulfspace}%
+}
+
+\newcommand{\hangulverbspacing}{%
+ \setstretch{\setspace@hangulverbspace}%
+}
+
+\newcommand{\onehalfspacing}{%
+ \setstretch{1.25}% default
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.25}%
+ \or % 11pt
+ \setstretch {1.213}%
+ \or % 12pt
+ \setstretch {1.241}%
+ \fi
+}
+
+\newcommand{\doublespacing}{%
+ \setstretch {1.667}% default
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.667}%
+ \or % 11pt
+ \setstretch {1.618}%
+ \or % 12pt
+ \setstretch {1.655}%
+ \fi
+}
+
+%% adjust verbatim
+%% if and only if [nofloatspacing] and [adjustverbatim] is on,
+%% the verbatim will be the same to the main text linestretch.
+%% if [hangul] it will adjust the linestretch to the quote or quotation
+%% the other case, it will be 1.0, I hope.
+%%
+\if@adjustverbatim
+\SetHangulVerbatimSpace{\setspace@hangulfspace}%
+\else
+\SetHangulVerbatimSpace{1.0}
+\fi
+
+% ** Modification of the LaTeX command \@setsize.
+
+%---Stretch the baseline BEFORE calculating the strut size. This improves
+% spacing below tabular environments etc., probably...
+% Comments are welcomed.
+
+% GT: Sun 29 Sep 1996: Question: Is this code anywhere near correct
+% since this part of LaTeX (in, eg, latex.ltx) has been greatly changed?
+
+% GT: Sun 29 Sep 1996: The meanings of the arguments to \@setsize
+% appear to be (whatever these may signify) :
+% current size; font baselineskip; ignored (!); and font size.
+
+% GT: Sun 29 Sep 1996: Note that \@setsize (in latest LaTeX,
+% \@setfontsize, which is called by \@setsize) seems to be the only
+% place in purely modern LaTeX where \@currsize is set, and ltxguide.cls
+% seems to be the only file in the LaTeX base distribution that uses it!
+
+\def\@setsize#1#2#3#4{%
+ % Modified 1993.04.07--GDG per KPC
+ \@nomath#1%
+ \let\@currsize#1%
+ \baselineskip #2%
+ \baselineskip \baselinestretch\baselineskip
+ \parskip \baselinestretch\parskip
+ \setbox\strutbox \hbox{%
+ \vrule height.7\baselineskip
+ depth.3\baselineskip
+ width\z@}%
+ \skip\footins \baselinestretch\skip\footins
+ \normalbaselineskip\baselineskip#3#4}
+
+% ** Float and footnote adjustments to compensate for a change in the
+% ** main text's line spacing.
+
+%---Increase the space between last line of text and footnote rule.
+%\skip\footins 20pt plus4pt minus4pt
+
+%---Reset baselinestretch within floats and footnotes.
+
+% GT: Tue 23 Jan 1996: This is where the conflict with the combination
+% of the color package and the figure environment used to occur.
+
+% Floats.
+
+% GT: Sat 28 Sep 1996: \@xfloat is the only place where \normalsize
+% is still used in setspace.sty !
+
+\if@singlespacefn
+\let\latex@xfloat=\@xfloat
+\def\@xfloat #1[#2]{%
+ \latex@xfloat #1[#2]%
+ \if@singlespacefn
+ \def\baselinestretch {\setspace@hangulfspace}
+ \else
+ \def\baselinestretch {\setspace@hangulspace}
+ \fi
+ \normalsize
+}
+\else\fi
+
+% Karnes: footnotesep for hangul
+\if@adjustfootnotesep
+\if@hangul
+\if@singlespacefn
+ \ifcase \@ptsize \relax
+ \setlength\footnotesep{8.51 pt}% 10pt
+ \or
+ \setlength\footnotesep{9.6 pt}% 11pt
+ \or
+ \setlength\footnotesep{10.3 pt}% 12pt
+ \fi
+\else
+\fi
+\else\fi
+\else\fi
+
+% GT: Wed 24 Jan 1996: This footnote code was copied from LaTeX and
+% modified rather naively. It had to be brought up to date, not only
+% because of LaTeX's new color ability, but also because ther had
+% been major changes to this code in LaTeX at least as far back as
+% March 1992.
+
+% Normal, bottom of the page, footnotes.
+%
+% GT: Based HEAVILY on original LaTeX (2e) code. A standard hook would
+% be MUCH preferred, so that LaTeX's footnote implementation needn't be
+% copied each time it changes.
+%
+% GT: The \protected@edef requires at least the December 1994 LaTeX.
+% This is precisely the kind of VERSION DEPENDENCY situation that
+% cannot (AFAIK) be avoided, because LaTeX (2e) LACKS appropriate
+% standard hooks and/or context markers.
+\if@singlespacefn
+\def\m@mold@footnotetext{\@memsetspace@footnotetext}
+\renewcommand{\@footnotetext}[1]{\m@mold@footnotetext{#1}\m@mmf@prepare}
+\long\def\@memsetspace@footnotetext#1{%
+ \insert\footins{%
+% GT: Next line added. Hook desired here!
+ \@floatfnspacinghook\memucsfninterwordhook
+% \def\baselinestretch {\setspace@hangulfspace}%
+% \@SetFloatspaces
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+% Minipage footnotes.
+\renewcommand{\@mpfootnotetext}[1]{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+% GT: Next line added. Hook desired here!
+ \@floatfnspacinghook\memucsfninterwordhook
+% \def\baselinestretch {\setspace@hangulfspace}%
+ \foottextfont \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+\else\fi
+
+% ** Line space environments.
+
+% A single spaced quote (say) is done by surrounding singlespace with quote.
+
+\newenvironment{singlespace}{%
+ \vskip \baselineskip
+ \setstretch {\setspace@singlespace}%
+ \vskip -\baselineskip
+}{%
+ \par
+}
+
+% GT (c/o Mark Olesen), Wed 15 April 1998.
+
+\newenvironment{singlespace*}{%
+ \setstretch {\setspace@singlespace}%
+ \vskip -\baselineskip
+}{%
+ \vskip -0.5\baselineskip
+}
+
+% spacing, doublespace and onehalfspace all are meant to INCREASE the
+% spacing (i.e. calling onehalfspace from within doublespace will not
+% produce a graceful transition between spacings)
+%
+% Next two definitions fixed for consistency with TeX 3.x
+
+% In order to use \newenvironment, while easily using same code for
+% end of each environment, the code that used to be in \endspacing has
+% been moved into a new (but internal) macro, \restore@spacing.
+
+\newcommand{\restore@spacing}{%
+ \par
+ \vskip \parskip
+ \vskip \baselineskip
+ \endgroup
+ \vskip -\parskip
+ \vskip -\baselineskip
+}
+
+\newenvironment{spacing}[1]{%
+ \par
+ \begingroup % moved from \endspacing by PGBR 29-1-91
+ \setstretch {#1}%
+}{%
+ \restore@spacing
+}
+
+% one and a half spacing is 1.5 x pt size
+\newenvironment{onehalfspace}{%
+ \begingroup
+ \onehalfspacing
+}{%
+ \restore@spacing
+}
+
+% double spacing is 2 x pt size
+\newenvironment{doublespace}{%
+ \begingroup
+ \doublespacing
+}{%
+ \restore@spacing
+}
+
+%% quote and quotation environment : Karnes.
+\def\@quotespacinghook{%
+ \if@singlespacequote
+ \hangulfspacing%
+ \else
+ \hangulspacing%
+ \fi
+}
+
+\renewenvironment{quotation}%
+ {\list{}{\listparindent 1.5em%
+ \itemindent \listparindent
+ \rightmargin \leftmargin
+ \parsep \z@ \@plus\p@}%
+% \memhangulinterwordhook
+ \item[]%
+ \@quotespacinghook
+ }%
+ {\endlist
+ \if@singlespacequote\vskip-.2\onelineskip\fi}
+\renewenvironment{quote}%
+ {\list{}{\rightmargin\leftmargin}%
+% \memhangulinterwordhook
+ \item[]
+ \@quotespacinghook
+ }%
+ {\endlist
+ \if@singlespacequote\vskip-.2\onelineskip\fi}
+\renewenvironment{symbols}{\list{}%
+ {\itemindent 0em \leftmargin 8em
+ \labelsep 1em \labelwidth 5em
+% \memhangulinterwordhook
+ \let\makelabel\symbollabel}%
+ \@quotespacinghook
+ }%
+ {\endlist}
+
+%%%%%%%%%%%%%%%%%%%%
+%%%% fix vertical spacing in the verse environment. mempatch 3.3
+\renewenvironment{verse}[1][\linewidth]{%
+ \refstepcounter{verse}%
+ \setcounter{poemline}{0}\refstepcounter{poemline}%
+ \setcounter{vslineno}{1}%
+ \let\\=\@vscentercr
+ \list{}{\itemsep \z@
+ \itemindent -\vindent
+ \listparindent\itemindent
+ \parsep \stanzaskip
+ \ifdim #1<\linewidth %% short line
+ \rightmargin \z@
+ \leftmargin \linewidth
+ \advance\leftmargin -#1\relax
+ \advance\leftmargin -0.5\leftmargin
+ \advance\leftmargin \vindent
+ \else
+ \ifdim #1>\linewidth %% long line
+ \rightmargin \z@
+ \leftmargin \vindent
+ \else %% default
+ \rightmargin \leftmargin
+ \advance\leftmargin \vindent
+ \fi
+ \fi}
+ \item[]%
+ \@quotespacinghook}{\endlist}
+%%%%%%%%%%%%%%
+
+\renewenvironment{altverse}%
+ {\starpatternfalse\patternfalse\altindenttrue\setcounter{vslineno}{1}%
+ \@quotespacinghook
+ }%
+ {\altindentfalse}
+
+\def\@verbatim{\the\every@verbatim
+ \trivlist
+ \if@adjustverbatim\hangulverbspacing\else\fi%
+ \item \relax
+ \if@minipage\else\vskip\parskip\fi
+ \@beginparpenalty \predisplaypenalty
+ \leftskip\@totalleftmargin\rightskip\z@
+ \parindent\z@\parfillskip\@flushglue\parskip\z@
+ \@@par
+ \def\par{%
+ \if@tempswa
+ \leavevmode\null\@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+ \def\@noitemerr{\@warning{No verbatim text}}%
+ \obeylines
+ \let\do\@makeother \dospecials
+ \verbatim@font
+ \everypar \expandafter{\the\everypar \unpenalty}%
+ \wrapright\the\afterevery@verbatim}
+
+%% Karnes : epigraph
+\newcommand\epigraphspacinghook{\setstretch{1.0}}
+\newcommand\epigraphspacing[1]{%
+ \renewcommand\epigraphspacinghook{\setstretch{#1}}%
+}
+
+\renewcommand{\epigraph}[2]{\vspace{\beforeepigraphskip}
+ {\epigraphsize\begin{\epigraphflush}%
+ \epigraphspacinghook
+ \begin{minipage}{\epigraphwidth}
+ \@epitext{#1}\\ \@episource{#2}
+ \end{minipage}\end{\epigraphflush}
+ \vspace{\afterepigraphskip}}}
+
+\renewenvironment{epigraphs}{%
+ \vspace{\beforeepigraphskip}\begin{\epigraphflush}
+ \epigraphsize
+ \begin{minipage}{\epigraphwidth}
+ \epigraphspacinghook
+ \list{}%
+ {\itemindent\z@ \labelwidth\z@ \labelsep\z@
+ \leftmargin\z@ \rightmargin\z@
+ \let\makelabel\qitemlabel}}%
+ {\endlist\end{minipage}\end{\epigraphflush}
+ \vspace{\afterepigraphskip}}
+
+% GT: EMSH chose to omit display math part that follows.
+% She wrote (see above) that the "altered spacing before and after displayed
+% equations ... just looked too much".
+%
+% Fix up spacing before and after displayed math
+% (arraystretch seems to do a fine job for inside LaTeX displayed math,
+% since array and eqnarray seem to be affected as expected).
+% Changing \baselinestretch and doing a font change also works if done here,
+% but then you have to change @setsize to remove the call to @nomath)
+%
+% GT: The \belowdisplayskip line was mistyped; now fixed, courtesy of
+% David Hull.
+%
+% GT: Brett Parnell has addressed EMSH's concern by replacing
+% \baselinestretch by \displayskipstretch in displays, as follows.
+
+\everydisplay\expandafter{%
+ \the\everydisplay
+ \abovedisplayskip \displayskipstretch\abovedisplayskip
+ \belowdisplayskip \displayskipstretch\belowdisplayskip
+ \abovedisplayshortskip \displayskipstretch\abovedisplayshortskip
+ \belowdisplayshortskip \displayskipstretch\belowdisplayshortskip
+}
+
+\endinput
+
+%%% EOF.
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/nanumfontsel.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/nanumfontsel.sty
new file mode 100644
index 00000000000..3a24d64566e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/nanumfontsel.sty
@@ -0,0 +1,29 @@
+%% File `nanumfontsel.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+\ProvidesPackage{nanumfontsel}
+
+\newif\ifUSETONE\USETONEfalse
+\DeclareOption{USETONEt1font}{\USETONEtrue}
+\DeclareOption{uset1font}{\USETONEtrue}
+\ProcessOptions
+
+\ifUSETONE
+\RequirePackage[T1]{fontenc}
+\renewcommand{\rmdefault}{nanummj}
+\renewcommand{\sfdefault}{nanumgt}
+\fi
+\SetHangulFonts{nanummj}{nanumgt}{nanumgt}
+\SetHanjaFonts{nanumgt}{nanumgt}{nanumgt}
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-koreanappendix.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-koreanappendix.sty
new file mode 100644
index 00000000000..1046b7e0233
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-koreanappendix.sty
@@ -0,0 +1,94 @@
+%% File `ob-koreanappendix.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+%% oblivoir sub-style. part of oblivoir
+%% \appendix (부록)
+%%
+\gdef\set@appendix@chapter{%
+ \ifanappendix\counterwithout{APPsection}{APPchapter}\fi%
+ \renewcommand\thesection{\Alph{APPsection}}%
+ \counterwithin{figure}{APPsection}\counterwithin{table}{APPsection}%
+ \counterwithin{equation}{APPsection}%
+ \renewcommand\thefigure{\Alph{APPsection}.\arabic{figure}}%
+ \renewcommand\thetable{\Alph{APPsection}.\arabic{table}}%
+ \renewcommand\theequation{\Alph{APPsection}.\arabic{equation}}%
+ \set@appendix@chapsec
+}
+
+\renewcommand{\@resets@pp}{%
+ \par
+ \@ppsavesec
+ \set@appendix@chapter
+ \restoreapp
+}
+
+\renewcommand{\appendix}{\par
+ \set@appendix@chapter
+ \anappendixtrue
+% \chapterstyle{appendixdefault}%
+ \if@AppendixTitleToToc
+ \addcontentsline{toc}{chapter}{\appendixname}%
+ \fi
+ \if@AttachAppendixTitleToSecnum
+ \addtodef{\secheadstyle}{}{\appendixrefname~}%
+ \fi
+}
+
+\def\set@appendix@chapsec{%
+ %%% SECTION in APPENDIX
+ \renewcommand{\section}{%
+ \sechook\memucsinterwordhook%
+ \@startsection{section}{1}% level 1
+ {\secindent}% heading indent
+ {\beforesecskip}% skip before the heading
+ {\aftersecskip}% skip after the heading
+ {\normalfont\secheadstyle}} % font
+ %
+ \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
+ \ifheadnameref\M@gettitle{##8}\else\M@gettitle{##7}\fi
+ \ifnum ##2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{APP##1}%
+ \protected@edef\@svsec{\@seccntformat{##1}\relax}%
+ \fi
+ \@tempskipa ##5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ ##6{%
+ \@hangfrom{\hskip ##3\relax\@svsec}%
+ \interlinepenalty \@M ##9\@@par}%
+ \endgroup
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\noexpand\protect\csname the##1\endcsname}%
+ \fi
+ ##7}%
+ \else
+ \def\@svsechd{%
+ ##6{\hskip ##3\relax
+ \@svsec ##9}%
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\csname the##1\endcsname}%
+ \fi
+ ##7}}%
+ \fi
+ \expandafter\protected@edef
+ \expandafter\@currentlabel
+ \expandafter{\csname the##1\endcsname}%
+ \@xsect{##5}}%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-nokoreanappendix.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-nokoreanappendix.sty
new file mode 100644
index 00000000000..69044f5eba1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-nokoreanappendix.sty
@@ -0,0 +1,96 @@
+%% File `ob-nokoreanappendix.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+%% oblivoir sub-style. part of oblivoir
+%% \appendix (부록) : nokorean
+%%
+\gdef\set@appendix@chapter{%
+ \ifanappendix\counterwithout{section}{chapter}\fi%
+ \setcounter{section}{0}
+ \setcounter{chapter}{0}
+ \renewcommand\thesection{\Alph{section}}%
+ \counterwithin{figure}{section}\counterwithin{table}{section}%
+ \counterwithin{equation}{section}%
+ \renewcommand\thefigure{\Alph{section}.\arabic{figure}}%
+ \renewcommand\thetable{\Alph{section}.\arabic{table}}%
+ \renewcommand\theequation{\Alph{section}.\arabic{equation}}%
+ \set@appendix@chapsec
+}
+
+\renewcommand{\@resets@pp}{%
+ \par
+ \@ppsavesec
+ \set@appendix@chapter
+ \restoreapp
+}
+
+\renewcommand{\appendix}{\par
+ \set@appendix@chapter
+ \anappendixtrue
+% \chapterstyle{appendixdefault}%
+ \if@AppendixTitleToToc
+ \addcontentsline{toc}{chapter}{\appendixname}%
+ \fi
+ \if@AttachAppendixTitleToSecnum
+ \addtodef{\secheadstyle}{}{\appendixrefname~}%
+ \fi
+}
+
+\def\set@appendix@chapsec{%
+ %%% SECTION in APPENDIX
+ \renewcommand{\section}{%
+ \sechook
+ \@startsection{section}{1}% level 1
+ {\secindent}% heading indent
+ {\beforesecskip}% skip before the heading
+ {\aftersecskip}% skip after the heading
+ {\normalfont\secheadstyle}} % font
+ %
+ \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
+ \ifheadnameref\M@gettitle{##8}\else\M@gettitle{##7}\fi
+ \ifnum ##2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{##1}%
+ \protected@edef\@svsec{\@seccntformat{##1}\relax}%
+ \fi
+ \@tempskipa ##5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ ##6{%
+ \@hangfrom{\hskip ##3\relax\@svsec}%
+ \interlinepenalty \@M ##9\@@par}%
+ \endgroup
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\noexpand\protect\csname the##1\endcsname}%
+ \fi
+ ##7}%
+ \else
+ \def\@svsechd{%
+ ##6{\hskip ##3\relax
+ \@svsec ##9}%
+ \csname ##1mark\endcsname{##8}%
+ \addcontentsline{toc}{##1}{%
+ \ifnum ##2>\c@secnumdepth \else
+ \protect\numberline{\csname the##1\endcsname}%
+ \fi
+ ##7}}%
+ \fi
+ \expandafter\protected@edef
+ \expandafter\@currentlabel
+ \expandafter{\csname the##1\endcsname}%
+ \@xsect{##5}}%
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-toclof.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-toclof.sty
new file mode 100644
index 00000000000..5ef56b463fb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-toclof.sty
@@ -0,0 +1,144 @@
+%% File `ob-toclof.sty`
+%%
+%% Copyright (c) 2007-2013 Kangsoo Kim <karnes 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.
+%%
+%% oblivoir substyle. part of oblivoir,
+%%
+%% \newlistof{listoffigures}{lof}{\listfigurename}
+%% \kill@lastcounter{lofdepth}
+%% \newlistentry[section]{figure}{lof}{0}
+%% \cftsetindents{figure}{0em}{2.3em}
+%%
+\if@toclofentry\else
+\renewcommand{\put@bsintoc}{%
+ \ifadd@bstotoc
+ \ifnumber@bs\else
+ \phantomsection
+ \addcontentsline{toc}{section}{\abstractname}
+ \fi
+ \fi}
+
+\def\addappheadtotoc{\addcontentsline{toc}{section}{\appendixtocname}}
+
+\renewcommand{\newlistof}[3]{%
+ \@namedef{ext@#2}{#2}
+ \@ifundefined{c@#2depth}{\newcounter{#2depth}}{}
+ \setcounter{#2depth}{1}
+ \@namedef{#2mark}{\markboth{#3}{#3}}
+ \@namedef{#1}{\@ifstar{\@nameuse{@star#2}}{\@nameuse{@plain#2}}}
+ \@namedef{@star#2}{%
+ \ensureonecol
+ \par
+ \begingroup
+%%% \parindent\z@ \parskip\cftparskip
+ \@nameuse{@#2maketitle}
+ \@starttoc{#2}%
+ \endgroup
+ \restorefromonecol}
+ \@namedef{@plain#2}{%
+ \ensureonecol
+ \par
+ \begingroup
+%%% \parindent\z@ \parskip\cftparskip
+ \@nameuse{@#2maketitle}
+ \phantomsection
+ \addcontentsline{toc}{section}{#3}
+ \@starttoc{#2}%
+ \endgroup
+ \restorefromonecol}
+ \@namedef{@#2maketitle}{%
+ \@nameuse{#2headstart}
+ {\parindent\z@ \parskip\cftparskip
+ \interlinepenalty\@M
+ \@nameuse{print#2nonum}%
+ \@nameuse{print#2title}{#3}%
+ \@nameuse{#2mark}%
+ \thispagestyle{chapter}%
+ \@nameuse{after#2title}
+ }
+ \@afterheading}
+% \@namedef{#2headstart}{\chapterheadstart}
+% \@namedef{after#2title}{\afterchaptertitle}
+% \@namedef{print#2nonum}{\printchapternonum}
+% \@namedef{print#2title}##1{\printchaptertitle{##1}}
+} % end \newlistof
+
+\def\@chapter[#1]#2{%
+ \ifx\ch@pt@c\m@m@empty % no optional args
+ \def\f@rtoc{#1}%
+ \def\f@rhdr{#1}%
+ \else % at least one opt arg
+ \def\f@rtoc{\ch@pt@c}%
+ \nametest{#1}{#2}%
+ \ifsamename % one opt arg
+ \def\f@rhdr{\ch@pt@c}%
+ \else % two opt args
+ \def\f@rhdr{#1}%
+ \fi
+ \fi
+ \m@m@Andfalse
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \m@m@Andtrue
+ \fi
+ \fi
+ \ifm@m@And
+ \ifanappendix
+ \refstepcounter{APPchapter}%
+ \else
+ \refstepcounter{chapter}%
+ \fi
+ \fi
+ \chaptermark{\f@rhdr}
+ \ifartopt
+ \@makechapterhead{#2}%
+ \@afterheading
+ \else
+ \insertchapterspace
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \fi
+ \@afterheading
+ \fi
+ \ifm@m@And
+ \ifanappendix
+ \addcontentsline{toc}{appendix}{%
+ \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
+ \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
+ \else
+ \addcontentsline{toc}{section}{%
+ \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
+ \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
+ \fi
+ \else
+ \addcontentsline{toc}{section}{\f@rtoc}%
+ \ifanappendix
+ \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
+ \else
+ \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
+ \fi
+ \fi
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
+%%% for chapter
+ \ifanappendix
+ \protected@edef\@currentlabel{\thechapter}%
+ \fi
+}
+
+\newlistof{tableofcontents}{toc}{\contentsname}
+\newlistof{listoffigures}{lof}{\listfigurename}
+\newlistof{listoftables}{lot}{\listtablename}
+
+\fi % of \if@toclofentry
+
+\endinput