From e1e8a425261a2321975a6d7276f0c2d4c577f928 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Tue, 22 Nov 2011 13:59:18 +0900 Subject: [PATCH] Change the meaning of the argument in jaxspmode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 注意:jaxspmode と alxspmode は完全に同じものになります. また,pTeX の \inhibitxspcode との(数値の)互換性はなくなりました. (preonly, postonly 等,文字列で書くのはそのままです.) jaxspmode, alxspmode で設定を共有するのならばこれでいいはず. --- src/luatexja-core.sty | 6 +++--- src/luatexja/jfmglue.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/luatexja-core.sty b/src/luatexja-core.sty index 666a6fe..fdbb74f 100644 --- a/src/luatexja-core.sty +++ b/src/luatexja-core.sty @@ -293,14 +293,14 @@ % jaxspmode = {, } % mode: inhibit, preonly, postonly, allow -% or 0 2 1 3 +% or 0 1 2 3 \define@key[ltj]{japaram}{jaxspmode}{% \inhibitxspcode \expandafter\ltj@set@jaxspmode#1:\relax} \def\ltj@set@jaxspmode#1,#2:{% \lowercase{\edef\ltj@temp{#2}}% \def\ltj@tempa{inhibit}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{0}\fi - \def\ltj@tempa{preonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{2}\fi - \def\ltj@tempa{postonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{1}\fi + \def\ltj@tempa{preonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{1}\fi + \def\ltj@tempa{postonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{2}\fi \def\ltj@tempa{allow}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{3}\fi \directlua{luatexja.stack.set_stack_table(ltj.isglobal, 'xsp', \ltj@safe@num@or\ltj@defnum{#1}, diff --git a/src/luatexja/jfmglue.lua b/src/luatexja/jfmglue.lua index e716f23..be18a57 100644 --- a/src/luatexja/jfmglue.lua +++ b/src/luatexja/jfmglue.lua @@ -332,8 +332,8 @@ local function set_np_xspc_jachar(x) Np.lend = 0 end y = ltjs_get_penalty_table('xsp', x.char, 3, box_stack_level) - Np.xspc_before = (y>=2) - Np.xspc_after = (y%2==1) + Np.xspc_before = (y%2==1) + Np.xspc_after = (y>=2) Np.auto_kspc = (has_attr(x, attr_autospc)==1) Np.auto_xspc = (has_attr(x, attr_autoxspc)==1) end -- 2.11.0