TeX output from Maxima 5.9.0



Richard,

Many thanks for such a swift reply.

Perhaps I should make my purpose clear.  Maxima will sit behind a website
I'm building and will take student's answers from a form, process them and
then give feedback.  I intend to change the TeX to HTML (using TtH) and
display it in that way, hence the need to concatinate a string.  It is not
expected that they will use CAS, although they could use a CAS window
elsewhere if they knew about such things.  (This is an educational issue,
not a technical one!)

The fact that it is Maxima working in the background should be transparent
to the user.  They will just see a form on a website with a question and
space for their answer.

Chris


On Fri, 23 Jan 2004, Richard Fateman wrote:

> This is certainly possible to do. The tex function is defined in a
> file called mactex, but it is written in lisp, so you would either have
> to learn some lisp or find someone who knows lisp.
> However, you are working on several faulty premises.
> 
> 1. A person who can solve a calculus problem has the interest and ability
> to type it in to a computer algebra system perfectly.
> 2. A person who CAN'T do calculus, even more miraculously, can type the
> answer (wrong...) into a computer algebra system perfectly.
> 3. The computer will differentiate the correct answer to get the integrand
> IN THE SAME FORM, EASILY CHECKED. 
> Since 80% (my guess) of the correct answers will be typed incorrectly, 
> people
> will not believe the computer feedback.
> 
> 
> 
> Some people have used point-evaluation tests to check results heuristically.
> 
> (Good luck, anyway)
> 
> RJF
> 
> 
> Chris Sangwin wrote:
> 
> >I am relatively new to Maxima, but have tried to find the answer to this
> >question in the FAQ and docs.
> >
> >I am using Maxima as part of a computer aided assessment system to
> >automatically mark students' work, and as part of this am concatinating
> >strings to generate feedback.  I would like to capture the output from the
> >TEX function as a string.  For efficiency reasons I don't want to write to
> >a file and then load this back.
> >
> >Also, I'd like to get just the raw TeX associated with a Maxima variable
> >without the $$'s around the string - sometimes I'd like to produce inline
> >equations, or construct arrays say, with specified entries.  In short I'd
> >like a little more control. 
> >
> >Where is the TEX function defined?  Is there a doc?  How would I customise
> >this?  I am a LISP virgin!
> >
> >The sort of syntax I'd like is the following:
> >
> >
> > WrongAnswer: x^2/2*EXP(x)+c;
> > Integrand:x*EXP*(x);
> >
> > FB1:"Incorrect answer.  You were asked to integrate $"$
> > T1:TEX(Integrand);
> > FB2:"$.  The derivative of your answer should be equal to the function that you were asked to integrate.  In fact the derivative of your answer is \\["$
> > T2:TEX(Diff(WrongAnswer,x));
> > FB3:"\\] So you must have done something wrong!"$
> >
> > FeedBack:CONCAT(FB1,T1,FB2,T2,FB3);
> >
> >Many thanks in advance for any advice.
> >
> >Chris Sangwin
> >----------------------------------------------
> >LTSN Maths, Stats & OR Network
> >School of Mathematics and Statistics
> >University of Birmingham
> >Birmingham, B15 2TT
> >United Kingdom
> >+44 121 414 6197
> >----------------------------------------------
> >
> >
> >_______________________________________________
> >Maxima mailing list
> >Maxima@www.math.utexas.edu
> >http://www.math.utexas.edu/mailman/listinfo/maxima
> >  
> >
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>