[Maxima] tex() and multiplication
msarnoff at andrew.cmu.edu
Thu Jul 20 15:37:07 CDT 2006
Chris: (defprop mtimes "\\cdot " texsym) will put a dot between _any_
two expressions that are multiplied together. This makes expressions
like "2*3" look fine, but "2*x" and "'diff(y,x)" look strange.
Due to the many forms that the multiplication operator can take, I
think that the behavior of times should be extended in the following
1. If the two expressions on either side of the operator are literal
numbers (i.e. numberp returns true), then "\\cdot " should be used.
2. If not, "\\," should be used, except:
3. In noun-forms of derivatives, no space at all (or very small
space) should be used in the denominator between the "d"/"\partial"
and the "x" variable. The current behavior (separate the two with the
"mtimes" symbol) looks a bit unclean.
Also, speaking of derivatives, I think that when formatting 'diff
(y,x), the "y" should be placed in the numerator if it is an atom.
That way, 'diff(y,x) would render nicely as
I've found the functions in mactex.lisp (tex-nary and tex-d) that
need to be changed to accomodate this behavior, but I don't have
enough Lisp experience to implement it. Thought I'd suggest it, though.
More information about the Maxima