--- loncom/xml/lontexconvert.pm 2011/02/10 19:28:29 1.105 +++ loncom/xml/lontexconvert.pm 2011/03/14 16:10:21 1.106 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.105 2011/02/10 19:28:29 raeburn Exp $ +# $Id: lontexconvert.pm,v 1.106 2011/03/14 16:10:21 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,10 +165,12 @@ sub clean_out_math_mode { sub displaystyle { my ($texstring)=@_; - #has a $$ or \[ or \displaystyle in it, guessinng it's display mode + #has a $$ or \[ or \displaystyle or eqnarray in it, guessinng it's display mode if ($$texstring=~/[^\\]\$\$/ || - $$texstring=~/\\\[/ || - $$texstring=~/\\displaystyle/) { return 1; } + $$texstring=~/\\\[/ || + $$texstring=~/\\displaystyle/ || + $$texstring=~/eqnarray/ + ) { return 1; } return 0; } @@ -289,7 +291,7 @@ sub mimetex_converted { my $valign = &mimetex_valign($esc_texstring); my $result=''.$alt_string.''; if ($displaystyle) { - $result='
'.$result.'
'; + $result='
'.$result.'
'; } return $result; }