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