--- loncom/xml/londefdef.pm 2003/08/30 02:38:11 1.170
+++ loncom/xml/londefdef.pm 2003/09/25 15:52:57 1.172
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.170 2003/08/30 02:38:11 albertel Exp $
+# $Id: londefdef.pm,v 1.172 2003/09/25 15:52:57 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -541,7 +541,7 @@ sub end_body {
if ($target eq 'web') {
$currentstring = $token->[2];
} elsif ($target eq 'tex') {
- $currentstring = '\end{document}';
+ $currentstring = '\strut\newline\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\newline\noindent \end{document}';
}
return $currentstring;
}
@@ -1654,25 +1654,28 @@ sub end_dl {
return $currentstring;
}
-#--
tag
+#-- tag (end tag optional)
sub start_dt {
- my ($target,$token) = @_;
- my $currentstring = '';
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+ my $currentstring='';
if ($target eq 'web') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
- $currentstring = '\item[';
+ &Apache::lonxml::startredirection();;
}
return $currentstring;
}
sub end_dt {
- my ($target,$token) = @_;
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[2];
} elsif ($target eq 'tex') {
- $currentstring = ']';
+ my $data=&Apache::lonxml::endredirection();
+ $data=~s/\\begin{center}//g;
+ $data=~s/\\end{center}//g;
+ $currentstring.='\item['.$data.']';
}
return $currentstring;
}
@@ -1684,10 +1687,8 @@ sub start_dd {
if ($target eq 'web') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
- if ($$tagstack[-2] eq 'dl') {
- $currentstring = ' \item [] ';
- } elsif ($$tagstack[-2] eq 'dt') {
- $currentstring = ']';
+ if ($$tagstack[-2] eq 'dt') {
+ $currentstring.='\item['.&Apache::lonxml::endredirection().']';
}
}
return $currentstring;