From cef58753eba8ad7e2071195dbd92454febe82d32 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 27 Jul 2021 03:01:57 +0000 Subject: CTAN sync 202107270301 --- language/korean/cjk-ko/ChangeLog | 7 ++ language/korean/cjk-ko/README | 2 +- language/korean/cjk-ko/cjk-ko-doc.pdf | Bin 173333 -> 173481 bytes language/korean/cjk-ko/cjk-ko-doc.tex | 2 +- language/korean/cjk-ko/cjkutf8-josa.sty | 160 ++++++++++++++++-------- language/korean/cjk-ko/cjkutf8-ko.sty | 2 +- language/korean/cjk-ko/cjkutf8-nanummjhanja.sty | 2 +- 7 files changed, 120 insertions(+), 55 deletions(-) (limited to 'language/korean') diff --git a/language/korean/cjk-ko/ChangeLog b/language/korean/cjk-ko/ChangeLog index 0aaabb5e44..2bea4780c5 100644 --- a/language/korean/cjk-ko/ChangeLog +++ b/language/korean/cjk-ko/ChangeLog @@ -1,3 +1,10 @@ +2021-07-26 Dohyun Kim + + Version 2.2 + + * cjkutf8-josa.sty: partially support josa selection after + biblatex's \cite command + 2021-07-20 Dohyun Kim Version 2.1 diff --git a/language/korean/cjk-ko/README b/language/korean/cjk-ko/README index 4f14c54557..457094f2c4 100644 --- a/language/korean/cjk-ko/README +++ b/language/korean/cjk-ko/README @@ -1,4 +1,4 @@ -CJK-ko package version 2.1 (2021/07/20) +CJK-ko package version 2.2 (2021/07/26) ======================================= This package supports typesetting of modern Korean documents with the help diff --git a/language/korean/cjk-ko/cjk-ko-doc.pdf b/language/korean/cjk-ko/cjk-ko-doc.pdf index 0468e21cc0..7de7a154ec 100644 Binary files a/language/korean/cjk-ko/cjk-ko-doc.pdf and b/language/korean/cjk-ko/cjk-ko-doc.pdf differ diff --git a/language/korean/cjk-ko/cjk-ko-doc.tex b/language/korean/cjk-ko/cjk-ko-doc.tex index dd96f89041..53a10800af 100644 --- a/language/korean/cjk-ko/cjk-ko-doc.tex +++ b/language/korean/cjk-ko/cjk-ko-doc.tex @@ -25,7 +25,7 @@ \title{\cjkko\ 간단 매뉴얼} \author{Dohyun Kim \normalsize $<$\texttt{nomos at ktug org}$>$ \and \normalsize $<$\url{http://github.com/dohyunkim/cjk-ko}$>$} -\date{Version 2.1\quad \today} +\date{Version 2.2\quad \today} \begin{document} \maketitle diff --git a/language/korean/cjk-ko/cjkutf8-josa.sty b/language/korean/cjk-ko/cjkutf8-josa.sty index 4157b470c3..cffa6f4457 100644 --- a/language/korean/cjk-ko/cjkutf8-josa.sty +++ b/language/korean/cjk-ko/cjkutf8-josa.sty @@ -24,25 +24,35 @@ % 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} + \cjkko@prepare@josa@str{\expandafter#2#1}% + \fi } % 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}% + \cjkko@prepare@josa@str{#1}% \egroup} + % partially support biblatex's \cite + \@ifpackageloaded{biblatex}{% + \renewrobustcmd*{\blx@imc@printfield}[2][]{% + \blx@imc@iffieldundef{#2} + {\blx@nounit} + {\blx@getformat\blx@theformat{ffd}{#1}{#2}% + \ifdefvoid\blx@theformat + {\blx@nounit} + {\blx@begunit + \edef\currentfield{#2}% + \expandafter\expandafter + \expandafter\blx@theformat + \expandafter\expandafter + \expandafter{\csname abx@field@#2\endcsname}% + \cjkko@prepare@josa@str{\csname abx@field@#2\endcsname}% + \blx@endunit}}}}{} \fi \@ifpackageloaded{hyperref}{\g@addto@macro\pdfstringdefPreHook{% \let\jong\relax @@ -75,28 +85,44 @@ 0\fi\fi } +\def\cjkko@prepare@josa@str#1{% + \ifx\protect\relax + \begingroup + \let^^ea\cjkko@josa@ea + \let^^eb\cjkko@josa@eb + \let^^ec\cjkko@josa@ec + \let^^ed\cjkko@josa@ed + \let\protect\noexpand + \xdef\josa@str{#1}% + \endgroup + \fi +} + %%% user commands: \jong \jung \rieul \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{% +\def\cjkko@josa@str@end{cjkko@josa@str@end} + +\def\makejosa{% \bgroup - \begingroup - \let^^ea\cjkko@josa@ea - \let^^eb\cjkko@josa@eb - \let^^ec\cjkko@josa@ec - \let^^ed\cjkko@josa@ed - \let\protect\noexpand - \edef\x{\endgroup \def\noexpand\josa@str{\josa@str}}\x - \expandafter\make@josa\josa@str\@nil{#1}{#2}% - \egroup} + \expandafter\make@josa\josa@str\cjkko@josa@str@end + \expandafter\egroup + \expandafter\count@\number\@josa\relax + \jung + \make@@@josa +} + +\begingroup +\catcode`a=11 \global\let\cjkko@cat@letter=a\relax +\catcode`0=12 \global\let\cjkko@cat@other=0\relax +\endgroup \def\make@josa{\afterassignment\make@@josa\let\@let@token= } \def\make@@josa{% - \ifx\@let@token\@nil - \expandafter\make@@@josa + \ifx\@let@token\cjkko@josa@str@end \else \ifx\@let@token 1\rieul\else \ifx\@let@token 3\jong \else @@ -110,50 +136,82 @@ \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\else - \jung - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \ifcat\noexpand\@let@token\cjkko@cat@other \jung\else + \ifcat\noexpand\@let@token\cjkko@cat@letter\jung\else + \ifx\@let@token ^^c2\jung \else + \ifx\@let@token ^^c3\jung \else + \ifx\@let@token\jong \jong\else + \ifx\@let@token\jung \jung\else + \ifx\@let@token\rieul\rieul + \fi\fi\fi\fi\fi \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\make@@@josa{% + \ifcase\count@ + \expandafter\@secondoftwo + \or + \expandafter\make@@@@josa + \else + \expandafter\@firstoftwo + \fi +} +\def\make@@@@josa#1{% + \ifx\empty#1\empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} \def\error@josa{\PackageError{cjkutf8-josa}{Undefined Control Sequence}{}} +\def\makejosa@ga@i{\makejosa{가}{이}} +\def\makejosa@wa@gwa{\makejosa{와}{과}} +\def\makejosa@neun@eun{\makejosa{는}{은}} +\def\makejosa@ra@ira{\makejosa{라}{이라}} +\def\makejosa@empty@eu@ro{\makejosa{}{으}로} +\def\makejosa@reul@eul{\makejosa{를}{을}} +\def\makejosa@empty@eu{\makejosa{}{으}} +\def\makejosa@relax@i{\makejosa\relax{이}} \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} + \ifx#1^^b0\ifx#2^^80\let\do@makejosa\makejosa@ga@i % \가 + \else\let\do@makejosa\error@josa \fi + \else\ifx#1^^b3\ifx#2^^bc\let\do@makejosa\makejosa@wa@gwa % \과 + \else\let\do@makejosa\error@josa \fi + \else\let\do@makejosa\error@josa \fi\fi + \do@makejosa} \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} + \ifx#1^^8a\ifx#2^^94\let\do@makejosa\makejosa@neun@eun % \는 + \else\let\do@makejosa\error@josa \fi + \else\ifx#1^^9d\ifx#2^^bc\let\do@makejosa\makejosa@ra@ira % \라 + \else\let\do@makejosa\error@josa \fi + \else\ifx#1^^a1\ifx#2^^9c\let\do@makejosa\makejosa@empty@eu@ro % \로 + \else\let\do@makejosa\error@josa \fi + \else\ifx#1^^a5\ifx#2^^bc\let\do@makejosa\makejosa@reul@eul % \를 + \else\let\do@makejosa\error@josa \fi + \else\let\do@makejosa\error@josa \fi\fi\fi\fi + \do@makejosa} \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 % \으로 + \ifx\reserved@a^^99\ifx\reserved@b^^80\let\do@makejosa\makejosa@wa@gwa % \와 + \else\let\do@makejosa\error@josa \fi + \else\ifx\reserved@a^^9c\ifx\reserved@b^^bc\let\do@makejosa\makejosa@empty@eu % \으로 + \else\let\do@makejosa\error@josa \fi \else\ifx\reserved@a^^9d% - \ifx\reserved@b^^80\makejosa{는}{은}% \은 - \else\ifx\reserved@b^^84\makejosa{를}{을}% \을 + \ifx\reserved@b^^80\let\do@makejosa\makejosa@neun@eun % \은 + \else\ifx\reserved@b^^84\let\do@makejosa\makejosa@reul@eul % \을 \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{가}{이}% \이 + \ifx\@let@token^^ea\let\do@makejosa\makejosa@relax@i % \이라 + \else\ifx\@let@token^^eb\let\do@makejosa\makejosa@relax@i % \이라 + \else\ifx\@let@token^^ec\let\do@makejosa\makejosa@relax@i % \이라 + \else\ifx\@let@token^^ed\let\do@makejosa\makejosa@relax@i % \이라 + \else\let\do@makejosa\makejosa@ga@i % \이 \fi\fi\fi\fi - \else\error@josa \fi\fi\fi - \else\error@josa \fi\fi\fi} + \else\let\do@makejosa\error@josa \fi\fi\fi + \else\let\do@makejosa\error@josa \fi\fi\fi + \do@makejosa} \endinput diff --git a/language/korean/cjk-ko/cjkutf8-ko.sty b/language/korean/cjk-ko/cjkutf8-ko.sty index 63b20d9d3c..4b8f167b9c 100644 --- a/language/korean/cjk-ko/cjkutf8-ko.sty +++ b/language/korean/cjk-ko/cjkutf8-ko.sty @@ -18,7 +18,7 @@ % MA 02110-1301 USA \NeedsTeXFormat{LaTeX2e}[2021/06/01] -\ProvidesPackage{cjkutf8-ko}[2021/07/20 v2.1 Hangul typesetting on CJKutf8] +\ProvidesPackage{cjkutf8-ko}[2021/07/26 v2.2 Hangul typesetting on CJKutf8] \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname eTeXversion\endcsname\relax diff --git a/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty b/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty index 40fc2c1552..68b763eea5 100644 --- a/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty +++ b/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty @@ -18,7 +18,7 @@ % MA 02110-1301 USA \ProvidesPackage{cjkutf8-nanummjhanja} - [2021/07/20 v2.1 UHC hanja for Nanum Myeongjo] + [2021/07/26 v2.2 UHC hanja for Nanum Myeongjo] \def\CJKKO@mjdefault{nanummj} \def\CJKKO@mjhanjafamily{\def\CJK@family{uhcmj}} -- cgit v1.2.3