--- loncom/xml/londefdef.pm 2003/09/30 19:51:44 1.176 +++ loncom/xml/londefdef.pm 2003/10/01 21:13:50 1.178 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.176 2003/09/30 19:51:44 sakharuk Exp $ +# $Id: londefdef.pm,v 1.178 2003/10/01 21:13:50 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -92,9 +92,15 @@ sub start_m { $Apache::lontexconvert::errorstring=''; } #&Apache::lonxml::debug("M is ends with:$currentstring:"); + $Apache::lonxml::post_evaluate=0; } elsif ($target eq 'tex') { $currentstring = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); + my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval); + if ($eval eq 'on') { + $currentstring=&Apache::run::evaluate($currentstring,$safeeval,$$parstack[-1]); + } if ($currentstring=~/^(\s*\\\\\s*)*$/) {$currentstring = ' \vskip 0 mm ';} + $Apache::lonxml::post_evaluate=0; } else { my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); } @@ -2202,11 +2208,16 @@ sub start_applet { $currentstring='[APPLET: '.$alttag.']'; } } elsif ($target eq 'tex') { - my $code=&Apache::lonxml::get_param('code',$parstack,$safeeval, - undef,1); - if ($code=~/TrueFalse\.class/) { - $currentstring.='\begin{center} \fbox{There is JAVA applet here.}\end{center}'; + my $alttag= &Apache::lonxml::get_param('alt',$parstack, + $safeeval,undef,1); + unless ($alttag) { + my $code=&Apache::lonxml::get_param('code',$parstack,$safeeval, + undef,1); + $alttag=&Apache::lonmeta::alttag($Apache::lonxml::pwd[-1], + $code); } + $currentstring.='\begin{center} \fbox{Java Applet: '.$alttag. + '.}\end{center}'; } return $currentstring; }