From d82f205d424457a0853f7501ab50cf5fb81b9f38 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 9 Nov 2013 00:52:44 +0000 Subject: kotex-utf git-svn-id: svn://tug.org/texlive/trunk@32103 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/kotex-utf/contrib/dhucs-cmap.sty | 88 ++++ .../latex/kotex-utf/contrib/dhucs-enumerate.sty | 64 +++ .../tex/latex/kotex-utf/contrib/dhucs-enumitem.sty | 55 +++ .../tex/latex/kotex-utf/contrib/dhucs-gremph.sty | 106 ++++ .../latex/kotex-utf/contrib/dhucs-interword.sty | 129 +++++ .../tex/latex/kotex-utf/contrib/dhucs-paralist.sty | 49 ++ .../tex/latex/kotex-utf/contrib/dhucs-sectsty.sty | 259 ++++++++++ .../tex/latex/kotex-utf/contrib/dhucs-setspace.sty | 204 ++++++++ .../tex/latex/kotex-utf/contrib/dhucs-trivcj.sty | 126 +++++ .../tex/latex/kotex-utf/contrib/dhucs-ucshyper.sty | 34 ++ .../tex/latex/kotex-utf/contrib/dhucsfn.sty | 213 ++++++++ .../tex/latex/kotex-utf/contrib/kotex-logo.sty | 24 + .../tex/latex/kotex-utf/contrib/kotex-varioref.sty | 48 ++ .../tex/latex/kotex-utf/dhucs-nanumfont.sty | 39 ++ Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty | 127 +++++ .../tex/latex/kotex-utf/hfontspec.default | 11 + .../tex/latex/kotex-utf/kosections-utf.sty | 548 +++++++++++++++++++++ Master/texmf-dist/tex/latex/kotex-utf/kotex.cfg | 8 + Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty | 548 +++++++++++++++++++++ Master/texmf-dist/tex/latex/kotex-utf/lucenc.dfu | 155 ++++++ Master/texmf-dist/tex/latex/kotex-utf/lucuhcmj.fd | 18 + .../tex/latex/kotex-utf/tex4ht/dhucs.4ht | 22 + .../tex/latex/kotex-utf/tex4ht/dhucs.cfg | 40 ++ .../tex/latex/kotex-utf/tex4ht/kosections-utf.4ht | 131 +++++ 24 files changed, 3046 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumerate.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumitem.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-gremph.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-interword.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-sectsty.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-setspace.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-ucshyper.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucsfn.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-logo.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/dhucs-nanumfont.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/hfontspec.default create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/kotex.cfg create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/lucenc.dfu create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/lucuhcmj.fd create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.4ht create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.cfg create mode 100644 Master/texmf-dist/tex/latex/kotex-utf/tex4ht/kosections-utf.4ht (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty new file mode 100644 index 00000000000..17e1fd0f6e7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty @@ -0,0 +1,88 @@ +%% File `dhucs-cmap.sty` +%% +%% Copyright (C) 2007-2013 Dohyun Kim +%% +%% 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{dhucs-cmap} + [2007/06/16 searchable PDF for dhucs upon pdftex] + +\RequirePackage{ifpdf} +\ifpdf\else\expandafter\endinput\fi + +\newcommand*\AddUniSubCmap{% + \ifdefined \now@jamo@printing + \expandafter\jamo@dh@cmap + \else + \expandafter\normal@dh@cmap + \fi +} + +\newcommand*\normal@dh@cmap[1]{% + \let\dh@cm@ppl@ne\@empty + \expandafter\uppercase\expandafter{\expandafter\count@\expandafter"#1\relax}% + \expandafter\get@unisubcm@p\expandafter{\number\numexpr256*\count@\relax}% + \expandafter\add@unisubcm@p\expandafter{\dh@cm@ppl@ne}% +} + +\newcommand*\get@unisubcm@p[1]{% + \ifnum#1>65535 + \expandafter\get@unisubcm@p\expandafter{\number\numexpr 55296+ + \dimexpr.0009765625\dimexpr\number#1sp-\p@\relax\relax\relax}% + \expandafter\get@unisubcm@p\expandafter{\number\numexpr#1-9216 + -1024*\dimexpr.0009765625\dimexpr\number#1sp-\p@\relax\relax\relax}% + \else + \@tempcnta\numexpr % 1 / 4096 = .000244140625 + \number\dimexpr.000244140625\dimexpr#1sp\relax\relax\relax + \edef\dh@cm@ppl@ne{\dh@cm@ppl@ne\hexnumber@\@tempcnta}% + \count@\numexpr#1-4096*\@tempcnta\relax + \@tempcnta\numexpr % 1 / 256 = .00390625 + \number\dimexpr.00390625\dimexpr\count@ sp\relax\relax\relax + \edef\dh@cm@ppl@ne{\dh@cm@ppl@ne\hexnumber@\@tempcnta}% + \count@\numexpr\count@-\@cclvi*\@tempcnta\relax + \@tempcnta\numexpr % 1 / 16 = .0625 + \number\dimexpr.0625\dimexpr\count@ sp\relax\relax\relax + \edef\dh@cm@ppl@ne{\dh@cm@ppl@ne\hexnumber@\@tempcnta}% + \@tempcnta\numexpr\count@-\sixt@@n*\@tempcnta\relax + \edef\dh@cm@ppl@ne{\dh@cm@ppl@ne\hexnumber@\@tempcnta}% + \fi +} + +\newcommand*\add@unisubcm@p[1]{% + \unless\ifcsname dhucs-cmap-\h@ngulpl@ne\endcsname + \immediate\pdfobj stream {% + /CIDInit /ProcSet findresource begin + 12 dict begin begincmap + /CIDSystemInfo << /Registry (TeX) + /Ordering (UNI\h@ngulpl@ne) + /Supplement 0 >> def + /CMapName /TeX-UNI\h@ngulpl@ne-0 def + /CMapType 2 def + 1 begincodespacerange <00> endcodespacerange + 1 beginbfrange <00> <#1> endbfrange + endcmap CMapName currentdict /CMap defineresource pop end end }% + \expandafter\xdef\csname dhucs-cmap-\h@ngulpl@ne\endcsname + {\the\pdflastobj}% + \fi + \pdffontattr\font@name{/ToUnicode + \csname dhucs-cmap-\h@ngulpl@ne\endcsname\space 0 R}% +} + +\newcommand*\jamo@dh@cmap[1]{% + \unless\ifcsname dhucs-cmap-mid-#1\endcsname + \immediate\pdfobj stream file {oldhanyang#1.cmap}% + \expandafter\xdef\csname dhucs-cmap-mid-#1\endcsname{\the\pdflastobj}% + \fi + \pdffontattr\font@name{/ToUnicode + \csname dhucs-cmap-mid-#1\endcsname\space 0 R}% +} + +\def\dhucs@define@newfont{\define@newfont\AddUniSubCmap\h@ngulpl@ne} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumerate.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumerate.sty new file mode 100644 index 00000000000..e8fac0f6940 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumerate.sty @@ -0,0 +1,64 @@ +%% File `dhucs-enumerate.sty` +%% +%% Copyright (c) 2007-2013 Dohyun Kim +%% +%% 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{dhucs-enumerate} + [2009/03/15 partially support enumrate.sty under dhucs] + +\@ifpackageloaded{enumerate}{}{\RequirePackage{enumerate}} + +\ifx가가\g@addto@macro\@enhook{% + \ifx ^^^^ac00\@entemp \def\@tempa{\@enLabel\gana}\else + \ifx ^^^^2170\@entemp \def\@tempa{\@enLabel\hroman}\else + \ifx ^^^^2160\@entemp \def\@tempa{\@enLabel\hRoman}\else + \ifx ^^^^249c\@entemp \def\@tempa{\@enLabel\peng}\else + \ifx ^^^^24d0\@entemp \def\@tempa{\@enLabel\oeng}\else + \ifx ^^^^2474\@entemp \def\@tempa{\@enLabel\pnum}\else + \ifx ^^^^2460\@entemp \def\@tempa{\@enLabel\onum}\else + \ifx ^^^^320e\@entemp \def\@tempa{\@enLabel\pgana}\else + \ifx ^^^^326e\@entemp \def\@tempa{\@enLabel\ogana}\else + \ifx ^^^^3260\@entemp \def\@tempa{\@enLabel\ojaso}\else + \ifx ^^^^3131\@entemp \def\@tempa{\@enLabel\jaso}\else + \ifx ^^^^3200\@entemp \def\@tempa{\@enLabel\pjaso}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + \expandafter\endinput +\fi + +\g@addto@macro\@enhook{% + \ifx^^ea\@entemp % 가, + \let\@tempa\@dhucs@enumerate\else %%%%% + \ifx^^e2\@entemp % ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ + \let\@tempa\@dhucs@enumerate\else %%%%% + \ifx^^e3\@entemp % ㄱ, ㉠, ㉮, ㈀, ㈎ + \let\@tempa\@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-utf/contrib/dhucs-enumitem.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumitem.sty new file mode 100644 index 00000000000..79c0c06be7e --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumitem.sty @@ -0,0 +1,55 @@ +%% File `dhucs-enumitem.sty` +%% +%% (C) Copyright 2007-2013 Dohyun Kim +%% +%% 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. +%% +\@ifpackageloaded{enumitem}{}{\RequirePackage{enumitem}[2007/03/12]} + +\@ifpackagelater{enumitem}{2007/03/12} + {% compatible with enumitem ver2.0 (2007/03/12) + \AddEnumerateCounter{\gana}{\gana}{가} + \AddEnumerateCounter{\jaso}{\jaso}{ㄱ} + \AddEnumerateCounter{\ogana}{\ogana}{㉮} + \AddEnumerateCounter{\pgana}{\pgana}{㈎} + \AddEnumerateCounter{\onum}{\onum}{①} + \AddEnumerateCounter{\pnum}{\pnum}{⑴} + \AddEnumerateCounter{\ojaso}{\ojaso}{㉠} + \AddEnumerateCounter{\pjaso}{\pjaso}{㈀} + \AddEnumerateCounter{\hnum}{\hnum}{하나} + \AddEnumerateCounter{\Hnum}{\Hnum}{일곱째} + \AddEnumerateCounter{\hroman}{\hroman}{ⅷ} + \AddEnumerateCounter{\hRoman}{\hRoman}{Ⅷ} + \AddEnumerateCounter{\hanjanum}{\hanjanum}{一} + \AddEnumerateCounter{\hNum}{\hNum}{일} + } + {% for enumitem version 1.x + \def\enit@normlabel#1{\begingroup \enit@refstar \arabic \enit@refstar \alph + \enit@refstar \Alph \enit@refstar \roman \enit@refstar \Roman + \enit@refstar \gana \enit@refstar \jaso + \enit@refstar \ogana \enit@refstar \pgana + \enit@refstar \onum \enit@refstar \pnum + \enit@refstar \ojaso \enit@refstar \pjaso + \enit@refstar \hnum \enit@refstar \Hnum + \enit@refstar \hroman \enit@refstar \hRoman + \enit@refstar \hanjanum \enit@refstar \hNum + \enit@refstar \value \enit@refstar \@arabic \enit@refstar \@alph + \enit@refstar \@Alph \enit@refstar \@roman \enit@refstar \@Roman + \protected@xdef \enit@a {#1}\endgroup} + } + +\endinput + +% USAGE EXAMPLE: +% \begin{enumerate}[label={\bfseries\jaso*)}] +% \item 가나다 +% \item 라마바 +% \end{enumerate} +% +%% end. diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-gremph.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-gremph.sty new file mode 100644 index 00000000000..4cc0c12a6a1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-gremph.sty @@ -0,0 +1,106 @@ +%% File `dhucs-gremph.sty` +%% +%% (C) Copyright 2007-2013 Kangsoo Kim +%% Dohyun Kim +%% +%% 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. +%% +%% ------------------------------------------------------------------- +%% 2013/10/01. strip off untype1, \SetGremphFonts{outbt}{outgo} +%% 2005/01/07. bfemph option +%% 2005/04/22. Gremph Font Selection Rearranged. +%% \usepackage[gremphhangul=,gremphhanja=,bfemph]{dhucs-gremph} +%% +\ProvidesPackage{dhucs-gremph} +\RequirePackage{dhucs} + +\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@vargremphhangulfont\else + \def\GrEmphFont{nanumgt}\fi + \if@vargremphhanjafont\else + \def\GrEmphHanjaFont{nanumgt}\fi +%\fi +%\def\SetGremphFonts#1#2{% +% \def\GrEmphFont{#1}% +% \def\GrEmphHanjaFont{#2}% +%} + +\if@bfemph +\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 + +\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}} + +\DeclareRobustCommand\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}}% +} + +\DeclareRobustCommand\ungremph{% + \@gremphfalse + \DeclareRobustCommand\itshape + {\not@math@alphabet\itshape\mathit + \fontshape\itdefault\selectfont}% + \DeclareRobustCommand\slshape + {\not@math@alphabet\slshape\relax + \fontshape\sldefault\selectfont}% +} + +\endinput + +% end of style. diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-interword.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-interword.sty new file mode 100644 index 00000000000..97c2cb37e9c --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-interword.sty @@ -0,0 +1,129 @@ +%% File `dhucs-interword.sty` +%% +%% (C) Copyright 2007-2013 Kangsoo Kim +%% +%% 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{dhucs-interword}[2009/03/15] +\RequirePackage{dhucs} + +\newif\if@HWP\@HWPfalse +\DeclareOption{HWP}{\@HWPtrue\let\dhucs@interhchar\z@\HWPinterwordskip} +\newif\if@default\@defaultfalse +\DeclareOption{default}{\@defaulttrue\@nonfrenchtrue\DEFAULTskips} +\newif\if@nonfrench\@nonfrenchfalse +\DeclareOption{nonfrench}{\@nonfrenchtrue} +\DeclareOption{wider}{\widerhangul} +\DeclareOption{narrower}{\narrowerhangul} +%\DeclareOption*{\DEFAULTskips} + +\newdimen\dimen@skip +\dimen@skip=\f@size\p@ + +%\let\dhucs@interhchar\setInterHangulSkip +\newcommand\interHchar[1]{\setInterHangulSkip{#1}} +\let\interhchar\interHchar + +%% finemath active +\if@dhucsfinemath\else\@dhucsfinemathtrue\fi + +\newcommand\interhword[4][\@empty]{% + \ifx#1\@empty\setinterwordskip{#2}{#3}{#4}\else\setinterwordskip[#1]{#2}{#3}{#4}\fi +} + +\def\narrowerhangul{% + \interHchar{-.75pt}% +} +\def\widerhangul{% + \interHchar{1pt}% +} + +\def\setinterwordskip{\@ifnextchar[\setinterwordskip@\setinterwordskip@@} +\def\setinterwordskip@[#1]#2#3#4{% + \spaceskip = #2\dimen@skip plus #3\dimen@skip minus #4\dimen@skip + \xspaceskip = #1\dimen@skip plus #3\dimen@skip minus #4\dimen@skip +} +\def\setinterwordskip@@#1#2#3{% + \spaceskip = #1\dimen@skip plus #2\dimen@skip minus #3\dimen@skip +} + +\def\HWPinterwordskip{% + \let\dhucs@interhchar\z@ + \if@nonfrench + \interhword[.6]{.475}{.111}{.111}% + \else + \interhword{.475}{.111}{.111}% + \fi +} + +\def\DEFAULTskips{% +% \let\dhucs@interhchar\z@ + \interHchar{-.5pt}% + \if@nonfrench + \interhword[.55]{.413}{.11}{.1}% + \else + \interhword{.413}{.11}{.1}% + \fi +} + +\ProcessOptions\relax + +\if@default +\AtEndOfPackage{% +\def\ucsfninterwordhook{% +% \let\dhucs@interhchar\z@ + \interHchar{-.55pt}% + \if@nonfrench + \interhword[.5]{.303}{.11}{.1}% + \else + \interhword{.303}{.11}{.1}% + \fi +}}\else +\if@HWP +\AtEndOfPackage{% +\def\ucsfninterwordhook{% + \let\dhucs@interhchar\z@ + \if@nonfrench + \interhword[.55]{.331}{.133}{.1}% + \else + \interhword{.331}{.133}{.1}% + \fi +}}\fi\fi + +\RequirePackage{verbatim} +\renewcommand\verbatim@font{\normalfont + \ttfamily\spaceskip.5em\relax + \hyphenchar\font\m@ne + \let\do\do@noligs + \verbatim@nolig@list} + +% 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 +%% +%% End of file `dhucs-interword.sty'. + +%% CHANGE LOG. +% 2005/09/22. finemath active, change default interhchar. +% 2005/01/07. code clearance +% 2005/05/12. add engtext env., HWP interhchar=0pt. +% 2005/08/05. rewrite codes. introduce nonfrench option +% 2005/11/17. \interhword bug fix. diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty new file mode 100644 index 00000000000..81f4a3e161b --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty @@ -0,0 +1,49 @@ +%% File `dhucs-paralist.sty` +%% +%% Copyright (c) 2007-2013 Dohyun Kim +%% modification from dhucs-enumerate.sty by Kangsoo Kim . +%% +%% 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{dhucs-paralist} + [2006/07/09 partially support paralist.sty under dhucs] + +\@ifpackageloaded{paralist}{}{\RequirePackage{paralist}} + +\g@addto@macro\pl@hook{% + \ifx^^ea\pl@temp % 가, + \let\@tempa\@dhucs@enumerate\else %%%%% + \ifx^^e2\pl@temp % ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ + \let\@tempa\@dhucs@enumerate\else %%%%% + \ifx^^e3\pl@temp % ㄱ, ㉠, ㉮, ㈀, ㈎ + \let\@tempa\@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{\pl@label\gana}\else + \ifnum\@dhucs@enum@temp=8560 \def\@tempa{\pl@label\hroman}\else + \ifnum\@dhucs@enum@temp=8544 \def\@tempa{\pl@label\hRoman}\else + \ifnum\@dhucs@enum@temp=9372 \def\@tempa{\pl@label\peng}\else + \ifnum\@dhucs@enum@temp=9424 \def\@tempa{\pl@label\oeng}\else + \ifnum\@dhucs@enum@temp=9332 \def\@tempa{\pl@label\pnum}\else + \ifnum\@dhucs@enum@temp=9312 \def\@tempa{\pl@label\onum}\else + \ifnum\@dhucs@enum@temp=12814 \def\@tempa{\pl@label\pgana}\else + \ifnum\@dhucs@enum@temp=12910 \def\@tempa{\pl@label\ogana}\else + \ifnum\@dhucs@enum@temp=12896 \def\@tempa{\pl@label\ojaso}\else + \ifnum\@dhucs@enum@temp=12593 \def\@tempa{\pl@label\jaso}\else + \ifnum\@dhucs@enum@temp=12800 \def\@tempa{\pl@label\pjaso}\else + \PackageError{dhucs-paralist} + {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-utf/contrib/dhucs-sectsty.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-sectsty.sty new file mode 100644 index 00000000000..235f0422b59 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-sectsty.sty @@ -0,0 +1,259 @@ +%% File `dhucs-sectsty.sty` +%% +%% (C) Copyright 2007-2013 Kangsoo Kim +%% +%% 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{dhucs-sectsty}[2006/04/20] + +\RequirePackage{sectsty} +%% borrowed from sectsty +\DeclareOption{garrulous}{\def\SS@chatlevel{0}} +\DeclareOption{chatty}{\def\SS@chatlevel{1}} +\DeclareOption{taciturn}{\def\SS@chatlevel{2}} +\DeclareOption{yorkshire}{\def\SS@chatlevel{3}} +%% newly defined options +\newif\if@ensec +\DeclareOption{ensec}{\@ensectrue} +\newif\if@adjchapnumskip +\DeclareOption{THE}{\@adjchapnumskipfalse} +\@ensecfalse +\@adjchapnumskiptrue +%% Now, process the options. +\ProcessOptions + +\newlength\KSTHE@skip +\setlength\KSTHE@skip{.3em} +\newcommand\KSTHEskip{% + \hskip\KSTHE@skip +} + +\def\kscntformat#1#2#3{\@namedef{pre@#1cnt}{#2} + \@namedef{post@#1cnt}{#3}} +\if@adjchapnumskip +\kscntformat{part}{\KSTHE\KSTHEskip}{\KSTHEskip\partname} +\kscntformat{chapter}{\KSTHE\KSTHEskip}{\KSTHEskip\chaptername} +\kscntformat{section}{\KSTHE\KSTHEskip}{\KSTHEskip\sectionname} +\else\fi + +\@ifclassloaded{article}{%
+ \def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\pre@partcnt\thepart\post@partcnt\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries\SS@partnumberfont \pre@partcnt\thepart\post@partcnt + \par\nobreak + \fi + \huge \bfseries\SS@parttitlefont #2% + \markboth{}{}\par}% + \nobreak + \vskip 3ex + \@afterheading} +}{% + \@ifundefined{@part}{}{% + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\pre@partcnt\thepart\post@partcnt\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries\SS@partnumberfont \pre@partcnt\thepart\post@partcnt + \par + \vskip 20\p@ + \fi + \Huge \bfseries\SS@parttitlefont #2\par}% + \@endpart} + } +} + +\@ifclassloaded{book}{% + \def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\pre@chaptercnt\thechapter\post@chaptercnt}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{% + \pre@chaptercnt\thechapter\post@chaptercnt}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge\bfseries\SS@chapnumfont + \pre@chaptercnt\thechapter\post@chaptercnt + \par\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \bfseries\SS@chaptitlefont #1\par\nobreak + \vskip 40\p@ + }}}{}% +\@ifclassloaded{report}{% + \def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\pre@chaptercnt\thechapter\post@chaptercnt} + \addcontentsline{toc}{chapter}% + {\protect\numberline{% + \pre@chaptercnt\thechapter\post@chaptercnt}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \huge\bfseries\SS@chapnumfont + \pre@chaptercnt\thechapter\post@chaptercnt + \par\nobreak + \vskip 20\p@ + \fi + \interlinepenalty\@M + \Huge \bfseries\SS@chaptitlefont #1\par\nobreak + \vskip 40\p@ + }}}{} + +\@ifundefined{chapter}{}{% + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setbox\z@=\hbox{\bfseries\pre@chaptercnt\post@chaptercnt~} + \setlength\@tempdima{1.5em} + \advance\@tempdima\wd\z@ + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip \@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi}} + +\if@ensec +\kscntformat{section}{}{} +\newcommand\enc@sec@skip{2em} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries\SS@sectfont}} +\@ifclassloaded{article}{}{% + \renewcommand*\l@section{\@dottedtocline{1}{1.3em}{2em}}% + \renewcommand*\l@subsection{\@dottedtocline{2}{3.3em}{2.8em}}% +} + +\else +\@ifundefined{section}{}{% + \def\section{% + \if@noskipsec \leavevmode \fi + \par + \@afterindentfalse + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace{3.5ex \@plus 1ex \@minus .2ex\relax} + \fi + \secdef\ks@sect\ks@ssect} + \def\ks@sect[#1]#2{% + \ifnum \c@secnumdepth<1 + \let\@svsec\@empty + \else + \refstepcounter{section}% + \protected@edef\@svsec{% + \noexpand\pre@sectioncnt\thesection\noexpand\post@sectioncnt + \quad\relax}% + \fi + \begingroup + \normalfont\Large\bfseries\SS@sectfont{% + \@hangfrom{\hskip \z@\relax\@svsec}% + \interlinepenalty \@M #2\@@par}% + \endgroup + \sectionmark{#1}% + \addcontentsline{toc}{section}{% + \ifnum\c@secnumdepth<1 \else + \protect\numberline{\pre@sectioncnt\thesection\post@sectioncnt}% + \fi + #1} + \@xsect{2.3ex \@plus.2ex}} + \def\ks@ssect#1{% + \begingroup + \normalfont\Large\bfseries\SS@sectfont{% + \@hangfrom{\hskip \z@}% + \interlinepenalty \@M #1\@@par}% + \endgroup + \@xsect{2.3ex \@plus.2ex}} +} + +\@ifclassloaded{article}{% + \renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty{\@secpenalty}% + \addvspace{1.0em \@plus\p@}% + \setbox\z@=\hbox{\bfseries\pre@sectioncnt\post@sectioncnt}% + \setlength\@tempdima{1.5em}% + \advance\@tempdima\wd\z@ + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + \fi} +}{\@ifundefined{l@section}{}{% + \renewcommand*\l@section{\@dottedtocline{1}{1em}{4em}}}%1.5em 2.3em +} + +\fi + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-setspace.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-setspace.sty new file mode 100644 index 00000000000..8d54e2a29e1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-setspace.sty @@ -0,0 +1,204 @@ +%% File `dhucs-secspace.sty` +%% +%% Copyright (C) 2007-2013 Kangsoo Kim +%% +%% 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}[1994/12/01] +\def\filename{dhucs-setspace.sty} +\def\filedate{2007/09/21} +\def\fileversion{0.11} +\ProvidesPackage{dhucs-setspace}[\filedate\space\fileversion\space + Line Spacing control of ko.TeX] + +\newif\if@singlespacefn\@singlespacefntrue +\DeclareOption{nofloatspacing}{\@singlespacefnfalse} +\newif\if@singlespacequote\@singlespacequotetrue +\DeclareOption{noquotespacing}{\@singlespacequotefalse} +\newif\if@hangul\@hangulfalse +\DeclareOption{hangul}{\@hangultrue\AtEndOfPackage{\hangulspacing}} +\newif\if@adjustfootnotesep\@adjustfootnotesepfalse +\DeclareOption{adjustfootnotesep}{\@adjustfootnoteseptrue} +\newif\if@adjustverbatim\@adjustverbatimfalse +\DeclareOption{adjustverbatim}{\@adjustverbatimtrue} + +\DeclareOption*{\PassOptionsToPackage{\CurrentOptions}{setspace}} + +\ProcessOptions + +% |dhucs-interword|가 로드되지 않았을 경우를 대비하여 +\ifx\undefined\ucsfninterwordhook + \providecommand{\ucsfninterwordhook}{}% +\fi + +\RequirePackage{setspace} + +%% 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}% +} + +\if@hangul +\Set@Hangulspace{1.333}{1.2} +\else +\Set@Hangulspace{1.0}{1.0} +\fi + +\newcommand{\hangulspacing}{% + \setstretch{\setspace@hangulspace}% default +} + +\newcommand{\hangulfspacing}{% + \setstretch{\setspace@hangulfspace}% +} + +\newcommand{\hangulverbspacing}{% + \setstretch{\setspace@hangulverbspace}% +} + +%% 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 + +%\let\latex@xfloat=\@xfloat +\if@singlespacefn +\def\@xfloat #1[#2]{% + \latex@xfloat #1[#2]% + \def\baselinestretch {\setspace@hangulfspace}% + \normalsize +} +\else + \let\@xfloat=\latex@xfloat +\fi + +\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 + +\if@singlespacefn +\long\def\@footnotetext#1{% + \insert\footins{% +% GT: Next line added. Hook desired here! + \def\baselinestretch {\setspace@hangulfspace}% + \ucsfninterwordhook +% \@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. + +\long\def\@mpfootnotetext#1{% + \global\setbox\@mpfootins\vbox{% + \unvbox \@mpfootins +% GT: Next line added. Hook desired here! + \def\baselinestretch {\setspace@hangulfspace}% + \ucsfninterwordhook +% \@SetFloatspaces + \reset@font\footnotesize + \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 + +\def\@quotespacinghook{% + \if@singlespacequote% + \hangulfspacing% + \else% + \hangulspacing% + \fi% +} + +\renewenvironment{quotation} + {\list{}{\listparindent 1.5em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item\relax + \@quotespacinghook% + } + {\endlist} +\renewenvironment{quote} + {\list{}{\rightmargin\leftmargin}% + \item\relax + \@quotespacinghook% + } + {\endlist} + +\def\@verbatim{\trivlist + \if@adjustverbatim\hangulverbspacing\else\fi% + \item\relax + \if@minipage\else\vskip\parskip\fi + \leftskip\@totalleftmargin\rightskip\z@skip + \parindent\z@\parfillskip\@flushglue\parskip\z@skip + \@@par + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode \null \@@par\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode\@@par\penalty\interlinepenalty\fi + \fi}% + \let\do\@makeother \dospecials + \obeylines \verbatim@font \@noligs + \hyphenchar\font\m@ne + \everypar \expandafter{\the\everypar \unpenalty}% +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty new file mode 100644 index 00000000000..0c4f65c0520 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty @@ -0,0 +1,126 @@ +%% File `dhucs-trivcj.sty` +%% +%% Copyright (c) 2007-2013 Dohyun Kim +%% +%% 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. +%% +%% ----------------------------------------------------------------- +%% \trivcjtypesetting for temporary chinese or japanese insertion +\ProvidesPackage{dhucs-trivcj} + [2011/08/17 temporary chinese/japanese for dhucs] + +%%%%%% luatex & xetex +\ifx가가\relax + \newcommand*\trivcjtypesetting{% + \parindent1em + \let\nbs\nobreakspace %% see CJK.sty + \def~{}} + \protected\edef\japanese{\unexpanded\expandafter{\japanese\trivcjtypesetting}} + \protected\edef\Schinese{\unexpanded\expandafter{\Schinese\trivcjtypesetting}} + \protected\edef\Tchinese{\unexpanded\expandafter{\Tchinese\trivcjtypesetting}} + \let\chinese\Schinese + \expandafter\endinput +\fi + +%%%%% legacy tex +\newskip\interCJskip +\interCJskip=0em plus 0.1em minus 0.01em +\newskip\interXCJskip +\interXCJskip=.25em plus .15em minus .06em + +\newcommand*\trivcjtypesetting{% + \parindent1em + \let\nbs\nobreakspace %% see CJK.sty + \def~{\hskip\interXCJskip\ignorespaces}%% see CJK.sty + \edef\declarenobreakspacefactor{\unexpanded\expandafter + {\declarenobreakspacefactor\ignorespaces}}% + \edef\declarehanjaspacefactor{\unexpanded\expandafter + {\declarehanjaspacefactor\ignorespaces}}% + \def\check@next@to@sptoken@@{% + \ifx\par\dhucs@nextnext + \chardef\puncnobre@k\@ne + \else + %% if \dhucs@nextnext == \fi ??? + \ifx\bgroup\dhucs@nextnext\else + \ifx\egroup\dhucs@nextnext\else + % \ifx&\dhucs@nextnext\else + \if\noexpand\dhucs@nextnext\relax\else + \chardef\nexttoh@ngul\@ne + \let\dhucs@next\relax + \fi\fi\fi %\fi + \fi + \unihangulchar@@@\dhucs@next}% + \def\kernbeforeasciichar{\hskip\interXCJskip}% + \def\breakbetweenhanja{\hskip\interCJskip}% + \def\nobreakbetweenhanja{\nobreak\hskip\interCJskip}% + \def\breakafterasciichar{\hskip\interXCJskip}% + \def\nobreakafterasciichar{\nobreak\hskip\interXCJskip}% + \let\breakafterinlinemath\breakafterasciichar + \let\nobreakafterinlinemath\nobreakafterasciichar + \let\breakbeforeasciichar\breakafterasciichar + \def\cjksymbolextraspace{\hskip.5em minus.5em\relax}% + \def\postcjksymskip{\futurelet\dhucs@next\@@postcjksymskip}% + \def\cjksymbolunskip{\ifhmode\unskip\fi}% + \def\cjksymbolskip{\cjksymbolunskip\cjksymbolextraspace} + \expandafter\let\csname nexttohangul-1\expandafter + \endcsname\csname nexttotrivcj-1\endcsname +} +\newcommand*\@@postcjksymskip{% + \ifx\dhucs@next.\else + \ifx\dhucs@next,\else + \ifx\dhucs@next:\else + \ifx\dhucs@next;\else + \ifx\dhucs@next!\else + \ifx\dhucs@next?\else + \cjksymbolextraspace + \fi\fi\fi\fi\fi \fi + \ifhmode\declarehanjaspacefactor\fi + \ignorespaces +} + +\DeclareUnicodeCharacter{30FB}% + {\cjksymbolunskip\nobreak\hskip.25em minus.25em + \hbox to .5em{\hss\unihangulchar{"30FB}\hss}\hskip.25em minus.25em\relax} +\DeclareUnicodeCharacter{FF01}% ! + {\cjksymbolunskip\hbox to.1em{\unihangulchar{"FF01}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF0C}% , + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF0C}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF0E}% . + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF0E}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF1A}% : + {\cjksymbolunskip\nobreak\hskip.25em minus.25em + \hbox to.5em{\hss\unihangulchar{"FF1A}\hss}\hskip.25em minus.25em\relax} +\DeclareUnicodeCharacter{FF1B}% ; + {\cjksymbolunskip\nobreak\hskip.25em minus.25em + \hbox to.5em{\hss\unihangulchar{"FF1B}\hss}\hskip.25em minus.25em\relax} +\DeclareUnicodeCharacter{FF1F}% ? + {\cjksymbolunskip\hbox to.1em{\unihangulchar{"FF1F}\hss}\postcjksymskip} + +%\newenvironment{japanese}{\SetHanjaFonts{jpmj}{jpgt}{jpgt}\trivcjtypesetting}{} +%\newenvironment{chinese}{\SetHanjaFonts{cnmj}{cngt}{cngt}\trivcjtypesetting}{} +% AR PL SungtiL GB +\DeclareFontFamily{LUC}{gbsn}{\hyphenchar\font\m@ne} +\DeclareFontShape{LUC}{gbsn}{m}{n}{<-> LUC * gbsnu}{} +%% AR PL Mingti2L Big5 +\DeclareFontFamily{LUC}{bsmi}{\hyphenchar\font\m@ne} +\DeclareFontShape{LUC}{bsmi}{m}{n}{<-> LUC * bsmiu}{} +%% Japanese Wadalab +\DeclareFontFamily{LUC}{min}{\hyphenchar\font\m@ne} +\DeclareFontShape{LUC}{min}{m}{n}{ <-> LUC * udmj}{} +%% +\newenvironment{japanese} +{\SetHanjaFonts{min}{min}{min}\trivcjtypesetting}{} +\newenvironment{Schinese} +{\SetHanjaFonts{gbsn}{gbsn}{gbsn}\trivcjtypesetting}{} +\newenvironment{Tchinese} +{\SetHanjaFonts{bsmi}{bsmi}{bsmi}\trivcjtypesetting}{} + +\let\chinese\Schinese\let\endchinese\endSchinese + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-ucshyper.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-ucshyper.sty new file mode 100644 index 00000000000..5d393ccde73 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-ucshyper.sty @@ -0,0 +1,34 @@ +%% File `dhucs-ucshyper.sty` +%% +%% Copyright (c) 2013 Kangsoo Kim +%% +%% 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. +%% +%% ko.TeX에서 없어진, 이전 hangul-ucs의 부가 스타일 +%% 하위 호환성을 위해서 같은 이름을 가진 스타일을 작성함. +%% +\newif\if@dvips\@dvipsfalse +\DeclareOption{dvips}{\@dvipstrue} +\ProcessOptions + +\RequirePackage{ifpdf} +%\@ifpackageloaded{hyperref}{}{% +\ifpdf + \RequirePackage[pdftex,unicode,bookmarks=true]{hyperref} + \input glyphtounicode\pdfgentounicode=1 +\else + \if@dvips + \RequirePackage[dvips,unicode]{hyperref} + \else + \RequirePackage[dvipdfm,unicode,bookmarks=true]{hyperref} + \fi +\fi +%} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucsfn.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucsfn.sty new file mode 100644 index 00000000000..8fb556a8ce4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucsfn.sty @@ -0,0 +1,213 @@ +%% File `dhucsfn.sty` +%% +%% (C) Copyright 2007-2013 Koaunghi Un +%% Dohyun Kim +%% Kangsoo Kim +%% +%% 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. +%% +%% ----------------------------------------------------- +%% +%% 제공되는 선택 사항은 각주 번호 형식의 선택과 각주 판짜기 방식의 +%% 선택으로 나뉜다. +%% +%% 각주 번호 형식 +%% -------------- +%% - 첨자: 라텍의 기본 방식이다. 각주 번호가 각주면에 첨자로 짜진다. +%% [superscript] +%% - 괄호: 한글 문서에서 자주 접할 수 있는 방식이다. 각주 번호가 +%% 각주면 글자체의 크기로 짜지며 각주 번호 다음에 닫는 +%% 소괄호가 뒤따른다. 소괄호와 각주문의 사이에는 전각 넓이의 +%% 간격이 각주 번호와 각주문을 구별하는데 효과적이다. +%% [parenthesis] +%% +%% ``첨자''의 경우, 각주 번호와 각주문의 간격은 0pt이고 +%% ``괄호''의 경우, 각주 번호와 각주문의 간격은 공간 문자의 넓이이다. +%% 이 간격을 달리 하고자 할 때는 다음과 같이 \footnumbersep의 길이를 +%% 다시 준다. +%% \setlength{\footnumbersep}{길이} +%% +%% 각주 판짜기 방식 +%% ---------------- +%% - 내어쓰기: 각주 번호가 본문의 왼쪽맞춤으로 짜지고 각주문은 첫 +%% 글자의 위치로 왼쪽맞춤 된다. (hang) +%% - 다항이어쓰기: 각주가 새 행에서 시작하지 않고 앞의 각주에 +%% 이어진다. 짧은 각줄고만 구성될 때 유용하다. 줄바꿈으로 새 행이 +%% 시작하면 항상 새로운 각주가 시작되도록 짜여진다. (multipara} +%% - 단순이어쓰기: 다항이어쓰기와 같으나 새로운 각주가 행을 시작하도록 +%% 하지 않는다. 앞의 각주가 끝나면 연이어 다음 각주가 시작한다. (para) +%% - 왼쪽맞춤: 들여쓰기나 내어쓰기에 의해 각주 번호가 구별되도록 하지 +%% 않는다. 각주면 전체가 왼쪽맞춤으로 짜진다. (leftflush) +%% - 들여쓰기: 각주 번호가 있는 행이 왼쪽에서 2배각 들여 써진다. +%% 각주면의 각주 번호들은 오른쪽으로 정렬된다. (indent) +%% - 들여왼쪽맞춤: 왼쪽맞춤과 같으나 각주면 전체가 2배각 들어간다. (leftflushindent) +%% - 들여내어쓰기: 내어쓰기와 같으나 각주면 전체가 2배각 들어간다. (hangpar) +%% - 들여괄호맞춤: 들여내어쓰기와 같으나 줄바꿈으로 새로 시작하는 행의 +%% 왼쪽 맞춤이 각주문의 첫 글자의 위치에서 왼쪽맞춤이 되지 않고 +%% 각주 번호의 괄호가 끝나는 위치에서 왼쪽맞춤된다. 각주 번호 +%% 형식은 ``괄호''가 애초값이다. (varhangpar) +%% +%% 기본 선택 사항 +%% -------------- +%% 선택 사항을 지정하지 않으면 ``첨자''와 ``내어쓰기''가 애초값이다. +%% + +\def\filedate{2005/04/20} +\def\fileversion{1.0} + +\ProvidesPackage{dhucsfn}[\filedate\space Korean footnote style] +\typeout{Korean footnote style `dhucsfn' (a variant of `hangulfn') <\filedate>.} + +%% 주석 판짜기 설정 + +\setlength{\footnotesep}{3pt} + +\def\footnoterule{\vfill\kern-3\p@ + \hrule \@width 2in \kern 2.6\p@\vspace{2pt}} % the \hrule is .4pt high + +\newdimen\foot@parindent +\newdimen\footnumbersep + +%% 라텍과 Λ를 구분하여 선택 사항 이름 규정 + +%\ifx\nullocplist\undefined +%\input hfn-k.tex +%\else +%\input hfn-u.tex +%\fi + +%%% hfn-u.tex for hangul lambda + +\DeclareOption{superscript}{ + \def\fn@markstyle{\@makefnmark} + \footnumbersep0pt +} +\DeclareOption{parenthesis}{ + \def\fn@markstyle{\@thefnmark)} + \settowidth{\footnumbersep}{~} +} + +%% 각주 내어쓰기 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +\DeclareOption{hang}{% + \long\def\@makefntext#1{ + \settowidth{\foot@parindent}{\fn@markstyle} + \@setpar{\@@par\@tempdima \hsize + \advance\@tempdima-\foot@parindent + \parshape\@ne\foot@parindent \@tempdima}\par + \parindent8\p@\noindent + \hb@xt@\z@{\hss\hss\fn@markstyle\hskip\footnumbersep}#1} +} + +%% 각주 다항이어쓰기 +%% --------------------- +%% 1) 첫번째 각주 2) 두번째 각주 +%% 3) 세번째 각주 +\DeclareOption{multipara}{ + \input{fnpara.sty} + \long\def\@makefntext#1{% + \hbox{\fn@markstyle\hskip\footnumbersep #1} + }% +} + +%% 각주 단순이어쓰기 +%% --------------------- +%% 1) 첫번째 각주 2) 두번째 각주 3) 세 +%% 번째 각주 +\DeclareOption{para}{ + \input{fnpara.sty} + \long\def\@makefntext#1{% + \fn@markstyle\ifdim\footnumbersep=\z@\else~\fi #1 + }% +} + +%% 각주 왼쪽맞춤 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +%% \parindent: 본문의 별행 indent +\DeclareOption{leftflush}{ + \renewcommand\@makefntext[1]{% + \settowidth{\foot@parindent}{\reset@font 각주} + \parindent\foot@parindent\noindent% + \fn@markstyle\hskip\footnumbersep #1}% +} + +%% 각주 들여쓰기 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +%% \parindent: 본문 별행 indent의 일정 배수 +%% 각주 번호 오른쪽 정렬 +\DeclareOption{indent}{ + \renewcommand\@makefntext[1]{% + \settowidth{\foot@parindent}{\reset@font 각주} + \parindent\foot@parindent\noindent + \hb@xt@1.5\foot@parindent{\hss\fn@markstyle}\hskip\footnumbersep #1} +} + +%% 각주 들여왼쪽맞춤 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +\DeclareOption{leftflushindent}{ + \renewcommand\@makefntext[1]{% + \settowidth{\foot@parindent}{\reset@font 각주} + \leftskip\foot@parindent + \parindent\z@\noindent + \fn@markstyle\hskip\footnumbersep #1 + } +} + +%% 각주 들여내어쓰기 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +\DeclareOption{hangpar}{ + \long\def\@makefntext#1{ + \settowidth{\foot@parindent}{\reset@font 각주} + \settowidth{\footnumbersep}{\reset@font 주} + \divide\footnumbersep by2 + \leftskip\foot@parindent + \@setpar{\@@par\@tempdima \hsize + \advance\@tempdima-\foot@parindent + \parshape\@ne\foot@parindent \@tempdima}\par + \parindent\z@\noindent + \hb@xt@\z@{\hss\hss\fn@markstyle\hskip\footnumbersep}#1} +} + +%% 각주 들여괄호맞춤 +%% --------------------- +%% 1) 첫번째 줄 +%% 두번째 줄 +\DeclareOption{varhangpar}{ + \def\fn@markstyle{\@thefnmark)} + \settowidth{\footnumbersep}{~} + \long\def\@makefntext#1{ + \settowidth{\leftskip}{\reset@font 각주} + \settowidth{\foot@parindent}{\fn@markstyle} + \settowidth{\footnumbersep}{\reset@font 주} + \@setpar{\@@par\@tempdima \hsize + \advance\@tempdima-\foot@parindent + \parshape\@ne\foot@parindent \@tempdima}\par + \parindent=\footnumbersep\noindent + \hb@xt@\z@{\hss\hss\fn@markstyle}\hskip\footnumbersep #1} +} + +\ExecuteOptions{superscript,hang} + +%% 선택된 각주 판짜기 형식 실행 + +\ProcessOptions + +\endinput + +%% end of dhucsfn.sty diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-logo.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-logo.sty new file mode 100644 index 00000000000..9dd7d049dff --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-logo.sty @@ -0,0 +1,24 @@ +%% File `kotex-logo.sty` +%% +%% Copyright (c) 2013 Kangsoo Kim +%% +%% 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. +%% +%% define \koTeX logo command +\RequirePackage{hologo} + +\ifx\koTeX\undefined +\providecommand*\ko{% + \leavevmode\textsf{k}\kern-0.0625em\textit{o}} +\newcommand*\koTeX{% + \leavevmode\textsf{k}\kern-0.0625em\textit{o}\kern-0.11em% + \lower.15ex\hbox{.}\kern-0.1em\hologo{TeX}} +\fi + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty b/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty new file mode 100644 index 00000000000..3b84adf60ca --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty @@ -0,0 +1,48 @@ +%% File `kotex-varioref.sty` +%% +%% (C) Copyright 2008-2013 slomo +%% +%% 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. +%% +\@ifpackageloaded{varioref}{}{\RequirePackage{varioref}[2006/05/13]} + + +% +% user interfaces +% +\renewcommand{\vref}[2][\reftextcurrent] + {\vpageref[#1]{#2} \ref{#2}} +\renewcommand{\vrefrange}[3][\reftextcurrent] + {\vpagerefrange[#1]{#2}{#3}의 \reftextlabelrange{#2}{#3}} + + +% +% reftexts +% +\renewcommand{\reftextfaceafter}{다음 \pagename}% +\renewcommand{\reftextfacebefore}{앞 \pagename}% +\renewcommand{\reftextafter}{다음 \pagename}% +\renewcommand{\reftextbefore}{앞 \pagename}% +\renewcommand{\reftextcurrent}{현재 \pagename}% +\renewcommand{\reftextfaraway}[1]{\pageref{#1}\pagename}% +\renewcommand{\reftextpagerange}[2]{\pageref{#1}--\pageref{#2}\pagename}% +\renewcommand{\reftextlabelrange}[2]{\ref{#1}에서 \ref{#2}} + +% +% labelformats +% +\labelformat{part}{#1\partname} +\labelformat{chapter}{#1\chaptername} +\labelformat{section}{#1\sectionname} +\labelformat{figure}{\figurename~#1} +\labelformat{table}{\tablename~#1} +\labelformat{footnote}{각주~#1} + +\endinput + diff --git a/Master/texmf-dist/tex/latex/kotex-utf/dhucs-nanumfont.sty b/Master/texmf-dist/tex/latex/kotex-utf/dhucs-nanumfont.sty new file mode 100644 index 00000000000..c13f2b345e9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/dhucs-nanumfont.sty @@ -0,0 +1,39 @@ +%% File `dhucs-nanumfont.sty` +%% +%% Copyright (c) 2013 Kangsoo Kim +%% +%% 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{dhucs-nanumfont} + +\newif\ifUSETONE\USETONEfalse +\DeclareOption{USETONEt1font}{\USETONEtrue} +\DeclareOption{uset1font}{\USETONEtrue} + +\DeclareOption*{% + \PassOptionsToPackage{\CurrentOption}{dhucs} +} + +\ProcessOptions + +\@ifpackageloaded{dhucs}{}{\RequirePackage{dhucs}} + +\usehangulfontspec{nanum} +\DeclareFontSubstitution{LUC}{nanummj}{m}{n} + +\ifUSETONE +\RequirePackage[T1]{fontenc} +\renewcommand{\rmdefault}{nanummj} +\renewcommand{\sfdefault}{nanumgt} +\fi +\SetHangulFonts{nanummj}{nanumgt}{nanumgt} +\SetHanjaFonts{uhcmj}{nanumgt}{nanumgt} + +\endinput + diff --git a/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty b/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty new file mode 100644 index 00000000000..dc247f7c249 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty @@ -0,0 +1,127 @@ +%% File `dhucs.sty` +%% +%% (C) Copyright 2007-2013 Dohyun Kim +%% Kangsoo Kim +%% +%% 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. +%% +%% -------------------------------------------------------- +%% +%% changelog: +%% 2009/03/05 5.0.0 wrapper for various engines +%% 2008/08/28 4.1.4 work around error under using babel package +%% 2008/05/26 4.1.3 fallback of hangul font family is now serif font +%% 2008/03/15 4.1.2 redefine hyphendemerits only under finemath +%% 2008/01/30 4.1.1 fix a bug of heading mark +%% 2008/01/29 4.1.0 write raw chars in aux, toc, idx ... +%% 2007/12/28 4.0.14 compatible with footmisc.sty (reported by 서상현) +%% 2007/12/01 4.0.13 spacefactor=1000 between hangul and `)' +%% 2007/10/30 4.0.12 fix on \dhucs@next == \ifx +%% 2007/10/29 4.0.11 nobreak after \nobreak in \cjksymbolskip +%% 2007/10/25 4.0.10 simplify code related to \dhucs@next +%% 2007/10/07 4.0.9 bug fix related to \dhucs@next == \fi +%% 2007/07/18 4.0.8 part of ko.TeX +%% PUA is now hangul class 2 (= hanja) +%% 2007/06/30 4.0.7 skip instead of kern after cjksymbol +%% 2007/06/26 4.0.6 option strictcharcheck introduced +%% 2007/06/26 4.0.5 redefine U+2018, U+2019, U+201C, U+201D +%% 2007/06/25 4.0.4 fix bugs introduced by previous minor upgrade +%% 2007/06/22 4.0.3 lowering multiple punctuations +%% 2007/06/16 4.0.2 support ulem.sty +%% 2007/06/14 4.0.1 \hu was too normal a CS. use \dhucs@hu intead. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dhucs} + [2012/11/08 v5.3.2 typesetting UTF-8 Korean documents] + +\ifx가가\else + \DeclareOption*{\PassOptionsToPackage\CurrentOption{kotexutf}} + \ProcessOptions\relax + \RequirePackage{kotexutf} + \expandafter\endinput +\fi + +\newif\if@nonfrench +\newif\if@hangul +\newif\if@nojosa +\newif\if@hanja +\newif\if@dhucsfinemath + +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname directlua\endcsname\relax\else + \DeclareOption{hangul}{\@hangultrue + \PassOptionsToPackage\CurrentOption{luatexko}} + \DeclareOption{hanja}{\@hangultrue\@hanjatrue + \PassOptionsToPackage\CurrentOption{luatexko}} + \DeclareOption{nounfonts}{\PassOptionsToPackage\CurrentOption{luatexko}} + \DeclareOption{nonfrench}{\@nonfrenchtrue} + \DeclareOption{finemath}{\@dhucsfinemathtrue} + \DeclareOption*{\OptionNotUsed} + \ProcessOptions\relax + \RequirePackage{luatexko} + \let\jong\relax + \let\jung\relax + \let\rieul\relax + \let\setInterHangulSkip\@gobble + \def\disablehangulfontspec{\finemathattr\z@} + \def\disablehangullinebreak{\finemathattr-"7FFFFFFF\relax} + \let\dhucs@hu\z@ +\fi + +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname XeTeXrevision\endcsname\relax\else + \DeclareOption{hangul}{\@hangultrue + \PassOptionsToPackage\CurrentOption{xetexko}} + \DeclareOption{hanja}{\@hangultrue\@hanjatrue + \PassOptionsToPackage\CurrentOption{xetexko}} + \DeclareOption{nounfonts}{\PassOptionsToPackage\CurrentOption{xetexko}} + \DeclareOption{nonfrench}{\@nonfrenchtrue} + \DeclareOption{finemath}{\@dhucsfinemathtrue} + \DeclareOption*{\OptionNotUsed} + \ProcessOptions\relax + \RequirePackage{xetexko} + \def\setInterHangulSkip#1{\def\xetexkointerhchar{#1}} + \let\disablehangulfontspec\disablehangulspacing + \let\disablehangullinebreak\disablehangulspacingandlinebreak + \let\dhucs@hu\xetexkohu +\fi + +\def\다{\nobreak 다} +\def\unihangulchar#1{\char#1 } +\let\DeclareUnicodeCharacter\@gobbletwo +%\DeclareFontEncoding{LUC}{}{} +%\DeclareFontSubstitution{LUC}{utbt}{m}{n} +\def\SetHangulFonts#1#2#3{} +\def\SetHanjaFonts#1#2#3{} +\def\SetSerifFonts#1#2{} +\def\SetSansFonts#1#2{} +\def\SetAdhocFonts#1#2{} +\let\usehangulfontspec\@gobble +\let\declarenobreakspacefactor\nobreak +\let\declarehanjaspacefactor\empty +\let\cjksymbolunskip\empty +\let\postcjksymskip\empty +\let\postcjksymbol\empty +\let\postcjksymnobreak\nobreak +\let\cjksymbolskip\empty +\if@hangul + \let\olddotemph\dotemph % save ... + \newdimen\dhucs@emph@raise + \unless\ifdefined\pdfstringdefPreHook\let\pdfstringdefPreHook\empty\fi + \let\dotemph\olddotemph % restore ... + \def\circemph#1{\begingroup\def\dotemphchar{^^^^02da}\dotemph{#1}\endgroup} + \def\useremph#1{\begingroup + \let\dotemphchar\useremphchar + \let\dotemphraise\useremphraisedim + \dotemph{#1}\endgroup} +\fi +\let\ungremph\empty +\let\regremph\empty + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/hfontspec.default b/Master/texmf-dist/tex/latex/kotex-utf/hfontspec.default new file mode 100644 index 00000000000..662b6b9a6f0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/hfontspec.default @@ -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-utf/kosections-utf.sty b/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty new file mode 100644 index 00000000000..8a41519040c --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty @@ -0,0 +1,548 @@ +%% File `kosections-utf.tex` +%% +%% (C) Copyright 2007-2013 Dohyun Kim +%% Kangsoo Kim +%% +%% 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. +%% +\ProvidesFile{kosections-utf} + [2013/10/20 hangul option to kotex/utf] + +%\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} + +%% 한글 기호문자 처리를 위한 정의들. +%% 일부 클래스(예: memoir)에서 \textsubscript를 정의하고 있으므로, +%% 여기서는 \TEXTsubscript로 정의한다. 만약 이 정의를 문서에서 +%% 사용하고 싶으면 \let\textsubscript\TEXTsubscript로 할 것. +\protected\def\TEXTsubscript#1{% + \@TEXTsubscript{\selectfont#1}} +\newcommand{\@TEXTsubscript}[1]{% + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}% +\DeclareUnicodeCharacter{00BC}% 1/4 + {\textsuperscript1\kern-.45em\unihangulchar{65295}\kern-.45em\TEXTsubscript4} +\DeclareUnicodeCharacter{00BD}% 1/2 + {\textsuperscript1\kern-.45em\unihangulchar{65295}\kern-.45em\TEXTsubscript2} +\DeclareUnicodeCharacter{00BE}% 3/4 + {\textsuperscript3\kern-.45em\unihangulchar{65295}\kern-.45em\TEXTsubscript4} +\DeclareUnicodeCharacter{02D0}% ː + {\unihangulchar{"02D0}}% 8251=0x203B +\DeclareUnicodeCharacter{2025}% ‥ + {\unihangulchar{"2025}}% 8251=0x203B +\DeclareUnicodeCharacter{2015}% ― + {\nobreak\hskip\dhucs@hu\unihangulchar{"2015}\hskip\dhucs@hu\relax}% 8251=0x203B +\DeclareUnicodeCharacter{2312}% ⌒ + {\unihangulchar{"2312}}% 8251=0x203B +\DeclareUnicodeCharacter{203B}% ※ + {\unihangulchar{8251}}% 8251=0x203B + +%% konames-utf +\RequirePackage{konames-utf} + +%% 단원의 한글화 +%% ============= +%% +%% Part I --> 제 I 편, 第 I 篇 +%% Chapter 1 --> 제 1 장, 第 1 章 +%% Section 1 --> 제 1 절, 第 1 節 +%% Appendix A --> 부록 A, 附綠 A +%% +%% 위와 같은 단원의 한글화는 절(節)까지 영향을 미친다. 그러므로 우리는 +%% 목차에 \subsubsection까지 단원이 번호와 함께 나오도록 한다. +%% article에서는 이미 3으로 지정되었으나, 그외에서는 2로 지정되어 +%% \subsection까지만 번호가 목차에 나오도록 되어 있다. +\setcounter{secnumdepth}{\thr@@} + +\@ifclassloaded{article}{%
+ \renewcommand{\appendix}{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \def\@chapapp{\appendixname}% 부록의 한글화에 의해 필요. + \kscntformat{section}{\appendixname~}{} + \def\thesection{\@Alph\c@section}}% +}{\@ifundefined{@chapapp}{}{% + \renewcommand\thesection{\@arabic\c@section} + \renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \renewcommand\@chapapp{\appendixname}% + \kscntformat{chapter}{\appendixname~}{} + \renewcommand\thechapter{\@Alph\c@chapter}}% +}} + +%% 위와같은 재정의로 다음과 같은 문제가 발생한다. +%% 1. \part는 \partname~\thepart로 나오게 된다. 편~I +%% 2. \chapter는 \@chapapp{} \thechapter로. 장~1 +%% 3. \section은 \sectionname~\thesection으로. 절~1 +%% 4. 목차작성의 들여쓰기가 우리말 환경에 적당하지 않다. +%% 5. 페이지 heading의 글자체가 \slshape으로 바뀜으로서 우리말이 +%% 불안정해진다. +%% +%% 이런 약점을 보완하기 위해 단원의 일련번호의 앞과 뒤에 끼워넣을 +%% 모듬을 다음과 같이 설정한다. +\def\kscntformat#1#2#3{\@namedef{pre@#1cnt}{#2} + \@namedef{post@#1cnt}{#3}} +\kscntformat{part}{\KSTHE~}{~\partname} +\kscntformat{chapter}{\KSTHE~}{~\chaptername} +\kscntformat{section}{\KSTHE~}{~\sectionname} + +\@ifclassloaded{article}{%
+ \def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\pre@partcnt\thepart\post@partcnt\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries \pre@partcnt\thepart\post@partcnt + \par\nobreak + \fi + \huge \bfseries #2% + \markboth{}{}\par}% + \nobreak + \vskip 3ex + \@afterheading} +}{} +\@ifclassloaded{report}{% + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\pre@partcnt\thepart\post@partcnt\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \pre@partcnt\thepart\post@partcnt + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} +}{} +\@ifclassloaded{book}{% + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}% + {\pre@partcnt\thepart\post@partcnt\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \pre@partcnt\thepart\post@partcnt + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} +}{} + +\@ifclassloaded{book}{% + \def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\pre@chaptercnt\thechapter\post@chaptercnt}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{% + \pre@chaptercnt\thechapter\post@chaptercnt}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge\bfseries + \pre@chaptercnt\thechapter\post@chaptercnt + \par\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }} + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setbox\z@=\hbox{\bfseries\pre@chaptercnt\post@chaptercnt~} + \setlength\@tempdima{1.5em} + \advance\@tempdima\wd\z@ + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip \@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi} +}{}% +\@ifclassloaded{report}{% + \def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\pre@chaptercnt\thechapter\post@chaptercnt} + \addcontentsline{toc}{chapter}% + {\protect\numberline{% + \pre@chaptercnt\thechapter\post@chaptercnt}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \huge\bfseries + \pre@chaptercnt\thechapter\post@chaptercnt + \par\nobreak + \vskip 20\p@ + \fi + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }} + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setbox\z@=\hbox{\bfseries\pre@chaptercnt\post@chaptercnt~} + \setlength\@tempdima{1.5em} + \advance\@tempdima\wd\z@ + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip \@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi} +}{} + +%%%%% make compatible with tex4ht ? +\def\dhucs@seccntformat#1#2{% + \ifnum#2=\@ne\pre@sectioncnt\fi + \csname the#1\endcsname + \ifnum#2=\@ne\post@sectioncnt\fi + \quad} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\dhucs@seccntformat{#1}{#2}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \ifnum #2=1 % in case of section + \protect\numberline{\pre@sectioncnt + \csname the#1\endcsname\post@sectioncnt}% + \else \protect\numberline{\csname the#1\endcsname}% + \fi + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +%%%%% + +\@ifclassloaded{article}{% + \renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty% + \addvspace{1.0em \@plus\p@}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \settowidth{\@tempdima}{\pre@sectioncnt\post@sectioncnt}% + \addtolength{\@tempdima}{1.5em}% + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + \fi} +}{} +\@ifclassloaded{book}{ + \renewcommand*\l@section{% + \settowidth{\@tempdima}{\pre@sectioncnt\post@sectioncnt}% + \addtolength{\@tempdima}{2.3em}% + \@dottedtocline{1}{1em}{\@tempdima}}%1.5em 2.3em +}{} +\@ifclassloaded{report}{ + \renewcommand*\l@section{% + \settowidth{\@tempdima}{\pre@sectioncnt\post@sectioncnt}% + \addtolength{\@tempdima}{2.3em}% + \@dottedtocline{1}{1em}{\@tempdima}}%1.5em 2.3em +}{} + + +%% 다음은 \ps@headings과 \ps@myheadings를 한글에 맞게 수정한 것이다. +%% 각각의 class들이 서로 다른 방식으로 페이지 머리를 짜므로 우리는 +%% 여기서 각각을 따로따로 정의해 주어야 한다. + +\@ifclassloaded{article}{% + \if@twoside + \renewcommand\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage\hfil\normalfont\slshape\leftmark}% + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \pre@sectioncnt\thesection\post@sectioncnt\quad + \fi + ##1}}{}}% + \def\subsectionmark##1{% + \markright {% + \ifnum \c@secnumdepth >\@ne + \thesubsection\quad + \fi + ##1}}} + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \pre@sectioncnt\thesection\post@sectioncnt\quad + \fi + ##1}}}} + \fi +}{} + +\@ifclassloaded{book}{% + \if@twoside + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage\hfil\normalfont\slshape\leftmark}% + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \pre@chaptercnt\thechapter\post@chaptercnt\quad% + \fi + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \pre@sectioncnt\thesection\post@sectioncnt\quad% + \fi + ##1}}}} + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \pre@chaptercnt\thechapter\post@chaptercnt\quad% + \fi + \fi + ##1}}}} + \fi + \pagestyle{headings} + }{} + +\@ifclassloaded{report}{% + \if@twoside + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage\hfil\normalfont\slshape\leftmark}% + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \pre@chaptercnt\thechapter\post@chaptercnt\quad% + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \pre@sectioncnt\thesection\post@sectioncnt\quad% + \fi + ##1}}}} + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\normalfont\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \pre@chaptercnt\thechapter\post@chaptercnt\quad% + \fi + ##1}}}} + \fi +}{} + +%% bangjom emphasis : extension. (inspired by hangul.sty) + +\def\circemphchar{˚} +\def\dotemphchar{˙} +\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\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{\leavevmode + \settowidth{\dhucs@emph@width}{#1}% + \put@dhucs@mphch@r{\useremphchar}% +} + +\g@addto@macro\pdfstringdefPreHook{% + \let\circemph\@firstofone + \let\useremph\@firstofone +} + +%%% xspaceskip +\@ifpackageloaded{dhucs-setspace}{}{\linespread{1.333}} +\if@nonfrench + \xspaceskip=.5em plus .111em minus .1em +\fi + +%%% interhchar +\setInterHangulSkip{-0.55pt} + +%%% makeidx를 쓰면 \see와 \seealso가 정의된다. +%%% modified from kosections-euc.tex +%%% See http://www.ktug.or.kr/jsboard/read.php?table=operate&no=22789 +\AtBeginDocument{% + \@ifundefined{see}{}{% + \renewcommand*\see[2]{#1\emph{\seename}}% + } + \@ifundefined{seealso}{}{% + \renewcommand*\seealso[2]{#1\emph{\alsoname}}% + } +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/kotex.cfg b/Master/texmf-dist/tex/latex/kotex-utf/kotex.cfg new file mode 100644 index 00000000000..a6389e4e5e4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/kotex.cfg @@ -0,0 +1,8 @@ +%%% kotex.sty configuration example +%\ExecuteOptions{% +% utf,% +% finemath,% +% strictcharcheck,% +%} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty b/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty new file mode 100644 index 00000000000..4b2f9a8a53a --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty @@ -0,0 +1,548 @@ +%% File `kotexutf.sty` +%% +%% Copyright (C) 2012-2013 Dohyun Kim +%% +%% 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{kotexutf} + [2013/10/20 v1.5 typesetting UTF-8 Korean documents] + +\newif\if@nonfrench +\newif\if@hangul +\newif\if@nojosa +\newif\if@hanja +\newif\if@dhucsfinemath + +%% Options. hangul, nonfrench, nojosa, hanja, finemath. +\DeclareOption{nonfrench}{\@nonfrenchtrue\AtEndOfPackage{\nonfrenchspacing}} +\DeclareOption{hangul}{\@hangultrue} +\DeclareOption{hanja}{\@hanjatrue\@hangultrue} +\DeclareOption{nojosa}{\@nojosatrue} +\DeclareOption{finemath}{\def\finemath{}\@dhucsfinemathtrue} +\DeclareOption{strictcharcheck}{\def\strictcharcheck{}} +\ProcessOptions\relax + +%% we use latex's standard utf8.def +\RequirePackage[utf8]{inputenc} + +\input kotexutf-core + +\long\def\protected@write#1#2#3{% + \begingroup + \def\UTFviii@two@octets##1##2{% + \string##1\string##2}% + \def\UTFviii@three@octets##1##2##3{% + \string##1\string##2\string##3}% + \def\UTFviii@four@octets##1##2##3##4{% + \string##1\string##2\string##3\string##4}% + \let\thepage\relax + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi +} + +% modified from lucenc.def +\DeclareFontEncoding{LUC}{}{} +%\DeclareFontSubstitution{LUC}{utbt}{m}{n} +\DeclareFontSubstitution{LUC}{nanummj}{m}{n} +\providecommand*\LUC@@empty[1]{% + \edef\mandatory@arg{\mandatory@arg\h@ngulpl@ne}% + \ifx\optional@arg\@empty + \empty@sfcnt#1% + \else % suppress redundant warning + \ifcsname dhucsluc@\curr@fontshape/\optional@arg\endcsname + \empty@sfcnt\@gobble + \else + \empty@sfcnt#1\expandafter + \gdef\csname dhucsluc@\curr@fontshape/\optional@arg\endcsname{}% + \fi + \fi + \xdef\font@name{\csname \curr@fontshape/\f@size/\h@ngulpl@ne\endcsname}} +\providecommand*\LUC@@sub[1]{% suppress redundant warning + \ifcsname dhucsluc@\mandatory@arg/\f@size\endcsname + \sub@sfcnt\@gobble + \else + \expandafter\gdef\csname dhucsluc@\mandatory@arg/\f@size\endcsname{}% + \sub@sfcnt#1% + \fi} +\DeclareSizeFunction{LUC}{\LUC@@empty\@font@warning} +\DeclareSizeFunction{LUCb}{\LUC@@empty\@font@warning} +\DeclareSizeFunction{sLUC}{\LUC@@empty\@font@info} +\DeclareSizeFunction{sLUCb}{\LUC@@empty\@font@info} +\DeclareSizeFunction{LUCsub}{\LUC@@sub\@font@warning} +\DeclareSizeFunction{LUCssub}{\LUC@@sub\@font@info} + +%% redefinition of \pickup@font (seems to be needed for microtype.sty) +\edef\pickup@font{% + \unexpanded{% + \ifcsname h@ngulpl@ne\endcsname + \ifcsname \curr@fontshape/\f@size/\h@ngulpl@ne\endcsname + \xdef\font@name{\csname \curr@fontshape/\f@size/\h@ngulpl@ne\endcsname}% + \else + \dhucs@define@newfont + \fi + \else}% + \unexpanded\expandafter{\pickup@font + \fi}} +\let\dhucs@define@newfont\define@newfont + +%% hangul font selection interface +\protected\def\SetHangulFonts#1#2#3{% + \def\dhucs@serifhangulfont{#1}% + \def\dhucs@sanshangulfont{#2}% + \def\dhucs@monohangulfont{#3}% +} +\protected\def\SetHanjaFonts#1#2#3{% + \def\dhucs@serifhanjafont{#1}% + \def\dhucs@sanshanjafont{#2}% + \def\dhucs@monohanjafont{#3}% +} +\protected\def\SetSerifFonts#1#2{% + \def\dhucs@serifhangulfont{#1}% + \def\dhucs@serifhanjafont{#2}% +} +\protected\def\SetSansFonts#1#2{% + \def\dhucs@sanshangulfont{#1}% + \def\dhucs@sanshanjafont{#2}% +} +\protected\def\SetAdhocFonts#1#2{% + \def\dhucs@temp@hangulfont{#1}% + \def\dhucs@temp@hanjafont {#2}% +} + +\protected\edef\normalfont{% + \unexpanded{% + \let\dhucs@temp@hangulfont\dhucs@undefined + \let\dhucs@temp@hanjafont \dhucs@undefined + }% + \unexpanded\expandafter{\normalfont}% +} +\let\reset@font\normalfont + +%% now print out \unihangulchar +\newcommand*\unihangulchar@@@{% + \getthish@ngulcl@ss + \geth@ngulfontn@me + \dobeforeh@ngulch@r + \leavevmode %%% 2010.01.04 moved from inside group + \begingroup + \geth@ngulpl@ne@ndch@r + \fontencoding{LUC}\fontfamily\h@ngulfontn@me\selectfont + \dhucs@check@if@char@exists + \dhucs@emph\h@ngulch@r % bangjom emphasis + \h@ngulch@r + \endgroup + % see http://www.ktug.or.kr/jsboard/read.php?table=operate&no=27177 + \ifnum\unih@ngulpoint="3009\else % 〉 + \josa@buf@del\global\@josa\unih@ngulpoint + \fi + \do@fterh@ngulch@r +} + +\newcommand*\geth@ngulfontn@me{% + \ifnum\thish@ngul=\@ne + \def\hangul@hanja{hangul}% + \else + \def\hangul@hanja{hanja}% + \fi + \edef\@tempa{\f@family}\edef\@tempb{\ttdefault}\edef\@tempc{\sfdefault}% + \ifx\@tempa\@tempb + \edef\h@ngulfontn@me{\csname dhucs@mono\hangul@hanja font\endcsname}% + \def\dhucs@hu{\z@}% do not insert micro-space when ttfamily, + % under which it should be fixed-width. + \else\ifx\@tempa\@tempc + \edef\h@ngulfontn@me{\csname dhucs@sans\hangul@hanja font\endcsname}% + \else + \edef\h@ngulfontn@me{\csname dhucs@serif\hangul@hanja font\endcsname}% + \fi\fi + \ifdefined\dhucs@temp@hangulfont + \edef\h@ngulfontn@me{\csname dhucs@temp@\hangul@hanja font\endcsname}% + \fi +} + +%% dhucs-interword.sty will use this command. +\newcommand*\setInterHangulSkip[1]{\def\dhucs@interhchar{#1}} + +%% ... why is this needed? +%\newcommand*\hfontfamilynameprefix{ut} + +%%%%%%%%%%%%%%%%%%%%%% +%% Autojosa and hangul. +\newcount\@josa +\newtoks\josatoks +\def\josa@buf@del{\global\josatoks{^^J}}\josa@buf@del +\protected\def\jong{\josa@buf@del\global\@josa\z@} +\protected\def\rieul{\josa@buf@del\global\@josa\@ne} +\protected\def\jung{\josa@buf@del\global\@josa\tw@} + +\AtBeginDocument{% + \if@dhucsfinemath + % redefine ref/pageref for finemath + \let\@setref@dhucs@orig@\@setref + \def\@setref#1#2#3{\@setref@dhucs@orig@{#1}{#2}{#3}% + \ifx#1\relax\else + \bgroup\setbox\z@\lastbox\egroup + \fi}% + \fi + \if@nojosa\else + % redefine ref/pageref for autojosa + \let\@setref@dhucs@orig\@setref + \def\@setref#1#2#3{\@setref@dhucs@orig{#1}{#2}{#3}% + \ifx#1\relax\else + \bgroup + \dhucs@make@cjkchar@null + \edef\@temp{\expandafter#2#1}\global\josatoks\expandafter{\@temp}% + \egroup + \fi}% + % redefine cite for autojosa: base only or with hyperref.sty + \let\@cite@ofmt@dhucs@orig\@cite@ofmt + \def\@cite@ofmt#1{\@cite@ofmt@dhucs@orig{#1}% + \bgroup + \let\@safe@activesfalse\@empty %%% workaround babel %%% + \dhucs@make@cjkchar@null + \def\hyper@@link[##1]##2##3##4{##4}% + \def\beamer@sort##1##2{}% + \edef\@temp{#1}\global\josatoks\expandafter{\@temp}% + \egroup}% + \fi + % version 4.0.14 : + % redefine footref for autojosa (footmisc v5.3d) + \@ifpackageloaded{footmisc}{% + \if@nojosa\else + \renewcommand\footref[1]{% + \begingroup + \let\@setref\@setref@dhucs@orig@ + \unrestored@protected@xdef\@thefnmark{\ref{#1}}% + \endgroup + \@footnotemark + \global\josatoks\expandafter{\@thefnmark}}% + \fi + }{} + % redefine cite for autojosa: with cite.sty + \@ifpackageloaded{cite}{% + \if@nojosa\else + \let\citeform@dhucs@orig\citeform + \def\citeform#1{\citeform@dhucs@orig{#1}% + \bgroup + \dhucs@make@cjkchar@null + \def\hyper@@link[##1]##2##3##4{##4}% + \edef\@temp{#1}\global\josatoks\expandafter{\@temp}% + \egroup}% + \fi + }{}% + % redefine cite for autojosa: with natbib.sty (NOT a full support yet) + \@ifpackageloaded{natbib}{% + \if@nojosa\else + \expandafter\def\expandafter\hyper@natlinkend\expandafter{% + \hyper@natlinkend + \bgroup%\def\protect##1##2{^^J}% how to do about \protect + \ifnum\NAT@ctype=1 + \edef\@temp{\NAT@nm}% + \else + \ifNAT@numbers + \edef\@temp{\NAT@num}\else + \edef\@temp{\NAT@date}\fi + \fi + \global\josatoks\expandafter{\@temp}% + \egroup}% + \fi + }{}% + % support of autojosa for apacite.sty + \@ifpackageloaded{apacite}{% + \if@nojosa\else + \let\dhucs@@cite@orig\@@cite + \def\@@cite<#1>[#2]#3{% + \dhucs@@cite@orig<#1>[#2]{#3}% + \begingroup + \dhucs@make@cjkchar@null + \def\hyper@@link[##1]##2##3##4{##4}% + \if@Y@cite + \@for\@citeb:=#3\do{% + \@ifundefined{b@\@citeb\@extra@b@citeb}{}{% + \edef\@temp{\csname Y@\@citeb\@extra@b@citeb\endcsname}}}% + \else + \let\BCA\@firstoftwo + \@for\@citeb:=#3\do{% + \@ifundefined{b@\@citeb\@extra@b@citeb}{}{% + \edef\@temp{\csname b@\@citeb\@extra@b@citeb\endcsname}}}% + \fi + \global\josatoks\expandafter{\@temp}% + \endgroup}% + \fi + }{}% +} +\newcommand*\dh@unichar@null@[1]{^^J} +\newcommand*\dhucs@make@cjkchar@null{\let\unihangulchar\dh@unichar@null@} +\newcommand*\josa@hyper@link{% + \begingroup + \toks@{}\expandafter\josa@hyper@link@\the\josatoks\@nil + \endgroup +} +\newcommand*\josa@hyper@link@{% + \afterassignment\josa@link@reversetoks\let\dhucs@tmp@next= } +\newcommand*\josa@link@reversetoks{% + \ifx\dhucs@tmp@next\@nil + \expandafter\josa@hyper@link@@ + \else + \if\noexpand\dhucs@tmp@next\relax + \else\ifx)\dhucs@tmp@next + \else\ifx]\dhucs@tmp@next + \else\ifcat\dhucs@cat@eleven\dhucs@tmp@next + \edef\act{\noexpand\toks@{\expandafter\strip@letter@meaning@prefix + \meaning\dhucs@tmp@next\the\toks@}}\act % by little tree + \else\ifcat\dhucs@cat@twelve\dhucs@tmp@next + \edef\act{\noexpand\toks@{\expandafter\strip@character@meaning@prefix + \meaning\dhucs@tmp@next\the\toks@}}\act % by little tree + \fi\fi\fi\fi\fi + \expandafter\josa@hyper@link@ + \fi} + +\begingroup +\catcode`\A=11 +\catcode`\0=12 +\global\let\dhucs@cat@eleven=A +\global\let\dhucs@cat@twelve=0 +\endgroup + +\expandafter\def\expandafter\strip@character@meaning@prefix + \detokenize{the character} #1{#1} +\expandafter\def\expandafter\strip@letter@meaning@prefix + \detokenize{the letter} #1{#1} + +\newcommand*\josa@hyper@link@@{% + \expandafter\josa@hyper@link@@@\the\toks@\@empty\@empty\@empty\@empty\@nil} +\def\josa@hyper@link@@@#1#2#3#4\@nil{% + \if#1^^J\else + \if 1#1\rieul\else + \if 3#1\jong\else + \if 6#1\jong\else + \if 7#1\rieul\else + \if 8#1\rieul\else + \if 0#1\jong\else + \if l#1\rieul\else + \if m#1\jong\else + \if n#1\jong\else + \if L#1\rieul\else + \if M#1\jong\else + \if N#1\jong\else + \jung + \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi + \if n#2\if g#1\jong\fi\fi%skating + \if a#2\if p#1\jong\fi\fi%cap + \if u#2\if p#1\jong\fi\fi%cup + \if a#2\if t#1\jong\fi\fi%cat + \if e#2\if t#1\jong\fi\fi%Hamlet + \if i#2\if t#1\jong\fi\fi%summit + \if o#2\if t#1\jong\fi\fi%not + \if u#2\if t#1\jong\fi\fi%nut + \if o#2\if k#1\jong\fi\fi%book + \if i#2\if c#1\jong\fi\fi%picnic + \if l#2\if e#1\rieul\fi\fi%apple + \if i#3\if m#2\if e#1\jong\fi\fi\fi%time + \if i#3\if n#2\if e#1\jong\fi\fi\fi%mine + \if a#3\if c#2\if k#1\jong\fi\fi\fi%back + \if i#3\if c#2\if k#1\jong\fi\fi\fi%pick + \if o#3\if a#2\if t#1\jung\fi\fi\fi%boat + \if T#3\if e#2\if X#1\jong\fi\fi\fi%TeX + \fi} +\if@nojosa + \let\josa@hyper@link\relax +\fi +\newcommand*\josa@hanja@hangul[1]{\begingroup + \count@=\z@ + \openin1=#1\relax \josa@hanja \closein1 + \endgroup} +\newcommand*\josa@hanja{\read1 to \@tempa + \ifnum\count@=\@josa + \global\@josa\@tempa \let\next\relax + \else + \advance\count@\@ne \let\next\josa@hanja + \fi \next} +\protected\def\makejosa#1#2{% + \josa@hyper@link + \ifnum\@josa>19967 \ifnum\@josa<40870 %%% CJK UNIFIED IDEOGRAPHS + \advance\@josa-19968 % "4E00 + \josa@hanja@hangul{hanja_hangul.tab}\fi\fi + \ifnum\@josa>13311 \ifnum\@josa<19894 %%% CJK UNIFIED IDEOGRAPHS EXT. A + \advance\@josa-13312 % "3400 + \josa@hanja@hangul{hanjaexa_hangul.tab}\fi\fi + \ifnum\@josa>63743 \ifnum\@josa<64046 %%% CJK COMPATIBILITY IDEOGRAPHS + \advance\@josa-63744 % "F900 + \josa@hanja@hangul{hanjacom_hangul.tab}\fi\fi + \ifnum\@josa>44031 \ifnum\@josa<55204 %%% hangul syllables + \advance\@josa-44032 % "AC00 + \count@=\@josa \divide\count@28 \multiply\count@28 + \advance\@josa-\count@ \advance\@josa4519 % "11A7 + \ifnum\@josa=4519 \jung + \else\ifnum\@josa=4527 \rieul % "11AF + \else \jong \fi\fi \fi\fi + \ifnum\@josa>12592 \ifnum\@josa<12623 %%% ㄱㄴㄷㄹ + \ifnum\@josa=12601 \rieul + \else\jong\fi \fi\fi + \ifnum\@josa>12895 \ifnum\@josa<12924 \advance\@josa-96 \fi\fi + \ifnum\@josa>12799 \ifnum\@josa<12814 %%% ㉠ or ㈀ + \ifnum\@josa=12803 \rieul + \else\jong\fi \fi\fi + \ifnum\@josa>12813 \ifnum\@josa<12829 %%% ㉮ or ㈎ + \jung \fi\fi + \ifnum\@josa>9311 \ifnum\@josa<9372 %%% ① or ⑴ + \advance\@josa\m@ne \num@josa{\@josa}\fi\fi + \ifnum\@josa>9423 \ifnum\@josa<9450 \advance\@josa-26 \fi\fi + \ifnum\@josa>9397 \ifnum\@josa<9424 \advance\@josa-26 \fi\fi + \ifnum\@josa>9371 \ifnum\@josa<9398 %%% ⓐ or ⒜ + \ifnum\@josa=9383 \rieul\else % l + \ifnum\@josa=9384 \jong\else % m + \ifnum\@josa=9385 \jong\else % n + \jung\fi\fi\fi \fi\fi + \ifnum\@josa>8543 \ifnum\@josa<8556 % ⅰⅱⅲ + \advance\@josa-3 \num@josa{\@josa}\fi\fi + \ifnum\@josa>8559 \ifnum\@josa<8572 % ⅠⅡⅢ + \advance\@josa\@ne \num@josa{\@josa}\fi\fi + \ifnum\@josa=\@ne + \ifx\@empty#1\@empty \else#2\relax\fi% rieul + \else + \ifnum\@josa=\tw@ #1\relax% jung + \else #2\relax% jong + \fi + \fi} +\newcommand*\num@josa[1]{\bgroup\count@#1% + \ifnum\count@<\z@ \count@-\count@ \fi\count2\count@ + \divide\count2 10 \multiply\count2 10 \advance\count@-\count2 + \ifcase\count@\jong\or\rieul\or\jung\or\jong\or\jung\or + \jung\or\jong\or\rieul\or\rieul\or\jung\fi\egroup} +\newcommand*\error@josa{\PackageError{kotex}{Undefined Control Sequence}{}} + +%% \nobreak다: see http://kts.ktug.kr/node/204 +\newcommand*\nobreak@hangul@da{\nobreak다} + +\newcommand*\^^ea[2]{% + \if\string#1\string^^b0% + \if\string#2\string^^80\makejosa{가}{이}\else\error@josa\fi% 가 + \else\if\string#1\string^^b3% + \if\string#2\string^^bc\makejosa{와}{과}\else\error@josa\fi% 과 + \else\error@josa \fi\fi} +\newcommand*\^^eb[2]{% + \if\string#1\string^^8b\if\string#2\string^^a4% avoid orphan "다" + \expandafter\expandafter\expandafter\nobreak@hangul@da\else\error@josa\fi + \else\if\string#1\string^^8a% + \if\string#2\string^^94\makejosa{는}{은}\else\error@josa\fi% 는 + \else\if\string#1\string^^9d% + \if\string#2\string^^bc\makejosa{라}{이라}\else\error@josa\fi% 라 + \else\if\string#1\string^^a1% + \if\string#2\string^^9c\makejosa{}{으}로\else\error@josa\fi% 로 + \else\if\string#1\string^^a5% + \if\string#2\string^^bc\makejosa{를}{을}\else\error@josa\fi% 를 + \else\error@josa \fi\fi\fi\fi\fi} +\newcommand*\^^ec[2]{% + \edef\@tempa{\string#1}\edef\@tempb{\string#2}% + \futurelet\next\@josa@begin@ec} +\def\@josa@begin@ec{% + \if\@tempa\string^^99% + \if\@tempb\string^^80\makejosa{와}{과}\else\error@josa\fi% 와 + \else\if\@tempa\string^^9c% + \if\@tempb\string^^bc\makejosa{}{으}\else\error@josa\fi% 으 + \else\if\@tempa\string^^9d% + \if\@tempb\string^^80\makejosa{는}{은}% 은 + \else\if\@tempb\string^^84\makejosa{를}{을}% 을 + \else\if\@tempb\string^^b4% + \ifx\next^^eb\makejosa\relax{이}% 이라 + \else\makejosa{가}{이}% 이 + \fi + \else\error@josa \fi\fi\fi + \else\error@josa \fi\fi\fi} + +%% hangul item titles +\RequirePackage{kolabels-utf} + +\AtBeginDocument{ +%% compatibility with apacite.sty (reported by slomo) +%% see http://www.ktug.or.kr/jsboard/read.php?table=operate&no=21183 +% \@ifpackageloaded{apacite}{% +% \@ifpackagewith{apacite}{noaccentfix}{}{% +% \def\unihangulchar@APAC#1{uni#1}% +% \g@addto@macro\@pre@accentfix{% +% \let\old@unihangulchar@APAC\unihangulchar +% \let\unihangulchar\unihangulchar@APAC}% +% \g@addto@macro\@post@accentfix{% +% \let\unihangulchar\old@unihangulchar@APAC}% +% }% +% }{}% +%% compatibility with ulem.sty +%% allowing linebreaking inside ulem'ed text. + \@ifpackageloaded{ulem}{% + \let\orig@lastnodetype\lastnodetype + \edef\UL@stop{\unexpanded{% + \ifnum\lastkern=\thr@@ % empty hbox + \else + \global\chardef\dhucs@ul@lastnodetype\orig@lastnodetype + \global\mathchardef\dhucs@ul@spacefactor\spacefactor + \fi}\unexpanded\expandafter{\UL@stop}} + \def\dhucs@ul@stop{\ifx\UL@start\@empty + \ifx\ \LA@space\else\UL@stop\fi\fi} + \def\dhucs@ul@start{\ifx\UL@start\@empty\else + \ifx\ \LA@space\else\UL@start\fi\fi} + \addto@hook\UL@hook{% + \def\discretionary#1#2#3{% + \ifx\\#3\\\hskip\z@skip\else\hskip\dhucs@interhchar\fi}% + \def\unihangulchar#1{\dhucs@ul@stop + \unih@ngulpoint#1\relax \futurelet\dhucs@next\unihangulchar@@}% + \edef\dobeforeh@ngulch@r{% + \unexpanded{\ifdefined\dhucs@ul@lastnodetype + \let\lastnodetype\dhucs@ul@lastnodetype + \spacefactor\dhucs@ul@spacefactor + \fi}\unexpanded\expandafter{\dobeforeh@ngulch@r\dhucs@ul@start}}% + \edef\breakbeforeasciichar{\unexpanded{\dhucs@ul@stop}% + \unexpanded\expandafter{\breakbeforeasciichar\dhucs@ul@start}}% + \edef\cjksymbolextraspace{\unexpanded{\dhucs@ul@stop}% + \unexpanded\expandafter{\cjksymbolextraspace\dhucs@ul@start}}% + \let\hskip\LA@hskip + \let\asciiexclamationafterhangul\relax + \let\asciiquestionafterhangul\relax + \let\asciifullstopafterhangul\relax + }% + }{}% +} + +%% use hyperref's unichar support +\unless\ifdefined\pdfstringdefPreHook + \let\pdfstringdefPreHook\@empty\fi +\g@addto@macro\pdfstringdefPreHook{% + \let\unihangulchar\HyPsd@unichar + \let\makejosa\@secondoftwo + \let\dotemph\@firstofone + \let\jong\@empty + \let\jung\@empty + \let\rieul\@empty + \def\SetHangulFonts#1#2#3{}% + \def\SetHanjaFonts#1#2#3{}% + \def\SetSerifFonts#1#2{}% + \def\SetSansFonts#1#2{}% + \def\SetAdhocFonts#1#2{}% +} + + +%% for downward compatibility +\let\PrerenderUnicode\@gobble +\let\dhucsPrerenderUnicode\@gobble +\let\BreakBeforeAsciiOParen\@gobble +\let\unichar\unihangulchar + +%% load ucs-hangul upon [hangul] option +\if@hangul + \RequirePackage{kosections-utf} +\fi + +\endinput + +%%% karnes: 2013/10/21, .tab files --- xetexko’s +%%% karnes: 2013/10/20, konames, kosections, kolabes --- cjk-ko’s. diff --git a/Master/texmf-dist/tex/latex/kotex-utf/lucenc.dfu b/Master/texmf-dist/tex/latex/kotex-utf/lucenc.dfu new file mode 100644 index 00000000000..172cc95e93e --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/lucenc.dfu @@ -0,0 +1,155 @@ +%% File `lucenc.dfu` +%% +%% Copyright (C) 2007-2013 Dohyun Kim +%% +%% 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. +%% +\ifdefined\ProvidesFile + \ProvidesFile{lucenc.dfu}[2007/09/05 UTF-8 support for dhucs] +\fi + +%%%%%%%%%%%%%%%%%%%%% +%%% CJK 기호문자 설정 +%%%%%%%%%%%%%%%%%%%%% + +\DeclareUnicodeCharacter{00B7}% · + {\leavevmode\hbox to.7em{\hss\textperiodcentered\hss}\postcjksymbol} +\DeclareUnicodeCharacter{2018}% ‘ + {\cjksymbolskip\textquoteleft\postcjksymnobreak} +\DeclareUnicodeCharacter{2019}% ’ + {\cjksymbolunskip\kernbeforelatinquoteclose\textquoteright\postcjksymskip} +\DeclareUnicodeCharacter{201C}% “ + {\cjksymbolskip\textquotedblleft\postcjksymnobreak} +\DeclareUnicodeCharacter{201D}% ” + {\cjksymbolunskip\kernbeforelatinquoteclose\textquotedblright\postcjksymskip} +\DeclareUnicodeCharacter{3001}% 、 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3001}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3002}% 。 + {\cjksymbolunskip\hbox to.6em{\unihangulchar{"3002}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3008}% 〈 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3008}}\postcjksymnobreak} +\DeclareUnicodeCharacter{3009}% 〉 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3009}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{300A}% 《 + {\cjksymbolskip\hbox to.7em{\hss\unihangulchar{"300A}}\postcjksymnobreak} +\DeclareUnicodeCharacter{300B}% 》 + {\cjksymbolunskip\hbox to.7em{\unihangulchar{"300B}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{300C}% 「 + {\cjksymbolskip\hbox to.6em{\hss\unihangulchar{"300C}}\postcjksymnobreak} +\DeclareUnicodeCharacter{300D}% 」 + {\cjksymbolunskip\hbox to.6em{\unihangulchar{"300D}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{300E}% 『 + {\cjksymbolskip\hbox to.6em{\hss\unihangulchar{"300E}}\postcjksymnobreak} +\DeclareUnicodeCharacter{300F}% 』 + {\cjksymbolunskip\hbox to.6em{\unihangulchar{"300F}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3010}% 【 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3010}}\postcjksymnobreak} +\DeclareUnicodeCharacter{3011}% 】 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3011}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3014}% 〔 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3014}}\postcjksymnobreak} +\DeclareUnicodeCharacter{3015}% 〕 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3015}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3016}% 〖 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3016}}\postcjksymnobreak} +\DeclareUnicodeCharacter{3017}% 〗 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3017}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{3018}% 〘 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"3018}}\postcjksymnobreak} +\DeclareUnicodeCharacter{3019}% 〙 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"3019}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{301A}% 〚 + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"301A}}\postcjksymnobreak} +\DeclareUnicodeCharacter{301B}% 〛 + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"301B}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF01}% ! + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF01}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF08}% ( + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"FF08}}\postcjksymnobreak} +\DeclareUnicodeCharacter{FF09}% ) + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF09}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF0C}% , + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF0C}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF0E}% . + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF0E}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF1A}% : + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF1A}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF1B}% ; + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF1B}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF1C}% < + {\cjksymbolskip\hbox to 1em{\hss\unihangulchar{"FF1C}}\postcjksymnobreak} +\DeclareUnicodeCharacter{FF1D}% = + {\leavevmode\hbox to.9em{\hss\unihangulchar{"FF1D}\hss}\postcjksymbol} +\DeclareUnicodeCharacter{FF1E}% > + {\cjksymbolunskip\hbox to 1em{\unihangulchar{"FF1E}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF1F}% ? + {\cjksymbolunskip\hbox to.667em{\hss\unihangulchar{"FF1F}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF3B}% [ + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"FF3B}}\postcjksymnobreak} +\DeclareUnicodeCharacter{FF3D}% ] + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF3D}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF5B}% { + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"FF5B}}\postcjksymnobreak} +\DeclareUnicodeCharacter{FF5D}% } + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF5D}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF61}% 。 HALFWIDTH IDEOGRAPHIC FULL STOP + {\cjksymbolunskip\hbox to.5em{\hss\unihangulchar{"FF61}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF62}% 「 HALFWIDTH LEFT CORNER BRACKET + {\cjksymbolskip\hbox to.5em{\hss\unihangulchar{"FF62}}\postcjksymnobreak} +\DeclareUnicodeCharacter{FF63}% 」 HALFWIDTH RIGHT CORNER BRACKET + {\cjksymbolunskip\hbox to.5em{\unihangulchar{"FF63}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF64}% 、 HALFWIDTH IDEOGRAPHIC COMMA + {\leavevmode\hbox to.5em{\hss\unihangulchar{"FF64}\hss}\postcjksymskip} +\DeclareUnicodeCharacter{FF65}% ・ HALFWIDTH KATAKANA MIDDLE DOT + {\leavevmode\hbox to.9em{\hss\unihangulchar{"FF65}\hss}\postcjksymbol} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% CJK 문자 다음에 오는 ASCII 문자의 카테고리 설정 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\expandafter\gdef\csname nexttohangul-1\endcsname{% + % ascii opening parentheses. + % 직전에 \breakbeforeasciichar (줄바꿈 허용하는 공백) 삽입. + ([`% +} + +\expandafter\gdef\csname nexttotrivcj-1\endcsname{% + % trivcj 환경에서의 ascii opening parentheses + ([`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz% +} + +\expandafter\gdef\csname nexttohangul-2\endcsname{% + % ascii closing parentheses. + % 직전에 아무 것도 삽입하지 않음. spacefactor조차도! + )]'% +} + +\expandafter\gdef\csname nexttohangul-3\endcsname{% + % ascii numbers. + % 직전에 \kernbeforeasciichars (줄바꿈 없는 공백) 삽입. + 1234567890:;/% +} + +\expandafter\gdef\csname nexttohangul-4\endcsname{% + % ascii fullstop. + .% +} + +\expandafter\gdef\csname nexttohangul-5\endcsname{% + % ascii question mark. + ?% +} + +\expandafter\gdef\csname nexttohangul-6\endcsname{% + % ascii exclamation mark. + !% +} + +\endinput + diff --git a/Master/texmf-dist/tex/latex/kotex-utf/lucuhcmj.fd b/Master/texmf-dist/tex/latex/kotex-utf/lucuhcmj.fd new file mode 100644 index 00000000000..091d8c9ce1b --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/lucuhcmj.fd @@ -0,0 +1,18 @@ +%% File `lucuhcmj.fd` +%% +%% Copyright (c) 2013 Kangsoo Kim +%% +%% 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. +%% +\ProvidesFile{lucuhcmj.fd}[2013/09/26 UHC Myeongjo font definitions] +\DeclareFontFamily{LUC}{uhcmj}{\hyphenchar\font\m@ne} +\DeclareFontShape {LUC}{uhcmj}{m}{n}{<-> LUC * uwmj}{} +\DeclareFontShape {LUC}{uhcmj}{m}{sl}{<-> LUC * uwmjo}{} +\DeclareFontShape {LUC}{uhcmj}{m}{it}{<-> LUCssub * uhcmj/m/sl}{} +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.4ht b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.4ht new file mode 100644 index 00000000000..650184fa844 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.4ht @@ -0,0 +1,22 @@ +%% File `dhucs.4ht` +%% +%% Copyright (c) 2007-2013 Kangsoo Kim +%% +%% 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. +%% +\protected\def\unihangulchar#1{\futurelet\dhucs@next\unihangulchar@#1\@nil} +\def\unihangulchar@{% + \ifx\dhucs@next"\expandafter\hex@unihangulchar + \else\expandafter\digit@unihangulchar + \fi} +\def\digit@unihangulchar#1\@nil{\HCode{&\##1;}} +\def\hex@unihangulchar"#1\@nil{\HCode{&\#x#1;}} + +\DeclareUnicodeCharacter{00B7}{~\unihangulchar{"00B7}~} + diff --git a/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.cfg b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.cfg new file mode 100644 index 00000000000..8c8f57f282a --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/dhucs.cfg @@ -0,0 +1,40 @@ +%% File `dhucs.cfg` +%% +%% Copyright (c) 2007-2013 Kangsoo Kim +%% +%% 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. +%% +\Preamble{xhtml} +\Configure{charset}{charset=utf-8} +\Configure{@TITLE}{\protected\def\unihangulchar##1{\special{t4ht=&\###1;}}} +\Configure{@BODY}{\NoFonts} +\Configure{@/BODY}{\EndNoFonts} + +\begin{document} +\CssFile + /* css.sty */ +body { + line-height: 150%; +} +.verbatim { + font-family: monospace; + white-space: nowrap; + text-align: left; + line-height: 100%; +} +.quote { + margin-bottom: 0.25em; + margin-top: 0.25em; + margin-left: 3em; + margin-right:3em; + text-align:justify; +} +\EndCssFile +\EndPreamble + diff --git a/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/kosections-utf.4ht b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/kosections-utf.4ht new file mode 100644 index 00000000000..c26be1caf93 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/tex4ht/kosections-utf.4ht @@ -0,0 +1,131 @@ +%% File `kosections-utf.4ht` +%% +%% Copyright (c) 2007-2013 Kangsoo Kim +%% +%% 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. +%% +\def\dhucs@seccntformat#1#2{} + +\@ifclassloaded{book}{ +\Configure{part} + {\HCode{
}} + {\HCode{
}} + {\HCode{

}% + \pre@partcnt\thepart\post@partcnt\HCode{
}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{chapter} + {\HCode{
}} + {\HCode{
}} + {\HCode{

}% + \pre@chaptercnt\thechapter\post@chaptercnt\HCode{
}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{section} + {} + {} + {\HCode{

}% + \HCode{}% + \pre@sectioncnt\thesection\post@sectioncnt~~% + \HCode{}\HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsection} + {} + {} + {\HCode{

}% + \HCode{}% + \thesubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsubsection} + {} + {} + {\HCode{
}% + \HCode{}% + \thesubsubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{
}} +} + +\@ifclassloaded{report}{ +\Configure{part} + {\HCode{
}} + {\HCode{
}} + {\HCode{

}% + \pre@partcnt\thepart\post@partcnt\HCode{
}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{chapter} + {\HCode{
}} + {\HCode{
}} + {\HCode{

}% + \pre@chaptercnt\thechapter\post@chaptercnt\HCode{
}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{section} + {} + {} + {\HCode{

}% + \HCode{}% + \pre@sectioncnt\thesection\post@sectioncnt~~% + \HCode{}\HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsection} + {} + {} + {\HCode{

}% + \HCode{}% + \thesubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsubsection} + {} + {} + {\HCode{
}% + \HCode{}% + \thesubsubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{
}} +} + +\@ifclassloaded{article}{ +\Configure{part} + {\HCode{
}} + {\HCode{
}} + {\HCode{

}% + \pre@partcnt\thepart\post@partcnt\HCode{
}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{section} + {} + {} + {\HCode{

}% + \HCode{}% + \pre@sectioncnt\thesection\post@sectioncnt~~% + \HCode{}\HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsection} + {} + {} + {\HCode{

}% + \HCode{}% + \thesubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{

}} +\Configure{subsubsection} + {} + {} + {\HCode{
}% + \HCode{}% + \thesubsubsection~~\HCode{}% + \HCode{}} + {\HCode{}\HCode{
}} +} + +\endinput -- cgit v1.2.3