Re: [NTG-context] MetaPost graphics with TRT direction

2009-03-27 Thread Khaled Hosny
On Thu, Mar 26, 2009 at 11:31:48PM +0100, Hans Hagen wrote:
 Khaled Hosny wrote:
 MPost graphics inside TRT direction are placed incorrectly overlapping
 the text on the right, similar to what we had with \pdfximage (see the
 attached PDF).

 This seems to be unrelated to images issue since MPost graphics are
 inserted as \pdfliteral. I'm not sure if this an engine or macro issue,
 but I'm guessing the later.

 Changing the \startMPLIBtoPDF so that the \hbox where the graphics is
 placed is fixed to TLT direction fixes this, but I'm not sure if it is
 safe to do so. 

 for the moment i did

 \def\startMPLIBtoPDF#1#2#3#4% watch the transparency reset
   {\naturalhbox\bgroup

 (as \naturalhbox is the official way)

 this keeps the internal direction (in textext) the same as the outer one

I didn't know about it, thanks for the tip and the fix.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MetaPost graphics with TRT direction

2009-03-26 Thread Hans Hagen

Khaled Hosny wrote:

MPost graphics inside TRT direction are placed incorrectly overlapping
the text on the right, similar to what we had with \pdfximage (see the
attached PDF).

This seems to be unrelated to images issue since MPost graphics are
inserted as \pdfliteral. I'm not sure if this an engine or macro issue,
but I'm guessing the later.

Changing the \startMPLIBtoPDF so that the \hbox where the graphics is
placed is fixed to TLT direction fixes this, but I'm not sure if it is
safe to do so. 


for the moment i did

\def\startMPLIBtoPDF#1#2#3#4% watch the transparency reset
  {\naturalhbox\bgroup

(as \naturalhbox is the official way)

this keeps the internal direction (in textext) the same as the outer one

idris: we need to discuss what aspects of r-l stay r-l and in what cases 
we revert to lr (as here) or even to lr inside constructs


it depends a bit on general rules for arabic typesetting

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] MetaPost graphics with TRT direction

2009-03-25 Thread Khaled Hosny
MPost graphics inside TRT direction are placed incorrectly overlapping
the text on the right, similar to what we had with \pdfximage (see the
attached PDF).

This seems to be unrelated to images issue since MPost graphics are
inserted as \pdfliteral. I'm not sure if this an engine or macro issue,
but I'm guessing the later.

Changing the \startMPLIBtoPDF so that the \hbox where the graphics is
placed is fixed to TLT direction fixes this, but I'm not sure if it is
safe to do so. 

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
\startuseMPgraphic{dummy}
pickup pencircle xscaled 5 rotated 30;
draw unitsquare scaled 20 withcmykcolor (0.3,0.4,0.6,0);
\stopuseMPgraphic

\starttext
\textdir TRT
This is text \useMPgraphic{dummy} and this is too
\stoptext


mpost_trt.pdf
Description: Adobe PDF document


mpost_trt.fixed.pdf
Description: Adobe PDF document
--- mlib-pdf.tex.orig	2009-03-25 17:26:53.0 +0200
+++ mlib-pdf.tex	2009-03-25 17:27:04.0 +0200
@@ -26,7 +26,7 @@
\xdef\MPheight{\the\dimexpr#4\onebasepoint-#2\onebasepoint\relax}}
 
 \def\startMPLIBtoPDF#1#2#3#4% watch the transparency reset
-  {\hbox\bgroup
+  {\hbox dir TLT\bgroup
\MPLIBboundingbox{#1}{#2}{#3}{#4}%
\forgetall
\setbox\scratchbox\vbox\bgroup


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___