From cd83186b6a2e004ec7ca663b8ee2013ffdfbf78e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 1 Mar 2022 21:47:59 +0000 Subject: kotex-oblivoir (1mar22) git-svn-id: svn://tug.org/texlive/trunk@62314 c570f23f-e606-0410-a88d-b1316a301751 --- .../memhangul-common/fapapersize.sty | 63 ++++++- .../memhangul-common/memhangul-common.sty | 197 +++++++++++---------- .../memhangul-common/oblivoir-misc.sty | 122 +++++++++++++ .../tex/latex/kotex-oblivoir/oblivoir-utf.cls | 2 +- .../tex/latex/kotex-oblivoir/oblivoir-xl.cls | 2 +- .../tex/latex/kotex-oblivoir/oblivoir.cls | 4 +- .../tex/latex/kotex-oblivoir/xoblivoir.cls | 2 +- 7 files changed, 285 insertions(+), 107 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/oblivoir-misc.sty (limited to 'Master/texmf-dist/tex/latex/kotex-oblivoir') diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/fapapersize.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/fapapersize.sty index a1a57f113fc..7d072a293e2 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/fapapersize.sty +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/fapapersize.sty @@ -1,6 +1,7 @@ %% File `fapapersize.sty` +%% this file is a part of oblivoir-packages. %% -%% Copyright (c) 2006-2013 Kangsoo Kim +%% Copyright (c) 2006-2022 Kangsoo Kim %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -15,18 +16,24 @@ %% ver 0.03 (2006/11/24) %% stocksize를 별도 지정할 수 있게 함 %% option [stock], command \usefastocksize{}{} -%% ver 0.02 +%% ver 0.02 (2007) %% 사륙배판, 국판, 신국판 정의. %% marginnote 영역 설정은 제외되어 있음. -%% ver 0.1 +%% ver 0.1 (2020) %% option 1in added +%% ver 0.2 (2022) +%% option a4 added +%% \definefageometry, \selectfageometry added. %% -\ProvidesPackage{fapapersize}[2020/02/10 v0.1] +\ProvidesPackage{fapapersize}[2022/03/01 v0.2] %%% %%% 옵션 %%% dbl4x6 : 사륙배판 %%% mum : 국판 %%% newmum : 신국판 +%%% 1in : margin 1in +%%% a4 : a4paper + 1in +%%% stock : stocksize \DeclareOption{dbl4x6}{% \AtEndOfPackage{\usefapapersize{190mm,260mm,30mm,*,30mm,*}}% } @@ -38,7 +45,10 @@ } \DeclareOption{1in}{% \AtEndOfPackage{\usefapapersize{*,*,1in,*,1in,*}}% - } +} +\DeclareOption{a4}{% + \AtEndOfPackage{\usefapapersize{210mm,290mm,1in,*,1in,*}}% +} \newif\ifStockSize@\StockSize@false \DeclareOption{stock}{% \StockSize@true @@ -144,4 +154,47 @@ \fi } +%%%% +%%% fapapersize.sty, 2021-06-21 +%%% \deffageometry, \setfageometry +%%% +\ExplSyntaxOn + \NewDocumentCommand \definefageometry { m o m o } + { + \IfValueTF{#2} + { + \tl_gset:cn { g_famarginsetopt_#1_tl } { #2 } + } + { + \tl_gset:cn { g_famarginsetopt_#1_tl } {} + } + \tl_gset:cn { g_famarginset_#1_tl } { #3 } + \IfValueTF { #4 } + { + \tl_gset:cn { g_famarginsetoptpost_#1_tl } { #4 } + } + { + \tl_gset:cn { g_famarginsetoptpost_#1_tl } {} + } + } + + \NewDocumentCommand \selectfageometry { s m } + { + \IfBooleanT { #1 } { \clearpage } + \tl_use:c { g_famarginsetopt_#2_tl } + \exp_args:Nx \usefapapersize{*,*, \use:c{ g_famarginset_#2_tl } } + \tl_if_empty:cF { g_famarginsetoptpost_#2_tl } + { + \tl_use:c { g_famarginsetoptpost_#2_tl } + } + \ch@ngetext + } + +\NewDocumentCommand \evenmarginsameasodd {} +{ + \setlength\evensidemargin{\oddsidemargin} +} + +\ExplSyntaxOff + \endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/memhangul-common.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/memhangul-common.sty index f96aafc7317..7742b961e0d 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/memhangul-common.sty +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/memhangul-common.sty @@ -241,36 +241,111 @@ %% \chapter[toc][hdr]{title} %% \chapter[toc]{hdr/title} %% \chapter{toc/hdr/title} +%%%%\def\@chapter[#1]#2{% +%%%% \m@mpn@new@chaptrue% +%%%% \m@mpn@new@schapfalse% +%%%% \def\f@rbdy{#2}% +%%%%% \ifx\ch@pt@c\@empty % no optional args +%%%%% \def\f@rtoc{#2}% +%%%%% \def\f@rhdr{#2}% +%%%%% \PrerenderUnicode{#2}% +%%%%% \else % at least one opt arg +%%%%% \let\f@rtoc\ch@pt@c +%%%%% \ifx\@empty#1\@empty +%%%%% \let\f@rhdr\ch@pt@c +%%%%% \PrerenderUnicode{#1#2}% +%%%%% \else +%%%%% \def\f@rhdr{#1}% +%%%%% \PrerenderUnicode{#1}% +%%%%% \fi +%%%%% \fi +%%%% \ifx\ch@pt@c\m@m@empty % no optional args +%%%% \def\f@rtoc{#1}% +%%%% \def\f@rhdr{#1}% +%%%%% \PrerenderUnicode{#1}% +%%%% \else % at least one opt arg +%%%% \def\f@rtoc{\ch@pt@c}% +%%%% \nametest{#1}{#2}% +%%%% \ifsamename % one opt arg +%%%% \def\f@rhdr{\ch@pt@c}% +%%%%% \PrerenderUnicode{#1#2}% +%%%% \else % two opt args +%%%% \def\f@rhdr{#1}% +%%%%% \PrerenderUnicode{#1}% +%%%% \fi +%%%% \fi +%%%% \m@m@Andfalse +%%%% \ifnum \c@secnumdepth >\m@ne +%%%% \if@mainmatter +%%%% \m@m@Andtrue +%%%% \fi +%%%% \fi +%%%% \ifm@m@And +%%%% \ifanappendix +%%%% \refstepcounter{APPchapter}% +%%%% \else +%%%% \refstepcounter{chapter}% +%%%% \fi +%%%% \fi +%%%% \chaptermark{\f@rhdr} +%%%% \ifartopt +%%%% \@makechapterhead{#2}% +%%%% \@afterheading +%%%% \else +%%%% \insertchapterspace +%%%% \if@twocolumn +%%%% \@topnewpage[\@makechapterhead{#2}]% +%%%% \else +%%%% \@makechapterhead{#2}% +%%%% \fi +%%%% \@afterheading +%%%% \fi +%%%% \ifm@m@And +%%%% \ifanappendix +%%%% \addcontentsline{toc}{appendix}{% +%%%%% \protect\chapternumberline{\thechapter}\f@rtoc}% +%%%% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% +%%%%% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \else +%%%% \addcontentsline{toc}{chapter}{% +%%%%% \protect\chapternumberline{\thechapter}\f@rtoc}% +%%%% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% +%%%%% \memchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \fi +%%%% \else +%%%% \addcontentsline{toc}{chapter}{\f@rtoc}% +%%%% \ifanappendix +%%%% \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \else +%%%% \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}% +%%%% \fi +%%%% \fi +%%%% \mempostaddchaptertotochook% +%%%% \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi +%%%%%%% for chapter +%%%% \ifanappendix +%%%% \protected@edef\@currentlabel{\thechapter}% +%%%% \fi +%%%% \memendofchapterhook% +%%%%} + \def\@chapter[#1]#2{% \m@mpn@new@chaptrue% \m@mpn@new@schapfalse% \def\f@rbdy{#2}% -% \ifx\ch@pt@c\@empty % no optional args -% \def\f@rtoc{#2}% -% \def\f@rhdr{#2}% -% \PrerenderUnicode{#2}% -% \else % at least one opt arg -% \let\f@rtoc\ch@pt@c -% \ifx\@empty#1\@empty -% \let\f@rhdr\ch@pt@c -% \PrerenderUnicode{#1#2}% -% \else -% \def\f@rhdr{#1}% -% \PrerenderUnicode{#1}% -% \fi -% \fi - \ifx\ch@pt@c\m@m@empty % no optional args - \def\f@rtoc{#1}% - \def\f@rhdr{#1}% + \ifx\ch@pt@c\@empty % no optional args + \def\f@rtoc{#2}% + \def\f@rhdr{#2}% \else % at least one opt arg - \def\f@rtoc{\ch@pt@c}% - \nametest{#1}{#2}% - \ifsamename % one opt arg - \def\f@rhdr{\ch@pt@c}% - \else % two opt args + \let\f@rtoc\ch@pt@c + \ifx\@empty#1\@empty + \let\f@rhdr\ch@pt@c + \else \def\f@rhdr{#1}% \fi - \fi + \fi \m@m@Andfalse \ifnum \c@secnumdepth >\m@ne \if@mainmatter @@ -297,18 +372,16 @@ \fi \@afterheading \fi + \@nameuse{chapter@f@rtoc@before@write@hook}% + \mempreaddchaptertotochook% \ifm@m@And \ifanappendix \addcontentsline{toc}{appendix}{% -% \protect\chapternumberline{\thechapter}\f@rtoc}% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% -% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% \else \addcontentsline{toc}{chapter}{% -% \protect\chapternumberline{\thechapter}\f@rtoc}% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% -% \memchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}% \fi \else @@ -321,82 +394,12 @@ \fi \mempostaddchaptertotochook% \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi -%%% for chapter \ifanappendix \protected@edef\@currentlabel{\thechapter}% \fi \memendofchapterhook% } -%%%\def\@chapter[#1]#2{% -%%% \m@mpn@new@chaptrue% -%%% \m@mpn@new@schapfalse% -%%% \def\f@rbdy{#2}% -%%% \ifx\ch@pt@c\@empty % no optional args -%%% \def\f@rtoc{#2}% -%%% \def\f@rhdr{#2}% -%%% \else % at least one opt arg -%%% \let\f@rtoc\ch@pt@c -%%% \ifx\@empty#1\@empty -%%% \let\f@rhdr\ch@pt@c -%%% \else -%%% \def\f@rhdr{#1}% -%%% \fi -%%% \fi -%%% \m@m@Andfalse -%%% \ifnum \c@secnumdepth >\m@ne -%%% \if@mainmatter -%%% \m@m@Andtrue -%%% \fi -%%% \fi -%%% \ifm@m@And -%%% \ifanappendix -%%% \refstepcounter{APPchapter}% -%%% \else -%%% \refstepcounter{chapter}% -%%% \fi -%%% \fi -%%% \chaptermark{\f@rhdr} -%%% \ifartopt -%%% \@makechapterhead{#2}% -%%% \@afterheading -%%% \else -%%% \insertchapterspace -%%% \if@twocolumn -%%% \@topnewpage[\@makechapterhead{#2}]% -%%% \else -%%% \@makechapterhead{#2}% -%%% \fi -%%% \@afterheading -%%% \fi -%%% \@nameuse{chapter@f@rtoc@before@write@hook}% -%%% \mempreaddchaptertotochook% -%%% \ifm@m@And -%%% \ifanappendix -%%% \addcontentsline{toc}{appendix}{% -%%% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% -%%% \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}% -%%% \else -%%% \addcontentsline{toc}{chapter}{% -%%% \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}% -%%% \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}% -%%% \fi -%%% \else -%%% \addcontentsline{toc}{chapter}{\f@rtoc}% -%%% \ifanappendix -%%% \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}% -%%% \else -%%% \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}% -%%% \fi -%%% \fi -%%% \mempostaddchaptertotochook% -%%% \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi -%%% \ifanappendix -%%% \protected@edef\@currentlabel{\thechapter}% -%%% \fi -%%% \memendofchapterhook% -%%%} - %\def\@makechapterhead#1{% % \chapterheadstart% \vspace*{50\p@}% % {\parindent \z@ \raggedright \normalfont diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/oblivoir-misc.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/oblivoir-misc.sty new file mode 100644 index 00000000000..8d81ccefbf2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-common/oblivoir-misc.sty @@ -0,0 +1,122 @@ +%% file oblivoir-misc.sty +%% part of oblivoir class +%% +%% (c) 2022 Kangsoo Kim +%% +%% 2022-03-01 +%% +\ProvidesPackage{oblivoir-misc}[2022/03/01 version0.1] + +\RequirePackage{etoolbox} + +%%% tikz pagenode +%%% see http://www.ktug.org/xe/index.php?mid=KTUG_QnA_board&document_srl=253542 + +\AtEndPreamble{% +\ifx\pgfkeys\undefined\else +\newcommand\setpagenode{% + \expandafter\def\csname pgf@sh@ns@current page\endcsname{rectangle}% + \strictpagecheck% + \checkoddpage% + \ifoddpage% + \expandafter\def\csname pgf@sh@np@current page\endcsname{% + \def\southwest{\pgfpoint{\stockwidth-\paperwidth-\trimedge}% + {\stockheight-\trimtop-\paperheight}}% + \def\northeast{\pgfpoint{\stockwidth-\trimedge}{\stockheight-\trimtop}}% + }% + \else + \expandafter\def\csname pgf@sh@np@current page\endcsname{% + \def\southwest{\pgfpoint{\trimedge}{\stockheight-\trimtop-\paperheight}}% + \def\northeast{\pgfpoint{\trimedge+\paperwidth}{\stockheight-\trimtop}}% + }% + \fi + \expandafter\def\csname pgf@sh@nt@current page\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% + \expandafter\def\csname pgf@sh@pi@current page\endcsname{pgfpageorigin}} + +\pgfkeys{/tikz/overlay/.add code={}{\setpagenode}} +\fi +} + +%%% \texthl +%%% from oblivoir-patch2.sty, 2021 +%%% \texthl command +%%% highlighs text in XeTeX +%%% * now, in mathmode it doesn't work. +%%%. * now, lualatex is not supported. +%%% +%%% \obhlcolor, \obhlheight, \obhlraisedim can be redefined by user. +\ExplSyntaxOn +\bool_new:N \g_ulemloaded_bool +\bool_new:N \g_xcolorloaded_bool +\dim_new:N \obhlraisedim +\dim_new:N \obhlheight +\AtEndPreamble{ + \@ifpackageloaded{color} + { \bool_set_true:N \g_xcolorloaded_bool } + { + \@ifpackageloaded{xcolor} + { \bool_set_true:N \g_xcolorloaded_bool } + { \bool_set_false:N \g_xcolorloaded_bool } + } + \@ifpackageloaded{ulem} + { \bool_set_true:N \g_ulemloaded_bool } + { \bool_set_false:N \g_ulemloaded_bool + \let\UL@protected\protected + } + \sys_if_engine_luatex:TF { + \cs_if_exist:NF \obhlcolor { \def\obhlcolor{yellow!80} } + \dim_set:Nn \obhlraisedim { -.1\baselineskip } + \dim_set:Nn \obhlheight { 1.01em } + \NewDocumentCommand\texthl{}{ + \bool_if:NTF \g_ulemloaded_bool + { + \msg_error:nn { texthl } { Do~not~use~ulem~with~luatexko. } + } + { + \hbox_set:Nn \l_tmpa_box { \color{\obhlcolor}\rule{1pt}{\obhlheight} } + \markoverwith{ + \box_move_up:nn { \obhlraisedim } { \box_use:N \l_tmpa_box } + } + } + } + }{ +% \sys_if_engine_xetex:TF { + \bool_if:nTF + { + \g_ulemloaded_bool + && + \g_xcolorloaded_bool + } + { + \cs_if_exist:NF \obhlcolor + { + \def\obhlcolor{yellow!80} + } + \dim_set:Nn \obhlraisedim { -.1\baselineskip } + \dim_set:Nn \obhlheight { 1.01em } + \UL@protected\def \texthl + { + \bgroup + \hbox_set:Nn \l_tmpa_box {\color{\obhlcolor}\rule{1pt}{\obhlheight}} + \box_set_ht:Nn \l_tmpa_box { \c_zero_dim } + \box_set_dp:Nn \l_tmpa_box { \c_zero_dim } + \markoverwith{% + \kern-.1pt + \box_move_up:nn { \obhlraisedim } { \box_use:N \l_tmpa_box } + }\ULon + } + } + { + \def\texthl { + \msg_error:nn { texthl } { ulem~and~(x)color~required.} + } + } +% } +% { +% \msg_error:nn { texthl } { pdftex~not~supported } +% } + } +} +\ExplSyntaxOff + +\endinput diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-utf.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-utf.cls index 3d321a14462..535b74dbd4c 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-utf.cls +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-utf.cls @@ -1,6 +1,6 @@ %% File `oblivoir-utf.cls` %% -%% (C) Copyright 2006-2021 Kangsoo Kim +%% (C) Copyright 2006-2015 Kangsoo Kim %% %% 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/kotex-oblivoir/oblivoir-xl.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xl.cls index 88327a694ae..e68aa40c940 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xl.cls +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir-xl.cls @@ -1,6 +1,6 @@ %% File `oblivoir-xl.cls` %% -%% (C) Copyright 2006-2021 Kangsoo Kim +%% (C) Copyright 2006-2021 Kangsoo Kim %% %% 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/kotex-oblivoir/oblivoir.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls index 19807a454a7..2ccb1f0fc25 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/oblivoir.cls @@ -1,6 +1,6 @@ %% File `oblivoir.cls` %% -%% (C) Copyright 2006-2021 Kangsoo Kim +%% (C) Copyright 2006-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,7 +10,7 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2006/05/20 or later. %% -\ProvidesClass{oblivoir}[2021/09/21 v3.0.2] +\ProvidesClass{oblivoir}[2022/03/01 v3.1] \RequirePackage{xkeyval} \RequirePackage{xparse} diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls b/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls index d1444651d20..a825b59adfd 100644 --- a/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls +++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/xoblivoir.cls @@ -1,6 +1,6 @@ %% File `xoblivoir.cls` %% -%% (C) Copyright 2006-2021 Kangsoo Kim +%% (C) Copyright 2006-2021 Kangsoo Kim %% (C) Copyright 2013 Kihwang Lee %% %% This work may be distributed and/or modified under the -- cgit v1.2.3