--- loncom/interface/lonpreferences.pm	2005/02/25 06:48:00	1.55
+++ loncom/interface/lonpreferences.pm	2005/02/26 05:37:23	1.56
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.55 2005/02/25 06:48:00 albertel Exp $
+# $Id: lonpreferences.pm,v 1.56 2005/02/26 05:37:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -190,7 +190,7 @@ sub texenginechanger {
     my $pref=&mt('Preferred method to display Math');
     my %mathchoices=('' => 'No Preference',
 		     'tth' => 'TeX to HTML',
-		     #'ttm' => 'TeX to MathML',
+		     'ttm' => 'TeX to MathML',
 		     'jsMath' => 'jsMath',
 		     #'mimetex' => 'Convert to Images'
                      );
@@ -245,6 +245,13 @@ sub verify_and_change_texengine {
 # Screenname
     my $newtexengine  = $ENV{'form.texengine'};
     $newtexengine=~s/[^\-\w]//g;
+    if ($newtexengine eq 'ttm') {
+	&Apache::lonnet::appenv('browser.mathml' => 1);
+    } else {
+	if ($ENV{'environment.texengine'} eq 'ttm') {
+	    &Apache::lonnet::appenv('browser.mathml' => 0);
+	}
+    }
     my $message='';
     if ($newtexengine) {
         &Apache::lonnet::put('environment',{'texengine' => $newtexengine});
@@ -255,6 +262,8 @@ sub verify_and_change_texengine {
         &Apache::lonnet::delenv('environment\.texengine');
         $message='Reset preferred math display.';
     }
+
+
     $r->print(<<ENDVCSCREEN);
 </p>
 $message