Diff for /loncom/xml/londefdef.pm between versions 1.41 and 1.42

version 1.41, 2002/01/18 16:33:54 version 1.42, 2002/02/21 04:10:31
Line 1331  EDITBUTTON Line 1331  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 = '';
             if ($target eq 'web') {      if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
                 my $durty = $token->[2]->{'src'};        my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
                 $durty =~ s!(^.*)/(.*)$!$1/!;        my $file;
                 my $durtytwo = $2;        my $path;
                 my $num = index($durtytwo,'gif',0);                if ($src =~ m!(.*)/([^/]*)$!) {
  substr($durtytwo,$num,3) = 'eps';   $file = $2;
  $currentstring = '\graphicspath{{/home/httpd/html'.$durty.'}}\fbox{\includegraphics{'.$durtytwo.'}}';   $path = $1;
     }    if ($path=~m:^/:) {
    return $currentstring;    $path = '/home/httpd/html'.$path;
    } elsif ($path =~ /^\./) {
     $path = $Apache::lonxml::pwd[-1].'/'.$path;
    } else {
     #else it is a full url don't print
     $path = undef;
    }
         } else {
    $path = $Apache::lonxml::pwd[-1];
    $file = $src;
         }
         $file=~s/(\.gif|\.jpg)^/\.eps/;
         if ($path) {
    $currentstring = '\graphicspath{{'.$path.'}}\fbox{\includegraphics{'.$file.'}}';
         } else {
    $currentstring = 'See the image at \tt{'.$src.'}';
         }
       }
       return $currentstring;
  }   }
         sub end_img {          sub end_img {
     my ($target,$token) = @_;      my ($target,$token) = @_;

Removed from v.1.41  
changed lines
  Added in v.1.42


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