From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60185 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Custom metaobj object in context Date: Thu, 15 Jul 2010 01:21:27 -0400 Message-ID: References: <4C3C8DF0.3070808@gmx.de> <4C3CB86B.6040905@wxs.nl> <4C3D9CA3.3070708@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0190350396==" X-Trace: dough.gmane.org 1279171297 16449 80.91.229.12 (15 Jul 2010 05:21:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 05:21:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 15 07:21:36 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 1OZGt6-0007Eh-FM for gctc-ntg-context-518@m.gmane.org; Thu, 15 Jul 2010 07:21:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B26C0C9CB3; Thu, 15 Jul 2010 07:21:35 +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 XJeiFsBOXuyQ; Thu, 15 Jul 2010 07:21:32 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5BD41C9C8C; Thu, 15 Jul 2010 07:21:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 84AACC9C8C for ; Thu, 15 Jul 2010 07:21:31 +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 rpaddp7ajIHo for ; Thu, 15 Jul 2010 07:21:28 +0200 (CEST) Original-Received: from mail-iw0-f169.google.com (mail-iw0-f169.google.com [209.85.214.169]) by balder.ntg.nl (Postfix) with ESMTP id 44E06C9C8A for ; Thu, 15 Jul 2010 07:21:28 +0200 (CEST) Original-Received: by iwn2 with SMTP id 2so724327iwn.14 for ; Wed, 14 Jul 2010 22:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=4Yf0IHm0TDtCKxIkwK8Du8amvpNuP6cOEXKbmDuhfKY=; b=CjbiCU6pkrvmeCZmwnQd018MQoy9InwEXDUi81Ht+OYgRwplz3TxZ6iGBGpIE1EsHn f072gyk3UFM1bl4Owk7X0+F0xCp1P1MDdflNz1ilLcrI/dLQ7i6C7nKErYB6cbKjjipu F1bYK1K1Ra89PHQOlO7OAaCmo0abUtj+MfLXI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=FQo04KSJTTIL3w3+jjMQMh6rDPNYvBwCol81draM3T1JNd1VKd50M/6211nbLj+mGy TMUq07nWH/M6Zt9eCncQ8PW5TmcMJ2yjrl8B+eDwFCRBH0fsJEqoQqWxrXHoWnR4py9R 83zopXMZZpTNSPUY91Y/TsLu2f58tjqvGYxVA= Original-Received: by 10.231.31.200 with SMTP id z8mr19456022ibc.90.1279171287466; Wed, 14 Jul 2010 22:21:27 -0700 (PDT) Original-Received: by 10.231.79.77 with HTTP; Wed, 14 Jul 2010 22:21:27 -0700 (PDT) In-Reply-To: <4C3D9CA3.3070708@gmx.de> X-Google-Sender-Auth: _J53sBAd-V729X5yYuU18Byosto 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:60185 Archived-At: --===============0190350396== Content-Type: multipart/alternative; boundary=0022150474373242a6048b6646bf --0022150474373242a6048b6646bf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jul 14, 2010 at 7:16 AM, Stefan M=FCller wrot= e: > On 13.07.2010 21:03, Hans Hagen wrote: > >> On 13-7-2010 6:01, Stefan M=FCller wrote: >> >>> Hi, >>> >>> I just tried to build my own object in metaobj but for some reason I >>> cannot figure out it does not work. I tried the example from the metaob= j >>> manual in a tex document (it works in a metapost file): >>> >>> \startuseMPgraphic{objecttest} >>> vardef newSegment@#=3D >>> assignObj(@#,"Segment"); >>> ObjPoint a,b; >>> ObjCode "@#b-@#a=3D(1cm,2cm)"; >>> enddef; >>> \stopuseMPgraphic >>> >> Can you post a complete metapost file that gives some output.I tried the following mp file: input metaobj; vardef newSegment@#=3D assignObj(@#,"Segment"); ObjPoint a,b; ObjCode "@#b-@#a=3D(1cm,2cm)"; enddef; beginfig(1) ; newSegment.s; % create an instance endfig ; end; but running it through metapost gives me an empty file: %!PS %%BoundingBox: 0 0 0 0 %%HiResBoundingBox: 0 0 0 0 %%Creator: MetaPost 1.208 %%CreationDate: 2010.07.15:0119 %%Pages: 1 %%BeginProlog %%EndProlog %%Page: 1 1 showpage %%EOF Aditya --0022150474373242a6048b6646bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jul 14, 2010 at 7:16 AM, Stefan M=FCller <warrence.stm@gmx.de> wrote= :
On 13.07.2010 21:03, Hans Hagen wrote:
On 13-7-2010 6:01, Stefan M=FCller wrote:
Hi,

I just tried to build my own object in metaobj but for some reason I
cannot figure out it does not work. I tried the example from the metaobj manual in a tex document (it works in a metapost file):

\startuseMPgraphic{objecttest}
vardef newSegment@#=3D
assignObj(@#,"Segment");
ObjPoint a,b;
ObjCode "@#b-@#a=3D(1cm,2cm)";
enddef;
\stopuseMPgraphic

Can = you post a complete metapost file that gives some output.I tried the follow= ing mp file:
input metaobj;
vardef newSegment@#=3D
assignObj(@#,"Segment");
ObjPoint a,b;
ObjCode &qu= ot;@#b-@#a=3D(1cm,2cm)";
enddef;
beginfig(1) ;
newSegment.s= ; % create an instance
endfig ;
end;

but running it= through metapost gives me an empty file:
%!PS
%%BoundingBox: 0 0 0 0
%%HiResBoundingBox: 0 0 0 0
%%Cre= ator: MetaPost 1.208
%%CreationDate: 2010.07.15:0119
%%Pages: 1
%%= BeginProlog
%%EndProlog
%%Page: 1 1
showpage
%%EOF

Aditya
--0022150474373242a6048b6646bf-- --===============0190350396== 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 ___________________________________________________________________________________ --===============0190350396==--