summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def
diff options
context:
space:
mode:
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.def63
1 files changed, 22 insertions, 41 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 c2073b9422f..7db74f2b2dd 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
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx f12457f 2016-05-16 00:55:34 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
{LuaLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-luatex.def}
- {\ExplFileDate}{2.4.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.3}{\ExplFileDescription}
\msg_new:nnn { ctex } { luatexja-loaded }
{
Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\
@@ -82,55 +82,36 @@
\ltj@allalchar
}
\AtEndUTFCommand { \group_end: }
-\RequirePackage { lltjp-fontspec }
-\cs_set:Npn \emshape { \itshape }
-\cs_set:Npn \eminnershape { \upshape }
-\cs_new_protected_nopar:Npn \__ctex_ltj_um_define_math_chars:
+\cs_set_protected:Npn \fontspec_visible_space:
{
- \group_begin:
- \cs_set_protected:Npn \__um_sym:nnn ##1##2##3
- {
- \tl_if_in:nnT
- {
- \mathord \mathalpha \mathbin \mathrel
- \mathpunct \mathop \mathfence
- }
- { ##3 }
- { \__ctex_ltj_um_char:Nn ##2 { ##1 } }
- }
- \__um_input_math_symbol_table:
- \group_end:
+ \font_glyph_if_exist:NnTF \font { "2423 }
+ { \ltjalchar "2423 \exp_stop_f: }
+ { \fontspec_visible_space_fallback: }
}
-\cs_new_protected:Npn \__ctex_ltj_um_char:Nn #1#2
+\cs_new_protected:Npn \ctex_ltj_set_math_letter:NN #1#2
{
- \__ctex_ltj_um_char_aux:Nx #1 { \char_generate:nn {#2} { 12 } }
- \ltjsetmathletter {#2}
+ \group_begin:
+ \cs_set_protected:Npn #1 ##1##2##3
+ { \ltjsetmathletter { ##1 } }
+ #2
+ \group_end:
}
-\cs_new_protected:Npn \__ctex_ltj_um_char_aux:Nn #1#2
+\ctex_at_end_package:nn { unicode-math }
{
- \cs_gset_protected_nopar:Npn #1
+ \cs_if_exist:NTF \um_input_math_symbol_table:
{
- \mode_if_math:TF
- {#2}
- {
- {
- \lua_now_x:n { tex.globaldefs = 0 }
- \ltj@allalchar #2
- }
- }
+ \ctex_ltj_set_math_letter:NN
+ \um_sym:nnn
+ \um_input_math_symbol_table:
}
- }
-\cs_generate_variant:Nn \__ctex_ltj_um_char_aux:Nn { Nx }
-\ctex_at_end_package:nn { unicode-math }
- {
- \cs_set_eq:NN \__um_define_math_chars: \__ctex_ltj_um_define_math_chars:
- \@ifpackagelater { unicode-math } { 2015/06/28 }
{
\cs_set_eq:NN \use@mathgroup \ctex_ltj_use_math_group:Nn
\cs_set_protected_nopar:Npn \ctex_ltj_math_group_hook:
{ \__um_switchto_literal: }
+ \ctex_ltj_set_math_letter:NN
+ \__um_sym:nnn
+ \__um_input_math_symbol_table:
}
- { }
}
\ctex_at_end_package:nn { listings }
{
@@ -631,12 +612,12 @@
{
\prop_if_empty:NF \g__ctex_ltj_family_font_name_prop
{
- \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l__ctex_ltj_tmpa_tl
+ \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l__ctex_ltj_tmp_tl
{
\str_if_eq_x:nnTF { \CJKfamilydefault } { \CJKrmdefault }
{ \use:n }
{
- \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l__ctex_ltj_tmpa_tl
+ \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l__ctex_ltj_tmp_tl
{ \tl_gset:Nn \CJKfamilydefault { \CJKrmdefault } \use_none:n }
{ \use:n }
}