Another question about tex output.



On 7/6/07, Peter Gustafson <petegus at spaceshipone.engin.umich.edu> wrote:

> In my mind, the output of %i4 (and maybe %i3) should read:
> $$y_1\left(x\right):=m\,x+b$$
>
> The output of %i6 should read:
> $$y_1\left(x\right)=m\,x+b$$
>
> Perhaps this is a feature not a bug.  Is there a reason the outputs are
> as they are?  Is there a way I can force the behavior that I expect?

Well, the treatment of ":=" is deliberate, although there could well
be room for improvement. I suppose ":=" is treated specially
because Maxima functons are typically full of stuff which doesn't
seem to display well as a formula (if, for, block ...). However
there certainly are some functions which are appropriately
displayed as formulas, and there is no way to allow that in the
current TeX output code.

I've attached a patch to cut out the special case for ":="
so function definitions are displayed as formulas.
That's heavy-handed but I don't see a better way to do it
given the organization of the TeX output code.

About tex('y(x)), that is treated differently than tex(y(x))
because of Maxima's noun-verb distinction.
Try tex('(y(x)) (i.e. argument is a verb expression) or
texput(nounify(y), y_1); tex('y(x)) (i.e. tell Maxima about the
noun). Dunno if the TeX output code should always treat
nouns the same as verbs.

HTH
Robert Dodier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mactex.lisp-mdefine-patch
Type: application/octet-stream
Size: 752 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070707/9f3dc9a9/attachment.obj