From - Mon Sep  2 08:13:14 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties2.sun.ac.za (maties2.sun.ac.za [146.232.128.10]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g826D5l85454 for
    <metafont@ens.fr>; Mon, 2 Sep 2002 08:13:05 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties2.sun.ac.za with esmtp (Exim 4.05) id 17lkSL-0004fX-00 for
    metafont@ens.fr; Mon, 02 Sep 2002 08:13:01 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g826Fa511104 for metafont@ens.fr; Mon, 2 Sep 2002
    08:15:36 +0200
Date: Mon, 2 Sep 2002 08:15:36 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: metafont@ens.fr
Message-Id: <20020902081536.B11089@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17lkSL-0004fX-00*ckUxItceJ.g*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 566
Precedence: list
Subject: [metafont] Euler math font

Is there any way that I can persuade MetaPost to set something
like 
  btex $O_1$ etex
in (a) the Euler mathematics font
   (b) more generally, whatever mathematics font is in effect
       in LaTeX after some \usepackage{...}?

Dirk Laurie


From - Tue Sep  3 15:39:29 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties1.sun.ac.za (maties1.sun.ac.za [146.232.128.1]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g83DdJl55676 for
    <metafont@ens.fr>; Tue, 3 Sep 2002 15:39:19 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties1.sun.ac.za with esmtp (Exim 4.05) id 17mDtc-0006cG-00 for
    metafont@ens.fr; Tue, 03 Sep 2002 15:39:08 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g83Dfpm15378 for metafont@ens.fr; Tue, 3 Sep 2002
    15:41:51 +0200
Date: Tue, 3 Sep 2002 15:41:51 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: metafont@ens.fr
Message-Id: <20020903154151.A15353@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17mDtc-0006cG-00*KnBCm2xoHXs*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 567
Precedence: list
Subject: [metafont] Formatting for messages

Is there some builtin macro that will 

(a) turn a pair into a string, i.e. the equivalent of

def disp(expr z) =  % z is a pair
  "(" & (decimal (xpart z)) & "," & (decimal (ypart z)) & ")"
enddef;

(b) turn the type of a parameter into a string, i.e. something a little like

vardef type(expr s) =
  if pair s: "pair" else: "impair" fi
enddef;

It feels very much like re-inventing the wheel to use such definitions,
since clearly MetaFont's messages show that such functionality is
available to the interpreter.

Dirk 


From - Tue Sep  3 16:57:39 2002
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g83EvUl70290 for
    <metafont@ens.fr>; Tue, 3 Sep 2002 16:57:30 +0200 (CEST)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197]) by
    mailhost.uark.edu (iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul 29
    2002)) with ESMTP id <0H1V003TQAVTO4@mailhost.uark.edu> for
    metafont@ens.fr; Tue, 03 Sep 2002 09:57:29 -0500 (CDT)
Received: (from luecking@localhost)	by comp.uark.edu (8.11.6/8.11.6) id
    g83EvSI11553; Tue, 03 Sep 2002 09:57:28 -0500 (CDT)
Date: Tue, 03 Sep 2002 09:57:28 -0500 (CDT)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] Euler math font
In-Reply-To: <20020902081536.B11089@siegfried.wisk.sun.ac.za>
To: Metafont distribution list <metafont@ens.fr>
Message-Id: <Pine.SOL.4.33.0209030954460.10838-100000@comp.uark.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Transfer-Encoding: 7BIT
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 568
Precedence: list

On Mon, 2 Sep 2002, Dirk Laurie wrote:

> Is there any way that I can persuade MetaPost to set something
> like
>   btex $O_1$ etex
> in (a) the Euler mathematics font
>    (b) more generally, whatever mathematics font is in effect
>        in LaTeX after some \usepackage{...}?

verbatimtex
  \documentclass{article}% for example
  \usepackage{eulervm}% for example
  \begin{document}
etex

Then run mpost after setting TEX=latex.


Dan

-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101


From - Tue Sep  3 17:32:45 2002
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g83FWal77023 for
    <metafont@ens.fr>; Tue, 3 Sep 2002 17:32:36 +0200 (CEST)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197]) by
    mailhost.uark.edu (iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul 29
    2002)) with ESMTP id <0H1V0031TBXCRN@mailhost.uark.edu> for
    metafont@ens.fr; Tue, 03 Sep 2002 10:20:00 -0500 (CDT)
Received: (from luecking@localhost)	by comp.uark.edu (8.11.6/8.11.6) id
    g83FJxj16863; Tue, 03 Sep 2002 10:19:59 -0500 (CDT)
Date: Tue, 03 Sep 2002 10:19:59 -0500 (CDT)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] Formatting for messages
In-Reply-To: <20020903154151.A15353@siegfried.wisk.sun.ac.za>
To: Metafont distribution list <metafont@ens.fr>
Message-Id: <Pine.SOL.4.33.0209030958340.10838-100000@comp.uark.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Transfer-Encoding: 7BIT
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 569
Precedence: list

On Tue, 3 Sep 2002, Dirk Laurie wrote:

> Is there some builtin macro that will
>
> (a) turn a pair into a string, i.e. the equivalent of
>
> def disp(expr z) =  % z is a pair
>   "(" & (decimal (xpart z)) & "," & (decimal (ypart z)) & ")"
> enddef;

None "built in" to metapost, but the above seems
perfectly reasonable to me.

> (b) turn the type of a parameter into a string, i.e. something a little like
>
> vardef type(expr s) =
>   if pair s: "pair" else: "impair" fi
> enddef;

Do you want the exact string values "pair" and "impair"?
If so, this should work just fine. If you want any one
of metaposts several types, then you need a multiple-branch
if...:...elseif...:...else:...fi. Again, there is nothing built
in to metapost.

I do seem to recall something along these lines in some macro
file, but I cant recall offhand where.

>
> It feels very much like re-inventing the wheel to use such definitions,
> since clearly MetaFont's messages show that such functionality

Unfortunately, Knuth left these out (of metafont), deciding either
they were unnecesary or could be realized as definitions. And John
Hobby presumably wanted to keep the differences between metafont
and metapost minimal.


Dan

-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101


From - Wed Sep  4 09:01:58 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties2.sun.ac.za (maties2.sun.ac.za [146.232.128.10]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g8471jl01796 for
    <metafont@ens.fr>; Wed, 4 Sep 2002 09:01:46 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties2.sun.ac.za with esmtp (Exim 4.05) id 17mTxM-000099-00 for
    metafont@ens.fr; Wed, 04 Sep 2002 08:48:04 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g846oe516317 for metafont@ens.fr; Wed, 4 Sep 2002
    08:50:40 +0200
Date: Wed, 4 Sep 2002 08:50:40 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: metafont@ens.fr
Message-Id: <20020904085040.A16253@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17mTxM-000099-00*a7NQTY/cUJ2*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 570
Precedence: list
Subject: [metafont] How unknown is a pair?

Is there a way to distinguish between the number of unknows left in a pair?

E.g. interactively I can see

*pair A; show A; 
>> (xpart A,ypart A)

two unknowns, and after giving an equation:

*A=whatever[(1,2),(3,5)]; show A; 
>> (0.66667ypart A-0.33334,ypart A)

one unknown.  But the known/unknown functions do not distinguish the cases.

I can think of several ways, all clumsy, to write a routine for this
(e.g. try to calculate an intersection with a random line through the
origin: chance of that line being parallel is small) but I'm hoping
there is some basic function or register that one can just interrogate.

Dirk
 


From - Wed Sep  4 13:00:21 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties1.sun.ac.za (maties1.sun.ac.za [146.232.128.1]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g84B0Al43129 for
    <metafont@ens.fr>; Wed, 4 Sep 2002 13:00:11 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties1.sun.ac.za with esmtp (Exim 4.05) id 17mXtI-0004tk-00 for
    metafont@ens.fr; Wed, 04 Sep 2002 13:00:08 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g84B2qP17095 for metafont@ens.fr; Wed, 4 Sep 2002
    13:02:52 +0200
Date: Wed, 4 Sep 2002 13:02:52 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: metafont@ens.fr
Message-Id: <20020904130252.A17040@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
References: <20020904085040.A16253@siegfried.wisk.sun.ac.za>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <20020904085040.A16253@siegfried.wisk.sun.ac.za>;
    from dpl@sun.ac.za on Wed, Sep 04, 2002 at 08:50:40AM +0200
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17mXtI-0004tk-00*yeti01m8knc*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 571
Precedence: list
Subject: [metafont] The MetaFont uncertainty principle?

Suppose you have a semi-unknown point (a point with one unknown), e.g.

show Z;
>> (0.66667ypart Z-0.33334,ypart Z)

Then although Z determines a very particular straight line, it seems
to be impossible to find more than one known point on that line.   Any of
the following would allow one to do so, but all seem to be impossible:

  * Saving the original equation for Z and recovering it after
    saying  Z=(x,0);
  * Extracting the coefficients a, b, c in the equation
     a*(xpart Z) + b*(ypart Z) + c = 0
  * Cloning the point, i.e. constructing the semi-unknown point
    (0.66667ypart Y-0.33334,ypart Y) 

Of course, there's nothing to it if the information leading to the
construction of Z (e.g. Z=whatever[A,B];) is still available.

Have I missed something?

Dirk


From - Wed Sep  4 15:38:35 2002
Return-Path: <Denis.Roegel@loria.fr>
Received: from macker.loria.fr (macker.loria.fr [152.81.1.70]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g84DcOl68558 for
    <metafont@ens.fr>; Wed, 4 Sep 2002 15:38:24 +0200 (CEST)
Received: from localhost.loria.fr (localhost [127.0.0.1]) by localhost
    (Postfix) with ESMTP id EAFF74E9E; Wed,  4 Sep 2002 15:38:23 +0200 (MEST)
X-Amavix: Anti-virus check done by McAfee
X-Amavix: Scanned by Amavix
Received: from auxerois.loria.fr (auxerois.loria.fr [152.81.144.16]) by
    macker.loria.fr (Postfix) with ESMTP id F2EF44E3A; Wed,  4 Sep 2002
    15:38:20 +0200 (MEST)
Received: from loria.fr (localhost [127.0.0.1]) by auxerois.loria.fr
    (8.9.3/8.9.3/8.9.3-client/JCG) with SMTP id PAA28509; Wed, 4 Sep 2002
    15:38:20 +0200 (MET DST)
From: <Denis.Roegel@loria.fr>
Received: from 202.88.239.187 (SquirrelMail authenticated user roegel) by
    www.loria.fr with HTTP; Wed, 4 Sep 2002 15:38:20 -0200 (MET DST)
Message-Id: <32929.202.88.239.187.1031146700.squirrel@www.loria.fr>
Date: Wed, 4 Sep 2002 15:38:20 -0200 (MET DST)
Subject: Re: [metafont] How unknown is a pair?
To: dirk@siegfried.wisk.sun.ac.za
In-Reply-To: <20020904085040.A16253@siegfried.wisk.sun.ac.za>
References: <20020904085040.A16253@siegfried.wisk.sun.ac.za>
Cc: dpl@sun.ac.za, metafont@ens.fr, Denis.Roegel@loria.fr
X-Mailer: SquirrelMail (version 1.0.6)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 572
Precedence: list

> Is there a way to distinguish between the number of unknows left in a
> pair?
> 
> E.g. interactively I can see
> 
> *pair A; show A; 
>>> (xpart A,ypart A)
> 
> two unknowns, and after giving an equation:
> 
> *A=whatever[(1,2),(3,5)]; show A; 
>>> (0.66667ypart A-0.33334,ypart A)
> 
> one unknown.  But the known/unknown functions do not distinguish the
> cases.
> 
> I can think of several ways, all clumsy, to write a routine for this
> (e.g. try to calculate an intersection with a random line through the
> origin: chance of that line being parallel is small) but I'm hoping
> there is some basic function or register that one can just interrogate.
> 

If you know the name of the unknown(s), make a copy of it (them), and of the
expression that depends on it (them). Do these copies with :=.
Then, give a value to ypart A, if ypart A is unknown, and check
if the whole expression (or xpart A) is still unknown. Of course,
this destroys the previous state, but I think you can recover it from
the saved values. I can't check that right now.

Denis Roegel




From - Wed Sep  4 15:45:33 2002
Return-Path: <Denis.Roegel@loria.fr>
Received: from macker.loria.fr (macker.loria.fr [152.81.1.70]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g84DjNl69975 for
    <metafont@ens.fr>; Wed, 4 Sep 2002 15:45:23 +0200 (CEST)
Received: from localhost.loria.fr (localhost [127.0.0.1]) by localhost
    (Postfix) with ESMTP id 7EE324E9E; Wed,  4 Sep 2002 15:45:23 +0200 (MEST)
X-Amavix: Anti-virus check done by McAfee
X-Amavix: Scanned by Amavix
Received: from auxerois.loria.fr (auxerois.loria.fr [152.81.144.16]) by
    macker.loria.fr (Postfix) with ESMTP id CA6274E9E; Wed,  4 Sep 2002
    15:45:21 +0200 (MEST)
Received: from loria.fr (localhost [127.0.0.1]) by auxerois.loria.fr
    (8.9.3/8.9.3/8.9.3-client/JCG) with SMTP id PAA28778; Wed, 4 Sep 2002
    15:45:21 +0200 (MET DST)
From: <Denis.Roegel@loria.fr>
Received: from 202.88.239.187 (SquirrelMail authenticated user roegel) by
    www.loria.fr with HTTP; Wed, 4 Sep 2002 15:45:21 -0200 (MET DST)
Message-Id: <32944.202.88.239.187.1031147121.squirrel@www.loria.fr>
Date: Wed, 4 Sep 2002 15:45:21 -0200 (MET DST)
Subject: Re: [metafont] Formatting for messages
To: dirk@siegfried.wisk.sun.ac.za
In-Reply-To: <20020903154151.A15353@siegfried.wisk.sun.ac.za>
References: <20020903154151.A15353@siegfried.wisk.sun.ac.za>
Cc: dpl@sun.ac.za, metafont@ens.fr, Denis.Roegel@loria.fr
X-Mailer: SquirrelMail (version 1.0.6)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 573
Precedence: list

> Is there some builtin macro that will 
> 
> (a) turn a pair into a string, i.e. the equivalent of
> 
> def disp(expr z) =  % z is a pair
>   "(" & (decimal (xpart z)) & "," & (decimal (ypart z)) & ")"
> enddef;
> 
> (b) turn the type of a parameter into a string, i.e. something a little
> like
> 
> vardef type(expr s) =
>   if pair s: "pair" else: "impair" fi
> enddef;
> 
> It feels very much like re-inventing the wheel to use such definitions,
> since clearly MetaFont's messages show that such functionality is
> available to the interpreter.

I don't think there is any of these. I have actually needed some
of these functions at various times, in my metapost packages.
You might want to peruse the code of metaobj.mp, for instance.
I also deal a lot with `whatever' intricacies.

Denis Roegel



From - Wed Sep  4 21:15:32 2002
Return-Path: <crowell02@lightandmatter.com>
Received: from pintail.mail.pas.earthlink.net
    (pintail.mail.pas.earthlink.net [207.217.120.122]) by nef.ens.fr
    (8.10.1/1.01.28121999) with ESMTP id g84JFJl21986 for <metafont@ens.fr>;
    Wed, 4 Sep 2002 21:15:19 +0200 (CEST)
Received: from pool0282.cvx15-bradley.dialup.earthlink.net
    ([209.179.45.27] helo=localhost.localdomain) by
    pintail.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id
    17mfcT-0001uU-00 for metafont@ens.fr; Wed, 04 Sep 2002 12:15:18 -0700
Date: Wed, 4 Sep 2002 12:21:23 -0700
From: Ben Crowell <crowell02@lightandmatter.com>
To: metafont@ens.fr
Message-Id: <20020904122123.22dcf9a9.crowell02@lightandmatter.com>
X-Mailer: Sylpheed version 0.7.7 (GTK+ 1.2.10; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 574
Precedence: list
Subject: [metafont] getting off the list

Sorry to post this to the whole list, but I've been trying for
a long time to unsubscribe, and haven't been able to do it.
All I get is automated replies that don't tell me how to unsubscribe.
Can anyone tell me how to do it?


From - Thu Sep 12 15:49:22 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties1.sun.ac.za (maties1.sun.ac.za [146.232.128.1]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g8CDn6l46667 for
    <metafont@ens.fr>; Thu, 12 Sep 2002 15:49:07 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties1.sun.ac.za with esmtp (Exim 4.05) id 17pUL1-000633-00 for
    metafont@ens.fr; Thu, 12 Sep 2002 15:48:55 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g8CDpex01471 for metafont@ens.fr; Thu, 12 Sep 2002
    15:51:40 +0200
Date: Thu, 12 Sep 2002 15:51:40 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: metafont@ens.fr
Message-Id: <20020912155140.A1459@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
References: <20020904085040.A16253@siegfried.wisk.sun.ac.za>
    <20020904130252.A17040@siegfried.wisk.sun.ac.za>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <20020904130252.A17040@siegfried.wisk.sun.ac.za>;
    from dpl@sun.ac.za on Wed, Sep 04, 2002 at 01:02:52PM +0200
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17pUL1-000633-00*rYcKaRAFmpk*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 575
Precedence: list
Subject: [metafont] Generalizing the labels macro

In plain.mf one finds:

vardef labels@#(text t) =
 if proofing>1: forsuffixes $=t:
  makelabel@#(str$,z$); endfor
 fi enddef;

Taking one's cue from this, a macro like

vardef foos(text t) =
  forsuffixes $=t:foo(z$); endfor
  enddef;

will give the effect of 
  foo(z1); foo(z2); foo(z3);

if you write
  foos(1,2,3);

Suppose for example foo is defined as

vardef foo(text t) = show str t; enddef;

you get 

foos(1,2,3);
>> "z1"
>> "z2"
>> "z3"

Now I would like to write a macro foobars that will give
the effect of
  foo(z1); foo(z2); foo(z3);

if I write
  foobars(z)(1,2,3);

My first six or so attempts failed miserably.

Dirk


From - Thu Sep 12 20:44:19 2002
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g8CIiBl03065 for
    <metafont@nef.ens.fr>; Thu, 12 Sep 2002 20:44:11 +0200 (CEST)
Received: from mathdancer.uark.edu (mathdancer.uark.edu [130.184.55.45])
    by mailhost.uark.edu (iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul
    29 2002)) with SMTP id <0H2C000319DIXC@mailhost.uark.edu> for
    metafont@nef.ens.fr; Thu, 12 Sep 2002 13:44:06 -0500 (CDT)
Date: Thu, 12 Sep 2002 13:43:47 -0500
From: "Daniel H.Luecking" <luecking@uark.edu>
Subject: Re: [metafont] Generalizing the labels macro
In-Reply-To: <20020912155140.A1459@siegfried.wisk.sun.ac.za>
X-Sender: luecking@mail.uark.edu (Unverified)
To: metafont@ens.fr
Message-Id: <3.0.6.32.20020912134347.007b6800@mail.uark.edu>
Mime-Version: 1.0
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Content-Type: text/plain; charset=us-ascii
References: <"from dpl"@sun.ac.za>
    <20020904085040.A16253@siegfried.wisk.sun.ac.za>
    <20020904130252.A17040@siegfried.wisk.sun.ac.za>
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 576
Precedence: list

At 03:51 PM 9/12/02 +0200, you wrote:
[...]
>vardef foos(text t) =
>  forsuffixes $=t:foo(z$); endfor
>  enddef;
>
>will give the effect of 
>  foo(z1); foo(z2); foo(z3);
>
>if you write
>  foos(1,2,3);
>
[...]
>
>Now I would like to write a macro foobars that will give
>the effect of
>  foo(z1); foo(z2); foo(z3);
>
>if I write
>  foobars(z)(1,2,3);
>
>My first six or so attempts failed miserably.

Doesn't this do what you want?

def foobars (suffix z) (text t) =
  forsuffixes $=t:
    foo(z$);
  endfor
enddef;

It seems to work here.


Dan

-- 
Daniel H. Luecking          luecking@uark.edu
Department of Mathematical Sciences
University of Arkansas, Fayetteville AR 72701-1201


From - Sun Sep 15 12:18:07 2002
Return-Path: <Denis.Roegel@loria.fr>
Received: from macker.loria.fr (macker.loria.fr [152.81.1.70]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g8FAHxl82082 for
    <metafont@ens.fr>; Sun, 15 Sep 2002 12:17:59 +0200 (CEST)
Received: from localhost.loria.fr (localhost [127.0.0.1]) by localhost
    (Postfix) with ESMTP id B395A4A9B; Sun, 15 Sep 2002 12:17:59 +0200 (MEST)
X-Amavix: Anti-virus check done by McAfee
X-Amavix: Scanned by Amavix
Received: from bar.loria.fr (bar.loria.fr [152.81.2.13]) by
    macker.loria.fr (Postfix) with ESMTP id 7C6FA4B85; Sun, 15 Sep 2002
    12:17:58 +0200 (MEST)
Received: (from roegel@localhost) by bar.loria.fr
    (8.9.3/8.9.3/8.9.3-client/JCG) id MAA19905; Sun, 15 Sep 2002 12:17:58
    +0200 (MET DST)
Date: Sun, 15 Sep 2002 12:17:58 +0200
From: "Denis B. Roegel" <Denis.Roegel@loria.fr>
To: metafont@ens.fr
Cc: "Denis B. Roegel" <Denis.Roegel@loria.fr>
Message-Id: <20020915121758.A18670@bar.loria.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.1i
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 577
Precedence: list
Subject: [metafont] metapost article

Hello,

the article and the presentation on metapost I made at TUG 2002
are now available at

  http://www.loria.fr/~roegel/TeX/tug2002-roegel.pdf
  http://www.loria.fr/~roegel/TeX/trivandrum-slides.pdf

Have fun!

Denis


From - Mon Sep 16 08:42:12 2002
Return-Path: <dirk@siegfried.wisk.sun.ac.za>
Received: from maties2.sun.ac.za (maties2.sun.ac.za [146.232.128.10]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g8G6g1l21110 for
    <metafont@ens.fr>; Mon, 16 Sep 2002 08:42:01 +0200 (CEST)
Received: from siegfried.wisk.sun.ac.za ([146.232.41.45]) by
    maties2.sun.ac.za with esmtp (Exim 4.05) id 17qpa2-0007zu-00;
    Mon, 16 Sep 2002 08:41:58 +0200
Received: (from dirk@localhost) by siegfried.wisk.sun.ac.za
    (8.11.6/8.11.0) id g8G6iqO15994; Mon, 16 Sep 2002 08:44:52 +0200
Date: Mon, 16 Sep 2002 08:44:52 +0200
From: Dirk Laurie <dpl@sun.ac.za>
To: "Daniel H.Luecking" <luecking@uark.edu>
Cc: metafont@ens.fr
Subject: Re: [metafont] Generalizing the labels macro
Message-Id: <20020916084452.A15918@siegfried.wisk.sun.ac.za>
Reply-To: dirk@siegfried.wisk.sun.ac.za
References: <"from <20020904085040.A16253@siegfried.wisk.sun.ac.za> <20020904130252.A17040@siegfried.wisk.sun.ac.za> <20020912155140.A1459@siegfried.wisk.sun.ac.za> <3.0.6.32.20020912134347.007b6800@mail.uark.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <3.0.6.32.20020912134347.007b6800@mail.uark.edu>;
    from luecking@uark.edu on Thu, Sep 12, 2002 at 01:43:47PM -0500
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
    *17qpa2-0007zu-00*0az2Si97tfA*
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 578
Precedence: list

Daniel H.Luecking skryf:
> At 03:51 PM 9/12/02 +0200, you wrote:
> [...]
> >
> >Now I would like to write a macro foobars that will give
> >the effect of
> >  foo(z1); foo(z2); foo(z3);
> >
> >if I write
> >  foobars(z)(1,2,3);
> >
> >My first six or so attempts failed miserably.
> 
> Doesn't this do what you want?
> 
> def foobars (suffix z) (text t) =
>   forsuffixes $=t:
>     foo(z$);
>   endfor
> enddef;
> 
Yes, it does exactly what I want.  I would NEVER have thought of
trying that!  In e.g. 'a' obviously '1' and 'a' are suffixes, but
my linguistic prejudices simply would not allow me to think of
calling 'z' a suffix too.  

Thanks.

Dirk

 


