--- loncom/xml/lontexconvert.pm 2006/10/23 18:49:47 1.79 +++ loncom/xml/lontexconvert.pm 2006/11/09 21:31:54 1.81 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.79 2006/10/23 18:49:47 albertel Exp $ +# $Id: lontexconvert.pm,v 1.81 2006/11/09 21:31:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -184,6 +184,10 @@ sub jsMath_converted { push(@jsMath_sent_header,0); } sub jsMath_header { + if (!@jsMath_sent_header) { + &Apache::lonnet::logthis("mismatched calls of jsMath_header and jsMath_process"); + return ''; + } return '' if $jsMath_sent_header[-1]; $jsMath_sent_header[-1]=1; return @@ -196,7 +200,8 @@ sub jsMath_converted { sub jsMath_process { my $state = pop(@jsMath_sent_header); return '' if !$state; - return ''; + return "\n". + ''."\n"; } }