diff options
Diffstat (limited to 'Master/texmf-dist/tex')
28 files changed, 7022 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 diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/luatexko-xobfont.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/luatexko-xobfont.sty new file mode 100644 index 00000000000..6fe0a4e97c1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/luatexko-xobfont.sty @@ -0,0 +1,608 @@ +%% luatexko-xobfont.sty +%% +%% Copyright (c) 2012-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 style font commands for luatex +%% part of oblivoir package +%% +%% Version 0.1: oldhangul option is not implemented +%% 0.1.1: bug fix (2012/07/28) +%% 0.1.2: [unfonts], [nounfonts] (2012/10/29) +%% +\ProvidesPackage{luatexko-xobfont}[2012/07/12] + +%% options: latinquote,oldhangul,gremph,itemph,nowinname,manualfontspec +\newif\if@latinquote\@latinquotefalse +\DeclareOption{latinquote}{\@latinquotetrue} +\newif\if@oldhangul\@oldhangulfalse +\DeclareOption{oldhangul}{\@oldhangultrue} +\newif\if@gremph\@gremphtrue +\DeclareOption{gremph}{\@gremphtrue} +\DeclareOption{itemph}{\@gremphfalse} +\newif\if@nowin\@nowinfalse +\DeclareOption{nowinname}{\@nowintrue} +\newif\if@manualfontspec\@manualfontspecfalse +\DeclareOption{manualfontspec}{\@manualfontspectrue} +\newif\if@unfonts\@unfontstrue +\DeclareOption{unfonts}{\@unfontstrue} +\DeclareOption{nounfonts}{\@unfontsfalse} +\newif\if@nanumfonts\@nanumfontsfalse +\DeclareOption{nanum}{\@nanumfontstrue} +\ProcessOptions + +%%% +\if@manualfontspec \endinput \fi + +%%% fixed options +\if@oldhangul + \edef\LKOV@oldhangulscript{Script=Hangul} + \edef\LKOV@oldhangullanguage{Language=Korean} + \edef\LKOV@oldhangulfeatures{RawFeature=+ccmp;+ljmo;+vjmo;+tjmo} +\else + \edef\LKOV@oldhangulscript{} + \edef\LKOV@oldhangullanguage{} + \edef\LKOV@oldhangulfeatures{} +\fi + +%%% note: FakeBold is disabled under LuaTeX +\if@gremph + \edef\LKOV@italicfeatures{} +\else + \edef\LKOV@italicfeatures{slant=0.17} +\fi + +\def\LKOV@externallocation{} + +\newcommand*\setmonoscale[1]{% + \edef\LKOV@monoscale{#1} +} +\setmonoscale{1} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%% main +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setkormainfont{% + \@ifstar {\setk@rm@inf@nt}{% + \@ifnextchar[{\m@inf@ntbracket}{% + \@ifnextchar(\m@inf@ntparen\m@inf@ntnoparen}% + } +} + +\def\m@inf@ntbracket[#1]#2{% + \@ifnextchar[{\m@inf@ntbrackettrail[#1]{#2}}{\m@inf@ntbracketnotrail[#1]{#2}} +} + +%%% \setkormainfont[foo]{bar} +\def\m@inf@ntbracketnotrail[#1]#2{% + \setmainhangulfont[#1]{#2} +} + +%%% \setkormainfont[foo1]{bar1}[foo2]{bar2} +\def\m@inf@ntbrackettrail[#1]#2[#3]#4{% + \setmainhangulfont[#1]{#2} + \setmainhanjafont[#3]{#4} +} + +%%% \setkormainfont{foo} +\def\m@inf@ntnoparen#1{\setmainhangulfont{#1}} + +\def\m@inf@ntparen(#1){% + \@ifnextchar({\m@inf@ntdoubleparen(#1)}{\m@inf@ntsingleparen(#1)} +} + +\def\m@inf@ntsingleparen(#1)#2{% + \@ifnextchar({\m@inf@ntsingleparentrail(#1){#2}}{\m@inf@ntsingleparennotrail(#1){#2}} +} + +\def\m@inf@ntsingleparentrail(#1)#2(#3){% + \@ifnextchar({\m@inf@ntsingleparentraildouble(#1){#2}(#3)}{\m@inf@ntsingleparentrailsingle(#1){#2}(#3)} +} + +\def\m@inf@ntdoubleparen(#1)(#2)#3{% + \@ifnextchar({\m@inf@ntdoubleparentrail(#1)(#2){#3}}{\m@inf@ntdoubleparennotrail(#1)(#2){#3}} +} + +\def\m@inf@ntdoubleparentrail(#1)(#2)#3(#4){% + \@ifnextchar({\m@inf@ntdoubleparentraildouble(#1)(#2){#3}(#4)}{\m@inf@ntdoubleparentrailsingle(#1)(#2){#3}(#4)} +} + +%%% \setkormainfont(foo){bar} +\def\m@inf@ntsingleparennotrail(#1)#2{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} +} + +%%% \setkormainfont(foo1){bar1}(foo2){bar2} +\def\m@inf@ntsingleparentrailsingle(#1)#2(#3)#4{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} + \setmainhanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#4} +} + +%%% \setkormainfont(foo1){bar1}(foo2)(foo3){bar2} +\def\m@inf@ntsingleparentraildouble(#1)#2(#3)(#4)#5{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setmainhanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%% \setkormainfont(foo1)(foo2){bar} +\def\m@inf@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} +} + +%%% \setkormainfont(foo1)(foo2){bar1}(foo3){bar2} +\def\m@inf@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} + \setmainhanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%% \setkormainfont(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\m@inf@ntdoubleparentraildouble(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setmainhanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%%%%%%%%%%%%%%%%%%%%% main: ExternalLocation %%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setk@rst@rm@inf@nt*{% + \@ifnextchar[{\st@rm@inf@ntbracket*}{% + \@ifnextchar({\st@rm@inf@ntparen*}{\st@rm@inf@ntnoparen*}}% +} + +\def\st@rm@inf@ntbracket*[#1]#2{% + \@ifnextchar[{\st@rm@inf@ntbrackettrail*[#1]{#2}}{\st@rm@inf@ntbracketnotrail*[#1]{#2}} +} + +%%% \setkormainfont*{bar} +\def\setk@rm@inf@nt#1{% + \setmainhangulfont[ExternalLocation]{#1} +} + +%%% \setkormainfont*[foo]{bar} +\def\st@rm@inf@ntbracketnotrail*[#1]#2{% + \setmainhangulfont[#1,ExternalLocation]{#2} +} + +%%% \setkormainfont*[foo1]{bar1}[foo2]{bar2} +\def\st@rm@inf@ntbrackettrail*[#1]#2[#3]#4{% + \setmainhangulfont[#1,ExternalLocation]{#2} + \setmainhanjafont[#3,ExternalLocation]{#4} +} + +%%% \setk@rst@rm@inf@nt*{foo} +\def\st@rm@inf@ntnoparen*#1{\setmainhangulfont[ExternalLocation]{#1}} + +\def\st@rm@inf@ntparen*(#1){% + \@ifnextchar({\st@rm@inf@ntdoubleparen*(#1)}{\st@rm@inf@ntsingleparen*(#1)} +} + +\def\st@rm@inf@ntsingleparen*(#1)#2{% + \@ifnextchar({\st@rm@inf@ntsingleparentrail*(#1){#2}}{\st@rm@inf@ntsingleparennotrail*(#1){#2}} +} + +\def\st@rm@inf@ntsingleparentrail*(#1)#2(#3){% + \@ifnextchar({\st@rm@inf@ntsingleparentraildouble*(#1){#2}(#3)}{\st@rm@inf@ntsingleparentrailsingle*(#1){#2}(#3)} +} + +\def\st@rm@inf@ntdoubleparen*(#1)(#2)#3{% + \@ifnextchar({\st@rm@inf@ntdoubleparentrail*(#1)(#2){#3}}{\st@rm@inf@ntdoubleparennotrail*(#1)(#2){#3}} +} + +\def\st@rm@inf@ntdoubleparentrail*(#1)(#2)#3(#4){% + \@ifnextchar({\st@rm@inf@ntdoubleparentraildouble*(#1)(#2){#3}(#4)}{\st@rm@inf@ntdoubleparentrailsingle*(#1)(#2){#3}(#4)} +} + +%%% \setk@rst@rm@inf@nt*(foo){bar} +\def\st@rm@inf@ntsingleparennotrail*(#1)#2{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} +} + +%%% \setk@rst@rm@inf@nt*(foo1){bar1}(foo2){bar2} +\def\st@rm@inf@ntsingleparentrailsingle*(#1)#2(#3)#4{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} + \setmainhanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#4} +} + +%%% \setk@rst@rm@inf@nt*(foo1){bar1}(foo2)(foo3){bar2} +\def\st@rm@inf@ntsingleparentraildouble*(#1)#2(#3)(#4)#5{% + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setmainhanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + +%%% \setk@rst@rm@inf@nt*(foo1)(foo2){bar} +\def\st@rm@inf@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} +} + +%%% \setk@rst@rm@inf@nt*(foo1)(foo2){bar1}(foo3){bar2} +\def\st@rm@inf@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} + \setmainhanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + +%%% \setk@rst@rm@inf@nt*(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\st@rm@inf@ntdoubleparentraildouble*(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmainhangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setmainhanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%% sans +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setkorsansfont{% + \@ifstar {\setk@rs@nsf@nt}{% + \@ifnextchar[{\s@nsf@ntbracket}{% + \@ifnextchar(\s@nsf@ntparen\s@nsf@ntnoparen}% + } +} + +\def\s@nsf@ntbracket[#1]#2{% + \@ifnextchar[{\s@nsf@ntbrackettrail[#1]{#2}}{\s@nsf@ntbracketnotrail[#1]{#2}} +} + +%%% \setkorsansfont[foo]{bar} +\def\s@nsf@ntbracketnotrail[#1]#2{% + \setsanshangulfont[#1]{#2} +} + +%%% \setkorsansfont[foo1]{bar1}[foo2]{bar2} +\def\s@nsf@ntbrackettrail[#1]#2[#3]#4{% + \setsanshangulfont[#1]{#2} + \setsanshanjafont[#3]{#4} +} + +%%% \setkorsansfont{foo} +\def\s@nsf@ntnoparen#1{\setsanshangulfont{#1}} + +\def\s@nsf@ntparen(#1){% + \@ifnextchar({\s@nsf@ntdoubleparen(#1)}{\s@nsf@ntsingleparen(#1)} +} + +\def\s@nsf@ntsingleparen(#1)#2{% + \@ifnextchar({\s@nsf@ntsingleparentrail(#1){#2}}{\s@nsf@ntsingleparennotrail(#1){#2}} +} + +\def\s@nsf@ntsingleparentrail(#1)#2(#3){% + \@ifnextchar({\s@nsf@ntsingleparentraildouble(#1){#2}(#3)}{\s@nsf@ntsingleparentrailsingle(#1){#2}(#3)} +} + +\def\s@nsf@ntdoubleparen(#1)(#2)#3{% + \@ifnextchar({\s@nsf@ntdoubleparentrail(#1)(#2){#3}}{\s@nsf@ntdoubleparennotrail(#1)(#2){#3}} +} + +\def\s@nsf@ntdoubleparentrail(#1)(#2)#3(#4){% + \@ifnextchar({\s@nsf@ntdoubleparentraildouble(#1)(#2){#3}(#4)}{\s@nsf@ntdoubleparentrailsingle(#1)(#2){#3}(#4)} +} + +%%% \setkorsansfont(foo){bar} +\def\s@nsf@ntsingleparennotrail(#1)#2{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} +} + +%%% \setkorsansfont(foo1){bar1}(foo2){bar2} +\def\s@nsf@ntsingleparentrailsingle(#1)#2(#3)#4{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} + \setsanshanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#4} +} + +%%% \setkorsansfont(foo1){bar1}(foo2)(foo3){bar2} +\def\s@nsf@ntsingleparentraildouble(#1)#2(#3)(#4)#5{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setsanshanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%% \setkorsansfont(foo1)(foo2){bar} +\def\s@nsf@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} +} + +%%% \setkorsansfont(foo1)(foo2){bar1}(foo3){bar2} +\def\s@nsf@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} + \setsanshanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%% \setkorsansfont(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\s@nsf@ntdoubleparentraildouble(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setsanshanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}}]{#5} +} + +%%%%%%%%%%%%%%%%%%%%%% sans: ExternalLocation %%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setk@rst@rs@nsf@nt*{% + \@ifnextchar[{\st@rs@nsf@ntbracket*}{% + \@ifnextchar({\st@rs@nsf@ntparen*}{\st@rs@nsf@ntnoparen*}}% +} + +\def\st@rs@nsf@ntbracket*[#1]#2{% + \@ifnextchar[{\st@rs@nsf@ntbrackettrail*[#1]{#2}}{\st@rs@nsf@ntbracketnotrail*[#1]{#2}} +} + +%%% \setkorsansfont*{bar} +\def\setk@rs@nsf@nt#1{% + \setsanshangulfont[ExternalLocation]{#1} +} + +%%% \setkorsansfont*[foo]{bar} +\def\st@rs@nsf@ntbracketnotrail*[#1]#2{% + \setsanshangulfont[#1,ExternalLocation]{#2} +} + +%%% \setkorsansfont*[foo1]{bar1}[foo2]{bar2} +\def\st@rs@nsf@ntbrackettrail*[#1]#2[#3]#4{% + \setsanshangulfont[#1,ExternalLocation]{#2} + \setsanshanjafont[#3,ExternalLocation]{#4} +} + +%%% \setk@rst@rs@nsf@nt*{foo} +\def\st@rs@nsf@ntnoparen*#1{\setsanshangulfont[ExternalLocation]{#1}} + +\def\st@rs@nsf@ntparen*(#1){% + \@ifnextchar({\st@rs@nsf@ntdoubleparen*(#1)}{\st@rs@nsf@ntsingleparen*(#1)} +} + +\def\st@rs@nsf@ntsingleparen*(#1)#2{% + \@ifnextchar({\st@rs@nsf@ntsingleparentrail*(#1){#2}}{\st@rs@nsf@ntsingleparennotrail*(#1){#2}} +} + +\def\st@rs@nsf@ntsingleparentrail*(#1)#2(#3){% + \@ifnextchar({\st@rs@nsf@ntsingleparentraildouble*(#1){#2}(#3)}{\st@rs@nsf@ntsingleparentrailsingle*(#1){#2}(#3)} +} + +\def\st@rs@nsf@ntdoubleparen*(#1)(#2)#3{% + \@ifnextchar({\st@rs@nsf@ntdoubleparentrail*(#1)(#2){#3}}{\st@rs@nsf@ntdoubleparennotrail*(#1)(#2){#3}} +} + +\def\st@rs@nsf@ntdoubleparentrail*(#1)(#2)#3(#4){% + \@ifnextchar({\st@rs@nsf@ntdoubleparentraildouble*(#1)(#2){#3}(#4)}{\st@rs@nsf@ntdoubleparentrailsingle*(#1)(#2){#3}(#4)} +} + +%%% \setk@rst@rs@nsf@nt*(foo){bar} +\def\st@rs@nsf@ntsingleparennotrail*(#1)#2{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} +} + +%%% \setk@rst@rs@nsf@nt*(foo1){bar1}(foo2){bar2} +\def\st@rs@nsf@ntsingleparentrailsingle*(#1)#2(#3)#4{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} + \setsanshanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#4} +} + +%%% \setk@rst@rs@nsf@nt*(foo1){bar1}(foo2)(foo3){bar2} +\def\st@rs@nsf@ntsingleparentraildouble*(#1)#2(#3)(#4)#5{% + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setsanshanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + +%%% \setk@rst@rs@nsf@nt*(foo1)(foo2){bar} +\def\st@rs@nsf@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} +} + +%%% \setk@rst@rs@nsf@nt*(foo1)(foo2){bar1}(foo3){bar2} +\def\st@rs@nsf@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} + \setsanshanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + +%%% \setk@rst@rs@nsf@nt*(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\st@rs@nsf@ntdoubleparentraildouble*(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setsanshangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setsanshanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation]{#5} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%% mono +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setkormonofont{% + \@ifstar {\setk@rm@n@f@nt}{% + \@ifnextchar[{\m@n@f@ntbracket}{% + \@ifnextchar(\m@n@f@ntparen\m@n@f@ntnoparen}% + } +} + +\def\m@n@f@ntbracket[#1]#2{% + \@ifnextchar[{\m@n@f@ntbrackettrail[#1]{#2}}{\m@n@f@ntbracketnotrail[#1]{#2}} +} + +%%% \setkormonofont[foo]{bar} +\def\m@n@f@ntbracketnotrail[#1]#2{% + \setmonohangulfont[#1,Scale=\LKOV@monoscale]{#2} +} + +%%% \setkormonofont[foo1]{bar1}[foo2]{bar2} +\def\m@n@f@ntbrackettrail[#1]#2[#3]#4{% + \setmonohangulfont[#1,Scale=\LKOV@monoscale]{#2} + \setmonohanjafont[#3,Scale=\LKOV@monoscale]{#4} +} + +%%% \setkormonofont{foo} +\def\m@n@f@ntnoparen#1{\setmonohangulfont{#1}} + +\def\m@n@f@ntparen(#1){% + \@ifnextchar({\m@n@f@ntdoubleparen(#1)}{\m@n@f@ntsingleparen(#1)} +} + +\def\m@n@f@ntsingleparen(#1)#2{% + \@ifnextchar({\m@n@f@ntsingleparentrail(#1){#2}}{\m@n@f@ntsingleparennotrail(#1){#2}} +} + +\def\m@n@f@ntsingleparentrail(#1)#2(#3){% + \@ifnextchar({\m@n@f@ntsingleparentraildouble(#1){#2}(#3)}{\m@n@f@ntsingleparentrailsingle(#1){#2}(#3)} +} + +\def\m@n@f@ntdoubleparen(#1)(#2)#3{% + \@ifnextchar({\m@n@f@ntdoubleparentrail(#1)(#2){#3}}{\m@n@f@ntdoubleparennotrail(#1)(#2){#3}} +} + +\def\m@n@f@ntdoubleparentrail(#1)(#2)#3(#4){% + \@ifnextchar({\m@n@f@ntdoubleparentraildouble(#1)(#2){#3}(#4)}{\m@n@f@ntdoubleparentrailsingle(#1)(#2){#3}(#4)} +} + +%%% \setkormonofont(foo){bar} +\def\m@n@f@ntsingleparennotrail(#1)#2{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#2} +} + +%%% \setkormonofont(foo1){bar1}(foo2){bar2} +\def\m@n@f@ntsingleparentrailsingle(#1)#2(#3)#4{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#2} + \setmonohanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#4} +} + +%%% \setkormonofont(foo1){bar1}(foo2)(foo3){bar2} +\def\m@n@f@ntsingleparentraildouble(#1)#2(#3)(#4)#5{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setmonohanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#5} +} + +%%% \setkormonofont(foo1)(foo2){bar} +\def\m@n@f@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#3} +} + +%%% \setkormonofont(foo1)(foo2){bar1}(foo3){bar2} +\def\m@n@f@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#3} + \setmonohanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#5} +} + +%%% \setkormonofont(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\m@n@f@ntdoubleparentraildouble(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setmonohanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},Scale=\LKOV@monoscale]{#5} +} + +%%%%%%%%%%%%%%%%%%%%%% mono: ExternalLocation %%%%%%%%%%%%%%%%%%%% +%%% top level command +\def\setk@rst@rm@n@f@nt*{% + \@ifnextchar[{\st@rm@n@f@ntbracket*}{% + \@ifnextchar({\st@rm@n@f@ntparen*}{\st@rm@n@f@ntnoparen*}}% +} + +\def\st@rm@n@f@ntbracket*[#1]#2{% + \@ifnextchar[{\st@rm@n@f@ntbrackettrail*[#1]{#2}}{\st@rm@n@f@ntbracketnotrail*[#1]{#2}} +} + +%%% \setkormonofont*{bar} +\def\setk@rm@n@f@nt#1{% + \setmonohangulfont[ExternalLocation]{#1} +} + + +%%% \setkormonofont*[foo]{bar} +\def\st@rm@n@f@ntbracketnotrail*[#1]#2{% + \setmonohangulfont[#1,ExternalLocation,Scale=\LKOV@monoscale]{#2} +} + +%%% \setkormonofont*[foo1]{bar1}[foo2]{bar2} +\def\st@rm@n@f@ntbrackettrail*[#1]#2[#3]#4{% + \setmonohangulfont[#1,ExternalLocation,Scale=\LKOV@monoscale]{#2} + \setmonohanjafont[#3,ExternalLocation,Scale=\LKOV@monoscale]{#4} +} + +%%% \setk@rst@rm@n@f@nt*{foo} +\def\st@rm@n@f@ntnoparen*#1{\setmonohangulfont[ExternalLocation]{#1}} + +\def\st@rm@n@f@ntparen*(#1){% + \@ifnextchar({\st@rm@n@f@ntdoubleparen*(#1)}{\st@rm@n@f@ntsingleparen*(#1)} +} + +\def\st@rm@n@f@ntsingleparen*(#1)#2{% + \@ifnextchar({\st@rm@n@f@ntsingleparentrail*(#1){#2}}{\st@rm@n@f@ntsingleparennotrail*(#1){#2}} +} + +\def\st@rm@n@f@ntsingleparentrail*(#1)#2(#3){% + \@ifnextchar({\st@rm@n@f@ntsingleparentraildouble*(#1){#2}(#3)}{\st@rm@n@f@ntsingleparentrailsingle*(#1){#2}(#3)} +} + +\def\st@rm@n@f@ntdoubleparen*(#1)(#2)#3{% + \@ifnextchar({\st@rm@n@f@ntdoubleparentrail*(#1)(#2){#3}}{\st@rm@n@f@ntdoubleparennotrail*(#1)(#2){#3}} +} + +\def\st@rm@n@f@ntdoubleparentrail*(#1)(#2)#3(#4){% + \@ifnextchar({\st@rm@n@f@ntdoubleparentraildouble*(#1)(#2){#3}(#4)}{\st@rm@n@f@ntdoubleparentrailsingle*(#1)(#2){#3}(#4)} +} + +%%% \setk@rst@rm@n@f@nt*(foo){bar} +\def\st@rm@n@f@ntsingleparennotrail*(#1)#2{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#2} +} + +%%% \setk@rst@rm@n@f@nt*(foo1){bar1}(foo2){bar2} +\def\st@rm@n@f@ntsingleparentrailsingle*(#1)#2(#3)#4{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#2} + \setmonohanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#4,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#4} +} + +%%% \setk@rst@rm@n@f@nt*(foo1){bar1}(foo2)(foo3){bar2} +\def\st@rm@n@f@ntsingleparentraildouble*(#1)#2(#3)(#4)#5{% + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#2,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#2} + \if#4* \def\LKOV@temp{#5}\else \def\LKOV@temp{#4}\fi + \setmonohanjafont[BoldFont=#3,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#5} +} + +%%% \setk@rst@rm@n@f@nt*(foo1)(foo2){bar} +\def\st@rm@n@f@ntdoubleparennotrail(#1)(#2)#3{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#3} +} + +%%% \setk@rst@rm@n@f@nt*(foo1)(foo2){bar1}(foo3){bar2} +\def\st@rm@n@f@ntdoubleparentrailsingle(#1)(#2)#3(#4)#5{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#3} + \setmonohanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=#5,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#5} +} + +%%% \setk@rst@rm@n@f@nt*(foo1)(foo2){bar1}(foo3)(foo4){bar2} +\def\st@rm@n@f@ntdoubleparentraildouble*(#1)(#2)#3(#4)(#5)#6{% + \if#2* \def\LKOV@temp{#3}\else\def\LKOV@temp{#2}\fi + \setmonohangulfont[BoldFont=#1,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#3} + \if#5* \def\LKOV@temp{#6}\else\def\LKOV@temp{#5}\fi + \setmonohanjafont[BoldFont=#4,BoldFeatures={RawFeature={embolden=2}},ItalicFont=\LKOV@temp,ItalicFeatures={RawFeature={\LKOV@italicfeatures}},ExternalLocation,Scale=\LKOV@monoscale]{#5} +} + +\if@nanumfonts +\setmainhangulfont{NanumMyeongjo} +\setsanshangulfont{NanumGothic} +\setmonohangulfont{NanumGothic} +\fi + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memhangul-x.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memhangul-x.sty new file mode 100644 index 00000000000..b9b928acb2e --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memhangul-x.sty @@ -0,0 +1,370 @@ +%% File `memhangul-x.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. +%% +%%% file `memhangul-x.sty` +%% part of oblivoir v2 +%% +\NeedsTeXFormat{LaTeX2e} +\def\filedate{2013/10/22} +\def\fileversion{11.7.16} +\ProvidesPackage{memhangul-x}[\filedate Hangul Typography for (x)oblivoir] +\typeout{Hangul Typography for (x)oblivoir} + +%% Options : + +\providecommand\DisabledOption[1]{% + \typeout{[#1] option to this class has been disabled!}} + +%%%% DisabledOptions +\newif\if@interwordHWP\@interwordHWPfalse +\DeclareOption{interwordHWP}{\DisabledOption{interwordHWP}} +\newif\if@interworddefault\@interworddefaultfalse +%\DeclareOption{interworddefault}{\DisabledOption{interworddefault}} +\DeclareOption{interworddefault}{\@interworddefaulttrue} +%\newif\if@finemath\@finemathfalse +\DeclareOption{finemath}{\DisabledOption{finemath}} +%\newif\if@nojosa\@nojosafalse +\DeclareOption{nojosa}{\DisabledOption{nojosa}} +%\newif\if@dvips{\@dvipsfalse} +\DeclareOption{dvips}{\DisabledOption{dvips}} +\DeclareOption{strictcharcheck}{\DisabledOption{strictcharcheck}} + +%%%% active options +\newif\if@hsspace\@hsspacetrue +\DeclareOption{nosetspace}{\@hsspacefalse} + +\newcommand\nosetspace{% + \@hsspacefalse +} + +%\RequirePackage{ifluatex} +%\RequirePackage{ifxetex} + +\newif\if@hsspacenoquote\@hsspacenoquotetrue +\DeclareOption{quotespacing}{\@hsspacenoquotefalse} +\newif\if@nonfrench\@nonfrenchfalse +\DeclareOption{nonfrench}{\@nonfrenchtrue} +\newif\if@hanja\@hanjafalse +\DeclareOption{hanja}{\@hanjatrue} +\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} + +\ifxetex +%%% xetexko options +\DeclareOption{gremph}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{itemph}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +%%% new option +\DeclareOption{latinquote}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{oldhangul}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{manualfontspec}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{nowinname}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{unfonts}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\DeclareOption{nounfonts}{\PassOptionsToPackage{\CurrentOption}{xetexko-var}} +\else\ifluatex +%%% luatexko options +\DeclareOption{gremph}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{itemph}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +%%% new option +\DeclareOption{latinquote}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{oldhangul}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{manualfontspec}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{nowinname}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{unfonts}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\DeclareOption{nounfonts}{\PassOptionsToPackage{\CurrentOption}{luatexko-xobfont}} +\else +%%% pdftex options +\DeclareOption{gremph}{\DisabledOption{gremph}} +\DeclareOption{itemph}{\DisabledOption{itemph}} +\DeclareOption{latinquote}{\DisabledOption{latinquote}} +\DeclareOption{oldhangul}{\DisabledOption{oldhangul}} +\DeclareOption{manualfontspec}{\DisabledOption{manualfontspec}} +\DeclareOption{nowinname}{\DisabledOption{nowinname}} +\DeclareOption{unfonts}{\DisabledOption{unfonts}} +\DeclareOption{nounfonts}{\DisabledOption{nounfonts}} +\fi\fi + +%%% figtabcapt +\newif\if@figtabcapt@\@figtabcapt@false +\DeclareOption{figtabcapt}{\@figtabcapt@true} + +\newif\ifKOTEXCJK\KOTEXCJKtrue +\DeclareOption{cjk}{\KOTEXCJKtrue} +\DeclareOption{dhucs}{\KOTEXCJKfalse} +\DeclareOption{uset1font}{\PassOptionsToPackage{usecjkt1font}{cjkutf8-ko}} +\DeclareOption{usedotemph}{\PassOptionsToPackage{\CurrentOption}{cjkutf8-ko}} + +\ProcessOptions + +\ifluatex + \RequirePackage{luatexko} + \RequirePackage{luatexko-xobfont} +\else\ifxetex + \RequirePackage{xetexko-var} + \else + \ifKOTEXCJK + \RequirePackage{cjkutf8-ko} +% \else +% \RequirePackage{dhucs} + \fi +\fi\fi + +\ifKOTEXCJK\else + \RequirePackage{xob-dotemph} +\fi + +%% define memh@hu +\newdimen\memh@hu\memh@hu=0.059375em + +\newif\if@inthekoreancontext\@inthekoreancontexttrue + +%% 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{ + \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 + +\if@pdfbookmark + \@ifpackageloaded{hyperref}{% hyperref is already loaded + \typeout{hyperref is already loaded!}% + \RequirePackage{memhfixc}}% + {% + \RequirePackage{hyperref} + \RequirePackage{memhfixc}} +\fi + +%%% interword +\if@interworddefault + \RequirePackage{memucs-interword-x} +\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}{제\ob@onethirdspace }{\ob@onethirdspace 절} +\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}} +\fi\fi +} + +\RequirePackage{memhangul-common} + +\ifx\memucsinterwordhook\undefined +\def\memucsinterwordhook{} +\fi + +\ifx\memucsinterwordchapterskiphook\undefined +\def\memucsinterwordchapterskiphook{} +\fi + +\if@nonfrench\else + \frenchspacing +\fi + +%%% 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} + +%%% fix first pdf page layout error : XeTeX +%%% based on v1.61803398 +%%% these codes are to be deleted later. (2009/09/25) +\renewcommand*{\fixpdflayout}{% + \pdfpageheight=\the\stockheight + \pdfpagewidth=\the\stockwidth + \ifxetex + \AtBeginDvi{\special{pdf: pagesize width \the\stockwidth\ height \the\stockheight}}% + \else + \ifdim\pdfvorigin=0pt\pdfvorigin=1in\fi + \ifdim\pdfhorigin=0pt\pdfhorigin=1in\fi + \fi} + +%%% 호환을 위하여 dhucs 명령 몇 개를 무력화함. +\ifx\SetAdhocFonts\undefined + \def\SetAdhocFonts#1#2{} +\fi +\ifx\regremph\undefined + \let\regremph\relax + \let\ungremph\relax +\fi + +\endinput + +% CHANGE LOG +% 2013/10/22 : introduce memhangul-common.sty +% 2013/10/16 : \kscntformat and [kosection] bug fix. +% 2013/09/27 : \cntrdotss +% 2013/09/15 : \leavevmode at \explpunc, \expldash +% 2013/09/01 : [cjk], [dhucs] option introduced +% 2012/12/02 : drop shipout hacking codes +% 2012/11/29 : \pdfstringdefDisableCommands +% 2012/11/22 : [figtabcapt] opton introduced +% 2012/11/01 : avoid error in \cnm, \ccnm etc. +% 2012/07/12 : introduce luatexko-xobfont +% 2011/09/15 : changes according to xoblivoir +% 2010/09/16 : cntrdot, adjustmath +% 2009/05/11 : protect bnm commands +% 2009/04/02 : redefine memoir-shipout for pdflualatex and other... +% 2009/02/11. memoir v1.6180339e compatibility mend 1. +% titleref, hangul page style. +%%% +% 오전 6:35 2008-09-18 : rename xkospace.sty to xkospace-var.sty +% to avoid confusion +% 오후 2:16 2008-09-18 : latinquote 옵션 +% 오전 4:32 2008-09-30 : hangul item titles +% 코드 정리. +% 오전 8:24 2008-10-07 : revive interword hook +% 오후 5:25 2008-10-07 : revive gremph/itemph +% 오전 1:21 2008-10-13 : xetexko v0.1 반영 +% 오후 2:37 2008-10-23 : bnmcmds, oblivoirdblquote +% 오후 17:59 2008-12-03 : nowinname 옵션 추가 +% 오전 2:17 2009-09-26 : try to fix the first pdf page layout error on XeTeX (moved from fapapersize) +% diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memucs-interword-x.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memucs-interword-x.sty new file mode 100644 index 00000000000..e033b74ce2f --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/memucs-interword-x.sty @@ -0,0 +1,188 @@ +%% memucs-interword-x.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-x}[2009/04/02] +\RequirePackage{ifluatex} +\RequirePackage{ifxetex} + +\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. +%\ifluatex\else\ifxetex\else +% \if@dhucsfinemath\else\@dhucsfinemathtrue\fi +%\fi\fi + +%%% inter hchar +\newcommand*\interHchar[1]{% + \ifluatex + \@luatex@setinterhangulskip{#1}% + \else\ifxetex + \@xetex@setinterhangulskip{#1}% + \else + \@setinterhangulskip{#1}% + \fi\fi +} + +\newcommand*\DefaultInterHchar{% + \interHchar{-.04}% +} + +\newcommand*\@luatex@setinterhangulskip[1]{% +\directlua{ + fmconfig.hangul_hangul = #1 % ѱ ڰ +}} + +\newcommand*\@xetex@setinterhangulskip[1]{% + \def\xetexkointerhchar{#1em}% +} + +\newcommand*\@setinterhangulskip[1]{% + \setInterHangulSkip{#1em}% +} + +\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{% + \DefaultInterHchar + }% + \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{% + \DefaultInterHchar + \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 +% 2009/04/02. small alterations. +% 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-x/xetexko-var.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xetexko-var.sty new file mode 100644 index 00000000000..2aaf1e8b97d --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xetexko-var.sty @@ -0,0 +1,67 @@ +%% xetexko-var.sty +%% +%% Copyright (c) 2007-2013 Kangsoo Kim <karnes at ktug org> +%% Copyright (c) 2013 Kihwang Lee <leekh 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. +%% +%% A variant of xetexko.sty +%% +%% Updated for xetexko v2.1 +%% 2013.08.26 +%% +\ProvidesPackage{xetexko-var} + [2013/08/26 v0.12 Korean Typesetting under XeTeX] + +%%% common options for xob-font +\DeclareOption{gremph}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\DeclareOption{itemph}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\DeclareOption{oldhangul}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\DeclareOption{latinquote}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\DeclareOption{nowinname}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +%%% for kolabels +\newif\if@hangul +\newif\if@hanja +\DeclareOption{hangul}{\@hangultrue} +\DeclareOption{hanja}{\@hangultrue\@hanjatrue} +%%% for xob-fonts +\newif\if@extfontspec\@extfontspecfalse +\DeclareOption{manualfontspec}{\@extfontspectrue} + +%%% unfonts +\DeclareOption{unfonts}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\DeclareOption{nounfonts}{\PassOptionsToPackage{\CurrentOption}{xetexko-xobfont}} +\ProcessOptions\relax + +%%% xetexko sub-styles +\RequirePackage{xetexko-space} +\RequirePackage{xetexko-josa} +\RequirePackage{xetexko-vertical} + +%%% xoblivoir sub-styles +\RequirePackage{xob-dotemph} +\RequirePackage{xob-hyper} + +\if@extfontspec + \PackageWarning{xetexko-var}{Load xetexko-xobfont and configure Korean Fonts manually!}{} + \RequirePackage{xetexko-font} +\else + \RequirePackage{xetexko-xobfont} +\fi + +\RequirePackage{kolabels-utf} +\if@hangul\AtBeginDocument{\RequirePackage{konames-utf}}\fi + +\endinput + +%%% 2013-09-27, nounfonts. +%%% 오후 3:22 2008-11-16 +%%% 오후 17:59 2008-12-03 : nowinname 옵션 추가 +%%% 2009-03-25, xetexko.sty +%%% 오전 2:22 2009-09-26, xetexko-vertical.sty diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xetexko-xobfont.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xetexko-xobfont.sty new file mode 100644 index 00000000000..2259087ca37 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xetexko-xobfont.sty @@ -0,0 +1,1059 @@ +%% xetexko-xobfont.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. +%% +%% a variant of xetexko-font.sty +% +\ifdefined\ProvidesPackage + \ProvidesPackage{xetexko-xobfont}[2009/10/29 v0.76 Korean font definition in conjunction with xetexko-space, a variant] +\fi + +\@ifpackageloaded{xetexko-space}{}{% + \PackageError{xetexko-xob}{xetexko-space must be loaded before}{}% +} + +\newif\if@latinquote\@latinquotefalse +\DeclareOption{latinquote}{\@latinquotetrue} +\newif\if@oldhangul\@oldhangulfalse +\DeclareOption{oldhangul}{\@oldhangultrue} +\newif\if@gremph\@gremphtrue +\DeclareOption{gremph}{\@gremphtrue} +\DeclareOption{itemph}{\@gremphfalse} +\newif\if@nowin\@nowinfalse +\DeclareOption{nowinname}{\@nowintrue} + +\newif\if@unfonts\@unfontsfalse +\DeclareOption{unfonts}{\@unfontstrue} +\DeclareOption{nounfonts}{\@unfontsfalse} +\newif\if@nanumfonts\@nanumfontsfalse +\DeclareOption{nanum}{\@nanumfontstrue} + +\ProcessOptions + +\RequirePackage{xetexko-font} + +\if@oldhangul + \def\XKOV@oldhangulscript{Script=Hangul} + \def\XKOV@oldhangullanguage{Language=Korean} + \def\XKOV@oldhangulfeatures{RawFeature=+ccmp;+ljmo;+vjmo;+tjmo} +\else + \def\XKOV@oldhangulscript{} + \def\XKOV@oldhangullanguage{} + \def\XKOV@oldhangulfeatures{} +\fi + +\if@gremph + \def\XKOV@italicfeatures{} + \def\XKOV@bolditalicfeatures{RawFeature={embolden=2}} + \def\XKOV@boldfeatures{RawFeature={embolden=2}} +\else + \def\XKOV@italicfeatures{RawFeature={slant=0.17}} + \def\XKOV@bolditalicfeatures{RawFeature={embolden=2;slant=0.17}} + \def\XKOV@boldfeatures{RawFeature={embolden=2}} +\fi + +\newcommand\setmonoscale[1]{% + \def\XKOV@monoscale{#1}% +} +\setmonoscale{1.05} + +%%% 괄호 재설정 +%\if@latinquote +% \XeTeXcharclass "2018 = 4 % ‘ +% \XeTeXcharclass "201C = 4 % “ +% \XeTeXcharclass "2019 = 5 % ’ +% \XeTeXcharclass "201D = 5 % ” +%\else +% \XeTeXcharclass "2018 = 2 % ‘ +% \XeTeXcharclass "201C = 2 % “ +% \XeTeXcharclass "2019 = 3 % ’ +% \XeTeXcharclass "201D = 3 % ” +%\fi + +%%% 한글 기호 문자 일부. xkospace에 정의되지 않은 것. +%%% 추후 삭제할 수 있는 코드. +%%% ※… = class 1 (한자) +%\XeTeXcharclass "007D = 7 %… class 7 ("AC00) +%%\count255 = "203B +%%\loop \XeTeXcharclass\count255 = 1 +%% \ifnum\count255 < "24EA +%% \advance\count255 1 \repeat +%%\count255 = "3200 +%%\loop \XeTeXcharclass\count255 = 1 +%% \ifnum\count255 < "33DE +%% \advance\count255 1 \repeat +%%\count255 = "25A0 +%%\loop \XeTeXcharclass\count255 = 1 +%% \ifnum\count255 < "266E +%% \advance\count255 1 \repeat + +\XeTeXcharclass "223C = 1 % ∼ + +%% 한글폰트 지정하기 : +\@ifpackageloaded{xltxtra}{}{\RequirePackage{xltxtra}} + \def\CallKorFont#1{% + \expandafter\newfontfamily\csname kor#1font\endcsname[\XKOV@externallocation,% + BoldFont=\csname XKOV@kor#1@bold\endcsname,% + ItalicFont=\csname XKOV@kor#1@italic\endcsname,% + ItalicFeatures={\XKOV@italicfeatures},% + BoldItalicFont=\csname XKOV@kor#1@bolditalic\endcsname,% + BoldItalicFeatures={\XKOV@italicfeatures},% +% Script=Hangul,% +% Language=Korean,% +% RawFeature=+ccmp;+ljmo;+vjmo;+tjmo + \XKOV@oldhangulscript,\XKOV@oldhangullanguage,% + \XKOV@oldhangulfeatures + ]% + {\csname XKOV@kor#1@regular\endcsname}% + } +%%%%%%%%% mono 폰트는 특별하게 취급한다. + \def\CallKorFontmono{% + \newfontfamily\kormonofont[\XKOV@externallocation,% + BoldFont=\XKOV@kormono@bold,% + BoldFeatures={\XKOV@boldfeatures},% + ItalicFont=\XKOV@kormono@italic,% + ItalicFeatures={\XKOV@italicfeatures},% + BoldItalicFont=\XKOV@kormono@bolditalic,% + BoldItalicFeatures={\XKOV@bolditalicfeatures},% + Scale=\XKOV@monoscale]% + {\XKOV@kormono@regular} + } +% \newfontfamily\korvertfont[ExternalLocation, +% BoldFont=UnBatang, +% BoldFeatures={RawFeature={embolden=2}}, +% ItalicFont=UnBatang, +% ItalicFeatures={RawFeature={slant=0.17}}, +% BoldItalicFont=UnBatang, +% BoldItalicFeatures={RawFeature={embolden=2;slant=0.17}}, +% Script=Hangul, +% Language=Korean, +% Vertical=RotatedGlyphs] +% {UnBatang} + \def\CallHnjFont#1{% + \expandafter\newfontfamily\csname hnj#1font\endcsname[\XKOV@externallocation,% + BoldFont=\csname XKOV@hnj#1@bold\endcsname,% + ItalicFont=\csname XKOV@hnj#1@italic\endcsname,% + ItalicFeatures={\XKOV@italicfeatures},% + BoldItalicFont=\csname XKOV@hnj#1@bolditalic\endcsname,% + BoldItalicFeatures={\XKOV@italicfeatures},% +% Script=Hangul,% +% Language=Korean,% +% RawFeature=+ccmp;+ljmo;+vjmo;+tjmo + \XKOV@oldhangulscript,\XKOV@oldhangullanguage,% + \XKOV@oldhangulfeatures + ]% + {\csname XKOV@hnj#1@regular\endcsname}% + } + \def\CallHnjFontmono{% + \newfontfamily\hnjmonofont[\XKOV@externallocation,% + BoldFont=\XKOV@hnjmono@bold,% + BoldFeatures={\XKOV@boldfeatures},% + ItalicFont=\XKOV@hnjmono@italic,% + ItalicFeatures={\XKOV@italicfeatures},% + BoldItalicFont=\XKOV@hnjmono@bolditalic,% + BoldItalicFeatures={\XKOV@bolditalicfeatures},% + Scale=\XKOV@monoscale + ]% + {\XKOV@hnjmono@regular} + } + \def\CallHnjDefault{% + \let\hnjmainfont\kormainfont + \let\hnjsansfont\korsansfont + \let\hnjmonofont\korsansfont + } + +%%% 사용자 명령 +%%% from here, Karnes writes: + +\RequirePackage{twoopt} +\newif\if@korfnt@external\@korfnt@externaltrue +\newif\if@XKOV@extendcommand\@XKOV@extendcommandfalse + +\let\XKOV@XP\expandafter + +%%%%%%%%%%%%%%%%%%%%%% main +%%% 아무래도 잊어버릴 듯해서... +%%% 다음 네 가지는 xetexko-font의 방식 +%%% \setkormainfont{FontName} +%%% \setkormainfont[Options]{FontName} +%%% \setkormainfont{FontName}[Hanja_Opt]{FontName} +%%% \setkormainfont[Options]{FontName}[Hanja_Opt]{FontName} +%%% xoblivoir 방식은 +%%% \setkormainfont*{FontName} +%%% \setkormainfont(Bold)(Italic){FontName} +%%% \setkormainfont*(Bold)(Italic){FontName} +%%% \setkormainfont(Bold)(Italic){FontName}(Bold)(Italic){FontName} +%%% \setkormainfont*(Bold)(Italic){FontName}(Bold)(Italic){FontName} +%%% (Bold)(Italic)은 optional. +%%% +\def\setkormainfont{% + \@ifnextchar[\setkormainATYPE{% + \@ifnextchar(\setkormainBTYPE{% + \@ifnextchar*\setkormainCTYPE\setkormainDTYPE}}% +} + +\def\setkormainATYPE[#1]#2{% + \gdef\@ATYPEopt@ne{#1}% + \gdef\@ATYPEarg@ne{#2}% + \@ifnextchar[\setkormainATYPEA\setkormainATYPEB +} + +\def\setkormainATYPEA[#1]#2{% + \XKOV@XP\setmainhangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% + \setmainhanjafont[#1]{#2}% +} + +\def\setkormainATYPEB{% + \XKOV@XP\setmainhangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% +} + +\def\setkormainDTYPE#1{% + \gdef\@ATYPEarg@ne{#1}% + \@ifnextchar[\setkormainDTYPEA\setkormainDTYPEB +} + +\def\setkormainDTYPEA[#1]#2{% + \setmainhangulfont{\@AgTYPEarg@ne}% + \setmainhanjafont[#1]{#2}% +} + +\def\setkormainDTYPEB{% + \setmainhangulfont{\@ATYPEarg@ne}% +} + +\def\setkormainBTYPE(#1){% + \long\gdef\@BTYPEopt@ne{#1}% + \@ifnextchar(\setkormainBTYPEA\setkormainBTYPEB +} + +\def\setkormainBTYPEA(#1)#2{% + \long\gdef\@BTYPEopttw@{#1}% + \long\gdef\@BTYPEarg@ne{#2}% + \@ifnextchar(\setkormainBTYPEC\setkormainBTYPED +} + +\def\setkormainBTYPEB#1{% + \gdef\@BTYPEarg@ne{#1}% + \@ifnextchar(\setkormainBTYPEBA\setkormainBTYPEBB +} + +\def\setkormainBTYPEBB{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% +} + +\def\setkormainBTYPEBA({% + \@ifnextchar)\setkormainBTYPEBNO\setkormainBTYPEBYES +} + +\def\setkormainBTYPEBNO)#1{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkormainBTYPEBYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkormainBTYPEBE\setkormainBTYPEBF +} + +\def\setkormainBTYPEBE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rm@inf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkormainBTYPEBF#1{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkormainBTYPEC({% + \@ifnextchar)\setkormainBTYPECNO\setkormainBTYPECYES +} + +\def\setkormainBTYPED{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% +} + +\def\setkormainBTYPECNO)#1{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkormainBTYPECYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkormainBTYPEE\setkormainBTYPEF +} + +\def\setkormainBTYPEE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rm@inf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkormainBTYPEF#1{% + \s@tk@rm@inf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkormainCTYPE*{ + \@ifnextchar(\setkormainCTYPEALPHA\setkormainCTYPEBETA +} + +\def\setkormainCTYPEBETA#1{% + \s@tk@rm@inf@nt*{#1}% +} + +\def\setkormainCTYPEALPHA(#1){% + \gdef\@CTYPEopt@ne{#1}% + \@ifnextchar(\setkormainCTYPEA\setkormainCTYPEB +} + +\def\setkormainCTYPEA(#1)#2{% + \gdef\@CTYPEopttw@{#1}% + \gdef\@CTYPEarg@ne{#2}% + \@ifnextchar(\setkormainCTYPEC\setkormainCTYPED +} + +\def\setkormainCTYPEB#1{% + \gdef\@CTYPEarg@ne{#1}% + \@ifnextchar(\setkormainCTYPEBA\setkormainCTYPEBB +} + +\def\setkormainCTYPEBB{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% +} + +\def\setkormainCTYPEBA({% + \@ifnextchar)\setkormainCTYPEBNO\setkormainCTYPEBYES +} + +\def\setkormainCTYPEBNO)#1{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkormainCTYPEBYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkormainCTYPEBE\setkormainCTYPEBF +} + +\def\setkormainCTYPEBE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkormainCTYPEBF#1{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +\def\setkormainCTYPEC({% + \@ifnextchar)\setkormainCTYPECNO\setkormainCTYPECYES +} + +\def\setkormainCTYPED{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% +} + +\def\setkormainCTYPECNO)#1{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkormainCTYPECYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkormainCTYPEE\setkormainCTYPEF +} + +\def\setkormainCTYPEE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkormainCTYPEF#1{% + \s@tk@rm@inf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +%%%%%%%%%%%%%%%%%%%%%%%% + +\def\setkorsansfont{% + \@ifnextchar[\setkorsansATYPE{% + \@ifnextchar(\setkorsansBTYPE{% + \@ifnextchar*\setkorsansCTYPE\setkorsansDTYPE}}% +} + +\def\setkorsansATYPE[#1]#2{% + \gdef\@ATYPEopt@ne{#1}% + \gdef\@ATYPEarg@ne{#2}% + \@ifnextchar[\setkorsansATYPEA\setkorsansATYPEB +} + +\def\setkorsansATYPEA[#1]#2{% + \XKOV@XP\setsanshangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% + \setsanshanjafont[#1]{#2}% +} + +\def\setkorsansATYPEB{% + \XKOV@XP\setsanshangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% +} + +\def\setkorsansDTYPE#1{% + \gdef\@ATYPEarg@ne{#1}% + \@ifnextchar[\setkorsansDTYPEA\setkorsansDTYPEB +} + +\def\setkorsansDTYPEA[#1]#2{% + \setsanshangulfont{\@ATYPEarg@ne}% + \setsanshanjafont[#1]{#2}% +} + +\def\setkorsansDTYPEB{% + \setsanshangulfont{\@ATYPEarg@ne}% +} + +\def\setkorsansBTYPE(#1){% + \long\gdef\@BTYPEopt@ne{#1}% + \@ifnextchar(\setkorsansBTYPEA\setkorsansBTYPEB +} + +\def\setkorsansBTYPEA(#1)#2{% + \long\gdef\@BTYPEopttw@{#1}% + \long\gdef\@BTYPEarg@ne{#2}% + \@ifnextchar(\setkorsansBTYPEC\setkorsansBTYPED +} + +\def\setkorsansBTYPEB#1{% + \gdef\@BTYPEarg@ne{#1}% + \@ifnextchar(\setkorsansBTYPEBA\setkorsansBTYPEBB +} + +\def\setkorsansBTYPEBB{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% +} + +\def\setkorsansBTYPEBA({% + \@ifnextchar)\setkorsansBTYPEBNO\setkorsansBTYPEBYES +} + +\def\setkorsansBTYPEBNO)#1{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkorsansBTYPEBYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkorsansBTYPEBE\setkorsansBTYPEBF +} + +\def\setkorsansBTYPEBE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkorsansBTYPEBF#1{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkorsansBTYPEC({% + \@ifnextchar)\setkorsansBTYPECNO\setkorsansBTYPECYES +} + +\def\setkorsansBTYPED{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% +} + +\def\setkorsansBTYPECNO)#1{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkorsansBTYPECYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkorsansBTYPEE\setkorsansBTYPEF +} + +\def\setkorsansBTYPEE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkorsansBTYPEF#1{% + \s@tk@rs@nsf@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkorsansCTYPE*{ + \@ifnextchar(\setkorsansCTYPEALPHA\setkorsansCTYPEBETA +} + +\def\setkorsansCTYPEBETA#1{% + \s@tk@rs@nsf@nt*{#1}% +} + +\def\setkorsansCTYPEALPHA(#1){% + \gdef\@CTYPEopt@ne{#1}% + \@ifnextchar(\setkorsansCTYPEA\setkorsansCTYPEB +} + +\def\setkorsansCTYPEA(#1)#2{% + \gdef\@CTYPEopttw@{#1}% + \gdef\@CTYPEarg@ne{#2}% + \@ifnextchar(\setkorsansCTYPEC\setkorsansCTYPED +} + +\def\setkorsansCTYPEB#1{% + \gdef\@CTYPEarg@ne{#1}% + \@ifnextchar(\setkorsansCTYPEBA\setkorsansCTYPEBB +} + +\def\setkorsansCTYPEBB{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% +} + +\def\setkorsansCTYPEBA({% + \@ifnextchar)\setkorsansCTYPEBNO\setkorsansCTYPEBYES +} + +\def\setkorsansCTYPEBNO)#1{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkorsansCTYPEBYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkorsansCTYPEBE\setkorsansCTYPEBF +} + +\def\setkorsansCTYPEBE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkorsansCTYPEBF#1{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +\def\setkorsansCTYPEC({% + \@ifnextchar)\setkorsansCTYPECNO\setkorsansCTYPECYES +} + +\def\setkorsansCTYPED{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% +} + +\def\setkorsansCTYPECNO)#1{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkorsansCTYPECYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkorsansCTYPEE\setkorsansCTYPEF +} + +\def\setkorsansCTYPEE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkorsansCTYPEF#1{% + \s@tk@rs@nsf@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\setkormonofont{% + \@ifnextchar[\setkormonoATYPE{% + \@ifnextchar(\setkormonoBTYPE{% + \@ifnextchar*\setkormonoCTYPE\setkormonoDTYPE}}% +} + +\def\setkormonoATYPE[#1]#2{% + \gdef\@ATYPEopt@ne{#1}% + \gdef\@ATYPEarg@ne{#2}% + \@ifnextchar[\setkormonoATYPEA\setkormonoATYPEB +} + +\def\setkormonoATYPEA[#1]#2{% + \XKOV@XP\setmonohangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% + \setmonohanjafont[#1]{#2}% +} + +\def\setkormonoATYPEB{% + \XKOV@XP\setmonohangulfont\XKOV@XP[\@ATYPEopt@ne]{\@ATYPEarg@ne}% +} + +\def\setkormonoDTYPE#1{% + \gdef\@ATYPEarg@ne{#1}% + \@ifnextchar[\setkormonoDTYPEA\setkormonoDTYPEB +} + +\def\setkormonoDTYPEA[#1]#2{% + \setmonohangulfont{\@ATYPEarg@ne}% + \setmonohanjafont[#1]{#2}% +} + +\def\setkormonoDTYPEB{% + \setmonohangulfont{\@ATYPEarg@ne}% +} + +\def\setkormonoBTYPE(#1){% + \long\gdef\@BTYPEopt@ne{#1}% + \@ifnextchar(\setkormonoBTYPEA\setkormonoBTYPEB +} + +\def\setkormonoBTYPEA(#1)#2{% + \long\gdef\@BTYPEopttw@{#1}% + \long\gdef\@BTYPEarg@ne{#2}% + \@ifnextchar(\setkormonoBTYPEC\setkormonoBTYPED +} + +\def\setkormonoBTYPEB#1{% + \gdef\@BTYPEarg@ne{#1}% + \@ifnextchar(\setkormonoBTYPEBA\setkormonoBTYPEBB +} + +\def\setkormonoBTYPEBB{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% +} + +\def\setkormonoBTYPEBA({% + \@ifnextchar)\setkormonoBTYPEBNO\setkormonoBTYPEBYES +} + +\def\setkormonoBTYPEBNO)#1{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkormonoBTYPEBYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkormonoBTYPEBE\setkormonoBTYPEBF +} + +\def\setkormonoBTYPEBE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkormonoBTYPEBF#1{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkormonoBTYPEC({% + \@ifnextchar)\setkormonoBTYPECNO\setkormonoBTYPECYES +} + +\def\setkormonoBTYPED{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% +} + +\def\setkormonoBTYPECNO)#1{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + []{#1}% +} + +\def\setkormonoBTYPECYES#1){% + \gdef\@BTYPEoptthr@@{#1}% + \@ifnextchar(\setkormonoBTYPEE\setkormonoBTYPEF +} + +\def\setkormonoBTYPEE(#1)#2{% + \gdef\@BTYPEoptf@ur{#1}% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@][\@BTYPEoptf@ur]{#2}% +} + +\def\setkormonoBTYPEF#1{% + \s@tk@rm@n@f@nt[\@BTYPEopt@ne][\@BTYPEopttw@]{\@BTYPEarg@ne}% + [\@BTYPEoptthr@@]{#1}% +} + +\def\setkormonoCTYPE*{ + \@ifnextchar(\setkormonoCTYPEALPHA\setkormonoCTYPEBETA +} + +\def\setkormonoCTYPEBETA#1{% + \s@tk@rm@n@f@nt*{#1}% +} + +\def\setkormonoCTYPEALPHA(#1){% + \gdef\@CTYPEopt@ne{#1}% + \@ifnextchar(\setkormonoCTYPEA\setkormonoCTYPEB +} + +\def\setkormonoCTYPEA(#1)#2{% + \gdef\@CTYPEopttw@{#1}% + \gdef\@CTYPEarg@ne{#2}% + \@ifnextchar(\setkormonoCTYPEC\setkormonoCTYPED +} + +\def\setkormonoCTYPEB#1{% + \gdef\@CTYPEarg@ne{#1}% + \@ifnextchar(\setkormonoCTYPEBA\setkormonoCTYPEBB +} + +\def\setkormonoCTYPEBB{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% +} + +\def\setkormonoCTYPEBA({% + \@ifnextchar)\setkormonoCTYPEBNO\setkormonoCTYPEBYES +} + +\def\setkormonoCTYPEBNO)#1{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkormonoCTYPEBYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkormonoCTYPEBE\setkormonoCTYPEBF +} + +\def\setkormonoCTYPEBE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkormonoCTYPEBF#1{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +\def\setkormonoCTYPEC({% + \@ifnextchar)\setkormonoCTYPECNO\setkormonoCTYPECYES +} + +\def\setkormonoCTYPED{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% +} + +\def\setkormonoCTYPECNO)#1{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + []{#1}% +} + +\def\setkormonoCTYPECYES#1){% + \gdef\@CTYPEoptthr@@{#1}% + \@ifnextchar(\setkormonoCTYPEE\setkormonoCTYPEF +} + +\def\setkormonoCTYPEE(#1)#2{% + \gdef\@CTYPEoptf@ur{#1}% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@][\@CTYPEoptf@ur]{#2}% +} + +\def\setkormonoCTYPEF#1{% + \s@tk@rm@n@f@nt*[\@CTYPEopt@ne][\@CTYPEopttw@]{\@CTYPEarg@ne}% + [\@CTYPEoptthr@@]{#1}% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\if@unfonts + \def\UnBatang{UnBatang} + \def\UnBatangBold{UnBatang-Bold} + \def\UnDotum{UnDotum} + \def\UnDotumBold{UnDotum-Bold} + \def\UnTaza{UnTaza} +\else +\if@nanumfonts + \setmainhangulfont{NanumMyeongjo} + \setsanshangulfont{NanumGothic} + \setmonohangulfont{NanumGothic} +\fi +\fi + +\def\s@tk@rm@inf@nt{% + \@ifnextchar*\s@setk@rmainf@nt\l@setk@rmainf@nt +} +\def\s@setk@rmainf@nt*{\SETKORMAINFONTEL} +\def\l@setk@rmainf@nt{\SETKORMAINFONT} + +\def\NOEXTSETKORMAINFONT{% + \let\hnjmainfont\kormainfont +} + +\def\RESstar{*} + +\newcommandtwoopt{\SETKORMAINFONTEL}[3][][]{% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@kormain@regular{#3}% + \def\XKOV@kormain@bold{#1}% + \ifx#2\RESstar + \def\XKOV@kormain@italic{#3}% + \else + \def\XKOV@kormain@italic{#2}% + \fi + \def\XKOV@kormain@bolditalic{#2}% + \CallKorFont{main}% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORMAINFONTEL\NOEXTSETKORMAINFONT +} + +\newcommandtwoopt{\EXTSETKORMAINFONTEL}[3][][]{% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@hnjmain@regular{#3}% + \def\XKOV@hnjmain@bold{#1}% + \ifx#2\RESstar + \def\XKOV@hnjmain@italic{#3}% + \else + \def\XKOV@hnjmain@italic{#2}% + \fi + \def\XKOV@hnjmain@bolditalic{#2}% + \CallHnjFont{main}% + \@XKOV@extendcommandfalse +} + +\newcommandtwoopt{\SETKORMAINFONT}[3][][]{% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@kormain@regular{#3}% + \def\XKOV@kormain@bold{#1}% + \ifx#2\RESstar + \def\XKOV@kormain@italic{#3}% + \else + \def\XKOV@kormain@italic{#2}% + \fi + \def\XKOV@kormain@bolditalic{#2}% + \CallKorFont{main}% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORMAINFONT\NOEXTSETKORMAINFONT +} + +\newcommandtwoopt{\EXTSETKORMAINFONT}[3][][]{% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@hnjmain@regular{#3}% + \def\XKOV@hnjmain@bold{#1}% + \ifx#2\RESstar + \def\XKOV@hnjmain@italic{#3}% + \else + \def\XKOV@hnjmain@italic{#2}% + \fi + \def\XKOV@hnjmain@bolditalic{#2}% + \CallHnjFont{main}% + \@XKOV@extendcommandfalse +} + +%%%%%%%%%%%%%%%%%%%%%%% sans + +\def\s@tk@rs@nsf@nt{% + \@ifnextchar*\s@setk@rsansf@nt\l@setk@rsansf@nt +} +\def\s@setk@rsansf@nt*{\SETKORSANSFONTEL} +\def\l@setk@rsansf@nt{\SETKORSANSFONT} + +\newcommandtwoopt{\SETKORSANSFONTEL}[3][][]{% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@korsans@regular{#3}% + \def\XKOV@korsans@bold{#1}% + \ifx#2\RESstar + \def\XKOV@korsans@italic{#3}% + \else + \def\XKOV@korsans@italic{#2}% + \fi + \def\XKOV@korsans@bolditalic{#2}% + \CallKorFont{sans}% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORSANSFONTEL\NOEXTSETKORSANSFONT +} + +\newcommandtwoopt{\EXTSETKORSANSFONTEL}[3][][]{% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@hnjsans@regular{#3}% + \def\XKOV@hnjsans@bold{#1}% + \ifx#2\RESstar + \def\XKOV@hnjsans@italic{#3}% + \else + \def\XKOV@hnjsans@italic{#2}% + \fi + \def\XKOV@hnjsans@bolditalic{#2}% + \CallHnjFont{sans}% + \@XKOV@extendcommandfalse +} + +\newcommandtwoopt{\SETKORSANSFONT}[3][][]{% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@korsans@regular{#3}% + \def\XKOV@korsans@bold{#1}% + \ifx#2\RESstar + \def\XKOV@korsans@italic{#3}% + \else + \def\XKOV@korsans@italic{#2}% + \fi + \def\XKOV@korsans@bolditalic{#2}% + \CallKorFont{sans}% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORSANSFONT\NOEXTSETKORSANSFONT +} + +\newcommandtwoopt{\EXTSETKORSANSFONT}[3][][]{% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@hnjsans@regular{#3}% + \def\XKOV@hnjsans@bold{#1}% + \ifx#2\RESstar + \def\XKOV@hnjsans@italic{#3}% + \else + \def\XKOV@hnjsans@italic{#2}% + \fi + \def\XKOV@hnjsans@bolditalic{#2}% + \CallHnjFont{sans}% + \@XKOV@extendcommandfalse +} + +\def\NOEXTSETKORSANSFONT{% + \let\hnjsansfont\korsansfont +} + +%%%%%%%%%%%%%%%%%%%%%%% mono + +\def\s@tk@rm@n@f@nt{% + \@ifnextchar*\s@setk@rmonof@nt\l@setk@rmonof@nt +} +\def\s@setk@rmonof@nt*{\SETKORMONOFONTEL} +\def\l@setk@rmonof@nt{\SETKORMONOFONT} + +\newcommandtwoopt{\SETKORMONOFONTEL}[3][][]{% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@kormono@regular{#3}% + \def\XKOV@kormono@bold{#1}% + \def\XKOV@kormono@italic{#2}% + \def\XKOV@kormono@bolditalic{#2}% + \CallKorFontmono% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORMONOFONTEL\NOEXTSETKORMONOFONT +} + +\newcommandtwoopt{\EXTSETKORMONOFONTEL}[3][][]{% + \setmonoscale{1.0}% + \def\XKOV@externallocation{ExternalLocation}% + \@korfnt@externaltrue + \def\XKOV@hnjmono@regular{#3}% + \def\XKOV@hnjmono@bold{#1}% + \def\XKOV@hnjmono@italic{#2}% + \def\XKOV@hnjmono@bolditalic{#2}% + \CallHnjFontmono% + \@XKOV@extendcommandfalse +} + +\newcommandtwoopt{\SETKORMONOFONT}[3][][]{% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@kormono@regular{#3}% + \def\XKOV@kormono@bold{#1}% + \def\XKOV@kormono@italic{#2}% + \def\XKOV@kormono@bolditalic{#2}% + \CallKorFontmono% + \@korfnt@externaltrue + \@ifnextchar[\EXTSETKORMONOFONT\NOEXTSETKORMONOFONT +} + +\newcommandtwoopt{\EXTSETKORMONOFONT}[3][][]{% + \setmonoscale{1.0}% + \def\XKOV@externallocation{}% + \@korfnt@externalfalse + \def\XKOV@hnjmono@regular{#3}% + \def\XKOV@hnjmono@bold{#1}% + \def\XKOV@hnjmono@italic{#2}% + \def\XKOV@hnjmono@bolditalic{#2}% + \CallHnjFontmono% + \@XKOV@extendcommandfalse +} + +\def\NOEXTSETKORMONOFONT{% + \let\hnjmonofont\korsansfont +} + +%% dummy call +\def\SetDefaultKorFonts{% +\if@unfonts +\if@korfnt@external + \ifx\XKOV@kormain@regular\undefined\def\XKOV@kormain@regular{UnBatang}\fi + \ifx\XKOV@kormain@bold\undefined\def\XKOV@kormain@bold{UnBatangBold}\fi + \ifx\XKOV@kormain@italic\undefined\def\XKOV@kormain@italic{UnBatang}\fi + \ifx\XKOV@kormain@bolditalic\undefined\def\XKOV@kormain@bolditalic{UnBatangBold}\fi + \ifx\XKOV@korsans@regular\undefined\def\XKOV@korsans@regular{UnDotum}\fi + \ifx\XKOV@korsans@bold\undefined\def\XKOV@korsans@bold{UnDotumBold}\fi + \ifx\XKOV@korsans@italic\undefined\def\XKOV@korsans@italic{UnDotum}\fi + \ifx\XKOV@korsans@bolditalic\undefined\def\XKOV@korsans@bolditalic{UnDotumBold}\fi + \ifx\XKOV@kormono@regular\undefined\def\XKOV@kormono@regular{UnTaza}\fi + \ifx\XKOV@kormono@bold\undefined\def\XKOV@kormono@bold{UnTaza}\fi + \ifx\XKOV@kormono@italic\undefined\def\XKOV@kormono@italic{UnTaza}\fi + \ifx\XKOV@kormono@bolditalic\undefined\def\XKOV@kormono@bolditalic{UnTaza}\fi +\else + \ifx\XKOV@kormain@regular\undefined\def\XKOV@kormain@regular{\UnBatang}\fi + \ifx\XKOV@kormain@bold\undefined\def\XKOV@kormain@bold{\UnBatangBold}\fi + \ifx\XKOV@kormain@italic\undefined\def\XKOV@kormain@italic{\UnBatang}\fi + \ifx\XKOV@kormain@bolditalic\undefined\def\XKOV@kormain@bolditalic{\UnBatangBold}\fi + \ifx\XKOV@korsans@regular\undefined\def\XKOV@korsans@regular{\UnDotum}\fi + \ifx\XKOV@korsans@bold\undefined\def\XKOV@korsans@bold{\UnDotumBold}\fi + \ifx\XKOV@korsans@italic\undefined\def\XKOV@korsans@italic{\UnDotum}\fi + \ifx\XKOV@korsans@bolditalic\undefined\def\XKOV@korsans@bolditalic{\UnDotumBold}\fi + \ifx\XKOV@kormono@regular\undefined\def\XKOV@kormono@regular{\UnTaza}\fi + \ifx\XKOV@kormono@bold\undefined\def\XKOV@kormono@bold{\UnTaza}\fi + \ifx\XKOV@kormono@italic\undefined\def\XKOV@kormono@italic{\UnTaza}\fi + \ifx\XKOV@kormono@bolditalic\undefined\def\XKOV@kormono@bolditalic{\UnTaza}\fi +\fi +\else\fi +} + +%%% dummy declaration, to avoid errors! +\if@unfonts +\s@tk@rm@inf@nt*{UnBatang} +\s@tk@rs@nsf@nt*{UnDotum} +\s@tk@rm@n@f@nt*{UnTaza} +\CallHnjDefault +\else +%\input TnX-xob-default.tex +\fi + +\AtBeginDocument{ + \ifx\XKOV@externallocation\undefined\def\XKOV@externallocation{ExternalLocation}\@korfnt@externaltrue\fi +%% \SetDefaultKorFonts +%% \CallKorFont{main}% +%% \CallKorFont{sans}% +%% \CallKorFontmono +} + +\endinput + +%%% 2013-09-27 : nounfonts set to default. +%%% 2012-12-31 : [unfonts], [nounfonts] +%%% 오전 1:21 2008-10-13 : xetexko-xobfont 작성 +%%% 오전 12:12 2008-11-09 : \setkor...font 명령 재작성 +%%% 오후 17:59 2008-12-02 : nowinname 옵션 추가 +%%% 오후 22:05 2008-12-02 : Italic 옵션에 (*) 추가 +%%% 오전 04:04 2008-12-08 : \XKOV@XP +%%% 오전 1:18 2009-08-25 : sans/mono bug fixed (thanks to DH Kim and YW Kim) +%%% 오전 12:22 2009-10-13 : 따옴표 설정을 xetexko에게. diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-amssymb.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-amssymb.sty new file mode 100644 index 00000000000..9d9578b44d2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-amssymb.sty @@ -0,0 +1,27 @@ +%% xob-amssymb.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. +%% +%% disable a few commands +%% +\def\DisablePreAmsCmds#1{% + \expandafter\ifx\csname #1\endcsname\undefined\else + \expandafter\let\csname #1\endcsname\relax\fi +} +\DisablePreAmsCmds{Finv} +\DisablePreAmsCmds{Game} +\DisablePreAmsCmds{beth} +\DisablePreAmsCmds{gimel} +\DisablePreAmsCmds{daleth} +% +\RequirePackage{amssymb} +% +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-dotemph.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-dotemph.sty new file mode 100644 index 00000000000..ad4d1ca9960 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-dotemph.sty @@ -0,0 +1,51 @@ +%% xob-dotemph.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. +%% +%% xob-dotemph +%% 2010-03-18 +%% 오전 9:01 2008-10-22 +%% xetexko-dotemph의 확장 +%% dhucs/hangul compatible (\dotemph, \circemph, \useremph) +%% ---------- +%% \useremph is different from xetexko's \useremph *** +%% +%% Updated for xetexko v2.1 +%% Kihwang Lee <leekh at ktug.org> +%% 2013.08.26 +%% +%%% from dhucs.sty +\def\circemph#1{\begingroup\def\dotemphchar{^^^^02da}\dotemph{#1}\endgroup} +\def\dhucs@useremph#1{\begingroup + \let\dotemphchar\useremphchar + \let\dotemphraise\useremphraisedim + \dotemph{#1}\endgroup} + +\def\useremph{% + \@ifnextchar[\@user@emph{% + \@ifnextchar*\@orig@useremph\@@user@emph}% +} + +\def\@orig@useremph*#1{\dhucs@useremph{#1}} + +\def\@user@emph[#1]#2#3{% + \def\useremphchar{#2}% + \def\useremphraisedim{#1}% + \dhucs@useremph{#3}% +} + +\def\@@user@emph#1#2{% + \def\useremphchar{#1}% + \def\useremphraisedim{6pt}% + \dhucs@useremph{#2}% +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-hyper.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-hyper.sty new file mode 100644 index 00000000000..154e8d3544d --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-hyper.sty @@ -0,0 +1,74 @@ +%% xob-hyper.sty +%% +%% Copyright (c) 2013 Kihwang Lee <leekh 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. +%% +%% Created for xetexko v2.1 +%% 2013.08.26 +%% +\AtBeginDocument{ + % for ulem package + \ifcsname UL@hook\endcsname \xetexkoulemsupport \fi + % for hyperref package + \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{% + \let\dotemph\@firstofone + \let\makejosa\@secondoftwo + \let\jong\relax + \let\jung\relax + \let\rieul\relax + \let\latinalphs\relax + \let\hangulalphs\relax + \let\hanjaalphs\relax + \let\prevfontalphs\relax + \let\latinnums\relax + \let\hangulnums\relax + \let\hanjanums\relax + \let\prevfontnums\relax + \let\latinparens\relax + \let\hangulparens\relax + \let\hanjaparens\relax + \let\prevfontparens\relax + \let\latinquotes\relax + \let\hangulquotes\relax + \let\hanjaquotes\relax + \let\prevfontquotes\relax + \let\latinpuncts\relax + \let\hangulpuncts\relax + \let\hanjapuncts\relax + \let\prevfontpuncts\relax + \let\latinmarks\relax + \let\hangulmarks\relax + \let\hanjamarks\relax + \let\prevfontmarks\relax + \let\latincolons\relax + \let\hangulcolons\relax + \let\hanjacolons\relax + \let\prevfontcolons\relax + \let\latinhyphens\relax + \let\hangulhyphens\relax + \let\hanjahyphens\relax + \let\prevfonthyphens\relax + \let\latincjksymbols\relax + \let\hangulcjksymbols\relax + \let\hanjacjksymbols\relax + \let\prevfontcjksymbols\relax + \let\disablekoreanfonts\relax + \let\disablehangulspacing\relax + \let\disablehangulspacingandlinebreak\relax + \let\disableautojosa\relax + \let\disablecjksymbolspacing\relax + \let\japanese\relax + \let\chinese\relax + \let\Tchinese\relax + \let\Schinese\relax + }}{} +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-paralist.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-paralist.sty new file mode 100644 index 00000000000..d090882ab20 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-paralist.sty @@ -0,0 +1,46 @@ +%% xob-paralist.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. +%% +%% paralist, +%% +\@ifpackageloaded{paralist}{}{\RequirePackage{paralist}} +\makeatletter +\def\pl@loop@{% + \ifx 가\pl@temp \def\@tempa{\pl@label\gana }\else + \ifx ㈎\pl@temp \def\@tempa{\pl@label\pgana }\else + \ifx ㉮\pl@temp \def\@tempa{\pl@label\ogana }\else + \ifx ㄱ\pl@temp \def\@tempa{\pl@label\jaso }\else + \ifx ㈀\pl@temp \def\@tempa{\pl@label\pjaso }\else + \ifx ㉠\pl@temp \def\@tempa{\pl@label\ojaso }\else + \ifx ⑴\pl@temp \def\@tempa{\pl@label\pnum }\else + \ifx ①\pl@temp \def\@tempa{\pl@label\onum }\else + \ifx ⒜\pl@temp \def\@tempa{\pl@label\peng }\else + \ifx ⓐ\pl@temp \def\@tempa{\pl@label\oeng }\else + \ifx ⅰ\pl@temp \def\@tempa{\pl@label\hroman}\else + \ifx Ⅰ\pl@temp \def\@tempa{\pl@label\hRoman}\else +%%%%%%%%%%%%%%%%%%%%%%%%%% + \ifx A\pl@temp \def\@tempa{\pl@label\Alph }\else + \ifx a\pl@temp \def\@tempa{\pl@label\alph }\else + \ifx i\pl@temp \def\@tempa{\pl@label\roman }\else + \ifx I\pl@temp \def\@tempa{\pl@label\Roman }\else + \ifx 1\pl@temp \def\@tempa{\pl@label\arabic}\else + \ifx \@sptoken\pl@temp \let\@tempa\pl@space \else + \ifx \bgroup\pl@temp \let\@tempa\pl@group \else + \ifx \@@@\pl@temp \let\@tempa\@gobble \else + \let\@tempa\pl@other + \pl@hook + \fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\makeatother + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-base.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-base.cls new file mode 100644 index 00000000000..48950391112 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-base.cls @@ -0,0 +1,559 @@ +%% File `oblivoir.cls` +%% +%% (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. +%% +\ProvidesClass{oblivoir-base} + [2013/10/26 v0.4.3 article-like class to typeset UTF-8 korean using memoir.] +%\typeout{oblivoir requires memoir, dhucs, and memhangul. 2008/10/23.} + +%%% Acknowledgements: +%%% Many thanks to +%%% ischo who provided a computer, place and time for developing and testing. +%%% smcho, ischo, synapse and beomsukhyun who requested functional improvements. +%%% progress who wrote a nice introductory document. +%%% and all the people who do or do not use this class. +%%% +%%% Options: +%%% nokorean : 영문용 +%%% twoside : twoside +%%% openright +%%% kosection : 절 표제항의 한글화 +%%% nobookmarks : 북마크 만들지 않음 +%%% dvips : dvips 작업용 옵션 +%%% 10.5pt : 10.5pt 본문 폰트 사이즈. +%%% footnote : 한글식 각주 모양 사용. +%%% tocentry : toc 등을 한 수준 위에서 처리. +%%% itemph : 강조를 itshape로 처리함. +%%% finemath : pass finemath option to dhucs. made default. +%%% nofinemath : no finemath. +%%% strictcharcheck : strictcharcheck to dhucs. +%%% microtype : load microtype and apply margin-kerning & font-expansion +%%% romanfixed : 10.5pt 옵션 사용시 영문 글꼴은 10pt로 고정. +%%% faht,fawd : flowfram과 함께 쓸 때 임의의 페이지 사이즈. +%%% moreverb : pdfmtricks와 함께 쓰기 위해 moreverb를 로드. +%%% 기타 옵션 : memoir 옵션 사용. +%%% default는 oneside, openany, kosection false, pdfbookmark임. +%%% subfigure : load old subfigure packaged +%%% +%%% 한글 폰트 관련: +%%% unfonts-type-1 +%%% + +\RequirePackage{etex} +\RequirePackage{xkeyval} + +\newif\ifnokorean\nokoreanfalse +\DeclareOptionX{nokorean}{\nokoreantrue} +\newif\iftwosidedoc\twosidedocfalse +\DeclareOptionX{twoside}{\twosidedoctrue} +\newif\ifopenrightdoc\openrightdocfalse +\DeclareOptionX{openright}{\openrightdoctrue} +\newif\ifkosection\kosectionfalse +\DeclareOptionX{kosection}{\kosectiontrue} +\newif\ifnobookmarks\nobookmarksfalse +\DeclareOptionX{nobookmarks}{\nobookmarkstrue} +\newif\ifhyperrefwithlyx\hyperrefwithlyxfalse +\DeclareOptionX{lyxhyper}{\hyperrefwithlyxtrue}{\hyperrefwithlyxfalse} +\newif\if@dvips\@dvipsfalse +\DeclareOptionX{dvips}{\@dvipstrue} +\newif\if@tendotfive\@tendotfivefalse +\DeclareOptionX{10.5pt}{\@tendotfivetrue} +\newif\if@koreanfn\@koreanfnfalse +\DeclareOptionX{footnote}{\@koreanfntrue} +\newif\if@toclofentry\@toclofentryfalse +\DeclareOptionX{tocentry}{\@toclofentrytrue} +\newif\if@itemph\@itemphfalse +\DeclareOptionX{itemph}{\@itemphtrue} +\newif\if@resizelatin\@resizelatintrue +\DeclareOptionX{romanfixed}{\@resizelatinfalse} +\newif\if@chapter\@chapterfalse +\DeclareOptionX{chapter}{\@chaptertrue\@toclofentrytrue} +\newif\if@finemath\@finemathtrue +\DeclareOptionX{finemath}{\@finemathtrue} +\DeclareOptionX{nofinemath}{\@finemathfalse} +\newif\if@microtype\@microtypefalse +\DeclareOptionX{microtype}{\@microtypetrue} +\newif\if@subfigure\@subfigurefalse +\DeclareOptionX{subfigure}{\@subfiguretrue} +\DeclareOptionX{strictcharcheck}{\PassOptionsToPackage{\CurrentOption}{memhangul-ucs}} + +\newif\if@moreverb\@moreverbfalse +\DeclareOptionX{moreverb}{\@moreverbtrue} +\newif\if@foursix\@foursixfalse\newlength\fa@setheight\newlength\fa@setwidth +\DeclareOptionX{faht}[]{\fa@setheight=#1\@foursixtrue} +\DeclareOptionX{fawd}[]{\fa@setwidth=#1\@foursixtrue} + +\DeclareOptionX{figtabcapt}[]{\PassOptionsToPackage{\CurrentOption}{memhangul-ucs}} + +%%% 2013-09-26 +\newif\if@unfonts\@unfontsfalse +\DeclareOptionX{unfonts}{\@unfontstrue} +\DeclareOptionX{nounfonts}{\@unfontsfalse} +\DeclareOptionX{nanum}{\@unfontsfalse} +\DeclareOptionX{uset1font}{\PassOptionsToPackage{\CurrentOption}{nanumfontsel}} + +\DeclareOptionX{cjk}{\PassOptionsToPackage{\CurrentOption}{memhangul-ucs}} +\DeclareOptionX{dhucs}{\PassOptionsToPackage{\CurrentOption}{memhangul-ucs}} + +\newif\if@AMSmath\@AMSmathfalse +\DeclareOptionX{amsmath}{\@AMSmathtrue} + +\newif\if@FULLROOM\@FULLROOMfalse +\DeclareOptionX{moreroom}{\@FULLROOMtrue} + +\DeclareOptionX*{% + \PassOptionsToClass{\CurrentOption}{memoir}% +} +\ProcessOptionsX + +%%% moreroom, reported by Juho Lee, 2013-09-26. +\if@FULLROOM +\def\alloc@#1#2#3#4#5% + {\ifnum\count1#1<#4% make sure there's still room + \allocationnumber\count1#1 + \global\advance\count1#1\@ne + \global#3#5\allocationnumber + \wlog{\string#5=\string#2\the\allocationnumber}% + \else\ifnum#1<6 + \def\etex@dummy@definition{}% <-- code added + \begingroup \escapechar\m@ne + \expandafter\alloc@@\expandafter{\string#2}#5% + \else\errmessage{No room for a new #2}\fi\fi + } +\fi + +%%% moreverb : 2008/10/23 +\if@moreverb + \RequirePackage{moreverb} +\fi + +%%% dvips +\ifnokorean\else +\if@dvips + \PassOptionsToPackage{dvips}{memhangul-ucs} +\fi\fi + +%%% memoir/memhangul-ucs 로드. +\if@chapter + \LoadClass[openany]{memoir} +\else +\iftwosidedoc + \LoadClass[article,openany]{memoir} +\else + \LoadClass[article,openany,oneside]{memoir} +\fi +\fi +%%% flowfram confict : 2008/10/23 +\if@foursix + \newcommand*{\fa@dblfoursix}{\stockheight=\fa@setheight \stockwidth=\fa@setwidth} + \fa@dblfoursix +\fi + +\if@AMSmath +\RequirePackage{amsmath,amssymb} +\fi + +%%% +\ifopenrightdoc\openright\fi +\newcommand\finemath@status{\if@finemath finemath\else\fi} +\ifnokorean\else + \if@itemph + \RequirePackage[nonfrench,interworddefault,hangulpagestyle,\finemath@status]{memhangul-ucs} + \else + \RequirePackage[nonfrench,interworddefault,hangulpagestyle,gremph,\finemath@status]{memhangul-ucs} + \fi +\fi +\if@chapter\else +\counterwithout{section}{chapter} +\fi + +%%% hfontspec +\ifnokorean\let\usehangulfontspec\@gobble\fi + +%%% korean fontsettings +\ifnokorean\else + \if@unfonts + \RequirePackage{hfontsel} + \usehangulfontspec{obut} + \else + \RequirePackage{nanumfontsel} + \usehangulfontspec{nanum} + \fi + \ifpdf + \input glyphtounicode\pdfgentounicode=1 + \RequirePackage{dhucs-cmap} + \else\fi +% \ifpdf +% \RequirePackage[ps]{hfontsel} % ut**를 기본 글꼴로 +% \usehangulfontspec{obut} +% \pdfmapfile{=unttf-pdftex-dhucs.map} % 그래도 혹시 모르므로 +%%%% dhucs-cmap은 여기서 로드한다. +% \RequirePackage{dhucs-cmap} % ut**가 기본글꼴일 때는 disable? +% \input glyphtounicode\pdfgentounicode=1 +% \else +% \if@dvips +% \RequirePackage[ps]{hfontsel} % ut**를 기본 글꼴로 +% \usehangulfontspec{obut} +% \else +% \RequirePackage{hfontsel} % 아무 옵션도 없다면 un** +% \usehangulfontspec{obun} +% \RequirePackage{dhucs-cmap} % un**일 때 +% \fi +% \fi +\fi + +%%% Gremph +\if@itemph\else + \ifnokorean\else +% \ifpdf + \if@unfonts + \SetGremphFonts{outgr}{outgt} + \else + \SetGremphFonts{nanumgt}{nanumgt} + \fi +% \else +% \if@dvips +% \SetGremphFonts{utgr}{utgt} +% \fi +% \fi + \fi +\fi + +%%% microtype +\ifpdf + \if@microtype + \RequirePackage[expansion=all]{microtype} + % for more elaborated operation, document specific config is needed. + % expansion works for ONE fontset only; so, basictext + LUC. +% \DeclareMicrotypeSet{dhucsmicro} +% { encoding = {LUC,OT1,T1,LY1,OT4,QX,T5}, +% % family = {rm*,sf*}, +% % series = {md*}, +% % size = {normalsize,footnotesize,small,large} +% } +% \UseMicrotypeSet[expansion]{dhucsmicro} + \fi +\else + \if@microtype +% \ClassWarningNoLine{oblivoir}{no pdflatex runs! microtype option is ignored.}{} + \RequirePackage{microtype} + \fi +\fi + +%%% 기본 자간 +\newdimen\ob@hu % 1jw=.95em, 1hu=1/16jw. see hfontspec.oblivoir +\ifnokorean\ob@hu=\z@\else\ob@hu=\dhucs@hu\fi +% 기본 자간 설정은 hfontspec.obu{n/t}. +%%%\newdimen\ob@hangulglue\ob@hangulglue=-.55\ob@hu +%%%\interhchar{\ob@hangulglue} + +\def\ob@DEFAULTskips{% + \def\memucshangulskips{% +% \interhchar{\ob@hangulglue}% + }% + \def\memucsinterwordskip{% + \spaceskip = .390\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize + \if@nonfrench + \xspaceskip = .432\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize + \fi + }% + \def\memucsinterwordchapterskip{% + \spaceskip = .41\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize + \if@nonfrench + \xspaceskip = .55\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize + \fi + }% +} + +\let\DEFAULTskips\ob@DEFAULTskips +\def\ob@thinthinspace{\hskip2\ob@hu} +\def\ob@onethirdspace{\hskip5\ob@hu} + +\ifnokorean\else +\if@koreanfn +%%% footnote setting +%%% 99)에 해당하는 박스 길이를 구한 다음 +\newsavebox\mytmpbox\sbox\mytmpbox{\footnotesize 99)\ } +%%% 각주 번호 박스를 길이에 대하여 오른쪽 정렬함. 두 자리 +%%% 각주 번호 기준으로 오른쪽 정렬되도록 만든다. +\footmarkstyle{\makebox[\wd\mytmpbox][r]{#1)\ }} +\setlength\footmarksep{\wd\mytmpbox} +\setlength\footmarkwidth{0pt} +\setlength\footparindent{0pt} +%\ifnokorean\else +\SetFnmark{\textsuperscript}{\textsuperscript{)}} +%\fi +\fi\fi +%%% footnotes and floats. codes from memmanadd.pdf +\renewcommand*{\footnoterule}{\kern-3pt\vfill + \hrule width 0.4\columnwidth \kern 2.6pt} +\setlength{\skip\footins}{1.3\onelineskip} + +%%% toc 등의 레이아웃. +\if@chapter\else +\renewcommand\chaptitlefont{\Large\bfseries} +\renewcommand\printchapternonum{} +\renewcommand\printchaptertitle[1]{\chaptitlefont #1} +\renewcommand\afterchapskip{\onelineskip} +\renewcommand\beforechapskip{1.5\onelineskip} +\fi + +\renewcommand\cftsectionindent{0pt} +\ifnokorean\else +\renewcommand\cftsectionnumwidth{1.8em} +\renewcommand\cftsubsectionindent{1.8em} +\renewcommand\cftsubsectionnumwidth{2.5em} +\fi +\if@chapter\else +\let\cftchapterindent\cftsectionindent +\let\cftchapternumwidth\cftsectionnumwidth +\let\cftbeforechapterskip\cftbeforesectionskip +\fi + +\renewcommand\cftsectionpresnum{\hfill} +\renewcommand\cftsectionaftersnum{\hskip.8em} + +%%%% kscntformat definition moved to memhangul-ucs. +%%%% 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{}% +%} +% +%\ifnokorean\else +%\ifkosection +%\kscntformat{section}{제\ob@onethirdspace}{\ob@onethirdspace 절} +%\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}} +%\fi\fi + +%%% misc settings +\raggedbottom +\ifnokorean +\renewcommand\sectionmark[1]{\markboth{\thetitle}{#1}} +\else +\renewcommand\sectionmark[1]{\markboth{\thetitle}{#1}} +\fi +%\renewcommand\subsectionmark[1]{\markright{#1}} +\ifnokorean +\newcommand*\MarkDocTitle{\markboth{\thetitle}{}} +\else +\newcommand*\MarkDocTitle{\markboth{\thetitle}{}} +\fi + +%%% for bookmarks and hyperref +\def\CallHyperref{% + \ifnobookmarks + \@Call@Hyperref@Without@Bookmarks + \else + \@Call@Hyperref@With@Bookmarks + \fi +} + +\def\@Call@Hyperref@Without@Bookmarks{% + \ifpdf + \RequirePackage[pdftex,unicode,bookmarks=false]{hyperref} + \else + \if@dvips + \RequirePackage[dvips,unicode,bookmarks=false]{hyperref} + \else + \RequirePackage[dvipdfm,unicode,bookmarks=false]{hyperref} + \fi + \fi +} + +\def\@Call@Hyperref@With@Bookmarks{% + \ifpdf + \RequirePackage[pdftex,unicode]{hyperref} + \else + \if@dvips + \RequirePackage[dvips,unicode]{hyperref} + \else + \RequirePackage[dvipdfm,unicode]{hyperref} + \fi + \fi +} + +%% LyX 1.6.x의 Insert-Hyperlink 기능과 충돌하지 않게 하기 위하여 +%% hyperref을 로드하지 않음. (lyxhyper 옵션) +%% note: memhfixc는 memoir 자신이 로드해준다. +\ifnokorean\relax\else + \ifhyperrefwithlyx\relax\else + \CallHyperref +\fi\fi + +%%% \engtxt를 일일이 쓰기 귀찮고 space가 하나밖에 없을 때 +%%% 쓰기 위한 \ensp 매크로. +\newskip\@ensp +\@ensp=.297em plus .02em minus .01em +\def\ensp{\hskip\@ensp} + +%%% article의 pagestyle 기본값은 plain임. +\pagestyle{plain} + +%%% 2006/09/01 \title, \author 문제. reported by IsCho +\AtBeginDocument{% + \@ifundefined{thetitle}{\title{}}{\relax} + \@ifundefined{theauthor}{\author{}}{\relax} +} + +%%% 2006/09/05 [10.5pt] option, [romanfixed] 2006/10/22. +\if@tendotfive + \RequirePackage{10_5} + \if@resizelatin + \RequirePackage{type1cm} + \RequirePackage{type1ec} + \fi +\fi + +%%%% 2006/10/19. 현범석 님이 지적한 lof, toc 문제 +\if@chapter\else + \RequirePackage{ob-toclof} +\fi + +%%% oblivoir-chapter (12/20) +\if@chapter +\newcommand\oblivoirchapterstyle[1]{% + \chapterstyle{#1} + \renewcommand{\chapterheadstart}{\clearforchapter\vspace*{\beforechapskip}} +} +\fi + +%%%%%%%%%%%%% APPENDIX + +\ifnokorean\def\appendixrefname{Appendix}\else\def\appendixrefname{부록}\fi +\def\appref#1{\appendixrefname~\ref{#1}} + +\newif\if@AppendixTitleToToc\@AppendixTitleToTocfalse +\newif\if@AttachAppendixTitleToSecnum\@AttachAppendixTitleToSecnumfalse + +\def\AppendixTitleToToc{% + \@AppendixTitleToToctrue +} + +\def\AttachAppendixTitleToSecnum{% + \@AttachAppendixTitleToSecnumtrue +} + +\def\AppendixTitle{% + \chapter*{\appendixname} +} + +\ifnokorean +\RequirePackage{ob-nokoreanappendix} +\else +\RequirePackage{ob-koreanappendix} +\fi + +%%% modified from dhucs-enumerate.sty +\ifnokorean\else +\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} +\fi + +%%% subsection까지 항번을 붙이고 toc에 두자. +\maxtocdepth{subsection} +\maxsecnumdepth{subsection} + +%%% oblivoirallowbreak +\ifx\oblivoirallowbreak\undefined +\def\oblivoirallowbreak{\hskip1sp\hskip-1sp} +\fi + +%%% subfigure package compatibility +\if@subfigure + \let\c@lofdepth\relax + \let\c@lotdepth\relax +\fi + +%%% redefine \see or \seealso +\ifnokorean\else +\@ifundefined{see}{}{% + \renewcommand*{\see}[2]{#1\seename, \hyperpage{#2}} +} +\@ifundefined{seealso}{}{% + \renewcommand*{\seealso}[2]{#1\alsoname, \hyperpage{#2}} +} +\fi + +\endinput + +%%% ChangeLog: +%%% ver0.4.3 2013/10/26 : move \kscntformat definition to memhangul-ucs +%%% ver0.4.2 2013/10/03 : fix a typo. +%%% ver0.4.1 2013/09/26 : [moreroom] thanks to Juho.Lee +%%% ver0.4.0 2013/09/25 : redesign for nanum type 1 +%%% ver0.3.9 2012/11/22 : [figtabcapt] option +%%% ver0.3.8 2009/04/06 : [lyxhyper] option +%%% ver0.3.4 2008/10/23 : moreverb, faht, fawd options. (See xoblivoir.cls) +%%% ver0.3.3a 2008/09/30 : change the way of calling microtype (non-released version) +%%% ver0.3.3 2008/09/16 : apply microtype to non-pdflatex +%%% ver0.3.2 2007/11/18 : add \see, \seealso definition +%%% ver0.3.1 2007/10/23 : subfigure package compatibility (in order to use with LyX) +%%% ver0.3.0 2007/07/15 : no changes. part of ko.TeX +%%% ver0.2.4a 2007/07/05 : add \pjaso to enumerate +%%% ver0.2.4 2007/07/01 : adopt dhucs-enumerate.sty, enumerate hook. +%%% ver0.2.3 2007/06/26 : strictcharcheck option introduced. cf. dhucs 4.0.6 +%%% ver0.2.2 2007/06/16 : finemath setto default. [nofinemath] introduced. [microtype] introduces, which works only under pdflatex. +%%% ver0.2.1 2007/06/14 : dhucs 4.0.1, memhangul-ucs 1.5.1 +%%% ver0.20c 2007/06/03 : pdfbookmark option to memhangul-ucs dropped. +%%% ver0.20a 2007/05/24 : \oblivoirallowbreak introduced +%%% ver0.20 2007/05/17 : dhucs 4.0, memhangul-ucs 1.5.0 +%%% ver0.18a 2007/01/14 : slightly alter calling-hyperref method. +%%% ver0.17C.a 2006/12/20 : \chapter-compatible feature. (private version) : \oblivoirchapterstyle command added. +%%% ver0.17 2006/12/06 : \appendix+nokorean option bug fix (req. by Beomsuk Hyun) +%%% ver0.16 2006/11/23 : \appendix features added. (req. by Beomsuk Hyun) +%%% ver0.15 2006/11/01 : [nokorean] option \if..\fi pair bug fix (rep. by smcho) +%%% ver0.14 2006/10/22 : [itemph], [romanfixed] option introduced. +%%% ver0.13 2006/10/19 : [tocentry] option introduced. (req. by Beomsuk Hyun) +%%% ver0.12 2006/09/25 : \kscntformat bug fix +%%% ver0.11 2006/09/18 : article-like footnote style made default, [footnote] option introduced +%%% ver0.1 2006/09/13 : renamed to oblivoir (req. by ischo) +%%% ver0.014 2006/09/05 : introduce [10.5pt] option with 10_5.sty (req. by synapse) +%%% ver0.013 2006/09/03 : introduce hfontsel.sty. (req. by synapse) +%%% ver0.012 2006/09/01 : \thetitle, \theauthor undefined problem fixed. (rep. by IsCho) +%%% ver0.011 2006/05/02 : rename ksnamedef(false) to kscntformat +%%% ver0.01 2006/04/27 : introduce [nokorean] option requested by smcho. +%%% ver0.001 2006/03/11 : started this class, just for fun! +%%% diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xlua.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xlua.cls new file mode 100644 index 00000000000..01b7d0a0757 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xlua.cls @@ -0,0 +1,487 @@ +%% File `oblivoir-xlua.cls` +%% +%% (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. +%% +%% an oblivoir-compatible package for using with LuaLaTeX or XeLaTeX. +%% depends upon Dohyun Kim's xetexko and the author's memhangul-x. +%% +\ProvidesClass{oblivoir-xlua} + [2013/09/01 v0.4.5 article-like class to typeset UTF-8 korean using memoir.] +\typeout{A variant of oblivoir class for Lua- or XeLaTeX.} + +\providecommand\@DisabledOption[1]{% + \typeout{[#1] option is deprecated}} + +\RequirePackage{xkeyval} + +%%% Disabled Options +\DeclareOptionX{dvips}{\@DisabledOption{\CurrentOption}} +\DeclareOptionX{romanfixed}{\@DisabledOption{\CurrentOption}} +\DeclareOptionX{finemath}{\@DisabledOption{\CurrentOption}} +\DeclareOptionX{nofinemath}{\@DisabledOption{\CurrentOption}} +\DeclareOptionX{strictcharcheck}{\@DisabledOption{\CurrentOption}} + +%%% active Options +\newif\ifnokorean\nokoreanfalse +\DeclareOptionX{nokorean}{\nokoreantrue} +\newif\iftwosidedoc\twosidedocfalse +\DeclareOptionX{twoside}{\twosidedoctrue} +\newif\ifopenrightdoc\openrightdocfalse +\DeclareOptionX{openright}{\openrightdoctrue} +\newif\ifkosection\kosectionfalse +\DeclareOptionX{kosection}{\kosectiontrue} +\newif\ifnobookmarks\nobookmarksfalse +\DeclareOptionX{nobookmarks}{\nobookmarkstrue} +\newif\ifhyperrefwithlyx\hyperrefwithlyxfalse +\DeclareOptionX{lyxhyper}{\hyperrefwithlyxtrue}{\hyperrefwithlyxfalse} +\newif\if@tendotfive\@tendotfivefalse +\DeclareOptionX{10.5pt}{\@tendotfivetrue} +\newif\if@koreanfn\@koreanfnfalse +\DeclareOptionX{footnote}{\@koreanfntrue} +\newif\if@toclofentry\@toclofentryfalse +\DeclareOptionX{tocentry}{\@toclofentrytrue} +\newif\if@itemph\@itemphfalse +\DeclareOptionX{itemph}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +\DeclareOptionX{gremph}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +\newif\if@chapter\@chapterfalse +\DeclareOptionX{chapter}{\@chaptertrue\@toclofentrytrue} +\newif\if@microtype\@microtypefalse +\DeclareOptionX{microtype}{\@microtypetrue} +\newif\if@subfigure\@subfigurefalse +\DeclareOptionX{subfigure}{\@subfiguretrue} +\DeclareOptionX{adjustmath}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +% +%%% new Options +\DeclareOptionX{latinquote}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +%%% changed fontspec -> manualfontspec +\DeclareOptionX{fontspec}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +\newif\if@moreverb\@moreverbfalse +\DeclareOptionX{moreverb}{\@moreverbtrue} +\newif\if@foursix\@foursixfalse\newlength\fa@setheight\newlength\fa@setwidth +\DeclareOptionX{faht}[]{\fa@setheight=#1\@foursixtrue} +\DeclareOptionX{fawd}[]{\fa@setwidth=#1\@foursixtrue} +\newif\if@amsmath\@amsmathfalse +\DeclareOptionX{amsmath}{\@amsmathtrue} +\DeclareOptionX{nowinname}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +\newif\if@noinserts\@noinsertsfalse +\DeclareOptionX{noreserveinserts}{\@noinsertstrue} +% +\newif\ifPRELOAD\PRELOADfalse +\DeclareOptionX{preload}[]{\PRELOADtrue\def\PRELOADstr{#1}} +\def\PRELOADoptstr{} +\DeclareOptionX{preloadoption}[]{\def\PRELOADoptstr{#1}} + +%% [nounfonts] +\newif\if@unfonts\@unfontstrue +\DeclareOptionX{unfonts}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +\DeclareOptionX{nounfonts}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} + +\DeclareOptionX{figtabcapt}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} + +\DeclareOptionX{cjk}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} +%\DeclareOptionX{cjkoption}[]{\PassOptionsToPackage{#1}{cjkutf8-ko}} +\DeclareOptionX{dhucs}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} + +%%% compatibility options +\DeclareOptionX{uset1font}{\PassOptionsToPackage{usecjkt1font}{cjkutf8-ko}} +\DeclareOptionX{usedotemph}{\PassOptionsToPackage{\CurrentOption}{memhangul-x}} + +%%% +\DeclareOptionX*{% + \PassOptionsToClass{\CurrentOption}{memoir}% +} +% +\ProcessOptionsX + +%%% moreverb +\if@moreverb + \RequirePackage{moreverb} +\fi + +%%% preload +\ifPRELOAD + \RequirePackage[\PRELOADoptstr]{\PRELOADstr} + \ifx\medspace\undefined\relax\else\let\medspace\relax\fi +\fi + +%% LyX compatibility +\ifx\@textsubscript\undefined\else + \let\@textsubscript\relax +\fi + +%%% memoir/memhangul-ucs 로드. +\if@chapter + \LoadClass[openany]{memoir} +\else +\iftwosidedoc + \LoadClass[article,openany]{memoir} +\else + \LoadClass[article,openany,oneside]{memoir} +\fi +\fi + +%%% fontspec problem +\if@noinserts\else\reserveinserts{40}\fi + +%%% workaround with flowfram +\if@foursix + \newcommand*{\fa@dblfoursix}{\stockheight=\fa@setheight \stockwidth=\fa@setwidth} + \fa@dblfoursix +\fi + +%%% ams{math|symb} +\if@amsmath + \RequirePackage{amsmath,xob-amssymb} +\fi + +%%% +\ifopenrightdoc\openright\fi + +\RequirePackage{ifluatex} +\RequirePackage{ifxetex} + +%%% ifluaorxetex.sty +%\RequirePackage{iftex} +% +%\newif\ifLuaOrXeTeX +%\ifXeTeX\global\LuaOrXeTeXtrue +% \else\ifLuaTeX\global\LuaOrXeTeXtrue +% \else\global\LuaOrXeTeXfalse +%\fi\fi + +\ifx\XeTeX\undefined + \def\Xe{X\kern-.0833em\lower.5ex\hbox{\reflectbox{E}}} + \def\XeTeX{\Xe\kern-.1667em\TeX} + \def\XeLaTeX{\Xe\kern-0.0833em\LaTeX} +\fi + +%%\RequirePackage{comment} +%%\def\finemath@status{} + +%\ifxetex\else\ifluatex\else +% \PackageError{xoblivoir}{This Document requires Xe(La)TeX or Lua(La)TeX!}{} +%\fi\fi + +\def\@Load@Memhangul{% + \ifluatex + \usepackage[nonfrench,hangulpagestyle]{memhangul-x} + \else\ifxetex + \usepackage[nonfrench,hangulpagestyle]{memhangul-x} + \else + \usepackage[nonfrench,hangulpagestyle]{memhangul-x} + \fi\fi +} + +\ifnokorean\else + \@Load@Memhangul +\fi +\if@chapter\else + \counterwithout{section}{chapter} +\fi + +%%% +%%% xetex doesn't know microtype, +%%% but xetexko has hangingpunctuation feature, which +%%% we will use instead. +%%% +\ifnokorean\else +\if@microtype + \ifxetex + \usepackage{xetexko-hanging} + \AtBeginDocument{\hangingpunctuation} + \typeout {xoblivoir: use xetexko-hanging instead of microtype} + \else +% \ifluatex +% \enablemicrotype +% \fi + \fi +\fi +\fi + +%%% 기본 자간 +\newdimen\ob@hu % 1jw=.95em, 1hu=1/16jw. see hfontspec.oblivoir +\ifnokorean\ob@hu=\z@\else\ob@hu=.059375em\fi +%%% defaultskip +\def\ob@DEFAULTskips{% + \def\memucshangulskips{}% + \def\memucsinterwordskip{% + \spaceskip = .390\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize + \if@nonfrench + \xspaceskip = .432\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize + \fi + }% + \def\memucsinterwordchapterskip{% + \spaceskip = .41\BASE@FONTsize plus .11\BASE@FONTsize minus .1\BASE@FONTsize + \if@nonfrench + \xspaceskip = .55\BASE@FONTsize plus .1\BASE@FONTsize minus .1\BASE@FONTsize + \fi + }% +} + +\let\DEFAULTskips\ob@DEFAULTskips +\def\ob@thinthinspace{\hskip2\ob@hu} +\def\ob@onethirdspace{\hskip5\ob@hu} + +\ifnokorean\else +\if@koreanfn +%%% footnote setting +%%% 99)에 해당하는 박스 길이를 구한 다음 +\newsavebox\mytmpbox\sbox\mytmpbox{\footnotesize 99)\ } +%%% 각주 번호 박스를 길이에 대하여 오른쪽 정렬함. 두 자리 +%%% 각주 번호 기준으로 오른쪽 정렬되도록 만든다. +\footmarkstyle{\makebox[\wd\mytmpbox][r]{#1)\ }} +\setlength\footmarksep{\wd\mytmpbox} +\setlength\footmarkwidth{0pt} +\setlength\footparindent{0pt} +%\ifnokorean\else +\SetFnmark{\textsuperscript}{\textsuperscript{)}} +%\fi +\fi\fi +%%% footnotes and floats. codes from memmanadd.pdf +\renewcommand*{\footnoterule}{\kern-3pt\vfill + \hrule width 0.4\columnwidth \kern 2.6pt} +\setlength{\skip\footins}{1.3\onelineskip} + +%%% toc 등의 레이아웃. +\if@chapter\else +\renewcommand\chaptitlefont{\Large\bfseries} +\renewcommand\printchapternonum{} +\renewcommand\printchaptertitle[1]{\chaptitlefont #1} +\renewcommand\afterchapskip{\onelineskip} +\renewcommand\beforechapskip{1.5\onelineskip} +\fi + +\renewcommand\cftsectionindent{0pt} +\ifnokorean\else +\renewcommand\cftsectionnumwidth{1.8em} +\renewcommand\cftsubsectionindent{1.8em} +\renewcommand\cftsubsectionnumwidth{2.5em} +\fi +\if@chapter\else +\let\cftchapterindent\cftsectionindent +\let\cftchapternumwidth\cftsectionnumwidth +\let\cftbeforechapterskip\cftbeforesectionskip +\fi + +\renewcommand\cftsectionpresnum{\hfill} +\renewcommand\cftsectionaftersnum{\hskip.8em} + +%% moved kscntformat to memhangul-x +%%%% 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{}% +%} + +%\ifnokorean\else +%\ifkosection +%\kscntformat{section}{제}{절} +%\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}} +%\fi\fi + +%%% misc settings +\raggedbottom +\ifnokorean +\renewcommand\sectionmark[1]{\markboth{\thetitle}{#1}} +\else +\renewcommand\sectionmark[1]{\markboth{\thetitle}{#1}} +\fi +%\renewcommand\subsectionmark[1]{\markright{#1}} +\ifnokorean +\newcommand*\MarkDocTitle{\markboth{\thetitle}{}} +\else +\newcommand*\MarkDocTitle{\markboth{\thetitle}{}} +\fi + +%%% for bookmarks and hyperref +\def\CallHyperref{% + \ifnobookmarks + \@Call@Hyperref@Without@Bookmarks + \else + \@Call@Hyperref@With@Bookmarks + \fi +} + +\def\@Call@Hyperref@Without@Bookmarks{% + \ifluatex + \usepackage[unicode,bookmarks=false]{hyperref} + \else\ifxetex + \usepackage[bookmarks=false]{hyperref} + \else + \usepackage[unicode,bookmarks=false]{hyperref} + \fi\fi +} + +\def\@Call@Hyperref@With@Bookmarks{% + \ifluatex + \usepackage[unicode]{hyperref} + \else\ifxetex + \usepackage{hyperref} + \else + \usepackage[unicode]{hyperref} + \fi\fi +} + +%% LyX 1.6.x의 Insert-Hyperlink 기능과 충돌하지 않게 하기 위하여 +%% hyperref을 로드하지 않음. (lyxhyper 옵션) +%% note: memhfixc는 memoir 자신이 로드해준다. +\ifnokorean\relax\else + \ifhyperrefwithlyx\relax\else + \CallHyperref +\fi\fi + +%%% \engtxt를 일일이 쓰기 귀찮고 space가 하나밖에 없을 때 +%%% 쓰기 위한 \ensp 매크로. +\newskip\@ensp +\@ensp=.297em plus .02em minus .01em +\def\ensp{\hskip\@ensp} + +%%% article의 pagestyle 기본값은 plain임. +\pagestyle{plain} + +%%% 2006/09/01 \title, \author 문제. reported by IsCho +\AtBeginDocument{% + \@ifundefined{thetitle}{\title{}}{\relax} + \@ifundefined{theauthor}{\author{}}{\relax} +} + +%%% 2006/09/05 [10.5pt] option, [romanfixed] 2006/10/22. +\if@tendotfive + \RequirePackage{10_5} +\fi + +%%%% 2006/10/19. 현범석 님이 지적한 lof, toc 문제 +\if@chapter\else + \usepackage{ob-toclof} +\fi + +%%% oblivoir-chapter (12/20) +\if@chapter +\newcommand\oblivoirchapterstyle[1]{% + \chapterstyle{#1} + \renewcommand{\chapterheadstart}{\clearforchapter\vspace*{\beforechapskip}} +} +\fi + +%%%%%%%%%%%%% APPENDIX + +\ifnokorean\def\appendixrefname{Appendix}\else\def\appendixrefname{부록}\fi +\def\appref#1{\appendixrefname~\ref{#1}} + +\newif\if@AppendixTitleToToc\@AppendixTitleToTocfalse +\newif\if@AttachAppendixTitleToSecnum\@AttachAppendixTitleToSecnumfalse + +\def\AppendixTitleToToc{% + \@AppendixTitleToToctrue +} + +\def\AttachAppendixTitleToSecnum{% + \@AttachAppendixTitleToSecnumtrue +} + +\def\AppendixTitle{% + \chapter*{\appendixname} +} + +\ifnokorean +\usepackage{ob-nokoreanappendix} +\else +\usepackage{ob-koreanappendix} +\fi + +%%%%%%%%%%%%%%% enumerate +\@ifpackageloaded{enumerate}{}{\RequirePackage{enumerate}} +\def\@enloop@{% +%%% why @enhook doesn't work? + \ifx 가\@entemp \def\@tempa{\@enLabel\gana }\else + \ifx ㈎\@entemp \def\@tempa{\@enLabel\pgana }\else + \ifx ㉮\@entemp \def\@tempa{\@enLabel\ogana }\else + \ifx ㄱ\@entemp \def\@tempa{\@enLabel\jaso }\else + \ifx ㈀\@entemp \def\@tempa{\@enLabel\pjaso }\else + \ifx ㉠\@entemp \def\@tempa{\@enLabel\ojaso }\else + \ifx ⑴\@entemp \def\@tempa{\@enLabel\pnum }\else + \ifx ①\@entemp \def\@tempa{\@enLabel\onum }\else + \ifx ⒜\@entemp \def\@tempa{\@enLabel\peng }\else + \ifx ⓐ\@entemp \def\@tempa{\@enLabel\oeng }\else + \ifx ⅰ\@entemp \def\@tempa{\@enLabel\hroman}\else + \ifx Ⅰ\@entemp \def\@tempa{\@enLabel\hRoman}\else +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else + \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else + \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else + \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else + \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else + \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else + \ifx \bgroup\@entemp \let\@tempa\@enGroup \else + \ifx \@enum@\@entemp \let\@tempa\@gobble \else + \let\@tempa\@enOther + \@enhook + \fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} + +%%% subsection까지 항번을 붙이고 toc에 두자. +\maxtocdepth{subsection} +\maxsecnumdepth{subsection} + +%%% oblivoirallowbreak +\ifx\oblivoirallowbreak\undefined +\def\oblivoirallowbreak{\hskip1sp\hskip-1sp} +\fi + +%%% subfigure package compatibility +\if@subfigure + \let\c@lofdepth\relax + \let\c@lotdepth\relax +\fi + +%%% redefine \see or \seealso +\ifnokorean\else +\@ifundefined{see}{}{% + \renewcommand*{\see}[2]{#1\seename, \hyperpage{#2}} +} +\@ifundefined{seealso}{}{% + \renewcommand*{\seealso}[2]{#1\alsoname, \hyperpage{#2}} +} +\fi + +\endinput + +%%% ChangeLog: +%%% 2013-10-26 : moved \kscntformat definition to memhangul. +%%% 2013-09-12 : integrate ifluaorxetex.sty +%%% 2013-09-01 : [cjk], [dhucs] option introduced. +%%% 2011-09-26 : [preloadoption] bugfix. +%%% 2011-09-15 : [fontspec] renamed to [manualfontspec]; and intrudoce [fontspec, xcolor, hyperref, preloadoption] +%%% 2010-09-16 : reserveinserts, lyx compatibility etc. (for TeX Live 2010) +%%% 08:46 2010-02-09 : [microtype] -> hanging punctuation (xetexko) +%%% 10:16 2009-10-27 : [preload] 옵션 +%%% 오전 3:12 2009-04-07 : [lyxhyper] 옵션 +%%% 오전 6:36 2008-09-18 : revive microtype option, in spite of its impotence. +%%% 오후 2:16 2008-09-18 : latinquote 옵션 +%%% 오전 4:58 2008-09-30 : xkospace 새 버전에 맞춘 대대적인 수정. +%%% : enumerate, hangul item title, 기호문자 등을 추가. +%%% 오후 5:25 2008-10-07 : revive gremph/itemph +%%% 오전 10:51 2008-10-08 : revive kscntformat +%%% 오전 5:12 2008-10-12 : fontspec, moreverb, xob-hanfont +%%% 오전 1:19 2008-10-13 : xetexko v0.1 반영 +%%% 오전 12:50 2008-10-22 : fawd, faht 옵션 추가. (workaround with flowfram) +%%% 오후 12:22 2008-10-24 : add [unicode] option to hyperref under LuaTeX +%%% 13:49 2008-11-24 : add [amsmath] option to avoid LyX's auto loading problem under XeLaTeX. +%%% 오후 17:59 2008-12-03 : nowinname 옵션 추가 diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls new file mode 100644 index 00000000000..82c2faa98db --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls @@ -0,0 +1,23 @@ +%% File `oblivoir.cls` +%% +%% (C) Copyright 2006-2013 Kangsoo Kim <karnes at ktug org> +%% (C) Copyright 2013 Kihwang Lee <leekh 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. +%% +%% Read LICENSE included in the package. +%% +%% -------------------------------------------------------- +%% oblivoir.cls + +\ProvidesClass{oblivoir} + +\LoadClassWithOptions{xoblivoir} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls new file mode 100644 index 00000000000..1723b2beada --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls @@ -0,0 +1,50 @@ +%% File `xoblivoir.cls` +%% +%% (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. +%% +\ProvidesClass{xoblivoir}[2013/10/26] + +\RequirePackage{xkeyval} + +\newif\if@CJK\@CJKfalse +\DeclareOptionX{cjk}[]{\@CJKtrue} +\DeclareOptionX{dhucs}[]{\@CJKfalse} +%%% +%%% [fontspec] option introduced +\DeclareOptionX{fontspec}[]{\PassOptionsToPackage{{#1}}{fontspec}} +\DeclareOptionX{hyperref}[]{\PassOptionsToPackage{#1}{hyperref}} +\DeclareOptionX{xcolor}[]{\PassOptionsToPackage{#1}{xcolor}} + +\ProcessOptionsX + +%%% ifluaorxetex.sty +\RequirePackage{iftex} + +\newif\ifLuaOrXeTeX +\ifXeTeX\global\LuaOrXeTeXtrue + \else\ifLuaTeX\global\LuaOrXeTeXtrue + \else\global\LuaOrXeTeXfalse +\fi\fi + +\ifLuaOrXeTeX +\LoadClassWithOptions{oblivoir-xlua} +\typeout{HANGUL DRIVER: xetexko/luatexko running} +\else + \if@CJK + \LoadClassWithOptions{oblivoir-xlua} + \typeout{HANGUL DRIVER: cjk-ko running} + \else + \LoadClassWithOptions{oblivoir-base} + \typeout{HANGUL DRIVER: dhucs running} + \fi +\fi + +\endinput |