User Manual



--- willisb@unk.edu wrote:
> 
> After volunteering to write a section for the "User Manual" on the
> special function package, I started thinking about how to best
> present maxima examples in TeX.  A few thoughts on the possibilities:
> 
> i) Use maxima ASCI-art math.  This is the honest approach because
> it what most users will see on the screen; however, it looks
> 1970-ish,
> takes up  too much space, and it is easily messed up (an extra space
> here or a tab converted to spaces).

Agreed.

> ii) Use TeXMacs. TeXMacs doesn't do windows and those of us who have
> used TeX for fifteen plus years aren't too excited about it either.
> I think we'd get more volunteers for the "User Manual" if we used
> standard LaTeX. Additionally, I think currently TeXMacs is missing
> too much of LaTeX and is too flaky to use  on a large document.

I've looked at this a little, and I agree.  My though had been to run
the maxima sessions in TeXmacs, export to LaTeX, and cut and paste, but
unfortunately it isn't even that simple - the generated LaTeX is quite
odd, and depends on a special TeXmacs style file which causes some
problems with the current docs.  So that particular method is out.

> An idea:  Embed maxima in LaTeX something like:
> 
> Let {\tt buddy} be the gradient of $x^2 + y^2$.  Thus
> \begin{maxima}
>   buddy : [diff(x^2 + y^2,x), diff(x^2 + y^2,y)];
>   solve(buddy,[x,y]);
> \end{maxima}
> 
> Write a LaTeX pre-processor that would scan a LaTeX file for
> embedded maxima, extract the maxima commands, have maxima
> evaluate them, TeX the output and appropriately replace the
> \begin{maxima} ...  \end{maxima} with TeX code.   A document
> written  this way would more maintainable than one done by cutting
> and pasting from either TeXMacs or from ASCII-art.
> 
> What do you all think?

That would be absolutely ideal.  Also, it would have the added
advantage of automatically keeping the documentation honest - i.e., we
could just recompile the docs using a new maxima, and we could see if
any of the old examples no longer work with the new system.  

One thing we would have to be careful of, though, would be graphical
output.  It will be awhile before we have to worry about that, but we
need to make sure we get eps plots back in all cases, or at least
handle the other cases in some intelligent way.
Another thing would be the startup message, telling which versions of
Lisp and Maxima are being used - we would need to decide how to tell
the particular session whether or not to include it.  Also, would we
want to be able to do regular tex and a single maxima session mixed,
i.e.:


 Let {\tt buddy} be the gradient of $x^2 + y^2$.  Thus

 \begin{maximasession}

 \begin{maxima}
    buddy : [diff(x^2 + y^2,x), diff(x^2 + y^2,y)];
    solve(buddy,[x,y]);
 \end{maxima}

 Now let's integrate {\tt buddy}:

 \begin{maxima}
    integrate(buddy,x);
 \end{maxima}

 \end{maximasession}

That way, we could dictate not only when we had maxima commands to
evalutate, but we could denote when we wished to start a new session
and when we want to use the same session despite having put our own TeX
stuff in between some lines of Maxima output.


In any case, if it can be done, your approach gets my vote hands down. 
Problem is, I've no idea how to write a LaTeX preprocessor.  Are you
volunteering to do it? :-)

CY

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com