[LON-CAPA-cvs] cvs: loncom /xml lontexconvert.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 18 May 2006 22:13:50 -0000


albertel		Thu May 18 18:13:50 2006 EDT

  Modified files:              
    /loncom/xml	lontexconvert.pm 
  Log:
  - tth doesn't lie the trailing space on the option list
  
  
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.73 loncom/xml/lontexconvert.pm:1.74
--- loncom/xml/lontexconvert.pm:1.73	Wed May 17 18:08:08 2006
+++ loncom/xml/lontexconvert.pm	Thu May 18 18:13:50 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.73 2006/05/17 22:08:08 albertel Exp $
+# $Id: lontexconvert.pm,v 1.74 2006/05/18 22:13:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,19 +50,24 @@
 
 sub init_tth {
     my $options=$env{'course.'.$env{'request.course.id'}.'.tthoptions'};
+    if ($options =~ /\S/) {
+	$options = ' '.$options;
+    } else {
+	undef($options);
+    }
     if ($env{'browser.mathml'}) {
 	&tth::ttminit();
 	if ($env{'browser.unicode'}) {
-	    &tth::ttmoptions('-L -u1 '.$options);
+	    &tth::ttmoptions('-L -u1'.$options);
 	} else {
-	    &tth::ttmoptions('-L -u0 '.$options);
+	    &tth::ttmoptions('-L -u0'.$options);
 	}
     } else {
 	&tth::tthinit();
 	if ($env{'browser.unicode'}) {
-	    &tth::tthoptions('-L -u1 '.$options);
+	    &tth::tthoptions('-L -u1'.$options);
 	} else {
-	    &tth::tthoptions('-L -u0 '.$options);
+	    &tth::tthoptions('-L -u0'.$options);
 	}
     }
 }