• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: Commit

ソースコードの管理場所


Commit MetaInfo

Revision82b1a53d17c53640c14eb3ca43dd6964a22dc065 (tree)
Time2018-08-08 13:53:00
AuthorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Log Message

ltj-lineskip.lua: ignore discardables

Change Summary

Incremental Difference

--- a/src/ltj-lineskip.lua
+++ b/src/ltj-lineskip.lua
@@ -8,6 +8,7 @@ luatexja.lineskip = luatexja.lineskip or {}
88 local to_direct = node.direct.todirect
99 local ltjl = luatexja.lineskip
1010 local id_glue = node.id('glue')
11+local id_penalty = node.id('penalty')
1112 local id_hlist = node.id('hlist')
1213 local setfield = node.direct.setfield
1314 local getfield = node.direct.getfield
@@ -55,7 +56,9 @@ do
5556 local p, n = node_prev(x), node_next(x)
5657 if p then
5758 local pid = getid(p)
58- while (12<=pid) and (pid<=14) and node_prev(p) do p = node_prev(p); pid = getid(p) end
59+ while (id_glue<=pid) and (pid<=id_penalty) and node_prev(p) do
60+ p = node_prev(p); pid = getid(p)
61+ end
5962 if pid==id_hlist and getid(n)==id_hlist then
6063 local normal = bw - getfield(p, 'depth') - getfield(n, 'height')
6164 local lmin, adj = ltj_profiler(p, n, false, bw)
@@ -85,7 +88,7 @@ do
8588 - getfield(new_b, mirrored and 'depth' or 'height')
8689 local lmin, adj = nil, 0
8790 local tail = to_direct(tex.nest[tex.nest.ptr].tail)
88- if tail and getid(tail)==id_glue and getsubtype(tail)==3 then
91+ while tail and (id_glue<=getid(tail)) and (getid(tail)<=id_penalty) do
8992 tail = node_prev(tail)
9093 end
9194 if tail then
Show on old repository browser