--- loncom/xml/lontexconvert.pm 2007/06/19 20:10:55 1.83 +++ loncom/xml/lontexconvert.pm 2008/01/29 11:18:06 1.86 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.83 2007/06/19 20:10:55 albertel Exp $ +# $Id: lontexconvert.pm,v 1.86 2008/01/29 11:18:06 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,6 +108,13 @@ sub convert_real { $xmlstring=~s/^\s*\
jsMath.Process()'."\n"; } + sub jsMath_state { + my ($level) = @_; + return $jsMath_sent_header[$level]; + } } sub tex_engine { @@ -220,9 +231,11 @@ sub tex_engine { } sub init_math_support { + my ($inherit_jsmath) = @_; &init_tth(); &Apache::lontexconvert::jsMath_push(); - if (lc(&tex_engine()) eq 'jsmath') { + if (lc(&tex_engine()) eq 'jsmath' || + ($inherit_jsmath && &jsMath_state(-2))) { return &Apache::lontexconvert::jsMath_header(); } return;