X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test%2Ftest17-priority.tex;h=832f50d11d62a69fd1a97f3de9507f833a28d1b3;hb=f078ac2f7998a102c7ec765e725f2269eed9f872;hp=241468e90b72347c9d99b3269d1e013a6b6dadc2;hpb=26649839d59f6fb2d9517806a2850200a16895bc;p=luatex-ja%2Fluatexja.git diff --git a/test/test17-priority.tex b/test/test17-priority.tex index 241468e..832f50d 100644 --- a/test/test17-priority.tex +++ b/test/test17-priority.tex @@ -206,7 +206,7 @@ xkanjiskip: \ltjgetparameter{xkanjiskip}} local t = tex.getbox(a) local x = {} for n in node.traverse_id(node.id('hlist'), t.head) do - local b = n.glue_order>0 and 0 or math.floor(100*math.pow(n.glue_set, 3)+0.5); + local b = n.glue_order>0 and 0 or math.floor(100*n.glue_set^3+0.5); if b<=12 then x[#x+1]={2,b} % decent elseif n.glue_sign==1 and b>=100 then x[#x+1]={0,b} %very loose elseif n.glue_sign==1 then x[#x+1]={1,b} % loose @@ -215,7 +215,7 @@ xkanjiskip: \ltjgetparameter{xkanjiskip}} x[0]={2, 0} local d = 0 for i=1,#x do - d = d + math.floor(math.pow(tex.linepenalty + x[i][2], 2)+0.5) + d = d + math.floor((tex.linepenalty + x[i][2])^2+0.5) if math.abs(x[i][1]-x[i-1][1])>=1 then d = d + tex.adjdemerits end end tex.sprint(-2,tostring(d) )