Hi!
Now I have perl script which
1. parses .texi files for constructions
of the form
@c ===beg===
@c expand((x+y)^2);
@c factor(%);
@c ===end===
@example
...
@end example
2. extracts piece of code between
@c ===beg=== and @c ===end===.
3. feeds this code into maxima and replaces
... by the output.
But there is some problem with the step 3.
I'd like to see the result of this Maxima
session between @example and @end exactly
as it looks when I type it manually.
Unfortunately I don't see any simple way to
do so. All Maxima commands - batch, demo,
example print input lines not in the original
form. Shell redirection <> wont do as well AFAIK.
I see only two solutions to problem:
1. Write special Maxima regime which
literally echoes all input to output.
2. Take 'out' result of maxima < in > out
and merge it with the 'in'. This is a bit
tricky. It is not clear how to split
the input into pieces (multiline commands).
Various Maxima's questions like
"Is foo negative ... ?"
and answers to this questions in the 'in'
adds to the problem.
But it can be done with the reasonable
level of efforts.
I'm inclined to do 2.
Any opinion are greatly appreciated.
Best wishes,
Vadim
--
Vadim V. Zhytnikov