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

version 1.21, 2002/04/10 16:21:33 version 1.23, 2002/04/25 21:38:42
Line 223  ENDPART Line 223  ENDPART
  $result =~ s/\\includegraphics/\\includegraphics\[width=9\.0 cm\]/g;   $result =~ s/\\includegraphics/\\includegraphics\[width=9\.0 cm\]/g;
  $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[9.0cm\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Dept\. of Physics and Astronomy, MSU\\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright MSU GNU\/GPS $1/;   $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[9.0cm\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Dept\. of Physics and Astronomy, MSU\\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright MSU GNU\/GPS $1/;
     }      }
 #-- LaTeX corrections   #-- LaTeX corrections     
       my $first_comment = index($result,'<!--',0);
       while ($first_comment != -1) {
    my $end_comment = index($result,'-->',$first_comment);
    substr($result,$first_comment,$end_comment-$first_comment+3) = '';
    $first_comment = index($result,'<!--',$first_comment);
       }
     $result =~ s/^\s+$//gm; #remove empty lines      $result =~ s/^\s+$//gm; #remove empty lines
     $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/\\vskip/gm;
       $result =~ s/ (<|>|) / \$$1\$ /g; #corrects < or >
       $result =~ s/\\\\\s*\\noindent\s*(\\\\)+/\\\\\\noindent/g;
       $result =~ s/{\\par }\s*\\\\/\\\\/gm;
 #-- 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 250  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 329  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.23


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