Diff for /loncom/interface/lonprintout.pm between versions 1.21 and 1.22

version 1.21, 2002/04/10 16:21:33 version 1.22, 2002/04/12 13:45:48
Line 228  ENDPART Line 228  ENDPART
     $result =~ s/%/\\%/g;   #corrects %      $result =~ s/%/\\%/g;   #corrects %
     $result =~ s/(\s)+/$1/g; #removes more than one empty space      $result =~ s/(\s)+/$1/g; #removes more than one empty space
     $result =~ s/\\\\\s*(\\vskip)/ $1/gm;      $result =~ s/\\\\\s*(\\vskip)/ $1/gm;
       $result =~ s/ (<|>|) / \$$1\$ /g; #corrects < or >
 #-- Do all of eps figures exist?  #-- Do all of eps figures exist?
     my $notepslist = '';      my $needconvert = 0;
     my $end_eps = index($result,'.eps}',0);      $_ = $result;
     while ($end_eps != -1) {      if (/\\needepsconversion/) { $needconvert = 1; }  
  my $start_eps = rindex($result,'{',$end_eps);  
         my $start_path = rindex($result,'\graphicspath{',$start_eps);  
         my $end_path = index($result,'}',$start_path);  
  my $chunk_eps = substr($result,$start_eps+1,$end_eps-$start_eps+3);  
  my $chunk_path = substr($result,$start_path+14,$end_path-$start_path-14);  
  $chunk_path =~ s/^{*//g;  
  unless (-s $chunk_path.$chunk_eps) {  
     $notepslist .= $chunk_path.$chunk_eps;  
  }  
  $end_eps = index($result,'.eps}',$end_eps+5);  
     }  
 #-- writing .tex file in prtspool   #-- writing .tex file in prtspool 
     my $temp_file;      my $temp_file;
     $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.tex";      $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.tex";
Line 252  ENDPART Line 242  ENDPART
     }       } 
     print $temp_file $result;      print $temp_file $result;
 $r->print(<<FINALEND);  $r->print(<<FINALEND);
 <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$filename&$laystyle&$notepslist">  <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$filename&$laystyle&$needconvert">
 </body>  </body>
 </html>  </html>
 FINALEND  FINALEND
Line 331  sub handler { Line 321  sub handler {
     unless  ($ENV{'form.phase'}) {      unless  ($ENV{'form.phase'}) {
  &menu_for_output($r);   &menu_for_output($r);
     }      }
   
   
 #-- core part   #-- core part 
     if ($ENV{'form.phase'} eq 'two') {      if ($ENV{'form.phase'} eq 'two') {
  &output_data($r);   &output_data($r);
   
     }      }
     return OK;      return OK;
   

Removed from v.1.21  
changed lines
  Added in v.1.22


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