OSDN Git Service

Change the meaning of the argument in jaxspmode.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 22 Nov 2011 04:59:18 +0000 (13:59 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 22 Nov 2011 11:55:04 +0000 (20:55 +0900)
注意:jaxspmode と alxspmode は完全に同じものになります.
また,pTeX の \inhibitxspcode との(数値の)互換性はなくなりました.
(preonly, postonly 等,文字列で書くのはそのままです.)

jaxspmode, alxspmode で設定を共有するのならばこれでいいはず.

src/luatexja-core.sty
src/luatexja/jfmglue.lua

index 666a6fe..fdbb74f 100644 (file)
 
 % jaxspmode = {<char_code>, <mode>}
 % 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},
index e716f23..be18a57 100644 (file)
@@ -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