Hi,
I have a lot of utility functions that I'd like to make into an Algebraic Manipulation Extras.
For example, it would be nice to have a crossMultiply:
crossMultiply[a_==b_]:=Numerator[a] Denominator[b]==Numerator[b] Denominator[a]
CreatePalette[PasteButton[crossMultiply[\[SelectionPlaceholder]]]];
This doesn't work like the Algebraic Manipulation palette: it correctly does the substitution:
a/b == c/d
crossMultiply[a/b == c/d]
a d == b c
when a/b == c/d
is highlighted, but it returns the function crossMultiply[a/b == c/d]
which then has to be shift/entered to evaluate.
Nothing I do can get it to evaluate automatically, which the description of PasteButton would seem to warrant. Any suggestions?
Thanks,
Eric