Diff for /loncom/xml/londefdef.pm between versions 1.36 and 1.38

version 1.36, 2001/12/07 22:23:37 version 1.38, 2002/01/06 02:19:25
Line 45  package Apache::londefdef; Line 45  package Apache::londefdef;
 use strict;  use strict;
 use Apache::lonxml;  use Apache::lonxml;
   
 sub BEGIN {  BEGIN {
   
     &Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset'));      &Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset'));
   
Line 70  sub start_m { Line 70  sub start_m {
   if ($target eq 'web') {    if ($target eq 'web') {
     my $inside = &Apache::lonxml::get_all_text("/m",$$parser[-1]);      my $inside = &Apache::lonxml::get_all_text("/m",$$parser[-1]);
     $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);
     if ($eval eq 'on') {      if ($eval eq 'on') {
       $inside=&Apache::run::evaluate($inside,$safeeval,$$parstack[-1]);        $inside=&Apache::run::evaluate($inside,$safeeval,$$parstack[-1]);
       #&Apache::lonxml::debug("M is evaulated to:$inside:");        #&Apache::lonxml::debug("M is evaulated to:$inside:");
     }      }
     $currentstring = &Apache::lontexconvert::converted(\$inside);      $currentstring = &Apache::lontexconvert::converted(\$inside);
       if ($Apache::lontexconvert::errorstring) {
         &Apache::lonxml::warning("tth error: ".
          $Apache::lontexconvert::errorstring);
         $Apache::lontexconvert::errorstring='';
       }
     #&Apache::lonxml::debug("M is ends with:$currentstring:");      #&Apache::lonxml::debug("M is ends with:$currentstring:");
   } elsif ($target eq 'tex') {    } elsif ($target eq 'tex') {
     $currentstring = "";      $currentstring = "";
Line 337  sub end_m { Line 342  sub end_m {
  &Apache::lonxml::unloadevents();   &Apache::lonxml::unloadevents();
   
       $currentstring .= '<'.$token->[1];        $currentstring .= '<'.$token->[1];
       map {        foreach (keys %{$token->[2]}) {
  $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"';         $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"';
       } keys %{$token->[2]};        }
       $currentstring.='>';        $currentstring.='>';
            } elsif ($target eq 'tex') {             } elsif ($target eq 'tex') {
               $currentstring = '\begin{document}';                  $currentstring = '\begin{document}';  

Removed from v.1.36  
changed lines
  Added in v.1.38


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