--- loncom/xml/lonxml.pm 2002/07/12 16:37:38 1.180 +++ loncom/xml/lonxml.pm 2002/07/16 15:02:31 1.182 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.180 2002/07/12 16:37:38 albertel Exp $ +# $Id: lonxml.pm,v 1.182 2002/07/16 15:02:31 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -346,7 +346,7 @@ sub registerurl { $Apache::lonxml::registered=1; my $nothing=''; if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; } - my $timesync='menu.clock.setTime(1000*'.time.');'; + my $timesync='menu.syncclock(1000*'.time.');'; if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) { my $hwkadd=''; if ($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { @@ -546,7 +546,17 @@ sub inner_xmlparse { while ($token = $$pars['-1']->get_token) { if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { if ($metamode<1) { - $result=$token->[1]; + if ($target eq 'tex') { + my @temp_array = @$stack; + if ($temp_array[-1] ne 'm') { + if ($temp_array[-1] ne 'tt') { + if ($token->[1]=~m/\^/) {$token->[1]=~s/\^/\\verb|\^|/g;} + } else { + if ($token->[1]=~m/\^/) {$token->[1]=~s/\^/}\\verb|\^|{/g;} + } + } + } + $result.=$token->[1]; } } elsif ($token->[0] eq 'PI') { if ($metamode<1) {