diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-22 20:52:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-22 20:52:19 +0000 |
commit | 791bcbf86c96835f107d5e972d2dd7a3ee94fa82 (patch) | |
tree | 8cd045eed20d7b4df2960a12626561e2d9ecbdee /Master/texmf-dist/tex/latex/kotex-utf | |
parent | f00d6d4f279983df6e306c54e94eecb6274c303d (diff) |
kotex-utf (22jun22)
git-svn-id: svn://tug.org/texlive/trunk@63690 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/kotex-utf')
8 files changed, 533 insertions, 439 deletions
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 index 17e1fd0f6e7..33e74428c33 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-cmap.sty @@ -11,10 +11,10 @@ %% version 2006/05/20 or later. %% \ProvidesPackage{dhucs-cmap} - [2007/06/16 searchable PDF for dhucs upon pdftex] + [2021/03/01 searchable PDF for dhucs upon pdftex] -\RequirePackage{ifpdf} -\ifpdf\else\expandafter\endinput\fi +\RequirePackage{iftex} +\ifpdf\else\endinput\fi \newcommand*\AddUniSubCmap{% \ifdefined \now@jamo@printing @@ -72,6 +72,7 @@ \fi \pdffontattr\font@name{/ToUnicode \csname dhucs-cmap-\h@ngulpl@ne\endcsname\space 0 R}% + \ifdefined\pdfnobuiltintounicode \pdfnobuiltintounicode\font@name \fi } \newcommand*\jamo@dh@cmap[1]{% @@ -81,6 +82,7 @@ \fi \pdffontattr\font@name{/ToUnicode \csname dhucs-cmap-mid-#1\endcsname\space 0 R}% + \ifdefined\pdfnobuiltintounicode \pdfnobuiltintounicode\font@name \fi } \def\dhucs@define@newfont{\define@newfont\AddUniSubCmap\h@ngulpl@ne} 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 index 71a5827f1d5..331912c51c0 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-paralist.sty @@ -1,6 +1,6 @@ %% File `dhucs-paralist.sty` %% -%% Copyright (c) 2007-2013 Dohyun Kim <nomos at krug org> +%% Copyright (c) 2007-2013 Dohyun Kim <nomos at ktug org> %% modification from dhucs-enumerate.sty by Kangsoo Kim <karnes at ktug org>. %% %% This work may be distributed and/or modified under the 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 index 0c4f65c0520..5f804accd0f 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-trivcj.sty @@ -16,7 +16,7 @@ [2011/08/17 temporary chinese/japanese for dhucs] %%%%%% luatex & xetex -\ifx가가\relax +\ifx 가가\relax \newcommand*\trivcjtypesetting{% \parindent1em \let\nbs\nobreakspace %% see CJK.sty 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 index 3b84adf60ca..2670928b12e 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/contrib/kotex-varioref.sty @@ -1,6 +1,7 @@ %% File `kotex-varioref.sty` %% %% (C) Copyright 2008-2013 slomo +%% 2022 Kangsoo Kim %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -10,29 +11,71 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2006/05/20 or later. %% +\ProvidesPackage{kotex-varioref}[2022/06/20 korean texts for varioref] +\RequirePackage{l3keys2e} \@ifpackageloaded{varioref}{}{\RequirePackage{varioref}[2006/05/13]} +\ExplSyntaxOn + +\keys_define:nn { kotexvarioref } +{ + pagename .tl_set:N = \pagename, + aftertext .tl_set:N = \kvr@aftertext, + beforetext .tl_set:N = \kvr@beforetext, + currenttext .tl_set:N = \kvr@currenttext, + totext .tl_set:N = \kvr@to, + footnotename .tl_set:N = \kvr@footnotename, + figurename .tl_set:N = \kvr@figurename, + tablename .tl_set:N = \kvr@tablename +} + +\keys_set:nn { kotexvarioref } +{ + pagename = 페이지, + aftertext = 다음, + beforetext = 앞, + currenttext = 현재, + totext = 에서, + footnotename = 각주, + figurename = \figurename, + tablename = \tablename +} + +\ProcessKeysOptions { kotexvarioref } + +\newif\ifUI\UIfalse +\NewDocumentCommand \kvr@ui {} +{ + \ifUI 의\else\fi +} + +\NewDocumentCommand \kotexvarioreftexts { m } +{ + \keys_set:nn { kotexvarioref } { #1 } +} + +\ExplSyntaxOff % % user interfaces % \renewcommand{\vref}[2][\reftextcurrent] - {\vpageref[#1]{#2} \ref{#2}} + {\vpageref[#1]{#2}\kvr@ui{} \ref{#2}} \renewcommand{\vrefrange}[3][\reftextcurrent] - {\vpagerefrange[#1]{#2}{#3}의 \reftextlabelrange{#2}{#3}} + {\vpagerefrange[#1]{#2}{#3}\kvr@ui{} \reftextlabelrange{#2}{#3}} % % reftexts % -\renewcommand{\reftextfaceafter}{다음 \pagename}% -\renewcommand{\reftextfacebefore}{앞 \pagename}% -\renewcommand{\reftextafter}{다음 \pagename}% -\renewcommand{\reftextbefore}{앞 \pagename}% -\renewcommand{\reftextcurrent}{현재 \pagename}% +\renewcommand{\reftextfaceafter}{\kvr@aftertext{} \pagename}% +\renewcommand{\reftextfacebefore}{\kvr@beforetext{} \pagename}% +\renewcommand{\reftextafter}{\kvr@aftertext{} \pagename}% +\renewcommand{\reftextbefore}{\kvr@beforetext{} \pagename}% +\renewcommand{\reftextcurrent}{\kvr@currenttext{} \pagename}% \renewcommand{\reftextfaraway}[1]{\pageref{#1}\pagename}% \renewcommand{\reftextpagerange}[2]{\pageref{#1}--\pageref{#2}\pagename}% -\renewcommand{\reftextlabelrange}[2]{\ref{#1}에서 \ref{#2}} +\renewcommand{\reftextlabelrange}[2]{\ref{#1}\kvr@to{} \ref{#2}} % % labelformats @@ -40,9 +83,9 @@ \labelformat{part}{#1\partname} \labelformat{chapter}{#1\chaptername} \labelformat{section}{#1\sectionname} -\labelformat{figure}{\figurename~#1} -\labelformat{table}{\tablename~#1} -\labelformat{footnote}{각주~#1} +\labelformat{figure}{\kvr@figurename~#1} +\labelformat{table}{\kvr@tablename~#1} +\labelformat{footnote}{\kvr@footnotename{}~#1} \endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty b/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty index dc247f7c249..f9d01963c91 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/dhucs.sty @@ -14,6 +14,7 @@ %% -------------------------------------------------------- %% %% changelog: +%% 2015/08/21 5.4.0 minor typo fix %% 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 @@ -38,9 +39,9 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dhucs} - [2012/11/08 v5.3.2 typesetting UTF-8 Korean documents] + [2015/08/21 v5.4 typesetting UTF-8 Korean documents] -\ifx가가\else +\ifx 가가\else \DeclareOption*{\PassOptionsToPackage\CurrentOption{kotexutf}} \ProcessOptions\relax \RequirePackage{kotexutf} diff --git a/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty b/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty index 8a41519040c..098c97a81bb 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/kosections-utf.sty @@ -1,7 +1,7 @@ %% File `kosections-utf.tex` %% -%% (C) Copyright 2007-2013 Dohyun Kim <nomos at ktug org> -%% Kangsoo Kim <karnes at ktug org> +%% (C) Copyright 2007-2022 Dohyun Kim <nomos at ktug org> +%% 2022 Kangsoo Kim %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -12,7 +12,7 @@ %% version 2006/05/20 or later. %% \ProvidesFile{kosections-utf} - [2013/10/20 hangul option to kotex/utf] + [2022/06/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 @@ -59,410 +59,6 @@ %% konames-utf \RequirePackage{konames-utf} -%% 단원의 한글화 -%% ============= -%% -%% Part I --> 제 I 편, 第 I 篇 -%% Chapter 1 --> 제 1 장, 第 1 章 <book,report> -%% Section 1 --> 제 1 절, 第 1 節 -%% Appendix A --> 부록 A, 附綠 A -%% -%% 위와 같은 단원의 한글화는 절(節)까지 영향을 미친다. 그러므로 우리는 -%% 목차에 \subsubsection까지 단원이 번호와 함께 나오도록 한다. -%% article에서는 이미 3으로 지정되었으나, 그외에서는 2로 지정되어 -%% \subsection까지만 번호가 목차에 나오도록 되어 있다. -\setcounter{secnumdepth}{\thr@@} - -\@ifclassloaded{article}{% <article> - \renewcommand{\appendix}{\par - \setcounter{section}{0}% - \setcounter{subsection}{0}% - \def\@chapapp{\appendixname}% 부록의 한글화에 의해 필요. - \kscntformat{section}{\appendixname~}{} - \def\thesection{\@Alph\c@section}}% -}{\@ifundefined{@chapapp}{}{% <report|book> - \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}{% <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{˚} @@ -529,9 +125,10 @@ \if@nonfrench \xspaceskip=.5em plus .111em minus .1em \fi +\skip\footins=\glueexpr\skip\footins/72*100\relax %%% interhchar -\setInterHangulSkip{-0.55pt} +%\setInterHangulSkip{-0.55pt} %%% makeidx를 쓰면 \see와 \seealso가 정의된다. %%% modified from kosections-euc.tex diff --git a/Master/texmf-dist/tex/latex/kotex-utf/kotex-sections.sty b/Master/texmf-dist/tex/latex/kotex-utf/kotex-sections.sty new file mode 100644 index 00000000000..3b336c6529b --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-utf/kotex-sections.sty @@ -0,0 +1,447 @@ +%% File `kotex-sections.tex` +%% +%% (C) 2014-2022 Kangsoo Kim <karnes at ktug org> +%% +%% 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{kotex-sections} + [2022/06/20 0.3.1 chapter/section styles from HLaTeX] + +%% konames-utf +%\RequirePackage{konames-utf} +\@ifpackageloaded{konames-utf}{}{% + \RequirePackage{konames-utf} +} + +\newdimen\kosecldim\kosecldim=2.3em + +%% 단원의 한글화 +%% ============= +%% +%% Part I --> 제 I 편, 第 I 篇 +%% Chapter 1 --> 제 1 장, 第 1 章 <book,report> +%% Section 1 --> 제 1 절, 第 1 節 +%% Appendix A --> 부록 A, 附綠 A +%% +%% 위와 같은 단원의 한글화는 절(節)까지 영향을 미친다. 그러므로 우리는 +%% 목차에 \subsubsection까지 단원이 번호와 함께 나오도록 한다. +%% article에서는 이미 3으로 지정되었으나, 그외에서는 2로 지정되어 +%% \subsection까지만 번호가 목차에 나오도록 되어 있다. +\setcounter{secnumdepth}{\thr@@} + +\@ifclassloaded{article}{% <article> + \renewcommand{\appendix}{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \def\@chapapp{\appendixname}% 부록의 한글화에 의해 필요. + \kscntformat{section}{\appendixname~}{} + \def\thesection{\@Alph\c@section}}% +}{\@ifundefined{@chapapp}{}{% <report|book> + \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}{% <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}{\kosecldim}% + \@dottedtocline{1}{1em}{\@tempdima}}%1.5em 2.3em +}{} +\@ifclassloaded{report}{ + \renewcommand*\l@section{% + \settowidth{\@tempdima}{\pre@sectioncnt\post@sectioncnt}% + \addtolength{\@tempdima}{\kosecldim}% + \@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 +}{} + + +%%% from xetexko.sty +\AtBeginDocument{% + \@ifpackageloaded{hyperref}{% + \pdfstringdefDisableCommands{% + \def\는{는}% + \def\은{은}% + \def\을{을}% + \def\를{를}% + \def\와{와}% + \def\과{과}% + \def\가{가}% + \def\이{이}% + \def\라{라}% + \def\으{으}% + \def\로{로}% + }}{} +} + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty b/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty index 7b784a770ce..f1e6e73cf56 100644 --- a/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty +++ b/Master/texmf-dist/tex/latex/kotex-utf/kotexutf.sty @@ -1,6 +1,7 @@ %% File `kotexutf.sty` %% -%% Copyright (C) 2012-2013 Dohyun Kim <nomos at ktug org> +%% Copyright (C) 2012-2022 Dohyun Kim <nomos at ktug org> +%% Copyright (C) 2015-2022 Kangsoo Kim <karnes at ktug org> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -10,9 +11,9 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2006/05/20 or later. %% -\NeedsTeXFormat{LaTeX2e} +\NeedsTeXFormat{LaTeX2e}[2022/06/01] \ProvidesPackage{kotexutf} - [2015/07/18 v2.1.1 typesetting UTF-8 Korean documents] + [2022/06/22 v3.0.0 typesetting UTF-8 Korean documents] \newif\if@nonfrench \newif\if@hangul @@ -34,6 +35,13 @@ \input kotexutf-core +% care about fancyvrb's VerbatimOut env +\def\kotex@make@utfviii@other{% + \count@"80 \loop \catcode\count@=12 \ifnum\count@<"BF \advance\count@\@ne \repeat + \count@"C2 \loop \catcode\count@=12 \ifnum\count@<"F4 \advance\count@\@ne \repeat +} +\AddToHook{env/VerbatimOut/begin}{\kotex@make@utfviii@other} + % modified from lucenc.def \DeclareFontEncoding{LUC}{}{} %\DeclareFontSubstitution{LUC}{utbt}{m}{n} @@ -103,14 +111,10 @@ \def\dhucs@temp@hanjafont {#2}% } -\protected\edef\normalfont{% - \unexpanded{% - \let\dhucs@temp@hangulfont\dhucs@undefined - \let\dhucs@temp@hanjafont \dhucs@undefined - }% - \unexpanded\expandafter{\normalfont}% +\AddToHook{normalfont}{% + \let\dhucs@temp@hangulfont\dhucs@undefined + \let\dhucs@temp@hanjafont \dhucs@undefined } -\let\reset@font\normalfont %% now print out \unihangulchar \newcommand*\unihangulchar@@@{% @@ -511,9 +515,9 @@ \unless\ifdefined\pdfstringdefPreHook \let\pdfstringdefPreHook\@empty\fi \g@addto@macro\pdfstringdefPreHook{% - \unihangul@unprotect@range{C2}{DF}{two}% - \unihangul@unprotect@range{E0}{EF}{three}% - \unihangul@unprotect@range{F0}{F4}{four}% +% \unihangul@unprotect@range{C2}{DF}{two}% +% \unihangul@unprotect@range{E0}{EF}{three}% +% \unihangul@unprotect@range{F0}{F4}{four}% \let\unihangulchar\HyPsd@unichar \let\makejosa\@secondoftwo \let\dotemph\@firstofone |