[Dev-luatex] Wrong placement of image nodes in non left-right directions

Khaled Hosny khaledhosny at eglug.org
Thu Jan 22 13:41:04 CET 2009

On Wed, Jan 21, 2009 at 12:36:49AM +0100, Hartmut Henkel wrote:
> On Tue, 20 Jan 2009, Khaled Hosny wrote:
> > This new patch fixes BL_ and BR_ directions in vlist, it wasn't
> > working properly with the former patch.
> thanks a lot, but it seems it's not sufficient. The hpack/vpack
> algorithms don't get the right image dimensions, so the surrounding box
> sizes aren't calculated right and therefore \hrules and \vrules around
> the pictures are not always correct (i won't touch this now).

Ah, I see this, and I think I found why. This patch fixes this (at least
with my simple tests).


 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team
-------------- next part --------------
Index: luatex.web
--- luatex.web	(revision 1809)
+++ luatex.web	(working copy)
@@ -30097,7 +30097,9 @@
 @ @<Output a Image node in a vlist@>=
-begin cur_v:=cur_v+pdf_height(p)+pdf_depth(p);
+  edge_v:=cur_v;
+  cur_v:=cur_v+pdf_height(p)+pdf_depth(p);
   case box_direction(dvi_direction) of
   dir_TL_: begin
@@ -30114,6 +30116,7 @@
   othercases cur_h:=left_edge;
+  cur_h:=left_edge; cur_v:=edge_v+pdf_height(p)+pdf_depth(p);
 @ @<Output a Form node in a vlist@>=
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://www.ntg.nl/mailman/private/dev-luatex/attachments/20090122/c3189c43/attachment.bin>

More information about the dev-luatex mailing list