diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-07 21:22:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-07 21:22:23 +0000 |
commit | fc7eee8c175b307abf9396aed71c1d49bd1c0fe4 (patch) | |
tree | 6173e8f922c539a792fcbde24e58cb8db06dd5e2 /Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def | |
parent | bb3a18a8791a2f32a6c8a3e0c9ee15a643aefd89 (diff) |
ctex (7apr19)
git-svn-id: svn://tug.org/texlive/trunk@50843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def index 931d4739967..bcdc2e50814 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `luatex') %% -%% Copyright (C) 2003--2018 +%% Copyright (C) 2003--2019 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 096f319 2018-05-02 19:51:41 +0800 Liam Huang <liamhuang0205@gmail.com> $ +\GetIdInfo$Id: ctex.dtx cb8bf3c 2019-04-07 23:32:09 +0800 Qing Lee <sobenlee@gmail.com> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.4.14}{\ExplFileDescription} + {\ExplFileDate}{2.4.15}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -81,13 +81,13 @@ \AtBeginUTFCommand { \group_begin: - \lua_now_x:n { tex.globaldefs = 0 } + \lua_now:e { tex.globaldefs = 0 } \ltj@allalchar } \AtEndUTFCommand { \group_end: } \cs_set_protected:Npn \fontspec_visible_space: { - \etex_iffontchar:D \tex_font:D "2423 \exp_stop_f: + \tex_iffontchar:D \tex_font:D "2423 \exp_stop_f: \ltjalchar "2423 \exp_stop_f: \else: \fontspec_visible_space_fallback: @@ -155,7 +155,7 @@ } \exp_after:wN \globaljfont \font@name \external@font \scan_stop: \font@name - \lua_now_x:n { font.current(tex.getattribute('ltj@curjfnt')) } + \lua_now:e { font.current(tex.getattribute('ltj@curjfnt')) } \use:c { \f@encoding + \f@family } \use:c { \curr@fontshape } } @@ -181,21 +181,21 @@ } \prg_new_conditional:Npnn \ctex_ltj_if_alternate_shape_exist:n #1 { T , F , TF } { - \lua_now_x:n { luatexja.jfont.does_alt_set ('\lua_escape_x:n {#1}') } + \lua_now:e { luatexja.jfont.does_alt_set ('\lua_escape:e {#1}') } \prg_return_true: \else: \prg_return_false: \fi: } \cs_new_nopar:Npn \__ctex_ltj_patch_external_font:w #1 ~ at - { #1 \lua_now_x:n { luatexja.jfont.print_aftl_address() } ~ at } + { #1 \lua_now:e { luatexja.jfont.print_aftl_address() } ~ at } \cs_new_protected_nopar:Npn \ctex_ltj_select_alternate_font: { \ctex_ltj_if_alternate_shape_exist:nT { \l__ctex_ltj_current_shape_tl } { - \lua_now_x:n + \lua_now:e { luatexja.jfont.output_alt_font_cmd - ('y', '\lua_escape_x:n { \l__ctex_ltj_current_shape_tl }') + ('y', '\lua_escape:e { \l__ctex_ltj_current_shape_tl }') } - \lua_now_x:n { luatexja.jfont.pickup_alt_font_a ('\f@size') } + \lua_now:e { luatexja.jfont.pickup_alt_font_a ('\f@size') } } } \tl_new:N \l__ctex_ltj_current_shape_tl @@ -216,16 +216,16 @@ \cs_new_protected_nopar:Npn \ltj@pickup@altfont@copy #1#2 { \ltj@@getjfontnumber #1 - \lua_now_x:n + \lua_now:e { luatexja.jfont.pickup_alt_font_b - ( \int_use:N \ltj@tempcntc, '\lua_escape_x:n {#2}' ) + ( \int_use:N \ltj@tempcntc, '\lua_escape:e {#2}' ) } } \cs_new:Npn \ctex_ltj_if_jfont:nTF #1 { - \lua_now_x:n - { luatexja.jfont.is_kenc( string.match('\lua_escape_x:n {#1}', '[^/]+') ) } + \lua_now:e + { luatexja.jfont.is_kenc( string.match('\lua_escape:e {#1}', '[^/]+') ) } \ifin@ \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn \fi: } \cs_new:Npn \ctex_ltj_if_jfont_math:NTF #1 @@ -315,7 +315,7 @@ \exp_not:N \DeclareFontSubstitution { \CJK@encoding } { song } { \mddefault } { \updefault } } -\lua_now_x:n { luatexja.jfont.add_kyenc_list('\CJK@encoding') } +\lua_now:e { luatexja.jfont.add_kyenc_list('\CJK@encoding') } \cs_new_protected_nopar:Npn \__ctex_ltj_change_encoding: { \tl_set_eq:NN \g_fontspec_encoding_tl \CJK@encoding } \DeclareFontFamily { \CJK@encoding } { song } { } @@ -462,7 +462,7 @@ } \cs_new_nopar:Npn \__ctex_ltj_msg_def_family_map:n #1 { - \str_case_x:nnF {#1} + \str_case_e:nnF {#1} { \CJKrmdefault { \token_to_str:N \setCJKmainfont } \CJKsfdefault { \token_to_str:N \setCJKsansfont } @@ -473,7 +473,7 @@ } \cs_new_nopar:Npn \__ctex_ltj_msg_family_map:n #1 { - \str_case_x:nnF {#1} + \str_case_e:nnF {#1} { \CJKrmdefault { \token_to_str:N \CJKrmdefault } \CJKsfdefault { \token_to_str:N \CJKsfdefault } @@ -636,7 +636,7 @@ } \cs_new_protected_nopar:Npn \__ctex_ltj_update_family_aux: { - \str_case_x:nn { \f@family } + \str_case_e:nn { \f@family } { { \rmdefault } { \CJKfamily { \CJKrmdefault } } { \sfdefault } { \CJKfamily { \CJKsfdefault } } @@ -651,7 +651,7 @@ { \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l__ctex_ltj_tmp_tl { - \str_if_eq_x:nnTF { \CJKfamilydefault } { \CJKrmdefault } + \str_if_eq:eeTF { \CJKfamilydefault } { \CJKrmdefault } { \use:n } { \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l__ctex_ltj_tmp_tl @@ -832,10 +832,10 @@ \__ctex_ltj_save_alternate_shape:cnn { \__ctex_ltj_alternate_cs:n { clear / \l__ctex_ltj_base_CJKfamily_tl } } { luatexja.jfont.clear_alt_font_latex } - { '\lua_escape_x:n { \CJK@encoding/#2/#3/#4 }' } + { '\lua_escape:e { \CJK@encoding/#2/#3/#4 }' } } \NewDocumentCommand \ctex_ltj_set_alternate_shape:nnn - { m m > { \SplitArgument { \c_one } { -> } } m } + { m m > { \SplitArgument { 1 } { -> } } m } { \ctex_ltj_set_alternate_shape:nnnn {#1} {#2} #3 } \cs_new_protected_nopar:Npn \ctex_ltj_set_alternate_shape:nnnn #1#2#3#4 { @@ -847,13 +847,13 @@ \int_eval:n { \tl_if_blank:nTF {#3} { "80 } {#3} } , \int_eval:n { \tl_if_blank:nTF {#4} { "10FFFF } {#4} } , } - '\lua_escape_x:n { \CJK@encoding/#2 }' , - '\lua_escape_x:n { \CJK@encoding/#1 }' + '\lua_escape:e { \CJK@encoding/#2 }' , + '\lua_escape:e { \CJK@encoding/#1 }' } } \cs_new_protected_nopar:Npn \ctex_ltj_set_alternate_shape:n #1 { - \lua_now_x:n { luatexja.jfont.set_alt_font_latex ( #1 ) } + \lua_now:e { luatexja.jfont.set_alt_font_latex ( #1 ) } \__ctex_ltj_save_alternate_shape:cnn { \__ctex_ltj_alternate_cs:n { reset / \l__ctex_ltj_base_CJKfamily_tl } } { luatexja.jfont.set_alt_font_latex } {#1} @@ -865,8 +865,8 @@ \ctex_ltj_set_alternate_shape:n { ##1 , - '\lua_escape_x:n { \CJK@encoding/#2 }' , - '\lua_escape_x:n { \CJK@encoding/#1 }' + '\lua_escape:e { \CJK@encoding/#2 }' , + '\lua_escape:e { \CJK@encoding/#1 }' } } } @@ -875,9 +875,9 @@ \group_begin: \cs_if_exist:NF #1 { \cs_set_eq:NN #1 \prg_do_nothing: } \cs_set_eq:NN \l__ctex_ltj_base_family_tl \scan_stop: - \cs_set_eq:NN \lua_escape_x:n \scan_stop: + \cs_set_eq:NN \lua_escape:e \scan_stop: \cs_gset_protected_nopar:Npx #1 - { \exp_not:o {#1} \exp_not:N \lua_now_x:n { #2 ( #3 ) } } + { \exp_not:o {#1} \exp_not:N \lua_now:e { #2 ( #3 ) } } \group_end: } \cs_generate_variant:Nn \__ctex_ltj_save_alternate_shape:Nnn { c } @@ -940,7 +940,7 @@ \tl_new:N \l__ctex_ltj_char_range_tl \prop_new:N \g__ctex_ltj_char_range_prop \NewDocumentCommand \ctex_ltj_save_char_range:n - { > { \SplitArgument { \c_one } { -> } } m } + { > { \SplitArgument { 1 } { -> } } m } { \ctex_ltj_save_char_range:nn #1 } \cs_new_protected_nopar:Npn \ctex_ltj_save_char_range:nn #1#2 { @@ -1035,7 +1035,7 @@ { \tl_gset:Nx \g__ctex_fontset_tl { - \lua_now_x:n + \lua_now:e { if ~ os.name == 'windows' then ~ tex.sprint ( 'windows' ) @@ -1127,7 +1127,7 @@ \newluafunction \g__ctex_kanjisize_func \group_begin: \char_set_catcode_space:n { 32 } -\lua_now_x:n +\lua_now:e { local nulltable = { } local t = lua.get_functions_table() @@ -1145,7 +1145,7 @@ } \group_end: \cs_new_protected_nopar:Npn \ctex_update_kanjisize: - { \luatex_luafunction:D \g__ctex_kanjisize_func } + { \tex_luafunction:D \g__ctex_kanjisize_func } \ctex_add_to_selectfont:n { \ctex_update_kanjisize: } \keys_define:nn { ctex } { |