Diff for /loncom/xml/londefdef.pm between versions 1.155 and 1.158.4.3

version 1.155, 2003/07/25 10:44:36 version 1.158.4.3, 2003/08/27 15:00:43
Line 25 Line 25
 # /home/httpd/html/adm/gpl.txt  # /home/httpd/html/adm/gpl.txt
 #  #
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  ## Copyright for TtHfunc and TtMfunc by Ian Hutchinson. 
 # Copyright for TtHfunc and TtMfunc by Ian Hutchinson.   
 # TtHfunc and TtMfunc (the "Code") may be compiled and linked into   # TtHfunc and TtMfunc (the "Code") may be compiled and linked into 
 # binary executable programs or libraries distributed by the   # binary executable programs or libraries distributed by the 
 # Michigan State University (the "Licensee"), but any binaries so   # Michigan State University (the "Licensee"), but any binaries so 
Line 395  sub start_meta { Line 394  sub start_meta {
 }  }
   
 sub end_meta {  sub end_meta {
     my ($target,$token,$tagstack,$parstack,$parser) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  my $args='';   my $args='';
Line 404  sub end_meta { Line 403  sub end_meta {
     $currentstring = $token->[4];      $currentstring = $token->[4];
  }   }
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring=&Apache::lonxml::endredirection();   my $content=&Apache::lonxml::get_param('content',$parstack,$safeeval);
  $currentstring='';   my $name=&Apache::lonxml::get_param('name',$parstack,$safeeval);
    if ((not defined $content) && (not defined $name)) {
       &Apache::lonxml::endredirection();
    }
     }      }
     return $currentstring;      return $currentstring;
 }  }
Line 1079  sub end_q { Line 1081  sub end_q {
   
 #-- <p> tag  #-- <p> tag
 sub start_p {  sub start_p {
     my ($target,$token) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring .= $token->[4];   $currentstring .= $token->[4];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring .= '\par ';   my $signal=1;
    foreach my $tag (@$tagstack) {if (lc($tag) eq 'b') {$signal=0;}}
    if ($signal) {$currentstring .= '\par ';}
     }      }
     return $currentstring;      return $currentstring;
 }  }
Line 1406  sub start_a { Line 1410  sub start_a {
 }  }
   
 sub end_a {  sub end_a {
     my ($target,$token,$tagstack,$parstack,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring .= $token->[2];   $currentstring .= $token->[2];
Line 1416  sub end_a { Line 1420  sub end_a {
   
 #-- <li> tag  #-- <li> tag
 sub start_li {  sub start_li {
     my ($target,$token,$tagstack,$parstack,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
Line 1970  sub start_img { Line 1974  sub start_img {
     my $width_param = '';      my $width_param = '';
     my $height_param = '';      my $height_param = '';
     my $scaling = .3;      my $scaling = .3;
       
     if ($target eq 'web') {      if ($target eq 'web') {
  if ($ENV{'browser.imagesuppress'} ne 'on') {   if ($ENV{'browser.imagesuppress'} ne 'on') {
     $currentstring = $token->[4];      $currentstring.= $token->[4];
  } else {   } else {
     my $alttag= &Apache::lonxml::get_param      my $alttag= &Apache::lonxml::get_param
  ('alt',$parstack,$safeeval,undef,1);   ('alt',$parstack,$safeeval,undef,1);
Line 1981  sub start_img { Line 1984  sub start_img {
  $alttag=&Apache::lonmeta::alttag   $alttag=&Apache::lonmeta::alttag
     ($Apache::lonxml::pwd[-1],$src);      ($Apache::lonxml::pwd[-1],$src);
     }      }
     $currentstring='[IMAGE: '.$alttag.']';      $currentstring.='[IMAGE: '.$alttag.']';
  }   }
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);   $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
  &image_replication($src);   &image_replication($src);
   
  #if original gif/jpg/png file exist do following:   #if original gif/jpg/png file exist do following:
  if (-e $src) {             if (-e $src) {          
     #defines the default size of image      #defines the default size of image
Line 2011  sub start_img { Line 2013  sub start_img {
     } elsif ($width ne '') {      } elsif ($width ne '') {
  $width_param = $width*$scaling;         $width_param = $width*$scaling;      
     }      }
       if ($width_param > $ENV{'form.textwidth'}) {$width_param =0.95*$ENV{'form.textwidth'}}
     my $file;      my $file;
     my $path;      my $path;
     if ($src =~ m!(.*)/([^/]*)$!) {      if ($src =~ m!(.*)/([^/]*)$!) {

Removed from v.1.155  
changed lines
  Added in v.1.158.4.3


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