summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-06 21:47:04 +0000
committerKarl Berry <karl@freefriends.org>2013-07-06 21:47:04 +0000
commit92df2e9ea55c660a25f0fea16c4e943fae974140 (patch)
treeb622f529ef0e52121a8f37ff0529416124f943a4 /Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
parentc1b826d7ea445481132bbc36bf68b152bf5e1091 (diff)
cjk-ko (6jul13)
git-svn-id: svn://tug.org/texlive/trunk@31119 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty')
-rw-r--r--Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty110
1 files changed, 45 insertions, 65 deletions
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 ea6844c5e99..4aa112bb661 100644
--- a/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
+++ b/Master/texmf-dist/tex/latex/cjk-ko/cjkutf8-ko.sty
@@ -1,4 +1,4 @@
-% $Id: cjkutf8-ko.sty,v 1.14 2013/03/07 04:53:32 nomos Exp $
+% cjkutf8-ko.sty
%
% Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
%
@@ -17,9 +17,15 @@
% 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]
+\ProvidesPackage{cjkutf8-ko}[2013/07/03 v1.2 Hangul typesetting on CJKutf8]
\ifx\eTeXversion\relax \let\eTeXversion\undefined \fi
+\ifx\eTeXversion\undefined
+ \PackageError{cjkutf8-ko}
+ {e-TeX engine is required}
+ {Please update your TeX system to the latest distribution}
+\fi
+
\newif\if@hangul
\newif\if@hanja
\let\use@josa\empty
@@ -38,9 +44,6 @@
\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}
@@ -81,12 +84,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 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}
@@ -97,8 +94,7 @@
\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
+ \normalem % users should declare \ULforem to enable underlining for \emph
\def\dotemphraise{0.2em}
\def\dotemphchar{\bfseries\Unicode{"02}{"D9}}
% user command: dotemph
@@ -217,53 +213,29 @@
\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
+\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}
%%%%%%%%%%%%%%%%%%%%%%%%%
% half-width puncts
@@ -349,9 +321,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% nanummj has no hanja : texlive only
-\ifx\eTeXversion\undefined\else
- \RequirePackage{cjkutf8-nanummjhanja}
-\fi
+\RequirePackage{cjkutf8-nanummjhanja}
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% auto-josa, light version
@@ -361,8 +331,7 @@
% hangul captions, labels, and spacing
\RequirePackage{kolabels-utf}
\if@hangul
- \RequirePackage{konames-utf}
- \ifx\eTeXversion\undefined \mathsurround=0.25ex \fi
+ \AtBeginDocument{\RequirePackage{konames-utf}}
\linespread{1.3888}
\footnotesep=1.3888\footnotesep
\skip\footins=1.3888\skip\footins plus6pt minus3pt
@@ -385,4 +354,15 @@
\fi
\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% \makeindex in memoir class clashed with this package.
+%%% 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
+ }}}
+}{}
+
\endinput