| |
 |
|
| Science Forum Index » Math - Symbolic Forum » Question... |
|
Page 1 of 1 |
|
| Author |
Message |
| Rene Grothmann... |
Posted: Mon Jun 29, 2009 8:31 pm |
|
|
|
Guest
|
(1) Can I change the tex() command to output \frac{a}{b} instead of
{a
\over b} at the command tex(a/b). I looked at the texput() docs, but
there seems to be no function for this, or I cannot get it to work
properly.
(2) Can I define a function f(a,b) in Maxima, which works like "foo
a,b" or like "foo a b".
Thanks for any answers
Rene |
|
|
| Back to top |
|
|
|
| Richard Fateman... |
Posted: Tue Jun 30, 2009 7:59 am |
|
|
|
Guest
|
Rene Grothmann wrote:
[quote:931d2c366f](1) Can I change the tex() command to output \frac{a}{b} instead of
{a
\over b} at the command tex(a/b). I looked at the texput() docs, but
there seems to be no function for this, or I cannot get it to work
properly.
I think this can be done, but why? They typeset the same, don't they?
(2) Can I define a function f(a,b) in Maxima, which works like "foo
a,b" or like "foo a b".
[/quote:931d2c366f]
Probably a number of ways, but you could do this..
ev(expression, f(a,b):=concat(f,~,a,~,b)) before you typeset it.
I suggest you compose a more meaningful "subject" line in the future.
RJF |
|
|
| Back to top |
|
|
|
| Rene Grothmann... |
Posted: Tue Jun 30, 2009 7:48 pm |
|
|
|
Guest
|
I have no idea, what you mean with the following line. Where and when
should I input this to make "f a,b" work?
ev(expression, f(a,b):=concat(f,~,a,~,b))
[quote:d0e240f063]I suggest you compose a more meaningful "subject" line in the future.
[/quote:d0e240f063]
You are completely right. I should have made two postings with
appropriate headers. |
|
|
| Back to top |
|
|
|
| Richard Fateman... |
Posted: Wed Jul 01, 2009 7:36 am |
|
|
|
Guest
|
Rene Grothmann wrote:
[quote:5899091f3a]I have no idea, what you mean with the following line. Where and when
should I input this to make "f a,b" work?
ev(expression, f(a,b):=concat(f,~,a,~,b))
I suggest you compose a more meaningful "subject" line in the future.
You are completely right. I should have made two postings with
appropriate headers.
[/quote:5899091f3a]
Since you did not specify what you meant by making "f a b" WORK, I
assumed that you wanted to typeset f(a,b) as "f a b" in Maxima.
thus f(a,b);
ev(%, f(a,b):=concat(f,~,a,~,b));
tex(%);
produces $f~a~b$ which typesets as f a b . Tada.
If you mean (as Robert Dodier intuited), that you want to type into
Maxima the expression f a b
and get it to be interpreted as f(a,b)
then there is no easy way to do this. While Maxima's parser is, within
limits, re-programmable by the user with new infix or prefix or postfix
operations, "f a b" does not fit into this pattern, and so you would
have to change the program in other ways.
There are many things to complain about in using computers and computer
algebra systems specifically, and sometimes you (the human) should just
change your expectations a little. I encountered someone who declared
that all these programs were useless because he used symbols like alpha
and theta, and they weren't on the keyboard. Spelling them out was just
unacceptable to him. Similar to your preference for f a b, though I
hope you not as stubborn as he was, and can live with typing f(a,b).
Either that or you can learn to "fix" the parser. Or maybe offer to pay
someone else to do it.
RJF |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Sun Nov 08, 2009 7:17 am
|
|