Diff for /loncom/interface/lonprintout.pm between versions 1.316.2.1 and 1.317

version 1.316.2.1, 2004/08/19 20:03:47 version 1.317, 2004/07/21 19:49:30
Line 629  sub print_latex_header { Line 629  sub print_latex_header {
 }  }
   
 sub path_to_problem {  sub path_to_problem {
     my ($urlp,$colwidth)=@_;      my ($urlp,$LaTeXwidth)=@_;
     my $newurlp = '';      my $newurlp = '';
     $colwidth=~s/\s*mm\s*$//;      $LaTeXwidth=~s/\s*mm\s*$//;
 #characters average about 2 mm in width      my $HowMany = length($urlp)*2;
     if (length($urlp)*2 > $LaTeXwidth) {      if ($HowMany > $LaTeXwidth) {
  my @elements = split '/',$urlp;   my @temporrary = split '/',$urlp;
  my $curlength=0;   my $HowManyNew = 0;
  foreach my $element (@elements) {   for (my $ii=0;$ii<=$#temporrary;$ii++) {
     if ($curlength+(length($element)*2) > $colwidth) {      if ($temporrary[$ii] ne '') {
  $newurlp .=  '|\vskip -1 mm \noindent \verb|';   $HowManyNew += length($temporrary[$ii])*2;
  $curlength=0;   if ($HowManyNew < $LaTeXwidth ) {
     } else {      $newurlp .=  '/'.$temporrary[$ii];
  $curlength+=length($element)*2;   } else {
       $HowManyNew = 0;
       $newurlp .=  '|\vskip -1 mm \noindent \verb|';
       $ii--;
    }
     }      }
     $newurlp.='/'.$element;  
  }   }
     } else {      } else {
  $newurlp=$urlp;   $newurlp=$urlp;
Line 1260  ENDPART Line 1263  ENDPART
                             'cgi.'.$identifier.'backref' => $URLback,);                              'cgi.'.$identifier.'backref' => $URLback,);
     
 $r->print(<<FINALEND);  $r->print(<<FINALEND);
   <br />
 <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" />  <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$identifier" />
   <a href="/cgi-bin/printout.pl?$identifier">Continue</a>
 </body>  </body>
 </html>  </html>
 FINALEND  FINALEND

Removed from v.1.316.2.1  
changed lines
  Added in v.1.317


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