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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 12 Jul 2004 17:57:37 -0000


sakharuk		Mon Jul 12 13:57:37 2004 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Another addition/correction to fix bug 3103.
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.226 loncom/xml/londefdef.pm:1.227
--- loncom/xml/londefdef.pm:1.226	Mon Jul 12 13:19:13 2004
+++ loncom/xml/londefdef.pm	Mon Jul 12 13:57:36 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.226 2004/07/12 17:19:13 sakharuk Exp $
+# $Id: londefdef.pm,v 1.227 2004/07/12 17:57:36 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1152,8 +1152,16 @@
     if ($target eq 'web') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
-	if (($$tagstack[-2] eq 'b') || ($$tagstack[-2] eq 'strong') ||
-            ($$tagstack[-2] eq 'ol') || ($$tagstack[-2] eq 'ul')) {
+	my @tempo=@$tagstack;
+	my $sygnal=0;
+	for (my $i=$#tempo;$i>=0;$i--) {
+	    if (($tempo[$i] eq 'b') || ($tempo[$i] eq 'strong') ||
+                ($tempo[$i] eq 'ol') || ($tempo[$i] eq 'ul'))  {
+		$sygnal=1;
+		last;
+	    }
+	}
+	if ($sygnal) {
 	    $currentstring .= ' \vskip 0 mm ';
 	} elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') {
 	    $currentstring .= '\strut \\\\ \strut ';