--- loncom/xml/londefdef.pm 2001/12/07 22:23:37 1.36 +++ loncom/xml/londefdef.pm 2001/12/28 20:41:01 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.36 2001/12/07 22:23:37 albertel Exp $ +# $Id: londefdef.pm,v 1.37 2001/12/28 20:41:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -70,13 +70,18 @@ sub start_m { if ($target eq 'web') { my $inside = &Apache::lonxml::get_all_text("/m",$$parser[-1]); $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); if ($eval eq 'on') { $inside=&Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); #&Apache::lonxml::debug("M is evaulated to:$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:"); } elsif ($target eq 'tex') { $currentstring = ""; @@ -337,9 +342,9 @@ sub end_m { &Apache::lonxml::unloadevents(); $currentstring .= '<'.$token->[1]; - map { - $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; - } keys %{$token->[2]}; + foreach (keys %{$token->[2]}) { + $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; + } $currentstring.='>'; } elsif ($target eq 'tex') { $currentstring = '\begin{document}';