--- loncom/xml/londefdef.pm 2007/09/20 21:39:13 1.378 +++ loncom/xml/londefdef.pm 2007/12/06 11:22:37 1.380 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.378 2007/09/20 21:39:13 albertel Exp $ +# $Id: londefdef.pm,v 1.380 2007/12/06 11:22:37 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1585,6 +1585,9 @@ sub start_div { } if ($target eq 'tex') { # 4 possible alignments: left, right, center, and -missing-. + # If inside a table row, we must let the table logic + # do the alignment, however. + # my $endstring = ''; @@ -1595,6 +1598,7 @@ sub start_div { $endstring = '\end{center}'; if (&is_inside_of($tagstack, "table")) { $currentstring = ¢er_correction().$currentstring; + $endstring .= ¢er_end_correction(); } } elsif ($align eq 'right') { @@ -4543,6 +4547,12 @@ sub align_latex_image { my ($align, $latex_rendering, $image, $width, $height) = @_; my $currentstring; # The 1/2 wrapped image. my $closure; # The closure of the wrappage. + + # if it's none just return it back + if ($latex_rendering eq 'none') { + return ($image,''); + } + # If there's an alignment specification we need to honor it here. # For the horizontal alignments, we will also honor the # value of the latex specfication. The default is parbox,