make \m2{}, a tex macro, as below

=============================================================================

In-Reply-To: <200606261612.k5QGC0511245@u00.math.uiuc.edu>
From: "Justin C. Walker" <justin@mac.com>
Subject: Re: 0.9.8 on Mac OS X
Date: Mon, 26 Jun 2006 09:56:38 -0700
To: dan@math.uiuc.edu


On Jun 26, 2006, at 09:12 , Dan Grayson wrote:


> F10 is a special thing to make it easier to deal with TeX files  
> that have M2
> code in them.  I wrote a program, not part of Macaulay 2, but  
> visible in the
> repository M2-tex, that allows us to have M2 input lines in a TeX  
> file and
> replace them by the results from running them through the program.   
> That makes
> it easy to write a math paper with M2 code and results displayed  
> within it.
> So, F10 is used in a tex file where M2 code has been bracketed with  
> <<<...>>>.

Ah!  Cute!  There is a similar thing for SAGE (which William may  
already have mentioned): A "\sage{}" command in a LaTeX file dumps  
out a ".sage" file that SAGE can execute; the next time you run  
LaTex, the results of the program replace the "\sage{}" item.
