diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xduts/xdufont.sty | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls | 77 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xduts/xduugtp.cls | 60 |
4 files changed, 179 insertions, 78 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty b/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty index fd904429b36..94e309943bf 100644 --- a/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty +++ b/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty @@ -21,14 +21,15 @@ %% The Current Maintainer of this work is @note286 in GitHub and CTAN. %% %% This work consists of the files README.md, xduts.dtx, and xduts.ins -%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls. +%% and the derived files xduts.pdf, xdufont.sty, +%% xduugtp.cls, xdupgthesis.cls, and xduugthesis.cls. %% %% The copyright of xdulogo.pdf is Xidian University. %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplPackage{xdufont} - {2023/01/16}{4.1.1.0} + {2023/01/28}{4.3.0.0} {Xidian University Font package} \RequirePackage { xparse, l3keys2e } \PassOptionsToPackage { quiet } { xeCJK } @@ -37,6 +38,8 @@ \tl_new:N \l__xdu_fake_bold_tl \tl_new:N \l__xdu_fake_slant_tl \tl_new:N \l__xdu_latin_font_tl +\tl_new:N \l__xdu_latin_sans_scale_tl +\tl_new:N \l__xdu_latin_mono_scale_tl \tl_new:N \l__xdu_math_font_tl \tl_new:N \l__xdu_unicode_math_tl \tl_new:N \l__xdu_font_type_tl @@ -48,6 +51,10 @@ { \tl_set_eq:NN \l__xdu_cjk_font_tl \l_keys_choice_tl }, cjk-fake-bold .tl_set:N = \l__xdu_fake_bold_tl, cjk-fake-slant .tl_set:N = \l__xdu_fake_slant_tl, + latin-sans-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_sans_scale_tl \l_keys_choice_tl }, + latin-mono-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_mono_scale_tl \l_keys_choice_tl }, latin-font .choices:nn = { tac, tacn, thcs, gyre, none } { \tl_set_eq:NN \l__xdu_latin_font_tl \l_keys_choice_tl }, math-font .choices:nn = @@ -64,14 +71,16 @@ } \keys_set:nn { xdu } { - style / cjk-font = fandol, - style / cjk-fake-bold = 3, - style / cjk-fake-slant = 0.2, - style / latin-font = gyre, - style / math-font = cm, - style / unicode-math = { }, - style / font-type = font, - style / font-path = fonts + style / cjk-font = fandol, + style / cjk-fake-bold = 3, + style / cjk-fake-slant = 0.2, + style / latin-font = gyre, + style / latin-sans-scale = off, + style / latin-mono-scale = off, + style / math-font = cm, + style / unicode-math = { }, + style / font-type = font, + style / font-path = fonts } \cs_new:Npn \__xdu_select_font:nn #1#2 { @@ -255,8 +264,23 @@ ItalicFont = { #2 }, BoldItalicFont = { #3 } } -\cs_new:Npn \__xdu_set_latin_scale: - { Scale = MatchLowercase , } +\cs_new:Npn \__xdu_set_latin_sans_scale: { } +\cs_new:Npn \__xdu_set_latin_mono_scale: { } +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l__xdu_latin_sans_scale_tl { upper } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_latin_sans_scale_tl { lower } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchLowercase , } } + } + \tl_if_eq:NnTF \l__xdu_set_latin_mono_scale { upper } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_set_latin_mono_scale { lower } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchLowercase , } } + } + } \cs_new:Npn \__xdu_off_latin_ligatures: { Ligatures = CommonOff , } \cs_new:Npn \__xdu_set_latin_main_font:nnnnn #1#2#3#4#5 @@ -274,12 +298,12 @@ \cs_new:Npn \__xdu_set_latin_sans_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setsansfont { #1 } [ \__xdu_set_latin_scale: ] } + { \setsansfont { #1 } [ \__xdu_set_latin_sans_scale: ] } { \setsansfont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] } @@ -287,12 +311,12 @@ \cs_new:Npn \__xdu_set_latin_mono_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setmonofont { #1 } [ \__xdu_set_latin_scale: \__xdu_off_latin_ligatures: ] } + { \setmonofont { #1 } [ \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: ] } { \setmonofont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] @@ -309,7 +333,7 @@ { \setsansfont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] } @@ -317,7 +341,7 @@ { \setmonofont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] diff --git a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls index 80acc9738df..92116894f48 100644 --- a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls +++ b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls @@ -21,14 +21,15 @@ %% The Current Maintainer of this work is @note286 in GitHub and CTAN. %% %% This work consists of the files README.md, xduts.dtx, and xduts.ins -%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls. +%% and the derived files xduts.pdf, xdufont.sty, +%% xduugtp.cls, xdupgthesis.cls, and xduugthesis.cls. %% %% The copyright of xdulogo.pdf is Xidian University. %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplClass{xdupgthesis} - {2023/01/16}{4.1.1.0} + {2023/01/28}{4.3.0.0} {Xidian University Postgraduate Thesis document class} \RequirePackage { xparse, l3keys2e } \PassOptionsToPackage { quiet } { xeCJK } @@ -50,6 +51,8 @@ \tl_new:N \l__xdu_fake_bold_tl \tl_new:N \l__xdu_fake_slant_tl \tl_new:N \l__xdu_latin_font_tl +\tl_new:N \l__xdu_latin_sans_scale_tl +\tl_new:N \l__xdu_latin_mono_scale_tl \tl_new:N \l__xdu_math_font_tl \tl_new:N \l__xdu_unicode_math_tl \tl_new:N \l__xdu_font_type_tl @@ -61,6 +64,10 @@ { \tl_set_eq:NN \l__xdu_cjk_font_tl \l_keys_choice_tl }, cjk-fake-bold .tl_set:N = \l__xdu_fake_bold_tl, cjk-fake-slant .tl_set:N = \l__xdu_fake_slant_tl, + latin-sans-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_sans_scale_tl \l_keys_choice_tl }, + latin-mono-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_mono_scale_tl \l_keys_choice_tl }, latin-font .choices:nn = { tac, tacn, thcs, gyre, none } { \tl_set_eq:NN \l__xdu_latin_font_tl \l_keys_choice_tl }, math-font .choices:nn = @@ -77,14 +84,16 @@ } \keys_set:nn { xdu } { - style / cjk-font = fandol, - style / cjk-fake-bold = 3, - style / cjk-fake-slant = 0.2, - style / latin-font = gyre, - style / math-font = cm, - style / unicode-math = { }, - style / font-type = font, - style / font-path = fonts + style / cjk-font = fandol, + style / cjk-fake-bold = 3, + style / cjk-fake-slant = 0.2, + style / latin-font = gyre, + style / latin-sans-scale = off, + style / latin-mono-scale = off, + style / math-font = cm, + style / unicode-math = { }, + style / font-type = font, + style / font-path = fonts } \cs_new:Npn \__xdu_select_font:nn #1#2 { @@ -268,8 +277,23 @@ ItalicFont = { #2 }, BoldItalicFont = { #3 } } -\cs_new:Npn \__xdu_set_latin_scale: - { Scale = MatchLowercase , } +\cs_new:Npn \__xdu_set_latin_sans_scale: { } +\cs_new:Npn \__xdu_set_latin_mono_scale: { } +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l__xdu_latin_sans_scale_tl { upper } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_latin_sans_scale_tl { lower } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchLowercase , } } + } + \tl_if_eq:NnTF \l__xdu_set_latin_mono_scale { upper } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_set_latin_mono_scale { lower } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchLowercase , } } + } + } \cs_new:Npn \__xdu_off_latin_ligatures: { Ligatures = CommonOff , } \cs_new:Npn \__xdu_set_latin_main_font:nnnnn #1#2#3#4#5 @@ -287,12 +311,12 @@ \cs_new:Npn \__xdu_set_latin_sans_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setsansfont { #1 } [ \__xdu_set_latin_scale: ] } + { \setsansfont { #1 } [ \__xdu_set_latin_sans_scale: ] } { \setsansfont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] } @@ -300,12 +324,12 @@ \cs_new:Npn \__xdu_set_latin_mono_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setmonofont { #1 } [ \__xdu_set_latin_scale: \__xdu_off_latin_ligatures: ] } + { \setmonofont { #1 } [ \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: ] } { \setmonofont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] @@ -322,7 +346,7 @@ { \setsansfont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] } @@ -330,7 +354,7 @@ { \setmonofont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] @@ -2508,23 +2532,28 @@ \__xdu_lang_switch:nn { } { \cs_new_eq:NN \__xdu_org_chapter:n \chapter - \RenewDocumentCommand { \chapter } { m m } + \RenewDocumentCommand { \chapter } { m o } { \__xdu_org_chapter:n { ##1 } \__xdu_add_zh_toc:nn { chapter } - { \numberline { 第 \chinese { chapter } 章 \hspace { .3em } } ##2 } + { + \numberline { 第 \chinese { chapter } 章 \hspace { .3em } } + \IfNoValueTF { ##2 } { ##1 } { ##2 } + } } \cs_new_eq:NN \__xdu_org_section:n \section - \RenewDocumentCommand { \section } { m m } + \RenewDocumentCommand { \section } { m o } { \__xdu_org_section:n { ##1 } - \__xdu_add_zh_toc:nn { section } { \numberline { \thesection } ##2 } + \__xdu_add_zh_toc:nn { section } + { \numberline { \thesection } \IfNoValueTF { ##2 } { ##1 } { ##2 } } } \cs_new_eq:NN \__xdu_org_subsection:n \subsection - \RenewDocumentCommand { \subsection } { m m } + \RenewDocumentCommand { \subsection } { m o } { \__xdu_org_subsection:n { ##1 } - \__xdu_add_zh_toc:nn { subsection } { \numberline { \thesubsection } ##2 } + \__xdu_add_zh_toc:nn { subsection } + { \numberline { \thesubsection } \IfNoValueTF { ##2 } { ##1 } { ##2 } } } } \dim_set:Nn \abovedisplayskip { 12bp } diff --git a/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls b/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls index 7286c2ad01a..b167d090698 100644 --- a/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls +++ b/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls @@ -21,14 +21,15 @@ %% The Current Maintainer of this work is @note286 in GitHub and CTAN. %% %% This work consists of the files README.md, xduts.dtx, and xduts.ins -%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls. +%% and the derived files xduts.pdf, xdufont.sty, +%% xduugtp.cls, xdupgthesis.cls, and xduugthesis.cls. %% %% The copyright of xdulogo.pdf is Xidian University. %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplClass{xduugthesis} - {2023/01/16}{4.1.1.0} + {2023/01/28}{4.3.0.0} {Xidian University Undergraduate Thesis document class} \RequirePackage { xparse, l3keys2e } \PassOptionsToPackage { quiet } { xeCJK } @@ -51,6 +52,8 @@ \tl_new:N \l__xdu_fake_bold_tl \tl_new:N \l__xdu_fake_slant_tl \tl_new:N \l__xdu_latin_font_tl +\tl_new:N \l__xdu_latin_sans_scale_tl +\tl_new:N \l__xdu_latin_mono_scale_tl \tl_new:N \l__xdu_math_font_tl \tl_new:N \l__xdu_unicode_math_tl \tl_new:N \l__xdu_font_type_tl @@ -62,6 +65,10 @@ { \tl_set_eq:NN \l__xdu_cjk_font_tl \l_keys_choice_tl }, cjk-fake-bold .tl_set:N = \l__xdu_fake_bold_tl, cjk-fake-slant .tl_set:N = \l__xdu_fake_slant_tl, + latin-sans-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_sans_scale_tl \l_keys_choice_tl }, + latin-mono-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_mono_scale_tl \l_keys_choice_tl }, latin-font .choices:nn = { tac, tacn, thcs, gyre, none } { \tl_set_eq:NN \l__xdu_latin_font_tl \l_keys_choice_tl }, math-font .choices:nn = @@ -78,14 +85,16 @@ } \keys_set:nn { xdu } { - style / cjk-font = fandol, - style / cjk-fake-bold = 3, - style / cjk-fake-slant = 0.2, - style / latin-font = gyre, - style / math-font = cm, - style / unicode-math = { }, - style / font-type = font, - style / font-path = fonts + style / cjk-font = fandol, + style / cjk-fake-bold = 3, + style / cjk-fake-slant = 0.2, + style / latin-font = gyre, + style / latin-sans-scale = off, + style / latin-mono-scale = off, + style / math-font = cm, + style / unicode-math = { }, + style / font-type = font, + style / font-path = fonts } \cs_new:Npn \__xdu_select_font:nn #1#2 { @@ -269,8 +278,23 @@ ItalicFont = { #2 }, BoldItalicFont = { #3 } } -\cs_new:Npn \__xdu_set_latin_scale: - { Scale = MatchLowercase , } +\cs_new:Npn \__xdu_set_latin_sans_scale: { } +\cs_new:Npn \__xdu_set_latin_mono_scale: { } +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l__xdu_latin_sans_scale_tl { upper } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_latin_sans_scale_tl { lower } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchLowercase , } } + } + \tl_if_eq:NnTF \l__xdu_set_latin_mono_scale { upper } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_set_latin_mono_scale { lower } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchLowercase , } } + } + } \cs_new:Npn \__xdu_off_latin_ligatures: { Ligatures = CommonOff , } \cs_new:Npn \__xdu_set_latin_main_font:nnnnn #1#2#3#4#5 @@ -288,12 +312,12 @@ \cs_new:Npn \__xdu_set_latin_sans_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setsansfont { #1 } [ \__xdu_set_latin_scale: ] } + { \setsansfont { #1 } [ \__xdu_set_latin_sans_scale: ] } { \setsansfont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] } @@ -301,12 +325,12 @@ \cs_new:Npn \__xdu_set_latin_mono_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setmonofont { #1 } [ \__xdu_set_latin_scale: \__xdu_off_latin_ligatures: ] } + { \setmonofont { #1 } [ \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: ] } { \setmonofont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] @@ -323,7 +347,7 @@ { \setsansfont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] } @@ -331,7 +355,7 @@ { \setmonofont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] diff --git a/Master/texmf-dist/tex/xelatex/xduts/xduugtp.cls b/Master/texmf-dist/tex/xelatex/xduts/xduugtp.cls index 77a527a68e5..b87dee30908 100644 --- a/Master/texmf-dist/tex/xelatex/xduts/xduugtp.cls +++ b/Master/texmf-dist/tex/xelatex/xduts/xduugtp.cls @@ -21,14 +21,15 @@ %% The Current Maintainer of this work is @note286 in GitHub and CTAN. %% %% This work consists of the files README.md, xduts.dtx, and xduts.ins -%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls. +%% and the derived files xduts.pdf, xdufont.sty, +%% xduugtp.cls, xdupgthesis.cls, and xduugthesis.cls. %% %% The copyright of xdulogo.pdf is Xidian University. %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplClass{xduugtp} - {2023/01/16}{4.1.1.0} + {2023/01/28}{4.3.0.0} {Xidian University Undergraduate Thesis Proposal class} \RequirePackage { xparse, l3keys2e } \PassOptionsToPackage { quiet } { xeCJK } @@ -47,6 +48,8 @@ \tl_new:N \l__xdu_fake_bold_tl \tl_new:N \l__xdu_fake_slant_tl \tl_new:N \l__xdu_latin_font_tl +\tl_new:N \l__xdu_latin_sans_scale_tl +\tl_new:N \l__xdu_latin_mono_scale_tl \tl_new:N \l__xdu_math_font_tl \tl_new:N \l__xdu_unicode_math_tl \tl_new:N \l__xdu_font_type_tl @@ -58,6 +61,10 @@ { \tl_set_eq:NN \l__xdu_cjk_font_tl \l_keys_choice_tl }, cjk-fake-bold .tl_set:N = \l__xdu_fake_bold_tl, cjk-fake-slant .tl_set:N = \l__xdu_fake_slant_tl, + latin-sans-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_sans_scale_tl \l_keys_choice_tl }, + latin-mono-scale .choices:nn = { upper, lower, off } + { \tl_set_eq:NN \l__xdu_latin_mono_scale_tl \l_keys_choice_tl }, latin-font .choices:nn = { tac, tacn, thcs, gyre, none } { \tl_set_eq:NN \l__xdu_latin_font_tl \l_keys_choice_tl }, math-font .choices:nn = @@ -74,14 +81,16 @@ } \keys_set:nn { xdu } { - style / cjk-font = fandol, - style / cjk-fake-bold = 3, - style / cjk-fake-slant = 0.2, - style / latin-font = gyre, - style / math-font = cm, - style / unicode-math = { }, - style / font-type = font, - style / font-path = fonts + style / cjk-font = fandol, + style / cjk-fake-bold = 3, + style / cjk-fake-slant = 0.2, + style / latin-font = gyre, + style / latin-sans-scale = off, + style / latin-mono-scale = off, + style / math-font = cm, + style / unicode-math = { }, + style / font-type = font, + style / font-path = fonts } \cs_new:Npn \__xdu_select_font:nn #1#2 { @@ -265,8 +274,23 @@ ItalicFont = { #2 }, BoldItalicFont = { #3 } } -\cs_new:Npn \__xdu_set_latin_scale: - { Scale = MatchLowercase , } +\cs_new:Npn \__xdu_set_latin_sans_scale: { } +\cs_new:Npn \__xdu_set_latin_mono_scale: { } +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l__xdu_latin_sans_scale_tl { upper } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_latin_sans_scale_tl { lower } + { \cs_set:Npn \__xdu_set_latin_sans_scale: { Scale = MatchLowercase , } } + } + \tl_if_eq:NnTF \l__xdu_set_latin_mono_scale { upper } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchUppercase , } } + { + \tl_if_eq:NnT \l__xdu_set_latin_mono_scale { lower } + { \cs_set:Npn \__xdu_set_latin_mono_scale: { Scale = MatchLowercase , } } + } + } \cs_new:Npn \__xdu_off_latin_ligatures: { Ligatures = CommonOff , } \cs_new:Npn \__xdu_set_latin_main_font:nnnnn #1#2#3#4#5 @@ -284,12 +308,12 @@ \cs_new:Npn \__xdu_set_latin_sans_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setsansfont { #1 } [ \__xdu_set_latin_scale: ] } + { \setsansfont { #1 } [ \__xdu_set_latin_sans_scale: ] } { \setsansfont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] } @@ -297,12 +321,12 @@ \cs_new:Npn \__xdu_set_latin_mono_font:nnnnn #1#2#3#4#5 { \str_if_eq:NNTF { \l__xdu_font_type_tl } { font } - { \setmonofont { #1 } [ \__xdu_set_latin_scale: \__xdu_off_latin_ligatures: ] } + { \setmonofont { #1 } [ \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: ] } { \setmonofont { #2 } [ \__xdu_font_path: - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 } ] @@ -319,7 +343,7 @@ { \setsansfont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_sans_scale: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] } @@ -327,7 +351,7 @@ { \setmonofont { #1 } [ - \__xdu_set_latin_scale: + \__xdu_set_latin_mono_scale: \__xdu_off_latin_ligatures: \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 } ] |