--- loncom/xml/londefdef.pm 2003/09/26 18:59:59 1.174 +++ loncom/xml/londefdef.pm 2003/10/01 20:45:05 1.177 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.174 2003/09/26 18:59:59 sakharuk Exp $ +# $Id: londefdef.pm,v 1.177 2003/10/01 20:45:05 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -2202,7 +2202,16 @@ sub start_applet { $currentstring='[APPLET: '.$alttag.']'; } } elsif ($target eq 'tex') { - $currentstring = " \\begin{figure} "; + 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; } @@ -2213,7 +2222,6 @@ sub end_applet { if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { - $currentstring = " \\end{figure}"; } return $currentstring; } @@ -2236,7 +2244,6 @@ sub start_embed { $currentstring='[EMBED: '.$alttag.']'; } } elsif ($target eq 'tex') { - $currentstring = " \\begin{figure} "; } return $currentstring; } @@ -2246,8 +2253,7 @@ sub end_embed { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[2]; - } elsif ($target eq 'tex') { - $currentstring = " \\end{figure}"; + } elsif ($target eq 'tex') { } return $currentstring; } @@ -2266,7 +2272,6 @@ sub start_param { if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - $currentstring = " \\begin{figure} "; } return $currentstring; } @@ -2277,7 +2282,6 @@ sub end_param { if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { - $currentstring = " \\end{figure}"; } return $currentstring; }