summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-02 22:24:14 +0000
committerKarl Berry <karl@freefriends.org>2020-05-02 22:24:14 +0000
commit15f0c94913f0d5cb24dd909c5358b3a997994dd7 (patch)
tree9043df32cd0199835f5b3f9804ad132907857139 /Master/texmf-dist/tex/latex/ctex/ctexsize.sty
parent151fbc4b66cb3705f6ce20368a2c6f7c06b8d57d (diff)
ctex (2may20)
git-svn-id: svn://tug.org/texlive/trunk@54976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexsize.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexsize.sty85
1 files changed, 53 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
index 868a30b57de..8b030787cd5 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
+++ b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
@@ -6,9 +6,9 @@
%%
%% ctex.dtx (with options: `style,ctexsize')
%%
-%% Copyright (C) 2003--2019
+%% Copyright (C) 2003--2020
%% CTEX.ORG and any individual authors listed in the documentation.
-%% ------------------------------------------------------------------------------
+%% ---------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -20,22 +20,40 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-%% This work has the LPPL maintenance status `maintained'.
+%% This work has the LPPL maintenance status "maintained".
%%
-%% The Current Maintainers of this work are Leo Liu, Qing Lee and Liam Huang.
-%%
-%% ------------------------------------------------------------------------------
+%% ---------------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 735dfe2 2019-05-29 21:42:29 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese font size definition (CTEX)}
\ProvidesExplPackage{ctexsize}
- {\ExplFileDate}{2.4.16}{\ExplFileDescription}
+ {\ExplFileDate}{2.5.1}{\ExplFileDescription}
\RequirePackage { xparse , l3keys2e }
+\RequirePackage { fix-cm }
+\cs_new_protected:Npn \ctex_define_option:n
+ { \keys_define:nn { ctex / option } }
+\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
+ {
+ \use:x
+ {
+ \ExplSyntaxOff
+ \char_set_catcode_letter:n { 64 }
+ #1
+ \exp_not:n {#2}
+ \bool_if:NTF \l__kernel_expl_bool
+ { \ExplSyntaxOn }
+ { \ExplSyntaxOff }
+ \char_set_catcode:nn { 64 } { \char_value_catcode:n { 64 } }
+ #3
+ }
+ }
+\cs_new_protected:Npn \ctex_file_input:n #1
+ { \ctex_file_wrapper:nnn { } { \file_input:n {#1} } { } }
\int_new:N \g__ctex_font_size_int
-\int_set:Nn \g__ctex_font_size_int { -1 }
-\keys_define:nn { ctex / option }
+\int_gset:Nn \g__ctex_font_size_int { -1 }
+\ctex_define_option:n
{
zihao .choice: ,
zihao .value_required:n = true ,
@@ -57,12 +75,12 @@
#1 .value_forbidden:n = true ,
}
}
-\use:x { \keys_define:nn { ctex / option } { \exp_not:o { \l__ctex_tmp_tl } } }
+\exp_args:No \ctex_define_option:n { \l__ctex_tmp_tl }
\tl_clear:N \l__ctex_tmp_tl
\ProcessKeysOptions { ctex / option }
\NewDocumentCommand \zihao { m }
{ \exp_args:Nx \ctex_zihao:n {#1} \tex_ignorespaces:D }
-\cs_new_protected_nopar:Npn \ctex_zihao:n #1
+\cs_new_protected:Npn \ctex_zihao:n #1
{
\prop_get:NnNTF \c__ctex_font_size_prop {#1} \l__ctex_font_size_tl
{ \exp_after:wN \fontsize \l__ctex_font_size_tl \selectfont }
@@ -77,7 +95,7 @@
}
\prop_new:N \c__ctex_font_size_prop
\seq_new:N \c__ctex_font_size_seq
-\cs_new_protected_nopar:Npn \__ctex_save_font_size:nn #1#2
+\cs_new_protected:Npn \__ctex_save_font_size:nn #1#2
{
\use:x
{
@@ -109,12 +127,12 @@
{ 0 } { 42 bp }
}
{ \__ctex_save_font_size:nn #1 }
-\cs_new_protected_nopar:Npn \ctex_declare_math_sizes:nnnn #1#2#3#4
+\cs_new_protected:Npn \ctex_declare_math_sizes:nnnn #1#2#3#4
{
\__ctex_get_font_sizes:Nn \l__ctex_font_size_tl { {#1} {#2} {#3} {#4} }
\exp_after:wN \DeclareMathSizes \l__ctex_font_size_tl
}
-\cs_new_protected_nopar:Npn \__ctex_get_font_sizes:Nn #1#2
+\cs_new_protected:Npn \__ctex_get_font_sizes:Nn #1#2
{
\tl_clear:N #1
\tl_map_inline:nn {#2}
@@ -151,15 +169,19 @@
{ \msg_error:nnn { ctex } { fontsize } {#2} }
}
\cs_new_protected:Npn \__ctex_set_font_size:nnNn #1#2#3#4
- { \cs_set_protected_nopar:Npn #3 { \@setfontsize #3 {#1} {#2} #4 } }
-\if_case:w \g__ctex_font_size_int
- \ctex_file_input:n { ctex-c5size.clo }
-\or:
- \ctex_file_input:n { ctex-cs4size.clo }
-\fi:
+ { \cs_set_protected:Npn #3 { \@setfontsize #3 {#1} {#2} #4 } }
+\int_case:nn { \g__ctex_font_size_int }
+ {
+ { 0 } { \ctex_file_input:n { ctex-c5size.clo } }
+ { 1 } { \ctex_file_input:n { ctex-cs4size.clo } }
+ }
\normalsize
%%
-%% This package consists of the file ctex.dtx,
+%% This package consists of the files ctex.dtx,
+%% ctxdoc.cls,
+%% ctxdocstrip.tex,
+%% ctex-zhconv.lua,
+%% ctex-zhconv-make.lua,
%% and the derived files ctex.pdf,
%% ctex.ins,
%% ctex.sty,
@@ -169,16 +191,15 @@
%% ctexbook.cls,
%% ctexrep.cls,
%% ctexbeamer.cls,
-%% ctxdoc.cls,
%% ctexcap.sty,
%% ctexhook.sty,
%% ctexpatch.sty,
%% ctex-c5size.clo,
%% ctex-cs4size.clo,
-%% ctex-article.def,
-%% ctex-book.def,
-%% ctex-report.def,
-%% ctex-beamer.def,
+%% ctex-heading-article.def,
+%% ctex-heading-book.def,
+%% ctex-heading-report.def,
+%% ctex-heading-beamer.def,
%% ctex-scheme-plain.def,
%% ctex-scheme-plain-article.def,
%% ctex-scheme-plain-book.def,
@@ -193,6 +214,7 @@
%% ctex-name-utf8.cfg,
%% ctex.cfg,
%% ctexopts.cfg,
+%% ctexbackend.cfg,
%% ctex-engine-pdftex.def,
%% ctex-engine-xetex.def,
%% ctex-engine-luatex.def,
@@ -210,26 +232,25 @@
%% jt2zhrm.fd,
%% jt2zhsf.fd,
%% jt2zhtt.fd,
-%% ctex-fontset-windows.def,
-%% ctex-fontset-windowsnew.def,
-%% ctex-fontset-windowsold.def,
%% ctex-fontset-adobe.def,
%% ctex-fontset-fandol.def,
+%% ctex-fontset-founder.def,
%% ctex-fontset-mac.def,
%% ctex-fontset-macnew.def,
%% ctex-fontset-macold.def,
-%% ctex-fontset-founder.def,
%% ctex-fontset-ubuntu.def,
+%% ctex-fontset-windows.def,
%% ctexspa.def,
%% ctexpunct.spa,
%% ctexmakespa.tex,
%% ctexspamacro.tex,
-%% ctxdocstrip.tex,
%% zhadobefonts.tex,
%% zhfandolfonts.tex,
%% zhfounderfonts.tex,
+%% zhmacfonts.tex,
%% zhubuntufonts.tex,
%% zhwindowsfonts.tex,
+%% ctex-zhconv-index.lua,
%% translator-theorem-dictionary-ChineseGBK.dict,
%% translator-theorem-dictionary-ChineseUTF8.dict, and
%% README.md.