Diff for /loncom/xml/londefdef.pm between versions 1.88 and 1.90

version 1.88, 2002/09/16 17:40:09 version 1.90, 2002/10/07 17:57:37
Line 1549  EDITBUTTON Line 1549  EDITBUTTON
             my $currentstring = '';              my $currentstring = '';
     my $width_param = '';      my $width_param = '';
     my $height_param = '';      my $height_param = '';
     my $scaling = .3;       my $scaling = .3;
   
     if ($target eq 'web') {      if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];     
Line 1568  EDITBUTTON Line 1568  EDITBUTTON
   my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval);     my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval); 
   my $TeXheight = &Apache::lonxml::get_param('TeXheight',$parstack,$safeeval);     my $TeXheight = &Apache::lonxml::get_param('TeXheight',$parstack,$safeeval); 
   my $width = &Apache::lonxml::get_param('width',$parstack,$safeeval);    my $width = &Apache::lonxml::get_param('width',$parstack,$safeeval);
   if ($TeXwidth ne '') {     if ($TeXwidth ne '') {  
       $width_param = $TeXwidth;         if ($TeXwidth=~/(\d+)\s*\%/) {
   } elsif ($TeXheight ne '') {     $width_param = $1*$ENV{'form.textwidth'}/100;
       $width_param = $TeXheight/$height_param*$width_param;        } else { 
     $width_param = $TeXwidth;
         }
     } elsif ($TeXheight ne '') {
     $width_param = $TeXheight/$height_param*$width_param;
   } elsif ($width ne '') {    } elsif ($width ne '') {
       $width_param = $width*$scaling;              $width_param = $width*$scaling;      
   }    }
Line 1711  sub start_embed { Line 1715  sub start_embed {
     }       } 
    return $currentstring;     return $currentstring;
  }   }
   
 #-- <allow> tag  #-- <allow> tag
   
         sub start_allow {          sub start_allow {
     my ($target,$token) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
   
             $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=                 $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
                                         $token->[2]->{'src'};                                          $token->[2]->{'src'};
       my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
       if (not -e '/home/httpd/html'.$src) {
               #replicates image itself
    &Apache::lonnet::repcopy($src);
           #replicates eps or ps 
    my $newsrc = $src;
    $newsrc =~ s/(.gif|.jpg)$/.eps/;
     if (not-e $newsrc && &Apache::lonnet::repcopy($newsrc) ne 'OK') {
       $newsrc =~ s/\.ps$/\.eps/;
       &Apache::lonnet::repcopy($newsrc);
    }
       }
    return '';     return '';
  }   }
         sub end_allow {          sub end_allow {

Removed from v.1.88  
changed lines
  Added in v.1.90


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>