summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjk-ko
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-06 22:13:16 +0000
committerKarl Berry <karl@freefriends.org>2013-12-06 22:13:16 +0000
commit12667237913177a3776303787aaea92ded17cdd0 (patch)
treea4edd3e567825a1ebf504e5faecf89bad027e7c3 /Master/texmf-dist/tex/latex/cjk-ko
parentcfbdc127e742f1a0758482a6e7c5f00985127ff6 (diff)
cjk-ko (6dec13)
git-svn-id: svn://tug.org/texlive/trunk@32342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cjk-ko')
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty25
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty149
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty30
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty4
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/kotex.sty4
5 files changed, 132 insertions, 80 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
index ab84e0daf32..617a3b8589d 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-josa.sty
@@ -17,7 +17,7 @@
% 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]
+\ProvidesPackage{cjkutf8-josa}[2013/12/06 v1.3 Automatic Josa selection for cjk-ko]
\AtBeginDocument{
\ifx\use@josa\undefined\else
@@ -26,10 +26,10 @@
\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
+ \ifx\protect\relax % not from kotexutf
+ \let\protect\noexpand % not from kotexutf
+ \xdef\josa@str{\expandafter#2#1}%
+ \fi
\fi
\egroup}
% redefine \@cite@ofmt
@@ -54,18 +54,14 @@
}}{}
}
-\let\josa@str\empty
-
%%% user commands: \jong \jung \rieul
-\DeclareRobustCommand*\jong {\chardef\@josa\z@}
-\DeclareRobustCommand*\rieul{\chardef\@josa\@ne}
-\DeclareRobustCommand*\jung {\chardef\@josa\tw@}
+\protected\def\jong {\let\josa@str\empty\chardef\@josa\z@ }
+\protected\def\rieul{\let\josa@str\empty\chardef\@josa\@ne}
+\protected\def\jung {\let\josa@str\empty\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}
@@ -86,8 +82,9 @@
\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
+ \ifx\@let@token\jong \jong \else
+ \ifx\@let@token\rieul\rieul\else
+ \jung
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\expandafter\make@josa
\fi}
diff --git a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
index 4aa112bb661..67f8cef50fd 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
@@ -17,7 +17,7 @@
% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
% MA 02110-1301 USA
-\ProvidesPackage{cjkutf8-ko}[2013/07/03 v1.2 Hangul typesetting on CJKutf8]
+\ProvidesPackage{cjkutf8-ko}[2013/11/28 v1.3 Hangul typesetting on CJKutf8]
\ifx\eTeXversion\relax \let\eTeXversion\undefined \fi
\ifx\eTeXversion\undefined
@@ -35,37 +35,72 @@
\DeclareOption{usecjkt1font}{\let\usecjk@@font\empty\@hangultrue}
\DeclareOption{usedotemph}{\let\usedot@mph\empty}
\DeclareOption{nojosa}{\let\use@josa\undefined}
+\DeclareOption*{\expandafter\CJKKO@userfont@option\CurrentOption=\end}
+\def\CJKKO@userfont@option#1=#2\end{%
+ \ifx\empty#2\empty
+ \PackageError{cjkutf8-ko}{Option not used: #1}{}
+ \else
+ \def\reserved@a{mj}\def\reserved@b{gt}\def\reserved@c{#1}
+ \ifx\reserved@a\reserved@c
+ \edef\CJKKO@mjfont{\CJKKO@removetrailingEQ#2}
+ \IfFileExists{c70\CJKKO@mjfont.fd}{}{%
+ \PackageError{cjkutf8-ko}{`c70\CJKKO@mjfont.fd' does not exist}{}
+ \let\CJKKO@mjfont\undefined
+ }
+ \else
+ \ifx\reserved@b\reserved@c
+ \edef\CJKKO@gtfont{\CJKKO@removetrailingEQ#2}
+ \IfFileExists{c70\CJKKO@gtfont.fd}{}{%
+ \PackageError{cjkutf8-ko}{`c70\CJKKO@gtfont.fd' does not exist}{}
+ \let\CJKKO@gtfont\undefined
+ }
+ \else
+ \PackageError{cjkutf8-ko}
+ {Unknown hangul font type: #1}
+ {Allowed font types are `mj' and `gt'}
+ \fi
+ \fi
+ \fi
+}
+\def\CJKKO@removetrailingEQ#1={#1}
\ProcessOptions\relax
+\ifx\CJKKO@mjfont\undefined \def\CJKKO@mjfont{nanummj}\fi
+\ifx\CJKKO@gtfont\undefined \def\CJKKO@gtfont{nanumgt}\fi
+
%%%%%%%%%%%%%%%%%%%%%%%%%
% font settings
\ifx\usecjk@@font\undefined\else
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
- \def\rmdefault{nanummj}
- \def\sfdefault{nanumgt}
+ \IfFileExists{t1\CJKKO@mjfont.fd}{\let\rmdefault\CJKKO@mjfont}{}
+ \IfFileExists{t1\CJKKO@gtfont.fd}{\let\sfdefault\CJKKO@gtfont}{}
\fi
\RequirePackage{CJKutf8}
-\g@addto@macro\rmfamily{\CJKfamily{nanummj}}
-\g@addto@macro\sffamily{\CJKfamily{nanumgt}}
-\g@addto@macro\ttfamily{\CJKfamily{nanumgt}}
+\g@addto@macro\rmfamily{\CJKfamily{\CJKKO@mjfont}}
+\g@addto@macro\sffamily{\CJKfamily{\CJKKO@gtfont}}
+\g@addto@macro\ttfamily{\CJKfamily{\CJKKO@gtfont}}
\AtBeginDocument{
\edef\reserved@a{\familydefault}
\edef\reserved@b{\rmdefault}
\ifx\reserved@a\reserved@b
- \CJKfamily{nanummj}
- \g@addto@macro\normalfont{\CJKfamily{nanummj}}
+ \CJKfamily{\CJKKO@mjfont}
+ \g@addto@macro\normalfont{\CJKfamily{\CJKKO@mjfont}}
\if@hangul\ifx\usecjk@@font\undefined
- \CJKKO@hangulspaceglue{t1nanummjm}% get space glue from hangul font
+ \IfFileExists{t1\CJKKO@mjfont m}{%
+ \CJKKO@hangulspaceglue{t1\CJKKO@mjfont m}% space glue from hangul font
+ }{}
\fi\fi
\else
- \CJKfamily{nanumgt}
- \g@addto@macro\normalfont{\CJKfamily{nanumgt}}
+ \CJKfamily{\CJKKO@gtfont}
+ \g@addto@macro\normalfont{\CJKfamily{\CJKKO@gtfont}}
\if@hangul\ifx\usecjk@@font\undefined
- \CJKKO@hangulspaceglue{t1nanumgtm}% get space glue from hangul font
+ \IfFileExists{t1\CJKKO@gtfont m}{%
+ \CJKKO@hangulspaceglue{t1\CJKKO@gtfont m}% space glue from hangul font
+ }{}
\fi\fi
\fi
\let\reset@font\normalfont
@@ -102,7 +137,7 @@
\CJKunderanysymbol{-\dotemphraise}{\dotemphchar}}
\AtBeginDocument{
\@ifpackageloaded{hyperref}{\g@addto@macro\pdfstringdefPreHook{%
- \let\dotemph\@firstofone
+ \let\dotemph\@firstofone
}}{}
}
\fi
@@ -114,10 +149,29 @@
\def\CJKglue{\HangulPenalty\HangulGlue}
\def\CJKpostmathglue{\HangulPenalty\hskip.25ex plus.1ex minus.05ex }
\CJKspace
-\CJK@envStart{}{UTF8}{nanummj}
+\CJK@envStart{}{UTF8}{\CJKKO@mjfont}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%
+% italic correction after cjk
+\edef\maybe@ic@{%
+ \unexpanded{%
+ \let\CJKKO@wasCJK\undefined
+ \ifnum\lastkern=\@ne
+ \unkern\unkern
+ \let\CJKKO@wasCJK\empty
+ \fi
+ }%
+ \unexpanded\expandafter{\maybe@ic@
+ \ifx\CJKKO@wasCJK\empty
+ \CJK@CJK
+ \CJKKO@check@next@tok@
+ \let\CJKKO@wasCJK\undefined
+ \fi
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
%%% CJKscale: scale CJK char size
\def\CJKscale#1{%
\ifx\usecjk@@font\undefined
@@ -139,32 +193,32 @@
\@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
+ \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}%
+ \mandatory@arg\CJK@plane\space at \the\@tempdimb}%
\xdef\font@name{%
- \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}%
+ \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}%
\expandafter\global\expandafter\let
\csname \CJK@curr@fontshape\expandafter\endcsname
- \csname \curr@fontshape\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}
+ \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
@@ -225,13 +279,13 @@
\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}%
+ \CJK@testPostPunct{\CJK@@@enc}{\CJK@plane}{\CJK@gtemp}%
\fi
\ifCJK@
- \global\CJK@false
+ \global\CJK@false
\else % this char is not closing cjk
- \ifnum\lastnodetype=10 \CJKpostmathglue % after math-off
- \else \CJKglue \fi
+ \ifnum\lastnodetype=10 \CJKpostmathglue % after math-off
+ \else \CJKglue \fi
\fi
\fi\fi\fi\fi\fi
%%% end of inserted
@@ -285,8 +339,10 @@
\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}
+\AtBeginDocument{
+ \DeclareUnicodeCharacter{00B7}
{\leavevmode\kern.25em \Unicode{0}{"B7}\hskip.25em\relax}
+}
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% lowercjkchar: eg, \lowercjkchar{-0.1em}
@@ -309,11 +365,11 @@
\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
+ \symbol{#1}%
+ \ifCJK@bold@
+ \hbox to \CJKboldshift{\hss\symbol{#1}}%
+ \hbox to \CJKboldshift{\hss\symbol{#1}}%
+ \fi
}% inserted
}
\fi\fi
@@ -321,7 +377,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% nanummj has no hanja : texlive only
-\RequirePackage{cjkutf8-nanummjhanja}
+\def\CJKKO@mjdefault{nanummj}
+\ifx\CJKKO@mjfont\CJKKO@mjdefault
+ \RequirePackage{cjkutf8-nanummjhanja}
+\fi
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% auto-josa, light version
@@ -359,10 +418,6 @@
%%% cause: memoir appempts to write index entries to a file
%%% at the end of document without protecting active characters.
%%% spotted by Juho Lee. thanks to him.
-\@ifclassloaded{memoir}{
- \AtEndDocument{\edef\@sanitize{\unexpanded\expandafter{\@sanitize
- \let\protect\string
- }}}
-}{}
+\AtEndDocument{\CJK@makeInactive}
\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
index dd43bd5813c..39cc4217ca5 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-nanummjhanja.sty
@@ -18,9 +18,9 @@
% MA 02110-1301 USA
\ProvidesPackage{cjkutf8-nanummjhanja}
- [2013/02/23 v1.0 UHC hanja for Nanum Myeongjo]
+ [2013/10/07 v1.3 UHC hanja for Nanum Myeongjo]
-\def\CJKKO@mjfamily{nanummj}
+\def\CJKKO@mjdefault{nanummj}
\def\CJKKO@mjhanjafamily{\def\CJK@family{uhcmj}}
% redefine CJK@numbToHex
@@ -34,25 +34,25 @@
\xdef#1{%
\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}}%
% inserted
- \ifx\CJK@family\CJKKO@mjfamily
+ \ifx\CJK@family\CJKKO@mjdefault
\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
+ \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
+ \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
diff --git a/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty b/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty
index df7e215380f..38edfc6c3d7 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/kolabels-utf.sty
@@ -1,8 +1,8 @@
% kolabels-utf.sty
%
% Copyright (C) 2009-2013 Koaunghi Un <koaunghi at kornet net>
-% Kangsoo Kim <karnes at ktug or kr>
-% Dohyun Kim <nomos at ktug org>
+% Kangsoo Kim <karnes at ktug or kr>
+% Dohyun Kim <nomos at ktug org>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty b/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty
index 20d263f811b..f9f190e767e 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/kotex.sty
@@ -45,9 +45,9 @@
\PassOptionsToPackage{\CurrentOption}{kotex-euc}
\else
\ifx\@ko@cjk\undefined
- \PassOptionsToPackage{\CurrentOption}{kotexutf}
+ \PassOptionsToPackage{\CurrentOption}{kotexutf}
\else
- \PassOptionsToPackage{\CurrentOption}{cjkutf8-ko}
+ \PassOptionsToPackage{\CurrentOption}{cjkutf8-ko}
\fi
\fi
\fi}