Diff for /loncom/xml/londefdef.pm between versions 1.189 and 1.190

version 1.189, 2003/10/24 21:48:17 version 1.190, 2003/11/09 01:19:47
Line 82  sub end_output { Line 82  sub end_output {
 }  }
 #-- <m> tag  #-- <m> tag
 sub start_m {  sub start_m {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $currentstring = '';      my $currentstring = '';
       my $inside = &Apache::lonxml::get_all_text("/m",$parser,$style);
       $inside=~s-<LONCAPA_INTERNAL_TURN_STYLE_ON />--g;
     if ($target eq 'web') {      if ($target eq 'web') {
  $Apache::lonxml::prevent_entity_encode++;   $Apache::lonxml::prevent_entity_encode++;
  my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser);  
  $inside ='\\documentstyle{article}'.$inside;   $inside ='\\documentstyle{article}'.$inside;
  &Apache::lonxml::debug("M is starting with:$inside:");   &Apache::lonxml::debug("M is starting with:$inside:");
  my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);   my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);
Line 103  sub start_m { Line 104  sub start_m {
  #&Apache::lonxml::debug("M is ends with:$currentstring:");   #&Apache::lonxml::debug("M is ends with:$currentstring:");
  $Apache::lonxml::post_evaluate=0;   $Apache::lonxml::post_evaluate=0;
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring = &Apache::lonxml::get_all_text_unbalanced("/m",$parser);   $currentstring = $inside;
  my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);   my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);
  if ($eval eq 'on') {   if ($eval eq 'on') {
     $currentstring=&Apache::run::evaluate($currentstring,$safeeval,$$parstack[-1]);      $currentstring=&Apache::run::evaluate($currentstring,$safeeval,$$parstack[-1]);
  }   }
  if ($currentstring=~/^(\s*\\\\\s*)*$/) {$currentstring = ' \vskip 0 mm ';}   if ($currentstring=~/^(\s*\\\\\s*)*$/) {$currentstring = ' \vskip 0 mm ';}
  $Apache::lonxml::post_evaluate=0;   $Apache::lonxml::post_evaluate=0;
     } else {  
  my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser);  
     }      }
     return $currentstring;      return $currentstring;
 }  }

Removed from v.1.189  
changed lines
  Added in v.1.190


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