HOWTO document Maxima sessions?



|O.K. , for the records:
|I think I found something useful and quick.
|I open an xterm and type
|        # script
|This will save anything I do on this terminal in a file called
|/my_home/typescript .

A problem you may encounter using 'script' is that
it tends to generate funny ^M control characters
in the typescript file. From the man page:  "Script
places everything in the log file, including linefeeds and
backspaces."

If that happens you can eliminate the control characters with
the 'col' command.

# filter typescript with col -b
  cat typescript | col -b > maxima_session

You can append to typescript with
 script -a

The Maxima 'writefile()/closefile()' commands do
not have the same problems with control characters
but writefile/closefile will not capture output 
when another program is invoked from within Maxima 
using the 'system()' command.
So if you use system("octave"); from within Maxima
none of the commands from the octave session would
be logged.

The 'script' command that you mention will capture
that output (but you may need to filter with col -b.)

Script also allows you to specify a different file name
other than "typescript". For instance, to start the
script log with a date/time stamp in the file_name
to keep your session files organized you can do:

# start the script log with a date/time stamp
  script -f `date +%y%m%d_%H:%M`.maxima
  Script started, file is 031108_09:29.maxima
# or
  script -f `whoami``date +%m%d`.maxima
  Script started, file is username1108.maxima

The files generated by script, or writefile/closefile are
a useful format for students to use when submitting answers
to problem sets using Maxima. They can just mail you the files
when they are done with the exercise.

L. Prevett
Mathematics Instructor
Cochise College, Sierra Vista, AZ, US