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

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 27 Feb 2007 23:44:53 -0000


foxr		Tue Feb 27 18:44:53 2007 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  BZ5049  - do <sup> and <sub> using \raisebox and
  \scriptsize so that the contents of the tags don't wind up italicized
  as they would if done in mathmode.
  
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.354 loncom/xml/londefdef.pm:1.355
--- loncom/xml/londefdef.pm:1.354	Thu Feb  1 05:49:27 2007
+++ loncom/xml/londefdef.pm	Tue Feb 27 18:44:53 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.354 2007/02/01 10:49:27 foxr Exp $
+# $Id: londefdef.pm,v 1.355 2007/02/27 23:44:53 foxr Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1227,11 +1227,10 @@
 	}
 	if ($signal eq 1) {
 	    $currentstring .= ' \vskip 0 mm ';
-	} elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') {
+	} else {
 	    $currentstring .= '\strut \\\\ \strut ';
-	} else {                   # Honor break in simple <sup></sup>
-	    $currentstring .= '}} \strut \\\\ \strut \ensuremath{^{'; 
 	}
+    
     }
     return $currentstring;
 }
@@ -1413,7 +1412,7 @@
     if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
-	$currentstring .= '\ensuremath{_{';
+	$currentstring .= '\raisebox{-\smallskipamount}{\scriptsize{';
     } 
     return $currentstring;
 }
@@ -1436,7 +1435,7 @@
     if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
-	$currentstring .= '\ensuremath{^{';
+	$currentstring .= '\raisebox{\smallskipamount}{\scriptsize{';
     } 
     return $currentstring;
 }
@@ -1994,12 +1993,6 @@
         $Apache::londefdef::table[-1]{'minlen'}=[];
         $Apache::londefdef::table[-1]{'content'}=[];
         $Apache::londefdef::table[-1]{'align'}=[];
-	if (&is_inside_of($tagstack, 'sup')) {
-	    $currentstring .= '}} \\\\ \ensuremath{^{ ';
-	}
-	if (&is_inside_of($tagstack, 'sub')) {
-	    $currentstring .= '}} \\\\ \ensuremath{_{ ';
-	}
         $currentstring.=' \keephidden{NEW TABLE ENTRY}';