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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 09 Nov 2002 22:05:33 -0000


albertel		Sat Nov  9 17:05:33 2002 EDT

  Modified files:              
    /loncom/xml	londefdef.pm lontexconvert.pm 
  Log:
  - have the tth init code set the unicode encoding
  - new ENV parm needed browser.unicode
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.99 loncom/xml/londefdef.pm:1.100
--- loncom/xml/londefdef.pm:1.99	Thu Nov  7 14:33:52 2002
+++ loncom/xml/londefdef.pm	Sat Nov  9 17:05:33 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.99 2002/11/07 19:33:52 albertel Exp $
+# $Id: londefdef.pm,v 1.100 2002/11/09 22:05:33 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -109,28 +109,38 @@
   return $currentstring;
 }
 #-- <html> tag    
-      sub start_html {
-	    my ($target,$token) = @_;
-            my $currentstring = '';
-	    if ($ENV{'browser.mathml'}) {
-	      &tth::ttminit();
-	    } else {
-	      &tth::tthinit();
-	    }
-            if ($target eq 'web') {
-              $currentstring = &Apache::lonxml::xmlbegin().
-                               &Apache::lonxml::fontsettings();     
-	    } elsif ($target eq 'tex') {
-	      @Apache::londefdef::table = ();
-	      $currentstring .= '\documentclass[letterpaper]{article}
+sub start_html {
+    my ($target,$token) = @_;
+    my $currentstring = '';
+    if ($ENV{'browser.mathml'}) {
+	&tth::ttminit();
+	if ($ENV{'browser.unicode'}) {
+	    &tth::ttmoptions('-L -u1');
+	} else {
+	    &tth::ttmoptions('-L -u0');
+	}
+    } else {
+	&tth::tthinit();
+	if ($ENV{'browser.unicode'}) {
+	    &tth::tthoptions('-L -u1');
+	} else {
+	    &tth::tthoptions('-L -u0');
+	}
+    }
+    if ($target eq 'web') {
+	$currentstring = &Apache::lonxml::xmlbegin().
+	    &Apache::lonxml::fontsettings();     
+    } elsif ($target eq 'tex') {
+	@Apache::londefdef::table = ();
+	$currentstring .= '\documentclass[letterpaper]{article}
                                  \newcommand{\keephidden}[1]{}
                                  \renewcommand{\deg}{$^{\circ}$}
                                  \usepackage[dvips]{graphicx}
                                  \usepackage{epsfig}\usepackage{calc}
                                  \newenvironment{choicelist}{\begin{enumerate}}{\end{enumerate}}';
-	    }
-	   return $currentstring;
-	}
+    }
+    return $currentstring;
+}
         sub end_html {
 	    my ($target,$token) = @_;
             my $currentstring = '';
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.12 loncom/xml/lontexconvert.pm:1.13
--- loncom/xml/lontexconvert.pm:1.12	Mon Oct 28 15:40:25 2002
+++ loncom/xml/lontexconvert.pm	Sat Nov  9 17:05:33 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.12 2002/10/28 20:40:25 www Exp $
+# $Id: lontexconvert.pm,v 1.13 2002/11/09 22:05:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -55,8 +55,18 @@
   my $time=time;
   if ($ENV{'browser.mathml'}) {
       &tth::ttminit();
+      if ($ENV{'browser.unicode'}) {
+	  &tth::ttmoptions('-L -u1');
+      } else {
+	  &tth::ttmoptions('-L -u0');
+      }
   } else {
       &tth::tthinit();
+      if ($ENV{'browser.unicode'}) {
+	  &tth::tthoptions('-L -u1');
+      } else {
+	  &tth::tthoptions('-L -u0');
+      }
   }
   return &Apache::lonxml::xmlbegin().
          &Apache::lonxml::fontsettings().