if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end
p.penalty = a
head = node_insert_before(head, Np.first, p)
- Bp[1] = p; set_attr(p, attr_icflag, KINSOKU)
+ table_insert(Bp, p); set_attr(p, attr_icflag, KINSOKU)
end
else for i, v in pairs(Bp) do add_penalty(v,a) end
end
if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end
p.penalty = a
head = node_insert_before(head, Np.first, p)
- Bp[1] = p; set_attr(p, attr_icflag, KINSOKU)
+ table_insert(Bp, p); set_attr(p, attr_icflag, KINSOKU)
end
else for i, v in pairs(Bp) do add_penalty(v,a) end
end
if g and g.id==id_glue then
local p = node_new(id_penalty)
p.penalty = 10000; head = node_insert_before(head, Np.first, p)
- Bp[1] = p; set_attr(p, attr_icflag, KINSOKU)
+ table_insert(Bp, p); set_attr(p, attr_icflag, KINSOKU)
end
else for i, v in pairs(Bp) do add_penalty(v,a) end
end