[metapost] Open/True Type Fonts
luecking at uark.edu
Tue May 20 00:57:03 CEST 2008
At 04:48 PM 5/18/2008, you wrote:
>On Sun, May 18, 2008 at 2:37 AM, Troy Henderson wrote:
> > Does \sometxt do the same (or
> > similar) as btex ... etex?
>It has a similar purpose, but different mechanism. btex ... etex is
>just as stupid as it can get. A while ago I wrote some code that
>exported gnuplot graphs into ConTeXt. Now imagine 10 graphs with 20
>labels each (to label axis with 0, 1, 2, 3, ... 10, a title of the
>graph and so on ...). For each image (graph in my case), ConTeXt calls
That is probably he most inefficient way to proceed. If you need a
second context run anyway, all the graphs shoul be accumulated an
metapost called just once.
>so that means 10 metapost runs inside a ConTeXt run. But
>then each metapost calls another TeX instance to handle labels. Now,
>I'm not really sure if it called TeX a single time or if it called it
>20 times, but I wouldn't be surprised if it called it 20 times,
TeX is called just once for _each_ metapost input file if you use
btex...etex. When any btex or verbatimtex is encountered, mpto is
called, which scans the file for btex and passes all of them to TeX.
If this has happened before and the .mp file was not changed, mpto
detects that there is no need to regenerate labels and doesn't call
TeX even once.
(If you use the TEX() macro, it will write and then input a file for
each macro call so TeX is called once per TEX() macro. That is
remarkably inefficient, but should be avoided.)
If you write a script that puts all 10 graphs into one .mp file you get
one call to Metapost and one to TeX. So btex/etex is not so stupid.
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descarte
More information about the metapost