Figures are misplaced with \pagedir TRT\bodydir TRT
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT. See the attached example. -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
See the attached example.
When I make the figure \framed the frame gets in the prober place, but not the image, may be this is a LuaTeX bug? -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
On Tue, Sep 02, 2008 at 10:50:23PM +0200, Khaled Hosny wrote:
On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
See the attached example.
When I make the figure \framed the frame gets in the prober place, but not the image, may be this is a LuaTeX bug?
It looks like a bug inherited from omega. I can reproduce a similar reselut with this plain tex file: \textdir TRT \input epsf \epsfbox{fig.eps}\input knuth \bye and it gives the same result with luatex and aleph (and even with omega). Is this a known bug? -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
Khaled Hosny wrote:
On Tue, Sep 02, 2008 at 10:50:23PM +0200, Khaled Hosny wrote:
On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
See the attached example. When I make the figure \framed the frame gets in the prober place, but not the image, may be this is a LuaTeX bug?
It looks like a bug inherited from omega. I can reproduce a similar reselut with this plain tex file:
\textdir TRT \input epsf
\epsfbox{fig.eps}\input knuth
\bye
and it gives the same result with luatex and aleph (and even with omega). Is this a known bug?
no, it might be related to rlap/llap kind of situations; i'll look into it later ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Khaled Hosny wrote:
On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
See the attached example.
When I make the figure \framed the frame gets in the prober place, but not the image, may be this is a LuaTeX bug?
we need to look into it next week (when taco is back from vacation) because it might as well be some problem in luatex itself (when/where inject those dir nodes) ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
\pagedir TRT \bodydir TRT \setupheadertexts[from left to right] \starttext \input tufte \placefigure [here,force] [fig:Mill] {Test.} {\externalfigure[mill]} \input tufte \stoptext i'm wondering ... why do we need pagedir and bodydir? ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen
i'm wondering ... why do we need pagedir and bodydir?
========= http://www.ctan.org/tex-archive/systems/omega/ \pagedir The direction for pages (\shipout). \bodydir The direction for vboxes, including the main body of text. ========= Think of footnote numerals etc. IIRC: Without \pagedir TRT\bodydir TRT the footnote numerals will appear on the left despite \pardir and \textdir. I still don't completely _separately_ understand \pagedir TRT\bodydir TRT, but together they seem to make sense to me. Taco once started explainig these two to Hans and I a few months back but that thread was never completed... I'll look up where we left things off. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Idris Samawi Hamid ادريس سماوي حامد wrote:
On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen
wrote: i'm wondering ... why do we need pagedir and bodydir?
========= http://www.ctan.org/tex-archive/systems/omega/
\pagedir The direction for pages (\shipout). \bodydir The direction for vboxes, including the main body of text. =========
Think of footnote numerals etc. IIRC: Without \pagedir TRT\bodydir TRT the footnote numerals will appear on the left despite \pardir and \textdir.
I still don't completely _separately_ understand \pagedir TRT\bodydir TRT, but together they seem to make sense to me. Taco once started explainig these two to Hans and I a few months back but that thread was never completed... I'll look up where we left things off.
among the pending issues was 'where do we explicitly need to set it and when do we need to compensate for it' for some reason inserts (the figure) are sensitive to it and it might be some interference as well as a missing explicit dir reversal [omega provides these mechanisms but i think that there was never a full blown macro package using them, i.e. mixed direction support and such; there might be many places where we need to add dir-checking code to context; a few places already have it] ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Idris Samawi Hamid ادريس سماوي حامد wrote:
On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen
wrote: i'm wondering ... why do we need pagedir and bodydir?
========= http://www.ctan.org/tex-archive/systems/omega/
\pagedir The direction for pages (\shipout). \bodydir The direction for vboxes, including the main body of text. =========
Think of footnote numerals etc. IIRC: Without \pagedir TRT\bodydir TRT the footnote numerals will appear on the left despite \pardir and \textdir.
sure, but we might as well deal with them in a special r-l aware mode (probably easier) Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen
Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
\pagedir TRT \bodydir TRT
\setupheadertexts[from left to right]
\starttext
\input tufte
\placefigure [here,force] [fig:Mill] {Test.} {\externalfigure[mill]}
\input tufte
\stoptext
i'm wondering ... why do we need pagedir and bodydir?
Try this one, and play with commenting lines 1 or 2: \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \setupheadertexts[from left to right] \starttext \input tufte\footnote{\input ward } \placefigure [here,force] [fig:Mill] {Test.} {\externalfigure[mill]} \input tufte\footnote{\input ward } \stoptext As to the original problem: \textdir TRT \input epsf \epsfbox{fig.eps}\input knuth \bye I don't think this is an omega/aleph/luatex bug, but rather that epsf.tex does not take the global direction change into account. It seems that, for any figure mechanism in TeX, the coordinates of the figure need to be vertically reversed when \pagedir TRT \bodydir TRT in effect. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
On Tue, Sep 02, 2008 at 06:11:57PM -0600, Idris Samawi Hamid ادريس سماوي حامد wrote:
As to the original problem:
\textdir TRT \input epsf
\epsfbox{fig.eps}\input knuth
\bye
I don't think this is an omega/aleph/luatex bug, but rather that epsf.tex does not take the global direction change into account. It seems that, for any figure mechanism in TeX, the coordinates of the figure need to be vertically reversed when \pagedir TRT \bodydir TRT in effect.
I think I got the idea now (and this explains why the frame gets right). -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
Figures are shifted to the right (the left edge is where right edge should) when I set \pagedir TRT\bodydir TRT.
This my not be an optimum solution, but putting \externalfigure inside an hbox with TLT direction gets the figure in the correct position: \placefigure[][]{}{\hbox dir TLT\externalfigure[mill]}} Regards, -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
participants (3)
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي ح امد
-
Khaled Hosny