sub start_blankspace {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = &end_p(); # closes off any unclosed
if ($target eq 'tex') {
- my $howmuch = &Apache::lonxml::get_param('heigth',$parstack,$safeeval,undef,1);
+ my $howmuch = &Apache::lonxml::get_param('height',$parstack,$safeeval,undef,1);
$currentstring .= '\vskip '.$howmuch.' ';
}
return $currentstring;
@@ -3655,7 +3470,7 @@ sub start_caption {
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[4];
- }
+ }
return $currentstring;
}
@@ -3663,7 +3478,7 @@ sub end_caption {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
- $currentstring = $token->[2];
+ $currentstring = $token->[2];
}
return $currentstring;
}
@@ -3687,13 +3502,34 @@ sub end_col {
return $currentstring;
}
-#--
tag (end tag optional)
+#-- [4];
}
+ if ($target eq 'tex') {
+ # TODO: Ensure this tag is in a table:
+
+ # Fetch the attributes and build the hash for the
+ # call to define_colgroup.
+
+ my $span = &Apache::lonxml::get_param('span', $parstack, $safeeval);
+ my $halign = &Apache::lonxml::get_param('halign', $parstack, $safeeval);
+
+ my %colgroup_params;
+ if ($span ne '') {
+ $colgroup_params{'span'} = $span;
+ }
+ if ($halign ne '') {
+ $colgroup_params{'halign'} = $halign;
+ }
+
+ my $table = $Apache::londefdef::table[-1];
+ $table->define_colgroup(\%colgroup_params);
+
+ }
return $currentstring;
}
@@ -3706,12 +3542,16 @@ sub end_colgroup {
return $currentstring;
}
+
#-- tag (end tag required)
sub start_del {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[4];
+ } elsif ($target eq 'tex') {
+ &disable_para();
+ $currentstring .= '\st{';
}
return $currentstring;
}
@@ -3720,7 +3560,10 @@ sub end_del {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
- $currentstring = $token->[2];
+ $currentstring = $token->[2];
+ } elsif ($target eq 'tex') {
+ &enable_para();
+ $currentstring = '}';
}
return $currentstring;
}
@@ -3768,8 +3611,68 @@ sub start_iframe {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
- $currentstring = $token->[4];
- }
+ my ($src,$url,$query);
+ if ($token->[2]->{'src'}) {
+ $src = $token->[2]->{'src'};
+ } elsif ($token->[2]->{'SRC'}) {
+ $src = $token->[2]->{'SRC'};
+ }
+ if ($src) {
+ ($url,$query) = ($src =~ /^([^?]+)\??([^?]*)$/);
+ if ($query =~ /inhibitmenu=yes/) {
+ $currentstring = $token->[4];
+ } else {
+ my $inhibit;
+ if ($url =~ m{^[^/.].*\.x?html?$}) {
+ $inhibit = 1;
+ } elsif ($url =~ m{^/(uploaded|res)/.*\.x?html?$}) {
+ $inhibit = 1;
+ }
+ if ($inhibit) {
+ $currentstring = '