ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Khaled Hosny <khaledhosny@eglug.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: MetaPost graphics with TRT direction
Date: Wed, 25 Mar 2009 17:28:51 +0200	[thread overview]
Message-ID: <20090325152851.GA18337@khaled-laptop> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 613 bytes --]

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

[-- Attachment #1.1.2: mpost_trt.tex --]
[-- Type: text/x-tex, Size: 225 bytes --]

\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

[-- Attachment #1.1.3: mpost_trt.pdf --]
[-- Type: application/pdf, Size: 4337 bytes --]

[-- Attachment #1.1.4: mpost_trt.fixed.pdf --]
[-- Type: application/pdf, Size: 4337 bytes --]

[-- Attachment #1.1.5: mlib-pdf.tex.diff --]
[-- Type: text/x-diff, Size: 404 bytes --]

--- mlib-pdf.tex.orig	2009-03-25 17:26:53.000000000 +0200
+++ mlib-pdf.tex	2009-03-25 17:27:04.000000000 +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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2009-03-25 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 15:28 Khaled Hosny [this message]
2009-03-26 22:31 ` Hans Hagen
2009-03-27 12:07   ` Khaled Hosny
2009-04-01 14:41   ` MetaPost graph mkiv error Alan BRASLAU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090325152851.GA18337@khaled-laptop \
    --to=khaledhosny@eglug.org \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).