summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-12 23:30:42 +0000
committerKarl Berry <karl@freefriends.org>2021-03-12 23:30:42 +0000
commit0c4f41d2d7d60b48d60d5c43d11efd0ac2559eab (patch)
treeaf0dcadba965a377b4c73b008da29d25dca5c981 /Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x
parent1693549f9000660a7545f69e6296e37daea79429 (diff)
kotex-oblivoir (9mar21)
git-svn-id: svn://tug.org/texlive/trunk@58310 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x')
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-mathleading.sty144
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-unfontsdefault.sty143
-rw-r--r--Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-font.sty52
3 files changed, 319 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-mathleading.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-mathleading.sty
new file mode 100644
index 00000000000..010c83ec2aa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-mathleading.sty
@@ -0,0 +1,144 @@
+%%
+%% file: ob-mathleading.sty
+%%
+%% written by nova
+%%
+%% a supplementary package to oblivoir
+%% set lineskips in multi-lined math environments
+%% (amsmath required)
+%%
+%% v. 0.1alpha : 2018/12/22
+%% v. 0.0.1-pr2 : 2018/12/24
+%% v. 0.0.1 : 2018/12/25
+%%
+\RequirePackage{expl3}
+\ProvidesExplPackage
+ {ob-mathleading}
+ {2018/12/25}
+ {v0.0.1}
+ {adjust math leadings for oblivoir}
+
+\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
+\RequirePackage{xparse}
+\RequirePackage{etoolbox}
+\RequirePackage{l3keys2e}
+
+\keys_define:nn { obmathleading }
+{
+ default .bool_set:N = \l_defaultopt_bool,
+ mathleading .fp_set:N = \l_opt_mathleading_fp,
+ exception .clist_set:N = \g_opt_mlexception_clist,
+ noallowdisplaybreaks .bool_set:N = \g_noallowdispbreak_bool
+}
+
+\keys_set:nn { obmathleading }
+{
+ default = true,
+ mathleading = 1.0,
+ exception = {},
+ noallowdisplaybreaks = false
+}
+
+\ProcessKeysOptions { obmathleading }
+
+\scan_stop:
+
+\bool_if:NTF \l_defaultopt_bool
+{
+ \tl_set:Nn \l_obml_stretch_tl { \fp_use:N \l_opt_mathleading_fp }
+}
+{
+ \tl_set:No \l_obml_stretch_tl { \baselinestretch }
+}
+
+\NewDocumentCommand \obmathleading { m }
+{
+ \tl_set:Nn \l_obml_stretch_tl { #1 }
+}
+
+\NewDocumentEnvironment { obMathLeading } { O{1.0} }
+{
+ \obmathleading { #1 }
+}
+{
+}
+
+\cs_new:Npn \mathleading_set_default:nN #1 #2
+{
+ \clist_if_in:NnF \g_opt_mlexception_clist { #1 }
+ {
+ \AtBeginEnvironment { #1 }
+ {
+ \linespread { #2 } \selectfont \ignorespaces
+ }
+ }
+}
+
+\cs_new:Npn \splitleading_set_default:N #1
+{
+ \clist_if_in:NnF \g_opt_mlexception_clist { split }
+ {
+ \patchcmd \start@split
+ { \spread@equation }
+ { \linespread { #1 } \selectfont \spread@equation }
+ { }
+ { }
+ }
+}
+
+\mathleading_set_default:nN { array } \l_obml_stretch_tl
+\mathleading_set_default:nN { matrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { matrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { pmatrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { pmatrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { bmatrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { bmatrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { Bmatrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { Bmatrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { vmatrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { vmatrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { Vmatrix } \l_obml_stretch_tl
+\mathleading_set_default:nN { Vmatrix* } \l_obml_stretch_tl
+\mathleading_set_default:nN { cases } \l_obml_stretch_tl
+\mathleading_set_default:nN { cases* } \l_obml_stretch_tl
+\mathleading_set_default:nN { aligned } \l_obml_stretch_tl
+\mathleading_set_default:nN { alignedat } \l_obml_stretch_tl
+\mathleading_set_default:nN { gathered } \l_obml_stretch_tl
+
+\splitleading_set_default:N \l_obml_stretch_tl
+
+\clist_if_in:NnF \g_opt_mlexception_clist { gather }
+{
+ \patchcmd \start@gather
+ { \collect@body }
+ { \linespread { \l_obml_stretch_tl } \selectfont \collect@body }
+ { }
+ { }
+}
+
+\clist_if_in:NnF \g_opt_mlexception_clist { align }
+{
+ \patchcmd \start@align
+ { \collect@body }
+ { \linespread { \l_obml_stretch_tl } \selectfont \collect@body }
+ { }
+ { }
+}
+
+\clist_if_in:NnF \g_opt_mlexception_clist { multline }
+{
+ \patchcmd \start@multline
+ { \collect@body }
+ { \linespread { \l_obml_stretch_tl } \selectfont \collect@body }
+ { }
+ { }
+}
+
+
+
+\bool_if:NF \g_noallowdispbreak_bool
+{
+ \AtBeginDocument { \allowdisplaybreaks }
+}
+
+%% end of file
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-unfontsdefault.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-unfontsdefault.sty
new file mode 100644
index 00000000000..853643763e9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/ob-unfontsdefault.sty
@@ -0,0 +1,143 @@
+%%
+%% ob-unfontsdefault.sty
+%% part of xob-font.sty
+%%
+%% public domain
+%%
+\ProvidesExplPackage{ob-unfontsdefault}
+ {2020/10/26}
+ {v0.4}
+ {Un and Baekmuk Fonts for xetexko}
+
+\RequirePackage{l3keys2e}
+
+\msg_new:nnn { ksxeunfonts } { errormsg } { Legacy~TeX~engine~not~supported }
+
+\sys_if_engine_pdftex:T {
+ \msg_error:nn { ksxeunfonts } { errormsg }
+}
+
+\keys_define:nn { ksxeunfonts }
+{
+ mj .tl_set:N = \opt_mjfont_tl,
+ mjbold .tl_set:N = \opt_mjboldfont_tl,
+ mjitalic .tl_set:N = \opt_mjitalicfont_tl,
+ mjbolditalic .tl_set:N = \opt_mjbolditalicfont_tl,
+ gt .tl_set:N = \opt_gtfont_tl,
+ gtbold .tl_set:N = \opt_gtboldfont_tl,
+ gtitalic .tl_set:N = \opt_gtitalicfont_tl,
+ gtbolditalic .tl_set:N = \opt_gtbolditalicfont_tl,
+ renderer .tl_set:N = \opt_renderer_tl,
+ fakeitalic .bool_set:N = \opt_fakeitalic_bool,
+ jamo .bool_set:N = \opt_script_bool,
+ mjinterhangul .tl_set:N = \opt_mjinterhangul_tl,
+ gtinterhangul .tl_set:N = \opt_gtinterhangul_tl,
+ mjwordspace .tl_set:N = \opt_mjwordspace_tl,
+ gtwordspace .tl_set:N = \opt_gtwordspace_tl,
+ untaza .bool_set:N = \opt_untaza_bool,
+ more .tl_set:N = \opt_moreopt_tl,
+ other .tl_set:N = \opt_otheropt_tl,
+ baekmuk .bool_set:N = \opt_baekmuk_bool,
+}
+
+\keys_set:nn { ksxeunfonts }
+{
+ mj = UnBatang.ttf,
+ mjbold = UnBatangBold.ttf,
+ mjitalic = UnGraphic.ttf,
+ mjbolditalic = UnGraphicBold.ttf,
+ gt = UnDotum.ttf,
+ gtbold = UnDotumBold.ttf,
+ gtitalic = UnDinaru.ttf,
+ gtbolditalic = UnYetgul.ttf,
+ renderer = OpenType,
+ fakeitalic = false,
+ jamo = false,
+ mjinterhangul = .06em,
+ gtinterhangul = .04em,
+ mjwordspace = {.95,.45,.25},
+ gtwordspace = {.96,.45,.2},
+ more = {},
+ other = {},
+ baekmuk = false,
+}
+
+\ProcessKeysOptions { ksxeunfonts }
+
+\bool_if:NT \opt_baekmuk_bool
+{
+ \keys_set:nn { ksxeunfonts }
+ {
+ mj = batang.ttf,
+ mjbold = *,
+ mjitalic = *,
+ mjbolditalic = *,
+ gt = dotum.ttf,
+ gtbold = *,
+ gtitalic = gulim.ttf,
+ gtbolditalic = hline.ttf,
+ renderer = OpenType,
+ fakeitalic = true,
+ jamo = false,
+ mjinterhangul = .06em,
+ gtinterhangul = .045em,
+ mjwordspace = {.48,.3,.2},
+ gtwordspace = {.50,.3,.2},
+ more = {BoldFeatures={FakeBold=1.1},BoldItalicFeatures={FakeBold=1.1}},
+ }
+}
+
+\sys_if_engine_luatex:T {
+ \hangulbyhangulfont=1
+}
+
+\bool_if:NTF \opt_fakeitalic_bool
+{
+ \tl_set:Nn \l_fakeitalic_option_tl {
+ BoldItalicFeatures = { FakeSlant = { 0.167 } },
+ AutoFakeSlant,
+ }
+}
+{
+ \tl_set:Nn \l_fakeitalic_option_tl { }
+}
+
+\bool_if:NTF \opt_script_bool
+{
+ \tl_set:Nn \l_script_option_tl { Script = Hangul, }
+}
+{
+ \tl_set:Nn \l_script_option_tl {}
+}
+
+\setmainhangulfont{\opt_mjfont_tl}[
+ BoldFont = \opt_mjboldfont_tl,
+ ItalicFont = \opt_mjitalicfont_tl,
+ BoldItalicFont = \opt_mjbolditalicfont_tl,
+ Renderer = \opt_renderer_tl,
+ InterHangul = -\opt_mjinterhangul_tl,
+ WordSpace = {\opt_mjwordspace_tl},
+ \l_script_option_tl \l_fakeitalic_option_tl
+ \opt_moreopt_tl,
+ \opt_otheropt_tl
+]
+
+\setsanshangulfont{\opt_gtfont_tl}[
+ BoldFont = \opt_gtboldfont_tl,
+ ItalicFont = \opt_gtitalicfont_tl,
+ BoldItalicFont = \opt_gtbolditalicfont_tl,
+ Renderer = \opt_renderer_tl,
+ InterHangul = -\opt_gtinterhangul_tl,
+ WordSpace = {\opt_gtwordspace_tl},
+ \l_fakeitalic_option_tl
+ \opt_moreopt_tl,
+ \opt_otheropt_tl
+]
+
+\bool_if:NT \opt_untaza_bool
+{
+ \setmonohangulfont { UnTaza.ttf }
+ \setmonohanjafont { UnDotum.ttf }
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-font.sty b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-font.sty
index d47b3da1253..95172457541 100644
--- a/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-font.sty
+++ b/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-x/xob-font.sty
@@ -1,6 +1,6 @@
%% xob-font.sty
%%
-%% Copyright (c) 2014-2020 Kangsoo Kim <karnes at ktug org>
+%% Copyright (c) 2014-2021 Kangsoo Kim <karnes at ktug org>
%% Copyright (c) 2017-2020 Kihwang Lee <leekh at ktug org>
%%
%% This work may be distributed and/or modified under the
@@ -15,7 +15,7 @@
%% oblivoir hangul/hanja font setting.
%% part of oblivoir
%%
-\ProvidesPackage{xob-font}[2020/03/20 v0.8.1 select hangul/hanja fonts for oblivoir]
+\ProvidesPackage{xob-font}[2021/03/03 v0.9 select hangul/hanja fonts for oblivoir]
%%% obsolete options: retain \if@.. conditions for backward compatibility
\newif\if@nowin\@nowinfalse
@@ -60,6 +60,8 @@
\if@gremph \bool_set_false:N \ital_fake_bool \else \bool_set_true:N \ital_fake_bool \fi
\if@oldhangul \bool_set_true:N \hangulscript_bool \else \bool_set_false:N \hangulscript_bool \fi
+\bool_new:N \opt_mainfontdeclared_bool
+
\bool_set_false:N \bold_prov_bool
\bool_set_false:N \in_hanja_mode
\bool_set_false:N \mono_mode
@@ -624,8 +626,6 @@
}
-\ExplSyntaxOff
-
%%% starred version commands are provided for backward compatibility.
\protected\def\setkormainfont{%
\@ifstar{\setkorfontorigstar*{main}}{%
@@ -641,7 +641,7 @@
%%% \setkomainfont[BASENAME](Regu)(Bold)(Ital)[Feature]%
%%% [HJBASENAME](HJREGU)(HJBOLD)(HJITAL)[HJFeatures]
%%% no spaces allowed between optional arguments, e.g., [...]*nospace*[...]
-\protected\def\setkomainfont{\setkorfontxob{main}}
+\protected\def\setkomainfont{\bool_set_true:N \opt_mainfontdeclared_bool\setkorfontxob{main}}
\protected\def\setkosansfont{\setkorfontxob{sans}}
\protected\def\setkomonofont{\setkorfontxob{mono}}
@@ -663,28 +663,40 @@
% \setkomonofont(UnTaza.ttf)
%\fi
-\if@nanumfonts
- \if@nanumxfonts
- \setkomainfont(NanumMyeongjo)(*ExtraBold)(*)[](NanumGothic)(*Bold)
- \else
- \setkomainfont(NanumMyeongjo)(*Bold)(*)[](NanumGothic)(*Bold)
- \fi
- \setkosansfont(NanumGothic)(*Bold)(*)
- \setkomonofont(NanumGothic)
-\fi
-%%% [hcr] adds [Script=Hangul] feature automatically.
-\if@hcrfonts
- \setkomainfont(HCRBatangLVT)(HCRBatangLVT-Bold)(HCRBatangLVT)
- \setkosansfont(HCRDotumLVT)(HCRDotumLVT-Bold)(HCRDotumLVT)
- \setkomonofont(HCRDotumLVT)
-\fi
+\AddToHook{env/document/before}{%
+ \bool_if:NF \opt_mainfontdeclared_bool
+ {
+ \if@nanumfonts
+ \if@nanumxfonts
+ \setkomainfont(NanumMyeongjo)(*ExtraBold)(*)[](NanumGothic)(*Bold)
+ \else
+ \setkomainfont(NanumMyeongjo)(*Bold)(*)[](NanumGothic)(*Bold)
+ \fi
+ \setkosansfont(NanumGothic)(*Bold)(*)
+ \setkomonofont(NanumGothic)
+ \else
+ %%% [hcr] adds [Script=Hangul] feature automatically.
+ \if@hcrfonts
+ \setkomainfont(HCRBatangLVT)(HCRBatangLVT-Bold)(HCRBatangLVT)
+ \setkosansfont(HCRDotumLVT)(HCRDotumLVT-Bold)(HCRDotumLVT)
+ \setkomonofont(HCRDotumLVT)
+ \else
+ %%% 2020/03/03: Now UnFonts is set to default
+ \RequirePackage{ob-unfontsdefault}
+ \fi
+ \fi
+ }
+}
%\setkomainfont(UnBatang.ttf)(UnBatangBold.ttf)(UnGraphic.ttf)
%\fi\fi
+\ExplSyntaxOff
+
\endinput
%%% end of file `xob-font.sty`
%% CHANGES
+%% v0.9 : unfontsxe introduced
%% v0.8.1 : minor bug fix
%% v0.8 : suport fontspec’s FontFace feature.
%% v0.7 : Use \sys_if_engine_xetex and \sys_if_engine_luatex instead of xetex_if_engine and luatex_if_engine to be compatible with latest l3kernel.