--- loncom/xml/londefdef.pm 2004/08/16 17:11:10 1.232 +++ loncom/xml/londefdef.pm 2004/08/19 20:20:40 1.234 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.232 2004/08/16 17:11:10 sakharuk Exp $ +# $Id: londefdef.pm,v 1.234 2004/08/19 20:20:40 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1134,13 +1134,15 @@ sub end_p { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); - if ($align eq 'center') { + if (not defined $align) { + $currentstring.='\strut\\\\\strut '; + } elsif ($align eq 'center') { $currentstring .= '\end{center}'; } elsif ($align eq 'right') { $currentstring .= '}}'; } elsif ($align eq 'left') { $currentstring .= '}\hfill}'; - } + } } return $currentstring; } @@ -2477,6 +2479,8 @@ sub start_img { $currentstring .=&Apache::edit::text_arg('height (pixel):','height',$token,5).'
'; $currentstring .=&Apache::edit::text_arg('TeXwidth (mm):','TeXwidth',$token,5); $currentstring .=&Apache::edit::text_arg('TeXheight (mm):','TeXheight',$token,5); + $currentstring .=&Apache::edit::select_arg('Alignment:','align', + ['','bottom','middle','top','left','right'],$token,5); $currentstring .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval); my $alt=&Apache::lonxml::get_param('alt',$parstack,$safeeval); @@ -2490,7 +2494,7 @@ sub start_img { my ($osrc,$owidth,$oheight)= ($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'}); my $ctag=&Apache::edit::get_new_args($token,$parstack, - $safeeval,'src','alt', + $safeeval,'src','alt','align', 'TeXwidth','TeXheight', 'width','height'); my ($nsrc,$nwidth,$nheight)=