From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62596 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?B?UHJvY2jhemthIEx1a+G5IEluZy4gLSBQb250ZXggcy4gci4gby4=?= Newsgroups: gmane.comp.tex.context Subject: How to center a MP graphics generated by Lua? Date: Thu, 14 Oct 2010 09:49:50 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=----------jDYxdDgk2FdNqwzO1e87ph X-Trace: dough.gmane.org 1287042621 24842 80.91.229.12 (14 Oct 2010 07:50:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Oct 2010 07:50:21 +0000 (UTC) To: ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 14 09:50:20 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P6IZu-0001cn-93 for gctc-ntg-context-518@m.gmane.org; Thu, 14 Oct 2010 09:50:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E400CA743; Thu, 14 Oct 2010 09:50:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1ZlagB48qOqh; Thu, 14 Oct 2010 09:50:10 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B4E8CA73D; Thu, 14 Oct 2010 09:50:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EE748CA73D for ; Thu, 14 Oct 2010 09:50:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uwYAQN0uBMUI for ; Thu, 14 Oct 2010 09:49:57 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 2E3F7CA73A for ; Thu, 14 Oct 2010 09:49:57 +0200 (CEST) Original-Received: from mail.pontex.cz (mail.pontex.cz [89.233.168.98]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9E7ntjS012851 for ; Thu, 14 Oct 2010 09:49:56 +0200 Original-Received: from localhost ([127.0.0.1]) by mail.pontex.cz (Kerio MailServer 6.6.2) for ntg-context@ntg.nl; Thu, 14 Oct 2010 09:49:53 +0200 User-Agent: Opera Mail/10.10 (Win32) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=89.233.168.98; country=CZ; region=52; city=Prague; latitude=50.0833; longitude=14.4667; http://maps.google.com/maps?q=50.0833,14.4667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xDivNTMt - 55b9a0c11720 - 20101014 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62596 Archived-At: ------------jDYxdDgk2FdNqwzO1e87ph Content-Type: text/plain; charset=iso-8859-2; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Hello, I'm trying to center a MP graphics generated by Lua. Although the inline Ctx code is (or seems to be) the same as generated b= y Lua, I cannot understand why the red line is drawn on the left and not= centered. So how to make the Lua->MP graphics centered? My code: --- \showframe \starttext \startalignment[center] AAA\externalfigure[cow][width=3D4cm]BBB % OK, centered aaa\startMPcode draw (0,0)--(1in,0)\stopMPcode bbb % OK, centered \stopalignment \startalignment[center] \startluacode context.startMPcode() context("draw (0,0)--(1in,0) withrgbcolor (1,0,0)") % Red line LE= FT? context.stopMPcode() \stopluacode \stopalignment \startalignment[center] TTT\startMPcode draw (0,0)--(1in,0)\stopMPcode UUU % OK, centered \stopalignment \stoptext --- Lukas -- = Ing. Luk=E1=B9 Proch=E1zka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezov=E1 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ------------jDYxdDgk2FdNqwzO1e87ph Content-Disposition: attachment; filename=t-CenFig.mkiv Content-Type: application/octet-stream; name=t-CenFig.mkiv Content-Transfer-Encoding: Base64 XHNob3dmcmFtZQ0KXHN0YXJ0dGV4dA0KICBcc3RhcnRhbGlnbm1lbnRbY2VudGVy XQ0KICAgIEFBQVxleHRlcm5hbGZpZ3VyZVtjb3ddW3dpZHRoPTRjbV1CQkINCg0K ICAgIGFhYVxzdGFydE1QY29kZSBkcmF3ICgwLDApLS0oMWluLDApXHN0b3BNUGNv ZGUgYmJiDQogIFxzdG9wYWxpZ25tZW50DQoNCiAgXHN0YXJ0YWxpZ25tZW50W2Nl bnRlcl0NCiAgICBcc3RhcnRsdWFjb2RlDQogICAgICBjb250ZXh0LnN0YXJ0TVBj b2RlKCkNCiAgICAgIGNvbnRleHQoImRyYXcgKDAsMCktLSgxaW4sMCkgd2l0aHJn YmNvbG9yICgxLDAsMCkiKQ0KICAgICAgY29udGV4dC5zdG9wTVBjb2RlKCkNCiAg ICBcc3RvcGx1YWNvZGUNCiAgXHN0b3BhbGlnbm1lbnQNCg0KICBcc3RhcnRhbGln bm1lbnRbY2VudGVyXQ0KICAgIFRUVFxzdGFydE1QY29kZSBkcmF3ICgwLDApLS0o MWluLDApXHN0b3BNUGNvZGUgVVVVDQogIFxzdG9wYWxpZ25tZW50DQpcc3RvcHRl eHQNCg== ------------jDYxdDgk2FdNqwzO1e87ph Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ------------jDYxdDgk2FdNqwzO1e87ph--