From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64860 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: How to get graph module (metapost) to work with ConTeXt minimals? Date: Fri, 31 Dec 2010 13:49:12 +0100 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <201012311349.12804.alan.braslau@cea.fr> References: <4D1C59EF.3080403@ziggo.nl> <4D1C94A0.5050900@ziggo.nl> 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: dough.gmane.org 1293799774 19324 80.91.229.12 (31 Dec 2010 12:49:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 31 Dec 2010 12:49:34 +0000 (UTC) Cc: scholz.m82@googlemail.com To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 31 13:49:30 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 1PYeQD-0006cq-Vt for gctc-ntg-context-518@m.gmane.org; Fri, 31 Dec 2010 13:49:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C6495CA962; Fri, 31 Dec 2010 13:49:29 +0100 (CET) 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 3faGm2UGisxG; Fri, 31 Dec 2010 13:49:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D7B08CA957; Fri, 31 Dec 2010 13:49:26 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7DCACA957 for ; Fri, 31 Dec 2010 13:49:25 +0100 (CET) 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 3+vzxHJLbrXT for ; Fri, 31 Dec 2010 13:49:23 +0100 (CET) Original-Received: from filter7-ams.mf.surf.net (filter7-ams.mf.surf.net [192.87.102.75]) by balder.ntg.nl (Postfix) with ESMTP id 76799CA953 for ; Fri, 31 Dec 2010 13:49:23 +0100 (CET) Original-Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by filter7-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBVCnJEG019159 for ; Fri, 31 Dec 2010 13:49:20 +0100 Original-Received: from iram-hb-003386.localnet (unknown [82.254.175.234]) by smtp4-g21.free.fr (Postfix) with ESMTP id 5DC0F4C80D9; Fri, 31 Dec 2010 13:49:14 +0100 (CET) User-Agent: KMail/1.13.5 (Linux/2.6.32; KDE/4.4.5; x86_64; ; ) In-Reply-To: <4D1C94A0.5050900@ziggo.nl> X-Length: 4482 X-UID: 2957 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.27.42.4; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0DDNMNj9G - 7661959aba67 - 20101231 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.75 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:64860 Archived-At: The correct method is to use: \usemodule [graph] and then you can type, for example: \startMPcode draw begingraph(8cm,6cm) ; gdraw (0,0)--(1,1) ; endgraph ; \stopMPcode to include a graph with your text. As pointed out, under mkiv, metapost is processed under one continuous run, so definitions are retained. This is to be kept in mind, as some metapost code can then yield errors, in particular, inconsistent equations and the like. Alan On Thursday 30 December 2010 15:18:08 Verhaag, G.C.H.M. wrote: > Martin 'golodhrim' Scholz wrote: > >In article <4D1C59EF.3080403@ziggo.nl>, Verhaag, G.C.H.M. wrote: > >>Hi, > >> > >>This might not be the right place to ask this question, but want to give > >>it a try anyway! > >> > >>I've installed the ConTeXt minimals (Mark IV!) recently, and running the > >> > >>command: > >> context --version > >> > >>yields the following output: > >> ... > >> MTXrun | current version: 2010.07.30 11:35 > >> > >>Now I want to generate a few plots using the graph-module (by John D. > >>Hobby) of MetaPost, which I used in the past to make high-quality plots. > >> > >>But when I add the following statement: > >> input graph ; > >> > >>to the preamble of my MetaPost file and run the command: > >> mpost plot.mp > >> > >>The run aborts with the following messages: > >>>>texnum.mp > >>>>texnum.mpx > >> > >>! Unable to make mpx file. > >>l.17 init_numbers(btex > >> > >> $-$etex, btex$1$etex, btex${\times}10$etex, > >> > >>Transcript written on texnum.log. > >>TeXExec | processing graphic 'texnum.mpx' > >>TeXExec | runtime: 1.547143 > >> > >>>>texnum.mp > >>>>texnum.mpx > >> > >>! Unable to make mpx file. > >>l.17 init_numbers(btex > >> > >> $-$etex, btex$1$etex, btex${\times}10$etex, > >> > >>Transcript written on plot.log. > >> > >>So where to go from here? Do I need to install additional TeX related > >>stuff to get it working? Anybody any suggestions, please? Thanks in > >>advance! > >> > >>Regards, > >>Gerard Verhaag > >> > >>P.S. > >> > >>By the way, if I use MetaPost within ConTeXt using: > >> > >>\loadmarkfile{m-graph} > >> > >>\starttext > >> > >> \startMPcode > >> > >> . > >> > >> /[MetaPost code] > >> > >> . > >> > >>/ \stopMPcode > >>\stoptext > >> > >>than everything works just fine! > >> > >>_________________________________________________________________________ > >>__________ 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 > >>_________________________________________________________________________ > >>__________ > > > >Hi Gerard, > > > >that's because of a change in ConTeXts metapost, you can use > > > >\startMPpage > > > >\stopMPpage > > > >MetaPost from ConTeXt is not able without big changes to run standalone, > >so you might need to load the MetaPost version from TeXlive, the way how > >to do so depends on your OS... > > > >Greetings > > Hi Martin, > > Okay, thanks for your answer! > > Embedding the code in my ConTeXt file works well, but I was used to > obtain my MetaPost figures seperately using the mpost-command! > > Regards, > Gerard Verhaag ___________________________________________________________________________________ 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 ___________________________________________________________________________________