Diff for /loncom/xml/londefdef.pm between versions 1.194 and 1.195

version 1.194, 2004/01/28 17:16:27 version 1.195, 2004/01/28 19:59:13
Line 2100  sub start_img { Line 2100  sub start_img {
     }      }
     $currentstring.='[IMAGE: '.$alttag.']';      $currentstring.='[IMAGE: '.$alttag.']';
  }   }
    $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
    &image_replication($src);
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);   $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
  &image_replication($src);   &image_replication($src);
Line 2153  sub start_img { Line 2155  sub start_img {
  $currentstring .= '\vskip 1 mm \noindent\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';   $currentstring .= '\vskip 1 mm \noindent\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
     }      }
  } else {   } else {
     #there aren't eps or ps - so create eps       #care about eps dynamical generation
     my $temp_file;      $currentstring.='\vskip 1 mm '.&eps_generation($src,$file,$width_param);
     my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";  
     $temp_file = Apache::File->new('>>'.$filename);   
     print $temp_file "$src\n";  
     $newsrc=~s/\/home\/httpd\/html\/res//;  
     $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//;  
     $newsrc=~s/\/\.\//\//;  
     $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//;  
     $currentstring .= '\vskip 1 mm \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';  
  }   }
     }      }
  } else {   } else {
Line 3346  sub image_replication { Line 3340  sub image_replication {
     return '';      return '';
 }  }
   
   sub eps_generation {
       my ($src,$file,$width_param) = @_;     
       my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";
       my $temp_file = Apache::File->new('>>'.$filename); 
       print $temp_file "$src\n";
       my $newsrc = $src;
       $newsrc =~ s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
       $newsrc=~s/\/home\/httpd\/html\/res//;
       $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//;
       $newsrc=~s/\/\.\//\//;
       $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//;
       return ' \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
   }
   
 sub recalc {  sub recalc {
     my $argument = shift;      my $argument = shift;
     if (not $argument=~/(mm|cm|in|pc|pt)/) {return $argument.' mm';}      if (not $argument=~/(mm|cm|in|pc|pt)/) {return $argument.' mm';}

Removed from v.1.194  
changed lines
  Added in v.1.195


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