diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-26 21:27:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-26 21:27:39 +0000 |
commit | beb8cb93deea67f953fa940eb491b85994a23696 (patch) | |
tree | df912c5f2f25386367dd1239415c25ef0e5887e0 /Master/texmf-dist/tex | |
parent | 4d5de479f15b3829f09a2ea7f95a4dc02f2a173d (diff) |
cjk-ko (25mar13)
git-svn-id: svn://tug.org/texlive/trunk@29516 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty | 134 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty | 388 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty | 62 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty | 96 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/konames-utf.sty | 133 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cjk-ko/kotex.sty | 81 |
6 files changed, 894 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty new file mode 100644 index 00000000000..5f0bfa13b81 --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty @@ -0,0 +1,134 @@ +% $Id: cjkutf8-josa.sty,v 1.1 2013/02/27 06:42:16 nomos Exp $ +% +% Copyright (c) 2013 Dohyun Kim <nomos at ktug or kr> +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program in doc/COPYING; if not, write to the Free +% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +% MA 02110-1301 USA + +\ProvidesPackage{cjkutf8-josa}[2013/02/23 v1.0 Auto-Josa for CJKutf8] + +\AtBeginDocument{ + \ifx\use@josa\undefined\else + % redefine \@setref + \let\CJKKO@orig@setref\@setref + \def\@setref#1#2#3{\CJKKO@orig@setref{#1}{#2}{#3}% + \bgroup + \ifx#1\relax\else + \ifx\protect\relax % not from kotexutf + \let\protect\noexpand % not from kotexutf + \xdef\josa@str{\expandafter#2#1}% + \fi + \fi + \egroup} + % redefine \@cite@ofmt + \let\CJKKO@orig@cite@ofmt\@cite@ofmt + \def\@cite@ofmt#1{\CJKKO@orig@cite@ofmt{#1}% + \bgroup + \let\protect\noexpand % not from kotexutf + \let\@safe@activesfalse\@empty % babel ? + \def\hyper@@link[##1]##2##3##4{##4}% + \def\beamer@sort##1##2{}% + \def\hyperlink##1##2{##2}% for beamer: not from kotexutf + \xdef\josa@str{#1}% + \egroup} + \fi + \@ifpackageloaded{hyperref}{\g@addto@macro\pdfstringdefPreHook{% + \let\jong\relax + \let\rieul\relax + \let\jung\relax + \def\^^ea{^^ea}% + \def\^^eb{^^eb}% + \def\^^ec{^^ec}% + }}{} +} + +\let\josa@str\empty + +%%% user commands: \jong \jung \rieul +\DeclareRobustCommand*\jong {\chardef\@josa\z@} +\DeclareRobustCommand*\rieul{\chardef\@josa\@ne} +\DeclareRobustCommand*\jung {\chardef\@josa\tw@} +\jung + +\def\makejosa#1#2{% + \bgroup + % \jong etc in \josa@str is now unprotected + \def\jong{\chardef\@josa\z@}\def\rieul{\chardef\@josa\@ne}% + \expandafter\make@josa\josa@str\@nil{#1}{#2}% + \egroup} + +\def\make@josa{\afterassignment\make@@josa\let\@let@token= } +\def\make@@josa{% + \ifx\@let@token\@nil + \expandafter\make@@@josa + \else + \ifx\@let@token 1\rieul\else + \ifx\@let@token 3\jong \else + \ifx\@let@token 6\jong \else + \ifx\@let@token 7\rieul\else + \ifx\@let@token 8\rieul\else + \ifx\@let@token 0\jong \else + \ifx\@let@token l\rieul\else + \ifx\@let@token m\jong \else + \ifx\@let@token n\jong \else + \ifx\@let@token L\rieul\else + \ifx\@let@token M\jong \else + \ifx\@let@token N\jong \else + \ifx\@let@token\jong \jong\else + \ifx\@let@token\rieul\rieul + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \expandafter\make@josa + \fi} + +\def\make@@@josa#1#2{% + \ifcase\@josa #2% jong + \or \ifx\empty#1\empty\else#2\fi % rieul + \else #1% jung + \fi} + +\def\error@josa{\PackageError{cjkutf8-josa}{Undefined Control Sequence}{}} + +\DeclareRobustCommand*\^^ea[2]{% + \ifx#1^^b0\ifx#2^^80\makejosa{가}{이}\else\error@josa\fi % \가 + \else\ifx#1^^b3\ifx#2^^bc\makejosa{와}{과}\else\error@josa\fi % \과 + \else\error@josa\fi\fi} +\DeclareRobustCommand*\^^eb[2]{% + \ifx#1^^8a\ifx#2^^94\makejosa{는}{은}\else\error@josa\fi % \는 + \else\ifx#1^^9d\ifx#2^^bc\makejosa{라}{이라}\else\error@josa\fi % \라 + \else\ifx#1^^a1\ifx#2^^9c\makejosa{}{으}로\else\error@josa\fi % \로 + \else\ifx#1^^a5\ifx#2^^bc\makejosa{를}{을}\else\error@josa\fi % \를 + \else\error@josa\fi\fi\fi\fi} +\DeclareRobustCommand*\^^ec[2]{% + \let\reserved@a#1\let\reserved@b#2% + \futurelet\@let@token\@josa@begin@ec} +\def\@josa@begin@ec{% + \ifx\reserved@a^^99% + \ifx\reserved@b^^80\makejosa{와}{과}\else\error@josa\fi % \와 + \else\ifx\reserved@a^^9c% + \ifx\reserved@b^^bc\makejosa{}{으}\else\error@josa\fi % \으로 + \else\ifx\reserved@a^^9d% + \ifx\reserved@b^^80\makejosa{는}{은}% \은 + \else\ifx\reserved@b^^84\makejosa{를}{을}% \을 + \else\ifx\reserved@b^^b4% + \ifx\@let@token^^ea\makejosa\relax{이}% \이라 + \else\ifx\@let@token^^eb\makejosa\relax{이}% \이라 + \else\ifx\@let@token^^ec\makejosa\relax{이}% \이라 + \else\ifx\@let@token^^ed\makejosa\relax{이}% \이라 + \else\makejosa{가}{이}% \이 + \fi\fi\fi\fi + \else\error@josa \fi\fi\fi + \else\error@josa \fi\fi\fi} + +\endinput diff --git a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty new file mode 100644 index 00000000000..083df4a284a --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty @@ -0,0 +1,388 @@ +% $Id: cjkutf8-ko.sty,v 1.14 2013/03/07 04:53:32 nomos Exp $ +% +% Copyright (c) 2013 Dohyun Kim <nomos at ktug or kr> +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program in doc/COPYING; if not, write to the Free +% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +% MA 02110-1301 USA + +\ProvidesPackage{cjkutf8-ko}[2013/02/23 v1.0 Hangul typesetting on CJKutf8] + +\ifx\eTeXversion\relax \let\eTeXversion\undefined \fi +\newif\if@hangul +\newif\if@hanja +\let\use@josa\empty + +\DeclareOption{hangul}{\@hangultrue} +\DeclareOption{hanja}{\@hanjatrue\@hangultrue} +\DeclareOption{usecjkt1font}{\let\usecjk@@font\empty\@hangultrue} +\DeclareOption{usedotemph}{\let\usedot@mph\empty} +\DeclareOption{nojosa}{\let\use@josa\undefined} +\ProcessOptions\relax + +%%%%%%%%%%%%%%%%%%%%%%%%% +% font settings +\ifx\usecjk@@font\undefined\else + \RequirePackage[T1]{fontenc} + \RequirePackage{textcomp} + \def\rmdefault{nanummj} + \def\sfdefault{nanumgt} + \ifx\eTeXversion\undefined % TW T1 is broken + \g@addto@macro\ttfamily{\fontencoding{OT1}\selectfont} + \fi +\fi + +\RequirePackage{CJKutf8} + +\g@addto@macro\rmfamily{\CJKfamily{nanummj}} +\g@addto@macro\sffamily{\CJKfamily{nanumgt}} +\g@addto@macro\ttfamily{\CJKfamily{nanumgt}} + +\AtBeginDocument{ + \edef\reserved@a{\familydefault} + \edef\reserved@b{\rmdefault} + \ifx\reserved@a\reserved@b + \CJKfamily{nanummj} + \g@addto@macro\normalfont{\CJKfamily{nanummj}} + \if@hangul\ifx\usecjk@@font\undefined + \CJKKO@hangulspaceglue{t1nanummjm}% get space glue from hangul font + \fi\fi + \else + \CJKfamily{nanumgt} + \g@addto@macro\normalfont{\CJKfamily{nanumgt}} + \if@hangul\ifx\usecjk@@font\undefined + \CJKKO@hangulspaceglue{t1nanumgtm}% get space glue from hangul font + \fi\fi + \fi + \let\reset@font\normalfont +} + +\def\CJKKO@hangulspaceglue#1{% + \bgroup + \@for\reserved@a:=,\small,\footnotesize,\large,\Large,\LARGE\do{% + \reserved@a + \font\x=#1 at \f@size\p@ + \fontdimen2\font=\fontdimen2\x + \fontdimen3\font=.5\fontdimen2\x + \fontdimen4\font=.3333\fontdimen2\x + \fontdimen7\font=\fontdimen7\x }% + \egroup } + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% dotemph +% CJKfntef.sty requires e-TeX +\ifx\ifcsname\undefined + \expandafter\let + \csname ifcsname\expandafter\endcsname + \csname iffalse\endcsname +\fi +% Users can redefine \dotemphchar and \dotemphraise +\ifx\usedot@mph\undefined + \def\dotemph{\PackageError{cjkutf8-ko} + {To enable \string\dotemph, package option [usedotemph] is required} + {CJKfntef.sty will be automatically loaded if [usedotemph] option is given}} +\else + % CJKglue should be skip only. seems to do with \LA@CJKglue in CJKulem.sty + \RequirePackage{ulem}[2000/05/26] + \addto@hook\UL@hook{\let\CJKglue\HangulGlue} + \RequirePackage{CJKfntef} + \ifx\usecjk@@font\undefined\normalem\else % currently tex writer T1 is broken + \ifx\eTeXversion\undefined\else\normalem\fi\fi + \def\dotemphraise{0.2em} + \def\dotemphchar{\bfseries\Unicode{"02}{"D9}} + % user command: dotemph + \DeclareRobustCommand*\dotemph{% + \CJKunderanysymbol{-\dotemphraise}{\dotemphchar}} + \AtBeginDocument{ + \@ifpackageloaded{hyperref}{\g@addto@macro\pdfstringdefPreHook{% + \let\dotemph\@firstofone + }}{} + } +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%% +% start CJK env +\def\HangulGlue{\hskip0pt plus.1ex minus.01em } +\def\HangulPenalty{\ifnum\lastpenalty=\z@ \penalty50 \fi} +\def\CJKglue{\HangulPenalty\HangulGlue} +\def\CJKpostmathglue{\HangulPenalty\hskip.25ex plus.1ex minus.05ex } +\CJKspace +\CJK@envStart{}{UTF8}{nanummj} +\makeatletter + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% CJKscale: scale CJK char size +\def\CJKscale#1{% + \ifx\usecjk@@font\undefined + \def\CJK@scale{#1}% + \else + \PackageError{cjkutf8-ko} + {\string\CJKscale\space is not allowed} + {\string\CJKscale\space cannot be used with option [usecjkt1font]} + \fi} +\@onlypreamble\CJKscale +\def\cancelCJKscale{\let\CJK@scale\undefined} +\@onlypreamble\cancelCJKscale +\AtBeginDocument{ + \ifx\usecjk@@font\undefined + \ifx\CJK@scale\undefined\else + % redefine \CJK@empty + \def\CJK@empty#1{% + \@tempdimb \f@size\p@ + \@tempdimb\CJK@scale\@tempdimb %%% inserted + \ifx\optional@arg \@empty + \else + \expandafter\ifx + \csname CJK@\mandatory@arg/\f@size/\the\@tempdimb\endcsname \relax + \@tempdimb \optional@arg\@tempdimb + #1{Font\space shape\space `\curr@fontshape'\space + will\space be\MessageBreak + scaled\space to\space size\space \the\@tempdimb}% + \expandafter + \gdef\csname CJK@\mandatory@arg/\f@size/\the\@tempdimb\endcsname{}% + \fi + \fi + \edef\external@font{% + \mandatory@arg\CJK@plane\space at \the\@tempdimb}% + \xdef\font@name{% + \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}% + \expandafter\global\expandafter\let + \csname \CJK@curr@fontshape\expandafter\endcsname + \csname \curr@fontshape\endcsname} + \if@hangul % hangul is main language + % scale space glue + \bgroup + \@for\reserved@a:=,\small,\footnotesize,\large,\Large,\LARGE\do{% + \reserved@a + \fontdimen2\font=\CJK@scale\fontdimen2\font + \fontdimen3\font=\CJK@scale\fontdimen3\font + \fontdimen4\font=\CJK@scale\fontdimen4\font + \fontdimen7\font=\CJK@scale\fontdimen7\font} + \egroup + % scale parindent, footnotesep, footins + \parindent\CJK@scale\parindent + \footnotesep\CJK@scale\footnotesep + \skip\footins=\CJK@scale\skip\footins plus6pt minus3pt + % scale linespread + \@tempdima\baselinestretch\p@ + \@tempdima\CJK@scale\@tempdima + \edef\reserved@a{\strip@pt\@tempdima} + \expandafter\expandafter\expandafter\linespread\expandafter{\reserved@a} + \selectfont + \fi + \fi\fi +} + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% insert CJKglue before opening ascii and letter +\def\CJK@ignorespaces{% + \ifnum\lastkern=\@ne + \spacefactor\@m % was normal cjk, so sf=1000 + \expandafter\expandafter\expandafter\CJKKO@check@next@tok + \fi} +\def\CJKKO@check@next@tok{\futurelet\@let@token\CJKKO@check@next@tok@} +\def\CJKKO@check@next@tok@{% + \ifx\@let@token(\CJKglue\else + \ifx\@let@token`\CJKglue\else + \ifx\@let@token[\CJKglue\else + \ifx\@let@token<\CJKglue\else + \ifx\@let@token\{\CJKglue\else + \ifcat\noexpand\@let@token\CJKKO@catcodeXI + \CJKglue + \fi\fi\fi\fi\fi\fi} + +\begingroup + \catcode`\A=11 \global\let\CJKKO@catcodeXI=A +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% allow break after ascii (except opening) and before cjk +%%% not a good solution. but... +\sfcode16=998 % t1 `` +\sfcode40=998 % ( +\sfcode60=998 % < +\sfcode91=998 % [ +\sfcode92=998 % ot1 `` +\sfcode96=998 % ` +\sfcode102=998 % oms { +\sfcode123=998 % t1 { +\ifx\eTeXversion\undefined + \def\CJK@testLastCJK{% + \global\CJK@false + \ifnum\lastkern=\@ne + \global \CJK@true + %%% inserted + \else + \ifhmode + \ifnum\lastkern=\tw@\else + \ifnum\lastskip=\z@ % last node is not space (?) + \ifnum\lastpenalty=\z@ % last node is not penalty (?) + \ifnum\spacefactor=998 \else % last char is not opening ascii + \ifx\CJK@plane\undefined\else + \CJK@testPostPunct{\CJK@@@enc}{\CJK@plane}{\CJK@gtemp}% + \fi + \ifCJK@ \global\CJK@false + \else \CJKglue % this char is not closing cjk + \fi + \fi\fi\fi\fi\fi + %%% end of inserted + \fi} +\else + \def\CJK@testLastCJK{% + \global\CJK@false + \ifnum\lastkern=\@ne + \global \CJK@true + %%% inserted + \else + \ifhmode + \ifnum\lastkern=\tw@\else + \ifnum\lastskip=\z@ % last node is not space (?) + \ifnum\lastpenalty=\z@ % last node is not penalty (?) + \ifnum\spacefactor=998 \else % last char is not opening ascii + \ifx\CJK@plane\undefined\else + \CJK@testPostPunct{\CJK@@@enc}{\CJK@plane}{\CJK@gtemp}% + \fi + \ifCJK@ + \global\CJK@false + \else % this char is not closing cjk + \ifnum\lastnodetype=10 \CJKpostmathglue % after math-off + \else \CJKglue + \fi + \fi + \fi\fi\fi\fi\fi + %%% end of inserted + \fi} +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%% +% half-width puncts +\def\CJKKO@XXX@plane{30} +\def\CJKKO@FF@plane{ff} +\DeclareRobustCommand\CJKpunctsymbol[1]{% + \ifx\CJK@plane\CJKKO@XXX@plane + \ifcase#1\CJKsymbol{#1}% 3000 + \or \CJKKO@normal@punct{#1}% 3001 + \or \CJKKO@normal@punct{#1}% 3002 + \or \CJKsymbol{#1}% 3003 + \or \CJKsymbol{#1}% 3004 + \or \CJKsymbol{#1}% 3005 + \or \CJKsymbol{#1}% 3006 + \or \CJKsymbol{#1}% 3007 + \or \CJKKO@opening@punct{#1}% 3008 + \or \CJKKO@normal@punct{#1}% 3009 + \or \CJKKO@opening@punct{#1}% 300A + \or \CJKKO@normal@punct{#1}% 300B + \or \CJKKO@opening@punct{#1}% 300C + \or \CJKKO@normal@punct{#1}% 300D + \or \CJKKO@opening@punct{#1}% 300E + \or \CJKKO@normal@punct{#1}% 300F + \or \CJKKO@opening@punct{#1}% 3010 + \or \CJKKO@normal@punct{#1}% 3011 + \or \CJKsymbol{#1}% 3012 + \or \CJKsymbol{#1}% 3013 + \or \CJKKO@opening@punct{#1}% 3014 + \or \CJKKO@normal@punct{#1}% 3015 + \or \CJKKO@opening@punct{#1}% 3016 + \or \CJKKO@normal@punct{#1}% 3017 + \or \CJKKO@opening@punct{#1}% 3018 + \or \CJKKO@normal@punct{#1}% 3019 + \or \CJKKO@opening@punct{#1}% 301A + \or \CJKKO@normal@punct{#1}% 301B + \else \CJKsymbol{#1}% + \fi + \else + \ifx\CJK@plane\CJKKO@FF@plane + \ifnum#1="08 \CJKKO@opening@punct{#1}% FF08 + \else\ifnum#1="09 \CJKKO@normal@punct{#1}% FF09 + \else \CJKsymbol{#1}% + \fi\fi + \else + \CJKsymbol{#1}% + \fi + \fi} +\def\CJKKO@opening@punct#1{\leavevmode\hbox to.5em{\hss\CJKsymbol{#1}}} +\def\CJKKO@normal@punct#1{\leavevmode\hbox to.5em{\CJKsymbol{#1}\hss}} +\DeclareUnicodeCharacter{00B7} + {\leavevmode\kern.25em \Unicode{0}{"B7}\hskip.25em\relax} + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% lowercjkchar: eg, \lowercjkchar{-0.1em} +%%% do NOT use unit ex; hangul subfonts may not have x-height +\def\lowercjkchar#1{% + \ifx\usecjk@@font\undefined + \def\CJK@charlower{#1}% + \else + \PackageError{cjkutf8-ko} + {\string\lowercjkchar\space is not allowed} + {\string\lowercjkchar\space cannot be used with option [usecjkt1font]} + \fi} +\let\lowerCJKchar\lowercjkchar +\@onlypreamble\lowercjkchar \@onlypreamble\lowerCJKchar +\def\cancellowercjkchar{\let\CJK@charlower\undefined} +\let\cancellowerCJKchar\cancellowercjkchar +\@onlypreamble\cancellowercjkchar \@onlypreamble\cancellowerCJKchar +\AtBeginDocument{ + \ifx\usecjk@@font\undefined + \ifx\CJK@charlower\undefined\else + \DeclareRobustCommand{\CJKsymbol}[1]{% + \leavevmode\lower\CJK@charlower\hbox{% inserted + \symbol{#1}% + \ifCJK@bold@ + \hbox to \CJKboldshift{\hss\symbol{#1}}% + \hbox to \CJKboldshift{\hss\symbol{#1}}% + \fi + }% inserted + } + \fi\fi +} + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% nanummj has no hanja : texlive only +\ifx\eTeXversion\undefined\else + \RequirePackage{cjkutf8-nanummjhanja} +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% auto-josa, light version +\RequirePackage{cjkutf8-josa} + +%%%%%%%%%%%%%%%%%%%%%%%%% +% hangul captions, labels, and spacing +\RequirePackage{kolabels-utf} +\if@hangul + \RequirePackage{konames-utf} + \ifx\eTeXversion\undefined \mathsurround=0.25ex \fi + \linespread{1.3888} + \footnotesep=1.3888\footnotesep + \skip\footins=1.3888\skip\footins plus6pt minus3pt + \frenchspacing +\fi + +%\ifx\usecjk@@font\undefined +% \CJKscale{0.95} +% \lowercjkchar{-0.07em} +%\fi + +%%%%%%%%%%%%%%%%%%%%%%%%% +%%% disable cmap by CJK, which sometimes behaves insalely +%%% instead try to use pdftex's pdfgentounicode +\ifpdf + \let\CJK@addcmap\@gobble + \ifx\pdfgentounicode\undefined\else + \pdfgentounicode=1 + \input glyphtounicode + \fi +\fi + +\endinput diff --git a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty new file mode 100644 index 00000000000..04f007c1bc7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty @@ -0,0 +1,62 @@ +% $Id: cjkutf8-nanummjhanja.sty,v 1.1 2013/02/27 06:42:16 nomos Exp $ +% +% Copyright (c) 2013 Dohyun Kim <nomos at ktug or kr> +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program in doc/COPYING; if not, write to the Free +% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +% MA 02110-1301 USA + +\ProvidesPackage{cjkutf8-nanummjhanja} + [2013/02/23 v1.0 UHC hanja for Nanum Myeongjo] + +\def\CJKKO@mjfamily{nanummj} +\def\CJKKO@mjhanjafamily{\def\CJK@family{uhcmj}} + +% redefine CJK@numbToHex +\def\CJK@numbToHex#1#2{% + {\count\z@ #2\relax + \count\tw@ \count\z@ + \divide\count\z@ \sixt@@n + \count@ \count\z@ + \multiply\count@ \sixt@@n + \advance\count\tw@ -\count@ + \xdef#1{% + \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}}% + % inserted + \ifx\CJK@family\CJKKO@mjfamily + \expandafter\CJKKO@checkhanjaplane#1\fi} + +\def\CJKKO@checkhanjaplane#1#2{% + \begingroup + \count@\ifx#1A10\else + \ifx#1B11\else + \ifx#1C12\else + \ifx#1D13\else + \ifx#1E14\else + \ifx#1F15\else + #1\fi\fi\fi\fi\fi\fi + \@tempcnta\ifx#2A10\else + \ifx#2B11\else + \ifx#2C12\else + \ifx#2D13\else + \ifx#2E14\else + \ifx#2F15\else + #2\fi\fi\fi\fi\fi\fi + \multiply\count@\sixt@@n \advance\count@\@tempcnta + \ifnum\count@>"4D \ifnum\count@<"A0 \aftergroup\CJKKO@mjhanjafamily \else + \ifnum\count@>"F8 \ifnum\count@<"FB \aftergroup\CJKKO@mjhanjafamily + \fi\fi\fi\fi + \endgroup } + +\endinput diff --git a/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty b/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty new file mode 100644 index 00000000000..197a631e13e --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty @@ -0,0 +1,96 @@ +% This is file `kolabels-utf.sty' +% +% Copyright (C) 2009-2013 Koaunghi Un <koaunghi@kornet.net> +% Dohyun Kim <nomos@ktug.or.kr> +% Kangsoo Kim <karnes@ktug.or.kr> +% +% 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{kolabels-utf}[2013/02/23 v1.0 UTF-8 Hangul item labels] + +% hangul item labels +\newcommand*\jaso[1]{\@jaso{\@nameuse{c@#1}}} +\newcommand*\@jaso[1]{\ifcase#1\or + ㄱ\or ㄴ\or ㄷ\or ㄹ\or ㅁ\or ㅂ\or ㅅ\or ㅇ\or + ㅈ\or ㅊ\or ㅋ\or ㅌ\or ㅍ\or ㅎ\else\@ctrerr\fi} +\newcommand*\gana[1]{\@gana{\@nameuse{c@#1}}} +\newcommand*\@gana[1]{\ifcase#1\or + 가\or 나\or 다\or 라\or 마\or 바\or 사\or 아\or + 자\or 차\or 카\or 타\or 파\or 하\else\@ctrerr\fi} +\newcommand*\ojaso[1]{\@ojaso{\@nameuse{c@#1}}} +\newcommand*\@ojaso[1]{\ifcase#1\or + ㉠\or ㉡\or ㉢\or ㉣\or ㉤\or ㉥\or ㉦\or ㉧\or + ㉨\or ㉩\or ㉪\or ㉫\or ㉬\or ㉭\else\@ctrerr\fi} +\newcommand*\ogana[1]{\@ogana{\@nameuse{c@#1}}} +\newcommand*\@ogana[1]{\ifcase#1\or + ㉮\or ㉯\or ㉰\or ㉱\or ㉲\or ㉳\or ㉴\or ㉵\or + ㉶\or ㉷\or ㉸\or ㉹\or ㉺\or ㉻\else\@ctrerr\fi} +\newcommand*\pjaso[1]{\@pjaso{\@nameuse{c@#1}}} +\newcommand*\@pjaso[1]{\ifcase#1\or + ㈀\or ㈁\or ㈂\or ㈃\or ㈄\or ㈅\or ㈆\or ㈇\or + ㈈\or ㈉\or ㈊\or ㈋\or ㈌\or ㈍\else\@ctrerr\fi} +\newcommand*\pgana[1]{\@pgana{\@nameuse{c@#1}}} +\newcommand*\@pgana[1]{\ifcase#1\or + ㈎\or ㈏\or ㈐\or ㈑\or ㈒\or ㈓\or ㈔\or ㈕\or + ㈖\or ㈗\or ㈘\or ㈙\or ㈚\or ㈛\else\@ctrerr\fi} +\newcommand*\onum[1]{\@onum{\@nameuse{c@#1}}} +\newcommand*\@onum[1]{\ifcase#1\or + ①\or ②\or ③\or ④\or ⑤\or ⑥\or ⑦\or ⑧\or + ⑨\or ⑩\or ⑪\or ⑫\or ⑬\or ⑭\or ⑮\else\@ctrerr\fi} +\newcommand*\pnum[1]{\@pnum{\@nameuse{c@#1}}} +\newcommand*\@pnum[1]{\ifcase#1\or + ⑴\or ⑵\or ⑶\or ⑷\or ⑸\or ⑹\or ⑺\or ⑻\or + ⑼\or ⑽\or ⑾\or ⑿\or ⒀\or ⒁\or ⒂\else\@ctrerr\fi} +\newcommand*\oeng[1]{\@oeng{\@nameuse{c@#1}}} +\newcommand*\@oeng[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 ⓧ\or ⓨ\or ⓩ\else\@ctrerr\fi} +\newcommand*\peng[1]{\@peng{\@nameuse{c@#1}}} +\newcommand*\@peng[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 ⒳\or ⒴\or ⒵\else\@ctrerr\fi} +\newcommand*\hnum[1]{\@hnum{\@nameuse{c@#1}}} +\newcommand*\@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} +\newcommand*\Hnum[1]{\@Hnum{\@nameuse{c@#1}}} +\newcommand*\@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 째} +\newcommand*\hroman[1]{\@hroman{\@nameuse{c@#1}}} +\newcommand*\@hroman[1]{\ifcase#1\or + ⅰ\or ⅱ\or ⅲ\or ⅳ\or ⅴ\or ⅵ\or ⅶ\or ⅷ\or + ⅸ\or ⅹ\or ⅺ\or ⅻ\else\@ctrerr\fi} +\newcommand*\hRoman[1]{\@hRoman{\@nameuse{c@#1}}} +\newcommand*\@hRoman[1]{\ifcase#1\or + Ⅰ\or Ⅱ\or Ⅲ\or Ⅳ\or Ⅴ\or Ⅵ\or Ⅶ\or Ⅷ\or + Ⅸ\or Ⅹ\or Ⅺ\or Ⅻ\else\@ctrerr\fi} + +% from kosections-utf.tex +\def\hNum#1{\@hNum{\@nameuse{c@#1}}} +\def\@hNum#1{\ifcase#1\or 일\or 이\or 삼\or 사\or 오\or 육\or 칠\or + 팔\or 구\or 십\or 십일\or 십이\or 십삼\or 십사\or 십오\or 십육\or + 십칠\or 십팔\or 십구\or 이십\or 이십일\or 이십이\or 이십삼\or + 이십사\else\@ctrerr\fi} +\def\hanjanum#1{\@hanjanum{\@nameuse{c@#1}}} +\def\@hanjanum#1{\ifcase#1\or 一\or 二\or 三\or + 四\or 五\or 六\or 七\or 八\or 九\or 十\or + 十一\or 十二\or 十三\or 十四\or 十五\or + 十六\or 十七\or 十八\or 十九\or 二十\or + 二十一\or 二十二\or 二十三\or 二十四\else\@ctrerr\fi} + +\endinput diff --git a/Master/texmf-dist/tex/latex/cjk-ko/konames-utf.sty b/Master/texmf-dist/tex/latex/cjk-ko/konames-utf.sty new file mode 100644 index 00000000000..abb0444083a --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/konames-utf.sty @@ -0,0 +1,133 @@ +% file `konames-utf.sty` +% +% Copyright (C) 2007-2013 Koaunghi Un <koaunghi@kornet.net> +% Dohyun Kim <nomos@ktug.or.kr> +% Kangsoo Kim <karnes@ktug.or.kr> +% +% 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{konames-utf}[2013/02/23 v1.0 UTF-8 Hangul captions] + +\if@hanja + \def\today{\number\year 年 \number\month 月 \number\day 日} + \def\enclname{同封物} + \def\ccname{寫本}% 사전에서 + \def\headtoname{受信人}% + \def\seename{\을~參考}% + \def\alsoname{\을~參考}% + \def\contentsname{目~次}% + \def\listfigurename{그림~目次}% + \def\listtablename{表~目次}% + \def\refname{參考~文獻}% {參照~書籍} + \def\indexname{索~引} + \def\tablename{表} + \def\abstractname{要~約} + \def\bibname{著書~目錄}% 사전에서 + \def\appendixname{附錄}% 사전에서 + \def\KSTHE{第} + \def\partname{篇} + \def\chaptername{章} + \def\sectionname{節} + \def\colorlayer{幻燈版~色相}% 사전에서 + \def\glossaryname{語~彙}% 사전에서 +\else + \def\today{\number\year 년 \number\month 월 \number\day 일} + \def\enclname{동봉물} + \def\ccname{사본}% + \def\headtoname{받는이}% + \def\seename{\을~참고}% + \def\alsoname{\을~함께~참고}% + \def\contentsname{차~례}% + \def\listfigurename{그림~차례}% + \def\listtablename{표~차례}% + \def\refname{참고~문헌}% + \def\indexname{찾아보기}% 한자는 색~인 + \def\tablename{표} + \def\abstractname{요~약} + \def\bibname{참고~문헌}% 사전에서 + \def\appendixname{부록}% 사전에서 + \def\KSTHE{제}% + \def\partname{편}% 부 + \def\chaptername{장}% + \def\sectionname{절}% 단락 - subsection 소단락 + \def\colorlayer{환등판~색깔}% 사전에서 + \def\glossaryname{용어집}% 사전에서 +\fi +\def\pagename{페이지}% 쪽 +\def\figurename{그림} + +\@ifclassloaded{book}{% + \def\@chapapp#1#2{\KSTHE#1#2#1\chaptername} + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \KSTHE\nobreakspace\thepart\ \partname + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} +}{} + +\@ifclassloaded{report}{% + \def\@chapapp#1#2{\KSTHE#1#2#1\chaptername} + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \KSTHE\nobreakspace\thepart\ \partname + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} + +}{} + +\@ifclassloaded{article}{% + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries \KSTHE\nobreakspace\thepart\ \partname + \par\nobreak + \fi + \huge \bfseries #2% + \markboth{}{}\par}% + \nobreak + \vskip 3ex + \@afterheading} +}{} + +\endinput diff --git a/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty b/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty new file mode 100644 index 00000000000..c990a5b8757 --- /dev/null +++ b/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty @@ -0,0 +1,81 @@ +% $Id: kotex.sty,v 1.3 2013/02/22 10:23:16 nomos Exp $ +% +% (C) Copyright 2007-2013 Koaunghi Un <koaunghi@kornet.net> +% Dohyun Kim <nomos@ktug.or.kr> +% Kangsoo Kim <karnes@ktug.or.kr> +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2006/05/20 or later. +% +% ------------------------------------------------- +% +% main style of ko.TeX +% +% Usage : \usepackage{kotex} \usepackage[hangul]{kotex} +% \usepackage[euc]{kotex} \usepackage[euc,hangul]{kotex} +% \usepackage[cjk]{kotex} \usepackage[cjk,hangul]{kotex} + +\ProvidesPackage{kotex}[2013/02/16 v1.0 Korean TeX (ko.TeX)] + +\newif\if@ko@euc +\let\@ko@cjk\undefined + +\ifx\directlua\relax \let\directlua\undefined \fi +\ifx\eTeXversion\relax \let\eTeXversion\undefined \fi +\ifx\eTeXversion\undefined \let\@ko@cjk\empty \fi + +\DeclareOption{utf}{} +\DeclareOption{euc}{\@ko@euctrue} +\DeclareOption{cjk}{\let\@ko@cjk\empty} +\DeclareOption*{ + \ifx가가% + \ifx\directlua\undefined + \PassOptionsToPackage{\CurrentOption}{xetexko} + \else + \PassOptionsToPackage{\CurrentOption}{luatexko} + \fi + \else + \if@ko@euc + \PassOptionsToPackage{\CurrentOption}{kotex-euc} + \else + \ifx\@ko@cjk\undefined + \PassOptionsToPackage{\CurrentOption}{kotexutf} + \else + \PassOptionsToPackage{\CurrentOption}{cjkutf8-ko} + \fi + \fi + \fi} +\InputIfFileExists{kotex.cfg}{}{} +\ProcessOptions\relax + +%%% compatibility +\if@ko@euc \else + \let\gtfamily\sffamily + \DeclareTextFontCommand{\textgt}{\gtfamily} +\fi + +%%% load one of ko.TeX packages +\ifx가가% + \ifx\directlua\undefined + \RequirePackage{xetexko} + \else + \RequirePackage{luatexko} + \fi +\else + \if@ko@euc + \RequirePackage{kotex-euc} + \else + \ifx\@ko@cjk\undefined + \RequirePackage{kotexutf} + \else + \RequirePackage{cjkutf8-ko} + \fi + \fi +\fi + +\endinput |