--- loncom/xml/lontexconvert.pm 2009/12/22 05:08:04 1.100 +++ loncom/xml/lontexconvert.pm 2010/04/26 21:36:50 1.102 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.100 2009/12/22 05:08:04 faziophi Exp $ +# $Id: lontexconvert.pm,v 1.102 2010/04/26 21:36:50 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -326,6 +326,7 @@ sub converted { sub to_convert { my ($string) = @_; + &init_tth(); $string=~s/\/ /gs; # $string=~s/\s/ /gs; $string=&HTML::Entities::decode($string); @@ -339,19 +340,19 @@ sub smiley { '\:\-*\)' => 'face-smile.png', '8\-\)' => 'face-cool.png', '8\-(I|\|)' => 'face-glasses.png', - ':\-*(I|\|)' => 'face-plain.png', + '\:\-(I|\|)' => 'face-plain.png', '\:\-(o|O|\(\))' => 'face-surprise.png', - ':\-*\(' => 'face-sad.png', - '\;\-*\)' => 'face-wink.png', - '\:\-*(P|p)' => 'face-raspberry.png', + ':\-\(' => 'face-sad.png', + '\;\-\)' => 'face-wink.png', + '\:\-(P|p)' => 'face-raspberry.png', '\:\-(\\\|\\/)' => 'face-uncertain.png', - '\:\-*D' => 'face-smile-big.png', - '\:\-*(C|\@)' => 'face-angry.png', + '\:\-D' => 'face-smile-big.png', + '\:\-(C|\@)' => 'face-angry.png', '\:(\'|\`)\-*\(' => 'face-crying.png', - '\:\-*(X|x|\#)' => 'face-quiet.png', - '\:\-*(s|S)' => 'face-uncertain.png', - '\:\-*\$' => 'face-embarrassed.png', - '\:\-*\*' => 'face-kiss.png', + '\:\-(X|x|\#)' => 'face-quiet.png', + '\:\-(s|S)' => 'face-uncertain.png', + '\:\-\$' => 'face-embarrassed.png', + '\:\-\*' => 'face-kiss.png', '\+O\(' => 'face-sick.png', '(\<\;3|\(heart\))' => 'heart.png', '\(rose\)' => 'rose.png', @@ -361,7 +362,7 @@ sub smiley { '\(pirate\)' => 'face-pirate.png', '\((agree|yes)\)' => 'opinion-agree.png', '\((disagree|nay)\)' => 'opinion-disagree.png', - '(o|O)\-*\)' => 'face-angel.png', + '(o|O)\-\)' => 'face-angel.png', ); my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'}; foreach my $smiley (keys(%smileys)) { @@ -373,7 +374,6 @@ sub smiley { sub msgtexconverted { my ($message,$email) = @_; $errorstring=''; - &init_tth(); my $outmessage=''; my $tex=0; foreach my $fragment (split(/(?:\<\;|\<)\/*m\s*(?:\>\;|\>)/i,$message)) { @@ -415,7 +415,7 @@ sub msgtexconverted { sub algebra { use AlgParser; - + &init_tth(); my ($string,$target,$style,$parstack,$safeeval)=@_; my $parser = new AlgParserWithImplicitExpand; $string=&prepare_algebra($string);