OSDN Git Service

test17-priority: pow => ^
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 1 Apr 2019 06:50:50 +0000 (15:50 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 1 Apr 2019 06:50:50 +0000 (15:50 +0900)
test/test17-priority.pdf
test/test17-priority.tex

index 26eab79..7ce2d6e 100644 (file)
Binary files a/test/test17-priority.pdf and b/test/test17-priority.pdf differ
index 241468e..832f50d 100644 (file)
@@ -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) )