When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas? Regards, -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
Forgot to say that I'm using luatex 0.30.1 (the debian package) On Sun, Dec 07, 2008 at 11:14:18PM +0200, Khaled Hosny wrote:
When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas?
Regards,
-- Khaled Hosny Arabic localizer and member of Arabeyes.org team
-- Khaled Hosny Arabic localizer and member of Arabeyes.org team
Khaled Hosny wrote:
Forgot to say that I'm using luatex 0.30.1 (the debian package)
On Sun, Dec 07, 2008 at 11:14:18PM +0200, Khaled Hosny wrote:
When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas?
if you use plain tex (or so) then you need to set the pdf page offsets (tex by design has some 1 in offsets and backends need to compensate that) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
-------- Original-Nachricht --------
Datum: Mon, 08 Dec 2008 08:22:51 +0100 Von: Hans Hagen
An: Khaled Hosny CC: luatex development list Betreff: Re: [Dev-luatex] Differences between PDF and DVI
Khaled Hosny wrote:
Forgot to say that I'm using luatex 0.30.1 (the debian package)
On Sun, Dec 07, 2008 at 11:14:18PM +0200, Khaled Hosny wrote:
When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas?
if you use plain tex (or so) then you need to set the pdf page offsets (tex by design has some 1 in offsets and backends need to compensate that)
it's some error (or at least inconsistency between DVI and PDF output) in handling \pagerightoffset. The margin in RL mode should not be affected by \hoffset, but it is, differently for DVI and PDF. Needs digging into etex... Regards, Hartmut Regards, Hartmut -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
On Mon, Dec 08, 2008 at 08:22:51AM +0100, Hans Hagen wrote:
Khaled Hosny wrote:
Forgot to say that I'm using luatex 0.30.1 (the debian package)
On Sun, Dec 07, 2008 at 11:14:18PM +0200, Khaled Hosny wrote:
When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas?
if you use plain tex (or so) then you need to set the pdf page offsets (tex by design has some 1 in offsets and backends need to compensate that)
I can't reproduce this with plain tex, only with latex in RTL mode, LTR mode is OK. Regards, -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
Khaled Hosny wrote:
On Mon, Dec 08, 2008 at 08:22:51AM +0100, Hans Hagen wrote:
Forgot to say that I'm using luatex 0.30.1 (the debian package)
On Sun, Dec 07, 2008 at 11:14:18PM +0200, Khaled Hosny wrote:
When compiling the attached file with lualatex, the dvi output is OK, but with pdflualatex the page is shifted to the right. Any ideas? if you use plain tex (or so) then you need to set the pdf page offsets (tex by design has some 1 in offsets and backends need to compensate
Khaled Hosny wrote: that)
I can't reproduce this with plain tex, only with latex in RTL mode, LTR mode is OK.
If it is just a shift of (I assume) an inch or so and it only happens in latex, than I cannot help. That sounds suspiciously like a macro error and if not, I will need a much more low-level test file than a generic "pdflualatex" document (I don't use latex myself). Best wishes, Taco
I can't reproduce this with plain tex, only with latex in RTL mode, LTR mode is OK.
If it is just a shift of (I assume) an inch or so and it only happens in latex, than I cannot help. That sounds suspiciously like a macro error and if not, I will need a much more low-level test file than a generic "pdflualatex" document (I don't use latex myself).
it can be reproduced in plain pdfluatex/luatex, i'll make test files. Regards, Hartmut -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
On Mon, 8 Dec 2008, Taco Hoekwater wrote:
If it is just a shift of (I assume) an inch or so and it only happens in latex, than I cannot help. That sounds suspiciously like a macro error and if not, I will need a much more low-level test file than a generic "pdflualatex" document (I don't use latex myself).
here is some test file for luatex & pdfluatex: \pdfpagewidth=210mm \pdfpageheight=297mm \hsize=\pdfpagewidth \advance\hsize by -2in \vsize=\pdfpageheight \advance\vsize by -2in \hoffset=0in \voffset=0in \pagerightoffset=1in \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT \hrule width\hsize height 1mm \beginsection Hello world Hi there. \bye When you change \hoffset, the whole RL text moves in the DVI case, but not in the PDF case. Also there seems to be some inconsistent magic if \pagerightoffset=0pt. I have no idea how it should look like. Regards, Hartmut
Hi, Hartmut Henkel wrote:
When you change \hoffset, the whole RL text moves in the DVI case, but not in the PDF case.
In dvi mode there is a big difference between the actual dvi location (dvi_h, moves r2l or l2r depending on text direction) and where tex thinks the dvi location is (cur_h, always moves e2l). dvi output is quite convoluted. In pdf mode, output is much more straightforward. I think that it would be better to listen to \pagerightoffset in both cases, but that is open for discussion.
Also there seems to be some inconsistent magic if \pagerightoffset=0pt.
In that case, it defaults to 1inch (pdf) or 2inch (dvi). Yes, that is a mess (see below). I can easily make the pdf do what the dvi does, but which behaviour is right?
I have no idea how it should look like.
Me neither. And internally there are some more variables involved:
\pdfhorigin
\pdfvorigin
\pdfbottomoffset
Ok, \pdfbottomoffset can probably be ignored because luatex at the
moment doesn't do top-to-bottom scripts. But what about those origin
things?
Initex defaults:
\pdfpagewidth 0pt
\pdfpageheight 0pt
\pdfbottomoffset 0pt
\pdfrightoffset 0pt
\hoffset 0pt
\voffset 0pt
\pdfhorigin 1in
\pdfvorigin 1in
Here is the current logic (in DVI):
cur_page_width = (\pdfpagewidth > 0
? \pdfpagewidth
: \wd255 +2*(\hoffset + 1in))
cur_right_offset = (\pdfrightoffset != 0
? \pdfrightoffset
: 2in )
cur_h = \hoffset
On Tue, 9 Dec 2008, Taco Hoekwater wrote:
Hartmut Henkel wrote:
When you change \hoffset, the whole RL text moves in the DVI case, but not in the PDF case.
In dvi mode there is a big difference between the actual dvi location (dvi_h, moves r2l or l2r depending on text direction) and where tex thinks the dvi location is (cur_h, always moves e2l). dvi output is quite convoluted. In pdf mode, output is much more straightforward.
I think that it would be better to listen to \pagerightoffset in both cases, but that is open for discussion.
Also there seems to be some inconsistent magic if \pagerightoffset=0pt.
In that case, it defaults to 1inch (pdf) or 2inch (dvi). Yes, that is a mess (see below). I can easily make the pdf do what the dvi does, but which behaviour is right?
I have no idea how it should look like.
Me neither. And internally there are some more variables involved:
\pdfhorigin \pdfvorigin \pdfbottomoffset
Ok, \pdfbottomoffset can probably be ignored because luatex at the moment doesn't do top-to-bottom scripts. But what about those origin things?
Initex defaults:
\pdfpagewidth 0pt \pdfpageheight 0pt \pdfbottomoffset 0pt \pdfrightoffset 0pt \hoffset 0pt \voffset 0pt \pdfhorigin 1in \pdfvorigin 1in
Here is the current logic (in DVI):
cur_page_width = (\pdfpagewidth > 0 ? \pdfpagewidth : \wd255 +2*(\hoffset + 1in)) cur_right_offset = (\pdfrightoffset != 0 ? \pdfrightoffset : 2in ) cur_h = \hoffset
= (\pagedir TLT ? cur_h : cur_page_width-cur_right_offset - cur_h ) And in PDF, it looks like this:
cur_page_width = (\pdfpagewidth > 0 ? \pdfpagewidth : \wd255 +2*(\hoffset + \pdfhorigin)) cur_right_offset = (\pdfrightoffset != 0 ? \pdfrightoffset : 1in ) cur_h = (\pagedir TLT ? \hoffset + \pdfhorigin; : cur_page_width-cur_right_offset )
= cur_h
regarding \pdfhorigin and \pdfvorigin, it just appeared (under the shower :-) that these both should move _all_ stuff on the page consistently and therefore _independently_ from the direction mode. They are purely paper oriented parameters and only in use for PDF. So i guess that these two can be factored out, and with 1in default PDF should look like DVI. No idea about the others. Regards, Hartmut
participants (4)
-
Hans Hagen
-
Hartmut Henkel
-
Khaled Hosny
-
Taco Hoekwater