--- loncom/xml/londefdef.pm 2006/08/01 18:48:14 1.331 +++ loncom/xml/londefdef.pm 2006/09/05 21:57:57 1.336 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.331 2006/08/01 18:48:14 albertel Exp $ +# $Id: londefdef.pm,v 1.336 2006/09/05 21:57:57 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1154,7 +1154,7 @@ sub start_p { $currentstring .= &end_p(); # close off prior para if in progress. my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); if ($align eq 'center') { - $currentstring .='\begin{center}\par'; + $currentstring .='\begin{center}\par '; $closing_string = '\end{center}'; if (&is_inside_of($tagstack, "table")) { $currentstring = ¢er_correction().$currentstring; @@ -1210,13 +1210,14 @@ sub start_br { # for (my $i=$#tempo;$i>=0;$i--) { if (($tempo[$i] eq 'b') || ($tempo[$i] eq 'strong') || - ($tempo[$i] eq 'ol') || ($tempo[$i] eq 'ul') || - ($tempo[$i] eq 'td') || ($tempo[$i] eq 'th')) { + ($tempo[$i] eq 'ol') || ($tempo[$i] eq 'ul')) { $signal=1; - last; + } + if (($tempo[$i] eq 'td') || ($tempo[$i] eq 'th')) { + $signal = 1; } } - if ($signal) { + if ($signal eq 1) { $currentstring .= ' \vskip 0 mm '; } elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') { $currentstring .= '\strut \\\\ \strut '; @@ -2199,9 +2200,13 @@ sub end_table { # if ($colspan > 1) { + my $spanwidth = 0; + for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) { + $spanwidth += $fwidth[$spancol]; + } $output .= '\multicolumn{'. $colspan - .'}{|l|}{'; + ."}{|p{$spanwidth mm}|}{"; } if ($rowspan > 1) { @@ -2867,7 +2872,7 @@ sub start_img { ['','bottom','middle','top','left','right'],$token,5); $currentstring .=&Apache::edit::select_arg('TeXwrap:', 'TeXwrap', ['', 'parbox', 'parpic'], $token, 2); - $currentstring .=&Apache::edit::select_arg('Encyrpt URL:','encrypturl', + $currentstring .=&Apache::edit::select_arg('Encrypt URL:','encrypturl', ['no','yes'], $token, 2); $currentstring .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); my $src= &Apache::lonxml::get_param('src',$parstack,$safeeval);