diff options
Diffstat (limited to 'tex/context/base/mkxl/driv-shp.lmt')
-rw-r--r-- | tex/context/base/mkxl/driv-shp.lmt | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt index 7aba4ac01..9a37ccf8a 100644 --- a/tex/context/base/mkxl/driv-shp.lmt +++ b/tex/context/base/mkxl/driv-shp.lmt @@ -856,16 +856,18 @@ local hlist_out, vlist_out do local save_h = cur_h if pos_r == righttoleft_code then cur_h = ref_h - shipbox_h + cur_h - cur_h = width * (cur_h // width) + cur_h = width * (cur_h / width) cur_h = ref_h - shipbox_h - cur_h else cur_h = ref_h - shipbox_h - cur_h - cur_h = width * (cur_h // width) + cur_h = width * (cur_h / width) cur_h = ref_h - shipbox_h - cur_h end if cur_h < save_h then cur_h = cur_h + width end + local lr = gluewidth % width + cur_h = cur_h + lr / 2 elseif subtype == leaders_code then local save_h = cur_h cur_h = width * (cur_h / width) @@ -873,8 +875,8 @@ local hlist_out, vlist_out do cur_h = cur_h + width end else - lq = gluewidth / width - lr = gluewidth % width + local lq = gluewidth / width + local lr = gluewidth % width if subtype == cleaders_code then cur_h = cur_h + lr / 2 else @@ -1306,11 +1308,13 @@ local hlist_out, vlist_out do if subtype == gleaders_code then save_v = cur_v cur_v = ref_v - shipbox_v - cur_v - cur_v = total * (cur_v // total) + cur_v = total * (cur_v / total) cur_v = ref_v - shipbox_v - cur_v if cur_v < save_v then cur_v = cur_v + total end + local lr = glueheight % total + cur_v = cur_v + lr / 2 elseif subtype == leaders_code then -- aleader save_v = cur_v cur_v = top_edge + total * ((cur_v - top_edge) // total) @@ -1318,13 +1322,13 @@ local hlist_out, vlist_out do cur_v = cur_v + total end else - lq = glueheight / total - lr = glueheight % total + local lq = glueheight / total + local lr = glueheight % total if subtype == cleaders_code then - cur_v = cur_v + lr // 2 + cur_v = cur_v + lr / 2 else ly = lr // (lq + 1) - cur_v = cur_v + (lr - (lq - 1) * ly) // 2 + cur_v = cur_v + (lr - (lq - 1) * ly) / 2 end end local shift = getshift(leader) |