From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16241 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Metapost and TeX [OT] Date: Tue, 24 Aug 2004 08:14:02 +0200 Organization: Elvenkind Sender: ntg-context-bounces@ntg.nl Message-ID: <20040824081402.64688ca0.taco@elvenkind.com> References: <77347076e58b.76e58b773470@tampabay.rr.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1093327963 27931 80.91.224.253 (24 Aug 2004 06:12:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2004 06:12:43 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 24 08:12:35 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BzUXr-00072p-00 for ; Tue, 24 Aug 2004 08:12:35 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1814E1277B; Tue, 24 Aug 2004 08:12:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05688-03-3; Tue, 24 Aug 2004 08:12:32 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 593EF12771; Tue, 24 Aug 2004 08:12:32 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2286112771 for ; Tue, 24 Aug 2004 08:12:31 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05688-03-2 for ; Tue, 24 Aug 2004 08:12:30 +0200 (CEST) Original-Received: from amsfep12-int.chello.nl (unknown [213.46.243.17]) by ronja.ntg.nl (Postfix) with ESMTP id 7A80C1276F for ; Tue, 24 Aug 2004 08:12:30 +0200 (CEST) Original-Received: from hal.chatalicious.net ([62.163.240.169]) by amsfep12-int.chello.nl (InterMail vM.6.00.05.02 201-2115-109-103-20031105) with SMTP id <20040824061230.GOLY27621.amsfep12-int.chello.nl@hal.chatalicious.net>; Tue, 24 Aug 2004 08:12:30 +0200 Original-To: skhilji@tampabay.rr.com, mailing list for ConTeXt users In-Reply-To: <77347076e58b.76e58b773470@tampabay.rr.com> X-Mailer: Sylpheed version 0.9.5 (GTK+ 1.2.10; i586-mandrake-linux-gnu) X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16241 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16241 skhilji@tampabay.rr.com wrote: > So how does it happen in reality? Matthias' reply is better for your situation, but for curiosity's sake, here is what actually happens: - MetaPost is happily reading MetaPost commands when suddenly it sees a "btex" command. - Now it will throw away everything upto the next "etex", and it will run the external command "makempx" with the current filename as argument. * makempx's goal is to create a file with the same name as it's argument, but with the extension replaced with ".mpx". That file will contain a series of low-level MetaPost commands for each label in the source file, and those lists of commands are separated by the MetaPost command "mpxbreak". * nothing is done by makempx if the mpx file exists and is newer than the source file. ** otherwise, the source file is scanned for verbatimtex ... etex and btex ... etex blocks. These are wrapped in very simple TeX macros and written to a TeX input file. ** TeX is run, to produce a DVI file from these commands (each dvi page representing a label) ** The entire DVI file is then converted into the ".mpx" file in a single action. - MetaPost will now open the ".mpx" file as a concurrent source of commands linked to the current source file, and read commands from it up to the first "mpxbreak". - The location pointer in the ".mpx" file is saved for subsequent labels. Greetings, Taco