[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 03 Dec 2002 22:04:43 -0000
sakharuk Tue Dec 3 17:04:43 2002 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
Bug 1012 is fixed (thanks Guy).
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.215 loncom/xml/lonxml.pm:1.216
--- loncom/xml/lonxml.pm:1.215 Wed Nov 13 18:21:07 2002
+++ loncom/xml/lonxml.pm Tue Dec 3 17:04:43 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.215 2002/11/13 23:21:07 albertel Exp $
+# $Id: lonxml.pm,v 1.216 2002/12/03 22:04:43 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -144,8 +144,8 @@
# a pointer the the Apache request object
$Apache::lonxml::request='';
-# a problem number counter, and check on hether it is used
-$Apache::lonxml::counter=0;
+# a problem number counter, and check on ether it is used
+$Apache::lonxml::counter=1;
$Apache::lonxml::counter_changed=0;
#internal check on whether to look at style defs
@@ -598,7 +598,7 @@
sub latex_special_symbols {
my ($current_token,$stack,$parstack)=@_;
- $current_token=~s/\\/\\char92 /g;
+ $current_token=~s/\\ /\\char92 /g;
$current_token=~s/\^/\\char94 /g;
$current_token=~s/\~/\\char126 /g;
$current_token=~s/(&[^a-z\#])/\\$1/g;
@@ -623,8 +623,7 @@
if ($metamode<1) {
my $text=$token->[1];
if ($token->[0] eq 'C' && $target eq 'tex') {
- $text = '%'.$text;
- $text =~ s/[\n\r]//g;
+ $text = '%'.$text."\n";
}
$result.=$text;
}
@@ -716,7 +715,7 @@
if (($ENV{'QUERY_STRING'}) && ($target eq 'web')) {
$finaloutput=&afterburn($finaloutput);
- }
+ }
return $finaloutput;
}