--- loncom/interface/lonprintout.pm 2002/04/10 16:21:33 1.21 +++ loncom/interface/lonprintout.pm 2002/04/12 13:45:48 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.21 2002/04/10 16:21:33 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.22 2002/04/12 13:45:48 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -228,21 +228,11 @@ ENDPART $result =~ s/%/\\%/g; #corrects % $result =~ s/(\s)+/$1/g; #removes more than one empty space $result =~ s/\\\\\s*(\\vskip)/ $1/gm; + $result =~ s/ (<|>|) / \$$1\$ /g; #corrects < or > #-- Do all of eps figures exist? - my $notepslist = ''; - my $end_eps = index($result,'.eps}',0); - while ($end_eps != -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); - } + my $needconvert = 0; + $_ = $result; + if (/\\needepsconversion/) { $needconvert = 1; } #-- writing .tex file in prtspool my $temp_file; $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.tex"; @@ -252,7 +242,7 @@ ENDPART } print $temp_file $result; $r->print(< + FINALEND @@ -331,12 +321,9 @@ sub handler { unless ($ENV{'form.phase'}) { &menu_for_output($r); } - - #-- core part if ($ENV{'form.phase'} eq 'two') { &output_data($r); - } return OK;