tex command



Thanks everyone for your help. This simple script from Starvos Macrakis 
did the job:

stripped_tex(expr):=
  block([str: tex(expr,false)],
    concat("",?subseq(str,2,?length(str)-2)))$

Some comments:

    * I am using this to create individual assignments for my students
    (with an answer sheet for me, of course!). Is in the same spirit
     of what is achieved using wims web interface (http://wims.unice.fr)
     but on paper.

    * I agree need to learn lisp (Yet Another Lisp Virgin!). However, it 
seems a bit tricky to use it within maxima. I tried the following command:

marquez@pc-lmarquez:~> clisp
(clisp header suppressed)
[1]> (string-trim " ($)" "$$x^2$$");
"x^2"

so this is legal lisp (at least for clisp, the lisp I am using with 
maxima). However from maxima it does not work. I tried some variations 
based on a hint from Richard Fateman
   ?string-trim(" ($)" "$$x^2$$");
   ?string\-trim(" ($)" "$$x^2$$" );
   ?string\-trim(" ($)", "$$x^2$$" );
but they all ended with error messages! What is the correct way to 
"translate" this function?

I am using Maxima 5.9.0-1 with clisp-2.29-1 on a linux box (suse 9.1)

Thanks again.
A. Marquez