ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: Metapost and TeX [OT]
Date: Tue, 24 Aug 2004 08:14:02 +0200	[thread overview]
Message-ID: <20040824081402.64688ca0.taco@elvenkind.com> (raw)
In-Reply-To: <77347076e58b.76e58b773470@tampabay.rr.com>



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

  parent reply	other threads:[~2004-08-24  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24  2:48 skhilji
2004-08-24  3:02 ` Metapost and TeX Matthias Weber
2004-08-24  6:08 ` Metapost and TeX [OT] Brooks Moses
2004-08-24  8:18   ` Hans Hagen
2004-08-24  6:14 ` Taco Hoekwater [this message]
2004-08-24  8:21   ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040824081402.64688ca0.taco@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).