Diff for /loncom/xml/londefdef.pm between versions 1.343 and 1.344

version 1.343, 2006/11/06 23:45:00 version 1.344, 2006/11/07 02:39:39
Line 1916  sub start_table { Line 1916  sub start_table {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring .= $token->[4];        $currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $aa = {};   push(@Apache::londefdef::table, {}); 
  push @Apache::londefdef::table, $aa;   
  $Apache::londefdef::table[-1]{'row_number'} = -1;   $Apache::londefdef::table[-1]{'row_number'} = -1;
         #maximum table's width (default coincides with text line length)          #maximum table's width (default coincides with text line length)
  if ($#Apache::londefdef::table==0) {   if ($#Apache::londefdef::table==0) {
Line 2859  sub start_img { Line 2858  sub start_img {
     &Apache::lonxml::debug("$src exists");      &Apache::lonxml::debug("$src exists");
     my ($height_param,$width_param)=      my ($height_param,$width_param)=
  &image_size($origsrc,0.3,$parstack,$safeeval);   &image_size($origsrc,0.3,$parstack,$safeeval);
     my $destpath = $path;  
     my $destfile = $file;  
     my $size;      my $size;
     if ($width_param)  { $size.='width='.$width_param.' mm,'; }      if ($width_param)  { $size.='width='.$width_param.' mm,'; }
     if ($height_param) { $size.='height='.$height_param.' mm]'; }      if ($height_param) { $size.='height='.$height_param.' mm]'; }
Line 2870  sub start_img { Line 2867  sub start_img {
           
     $size='['.$size;      $size='['.$size;
     $size=~s/,$/]/;       $size=~s/,$/]/; 
     $currentstring .= '\graphicspath{{'.$destpath.'}}'      $currentstring .= '\graphicspath{{'.$path.'}}'
  .'\includegraphics'.$size.'{'.$destfile.'} ';   .'\includegraphics'.$size.'{'.$file.'} ';
   
     #    If there's an alignment specification we need to honor it here.      #    If there's an alignment specification we need to honor it here.
     #    For the horizontal alignments, we will also honor the      #    For the horizontal alignments, we will also honor the
Line 4238  sub get_eps_image { Line 4235  sub get_eps_image {
  &Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal.   &Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal.
     }      }
     &Apache::lonxml::debug("get_eps_image: Original image: $orig_src");      &Apache::lonxml::debug("get_eps_image: Original image: $orig_src");
     my ($spath, $sname, $sext) = fileparse($src, qr/\.(gif|png|jpg|jpeg)/i);      my ($spath, $sname, $sext) = &fileparse($src, qr/\.(gif|png|jpg|jpeg)/i);
     $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i;      $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i;
     $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);      $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
     &Apache::lonxml::debug("Filelocation gives: $src");      &Apache::lonxml::debug("Filelocation gives: $src");
Line 4263  sub get_eps_image { Line 4260  sub get_eps_image {
  my $newsrc=$orig_src;   my $newsrc=$orig_src;
  $newsrc =~ s|(.*)/res/|/home/httpd/html/res/|;   $newsrc =~ s|(.*)/res/|/home/httpd/html/res/|;
  &Apache::lonxml::debug("queueing $newsrc for dynamic eps production.");   &Apache::lonxml::debug("queueing $newsrc for dynamic eps production.");
  print FILE "$newsrc\n";   print FILE ("$newsrc\n");
  close FILE;   close(FILE);
  $src=~s|/home/httpd/html/res|/home/httpd/prtspool|;   $src=~s|/home/httpd/html/res|/home/httpd/prtspool|;
  $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;   $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
  if ($sext ne "") { # Put the ext. back in to uniquify.   if ($sext ne "") { # Put the ext. back in to uniquify.
Line 4288  sub get_eps_image { Line 4285  sub get_eps_image {
  $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;   $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
     }      }
     my ($path,$file)=($src=~m|(.*)/([^/]*)$|);      my ($path,$file)=($src=~m|(.*)/([^/]*)$|);
       $path =~ s/ /\_/g;
     $file =~ s/ /\_/g;      $file =~ s/ /\_/g;
     &Apache::lonxml::debug("get_eps_image returning: $path / $file<BR />");      &Apache::lonxml::debug("get_eps_image returning: $path / $file<BR />");
     return ($path.'/',$file);      return ($path.'/',$file);

Removed from v.1.343  
changed lines
  Added in v.1.344


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