[metapost] Re: all intersections between two paths

Daniel H. Luecking luecking at uark.edu
Fri Jan 21 17:22:36 CET 2005


On Thu, 20 Jan 2005, Hans Hagen wrote:

> Dan Luecking wrote:
> > At 03:00 AM 1/20/2005, you wrote:
> >
> >> Larry Siebenmann wrote:
> >>
> >>> When writing macros common to MF and MP, is there
> >>> a *conventional* way for macros to decide which of MF or MP
> >>> is running?
> >>
> >>
> >> boolean ThisIsMp ;
> >>
> >> ThisIsMp := known miterlimit ;
> >>
> >
> > This is what I use in grafbase.mf,mp (part of mfpic):
> >
> > boolean METAPOST;
> > METAPOST := known color Karl Frederich Gauss; % :-)
> >
>
> the safest thing to do is probably to ask Don & John to add something
>
>    mpversion
>    mfversion

I'd suggest going the same route as pdfetex: a single executable
(empost?), where setting a parameter to one value gives Metafont, to
another value gives Metapost. Another parameter turns on extensions
(maybe: higher precision arithmetic, short-circuit evaluation of
booleans, readfrom/write in MF, string literals spanning more than one
line, scantokens "btex " & decimal s & " etex" in MP, etc.).


Dan

-- 
Dan Luecking
Dept. of Mathematical Sciences
University of Arkansas
Fayetteville, AR 72101



More information about the metapost mailing list