Diff for /loncom/xml/londefdef.pm between versions 1.57 and 1.58

version 1.57, 2002/05/09 15:44:43 version 1.58, 2002/05/09 18:55:47
Line 1384  EDITBUTTON Line 1384  EDITBUTTON
             $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=              $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
                                         $token->[2]->{'src'};                                          $token->[2]->{'src'};
             my $currentstring = '';              my $currentstring = '';
       my $width_param = '';
   
     if ($target eq 'web') {      if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
         my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval); 
                 my $TeXheight = &Apache::lonxml::get_param('TeXheight',$parstack,$safeeval); 
         my $width = &Apache::lonxml::get_param('width',$parstack,$safeeval);
         if ($TeXwidth ne '') { 
     $width_param = $TeXwidth; 
         } elsif ($TeXheight ne '') { 
     $width_param = $TeXheight; 
         } else {
     if ($width ne '') {
         $width_param = $width*.3;
         if ($width_param <= 900) {
     $width_param = '[width='.$width_param.'mm]';
         } else {
     $width_param = '[width= 9.0 cm]';
         }
     }
         }
       my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);        my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
       $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);        $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
       my $file;        my $file;
Line 1401  EDITBUTTON Line 1419  EDITBUTTON
   $file=~s/(\.gif|\.jpg)$/\.eps/;    $file=~s/(\.gif|\.jpg)$/\.eps/;
       if (-e $newsrc) {        if (-e $newsrc) {
   if ($path) {    if ($path) {
       $currentstring .= '\graphicspath{{'.$path.'}}\fbox{\includegraphics{'.$file.'}}';        $currentstring .= '\graphicspath{{'.$path.'}}\fbox{\includegraphics'.$width_param.'{'.$file.'}}';
   }    }
       } else {        } else {
   my $temp_file;    my $temp_file;
   my $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.dat";    my $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.dat";
   $temp_file = Apache::File->new('>>'.$filename);     $temp_file = Apache::File->new('>>'.$filename); 
   print $temp_file "$src\n";    print $temp_file "$src\n";
   $currentstring .= '\graphicspath{{/home/httpd/prtspool/}}\fbox{\includegraphics{'.$file.'}}';    $currentstring .= '\graphicspath{{/home/httpd/prtspool/}}\fbox{\includegraphics'.$width_param.'{'.$file.'}}';
       }        }
     }      }
     return $currentstring;      return $currentstring;

Removed from v.1.57  
changed lines
  Added in v.1.58


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