--- loncom/xml/lontexconvert.pm 2007/06/19 20:10:55 1.83 +++ loncom/xml/lontexconvert.pm 2007/08/14 19:32:35 1.84 @@ -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.84 2007/08/14 19:32:35 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -203,6 +203,10 @@ sub jsMath_converted { return "\n". ''."\n"; } + sub jsMath_state { + my ($level) = @_; + return $jsMath_sent_header[$level]; + } } sub tex_engine { @@ -220,9 +224,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;