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.def31
1 files changed, 18 insertions, 13 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 5d0e587c18d..51d88db1d5c 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
@@ -24,10 +24,10 @@
%%
%% ---------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 76d4e94 2020-06-06 23:22:18 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx e805781 2020-08-23 21:30:35 +0800 Qing Lee <sobenlee@gmail.com> $
{LuaLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-luatex.def}
- {\ExplFileDate}{2.5.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.5.4}{\ExplFileDescription}
\msg_new:nnn { ctex } { luatexja-loaded }
{
Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\
@@ -42,6 +42,7 @@
\RequirePackage { fontspec }
\@ifpackagelater { fontspec } { 2020/02/21 } { }
{ \msg_error:nnn { ctex } { package-too-old } { fontspec } }
+\ctex_at_end:n { \char_set_catcode_comment:n { \ltjlineendcomment } }
\ExplSyntaxOff
\ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF}
\ltjdefcharrange{2}{"370-"4FF, "1F00-"1FFF}
@@ -65,16 +66,20 @@
"00B7, "2018, "2019, "201C, "201D, "2013, "2014, "2025, "2026, "2027, "2E3A}
\ltjsetparameter{jacharrange={-1, -2, -3, -4, -5, +6, +7, -8, +9}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
-\directlua{
- local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
- luatexja.stack.charprop_stack_table[0] = s and dofile(s) or {}
-}
-\ltjsetparameter{kanjiskip=\z@ plus .4pt minus .5pt,
- xkanjiskip=.25\zw plus 1pt minus 1pt,
- autospacing, autoxspacing, jacharrange={-1},
- yalbaselineshift=\z@, yjabaselineshift=\z@,
- jcharwidowpenalty=500, differentjfm=paverage
-}
+\@ifpackagelater{luatexja}{2020/08/08}
+ { \ltjsetparameter { autospacing, autoxspacing, differentjfm = paverage } }
+ {
+ \directlua{
+ local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
+ luatexja.stack.charprop_stack_table[0] = s and dofile(s) or {}
+ }
+ \ltjsetparameter{kanjiskip=\z@ plus .4pt minus .5pt,
+ xkanjiskip=.25\zw plus 1pt minus 1pt,
+ autospacing, autoxspacing, jacharrange={-1},
+ yalbaselineshift=\z@, yjabaselineshift=\z@,
+ jcharwidowpenalty=500, differentjfm=paverage
+ }
+ }
\ExplSyntaxOn
\cs_new_protected:Npn \CTEX@alchar #1
{ \CTEX@beginallalchar #1 \CTEX@endallalchar }
@@ -1092,7 +1097,7 @@
\tl_new:N #1
\cs_if_exist:NTF #3
{ \tl_gput_right:Nn #3 {#1} }
- { \ctex_patch_cmd:Nnn #2 {#4} { #1#4 } }
+ { \ctex_parse_name:NN \tl_replace_once:Nnn #2 {#4} { #1#4 } }
}
\ctex_provide_font_hook:NNN \rmfamily \@rmfamilyhook \selectfont
\ctex_provide_font_hook:NNN \sffamily \@sffamilyhook \selectfont