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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 30 Jun 2003 14:09:03 -0000


sakharuk		Mon Jun 30 10:09:03 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Added test for <dt> tag before <dd> in the definition list (actually I check for <dd> after <dl>) for target="tex" with additional \item[] in case of absence of <dt> tag.
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.146 loncom/xml/londefdef.pm:1.147
--- loncom/xml/londefdef.pm:1.146	Fri Jun 27 12:12:39 2003
+++ loncom/xml/londefdef.pm	Mon Jun 30 10:09:03 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.146 2003/06/27 16:12:39 sakharuk Exp $
+# $Id: londefdef.pm,v 1.147 2003/06/30 14:09:03 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1614,10 +1614,14 @@
 
 #-- <dd> tag
 sub start_dd {
-    my ($target,$token) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
     if ($target eq 'web') {
 	$currentstring = $token->[4];     
+    } elsif ($target eq 'tex') {
+	if ($$tagstack[-2] eq 'dl') {
+	    $currentstring = ' \item [] ';  
+	}
     } 
     return $currentstring;
 }
@@ -1824,9 +1828,6 @@
     } elsif ($target eq 'tex') {
 	my $current_row = $Apache::londefdef::table[-1]{'row_number'};
 	my $data=&Apache::lonxml::endredirection();
-
-	$currentstring.=' SSSS '.$data.' FFFF ';
-
 	my $TeXwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
 	if (defined $TeXwidth) {		
 	    my $current_length=&recalc($TeXwidth);