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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 24 Jul 2002 19:56:32 -0000


sakharuk		Wed Jul 24 15:56:32 2002 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Added 1. correction for stupid way of coming to the next line (used by Ray)
  <m>\\</m>;
        2. corrected \underline for a few html tags to work in latex2e. 	
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.75 loncom/xml/londefdef.pm:1.76
--- loncom/xml/londefdef.pm:1.75	Tue Jul 23 15:15:08 2002
+++ loncom/xml/londefdef.pm	Wed Jul 24 15:56:32 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.75 2002/07/23 19:15:08 sakharuk Exp $
+# $Id: londefdef.pm,v 1.76 2002/07/24 19:56:32 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -91,6 +91,7 @@
     #&Apache::lonxml::debug("M is ends with:$currentstring:");
   } elsif ($target eq 'tex') {
     $currentstring = &Apache::lonxml::get_all_text_unbalanced("/m",$parser);
+    if ($currentstring=~/\s*\\\\\s*/) {$currentstring = ' \vskip 0 mm ';}
   } else {
     my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser);
   }
@@ -842,8 +843,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[4];
 	    } elsif ($target eq 'tex') {
-		my @temp = @$tagstack;
-		if ($temp[-2] ne 'sub' && $temp[-2] ne 'sup') {
+		if ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') {
 		    $currentstring .= '\vskip 0 mm';
 		}
 	    } elsif ($target eq 'latexsource') {
@@ -954,7 +954,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[4];
 	    } elsif ($target eq 'tex') {
-		$currentstring .= "{\\underline ";
+		$currentstring .= '\underline{';
 	    } 
            return $currentstring;
 	}
@@ -964,7 +964,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[2];
 	    } elsif ($target eq 'tex') {
-	        $currentstring .= " }";
+	        $currentstring .= '}';
             }
            return $currentstring;
 	}
@@ -975,7 +975,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[4];
 	    } elsif ($target eq 'tex') {
-		$currentstring .= "{\\underline ";
+		$currentstring .= '\underline{';
 	    } 
            return $currentstring;
 	}
@@ -985,7 +985,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[2];
 	    } elsif ($target eq 'tex') {
-	        $currentstring .= " }";
+	        $currentstring .= '}';
             }
            return $currentstring;
 	}
@@ -1115,7 +1115,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[4];
 	    } elsif ($target eq 'tex') {
-		$currentstring .= "{\\underline ";
+		$currentstring .= '\underline{';
 	    } 
            return $currentstring;
 	}
@@ -1125,7 +1125,7 @@
             if ($target eq 'web') {
 	       $currentstring .= $token->[2];
 	    } elsif ($target eq 'tex') {
-	        $currentstring .= " }";
+	        $currentstring .= '}';
             }
            return $currentstring;
 	}