From a5e800bccfe7726898d846d3527a1c4937edcb5b Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Mon, 10 Sep 2007 21:39:08 +0000 Subject: [PATCH] Fix a bug in mid-aligned line positioning Originally committed to SVN as r1558. --- automation/include/karaskel-auto4.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/include/karaskel-auto4.lua b/automation/include/karaskel-auto4.lua index d65b01b1b..c0a6236c8 100644 --- a/automation/include/karaskel-auto4.lua +++ b/automation/include/karaskel-auto4.lua @@ -353,7 +353,7 @@ function karaskel.preproc_line_pos(meta, styles, line) line.valign = "bottom" elseif line.styleref.align >= 4 and line.styleref.align <= 6 then -- Mid aligned - line.top = (meta.res_y - line.eff_margin_t - line.eff_margin_b) / 2 + line.eff_margin_t + line.top = (meta.res_y - line.eff_margin_t - line.eff_margin_b - line.height) / 2 + line.eff_margin_t line.middle = line.top + line.height / 2 line.bottom = line.top + line.height line.y = line.middle