From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40122 Path: news.gmane.org!not-for-mail From: "Wolfgang Werners-Lucchini" Newsgroups: gmane.comp.tex.context Subject: Re: mplib Date: Sat, 12 Apr 2008 21:47:45 +0200 Message-ID: <48012E01.7850.2AAF773@wwl.musensturm.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208029239 22126 80.91.229.12 (12 Apr 2008 19:40:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Apr 2008 19:40:39 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 12 21:41:13 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Jklb5-0001bV-OY for gctc-ntg-context-518@m.gmane.org; Sat, 12 Apr 2008 21:41:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AA4C61FBA8; Sat, 12 Apr 2008 21:40:31 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04288-01; Sat, 12 Apr 2008 21:39:51 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 471F11FB89; Sat, 12 Apr 2008 21:39:51 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 924F51FBB9 for ; Sat, 12 Apr 2008 21:39:48 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02171-06 for ; Sat, 12 Apr 2008 21:39:10 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by ronja.ntg.nl (Postfix) with ESMTP id CB4421FB89 for ; Sat, 12 Apr 2008 21:39:10 +0200 (CEST) Original-Received: from [192.168.178.20] (frnk-590d014d.pool.einsundeins.de [89.13.1.77]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1JklZ81dOA-0008Mk; Sat, 12 Apr 2008 21:39:10 +0200 Priority: normal In-reply-to: X-mailer: Pegasus Mail for Windows (4.41, DE v4.41 R1) Content-description: Mail message body X-Provags-ID: V01U2FsdGVkX1+G7DwuA9BLoF/tmB/Fa2v1NNsvItbuX+TFC90 ddWacaMQEZfJS4OJ8YAdmbhbkxs00ZKaJAXHFVoX223dxfIUAl OxgQfAudmBfE7ZYnUri+AqOqAU52t4B X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40122 Archived-At: On 12 Apr 2008 at 9:39, ntg-context-request@ntg.nl wrote: > > \startlua > > mp = mplib.new ( { > > hash_size = 100000, > > main_memory = 2000000, > > param_size = 100000, > > } ) > > > > if mp then > > res = mp:execute( > > "beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;" ) > > tex.print("[" .. tostring(res.status) .. "]") > > mp:finish() > > end > > \stoplua > > no format, so beginfig, draw etc are unknown I thought 'plain.mem' is the default. But I see, there exists only 'metafun.mem'. So I wrote: ------------------------------------------------------ mp = mplib.new ( { hash_size = 100000, main_memory = 2000000, param_size = 100000, mem_name = "metafun.mem" } ) ------------------------------------------------------ and it get the same result > metapost.process("metafun","some commands") > > may work better ------------------------------------------------------ \startlua mp = mplib.new ( { hash_size = 100000, main_memory = 2000000, param_size = 100000 } ) if mp then res = metapost.process("metafun","beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;") tex.print("[" .. tostring(res.status) .. "]") mp:finish() end \stoplua ------------------------------------------------------ results in : ------------------------------------------------------ mplib : loading format: metafun.mp, name: d:/context/tex/texmf-cache/luatex- cache/context/c80dc1fd5292ec817c6e82c295beaf1e/formats/cont-en- metafun.mem ! Emergency stop. \@@expanded ..... "]") -- mp:finish() -- end } l.54 \stoplua ! ==> Fatal error occurred, no output PDF file produced! ------------------------------------------------------ why does it load 'metafun.mp'? after that I tried ------------------------------------------------------ \startlua mp = mplib.new ( { hash_size = 100000, main_memory = 2000000, param_size = 100000, mem_name = "metafun.mem" } ) if mp then res = metapost.process(mp, "beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;") tex.print("[" .. tostring(res.status) .. "]") mp:finish() end \stoplua ------------------------------------------------------ which gives the following error: ------------------------------------------------------ report >> error: This is MetaPost, Version 1.003 (Cweb version 0.40) I can't find the PLAIN mem file! ------------------------------------------------------ What else should I check to find the error? Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________