[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Fri, 27 Jun 2003 16:12:39 -0000
sakharuk Fri Jun 27 12:12:39 2003 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Corrected <a> and <li> tags.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.145 loncom/xml/londefdef.pm:1.146
--- loncom/xml/londefdef.pm:1.145 Fri Jun 27 10:01:19 2003
+++ loncom/xml/londefdef.pm Fri Jun 27 12:12:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.145 2003/06/27 14:01:19 albertel Exp $
+# $Id: londefdef.pm,v 1.146 2003/06/27 16:12:39 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1357,40 +1357,33 @@
}
sub end_a {
- my ($target,$token,$tagstack,$stackref) = @_;
+ my ($target,$token,$tagstack,$parstack,$safeeval) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
- my $tempor_var = $stackref->[$#$stackref];
- if (index($tempor_var,'name') != -1 ) {
- $tempor_var =~ s/name=([^,]*),/$1/g;
- } elsif (index($tempor_var,'href') != -1 ) {
- $tempor_var =~ s/href=([^,]*),/$1/g;
- $currentstring .= " \\ref{$tempor_var}";
- }
+ my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1);
+ $currentstring .= '\ref{'.$href.'}';
}
return $currentstring;
}
#-- <li> tag
sub start_li {
- my ($target,$token,$tagstack,$stackref) = @_;
+ my ($target,$token,$tagstack,$parstack,$safeeval) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
- my $tempor_var = $stackref->[$#$stackref];
- if (index($tempor_var,'circle') != -1 ) {
- $currentstring .= " \\item[o] ";
- } elsif (index($tempor_var,'square') != -1 ) {
- $currentstring .= " \\item[$\Box$] ";
- } elsif ($tempor_var ne '') {
- $_ = $tempor_var;
- m/my\s*([^=]*)=/;
- $currentstring .= " \\item[$1] ";
+ my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,1);
+ if ($type=~/circle/) {
+ $currentstring .= ' \item[o] ';
+ } elsif ($type=~/square/) {
+ $currentstring .= ' \item[$\Box$] ';
+ } elsif ($type ne '') {
+ $currentstring .= ' \item['.$type.'] ';
} else {
- $currentstring .= " \\item ";
+ $currentstring .= ' \item ';
}
}
return $currentstring;
@@ -1831,6 +1824,9 @@
} 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);