diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-12-27 21:56:16 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-12-27 21:56:16 +0100 |
commit | db25374e65d39dc254ddce11b40ad4a95e6a385b (patch) | |
tree | 9e0c569395847f1db266ea0e80660e8680d26318 /tex/context/base/mkxl/driv-shp.lmt | |
parent | 32ca60de005df4b45e8904ab63e0e03978331c6f (diff) | |
download | context-db25374e65d39dc254ddce11b40ad4a95e6a385b.tar.gz |
2022-12-27 21:04:00
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) |