version 1.289, 2003/10/29 18:29:24
|
version 1.294, 2003/11/21 18:54:10
|
Line 337 sub xmlparse {
|
Line 337 sub xmlparse {
|
&Apache::style::styleparser($target,$styletext)); |
&Apache::style::styleparser($target,$styletext)); |
} |
} |
} |
} |
|
} elsif ($ENV{'construct.style'} && ($ENV{'request.state'} eq 'construct')) { |
|
my $location=&Apache::lonnet::filelocation('',$ENV{'construct.style'}); |
|
my $styletext=&Apache::lonnet::getfile($location); |
|
if ($styletext ne '-1') { |
|
%style_for_target = (%style_for_target, |
|
&Apache::style::styleparser($target,$styletext)); |
|
} |
} |
} |
#&printalltags(); |
#&printalltags(); |
my @pars = (); |
my @pars = (); |
Line 397 sub latex_special_symbols {
|
Line 404 sub latex_special_symbols {
|
$string=~s/\\ /\\char92 /g; |
$string=~s/\\ /\\char92 /g; |
$string=~s/\^/\\\^ /g; |
$string=~s/\^/\\\^ /g; |
$string=~s/\~/\\char126 /g; |
$string=~s/\~/\\char126 /g; |
$string=~s/(&[^A-Za-z\#])/\\$1/g; |
#fixup & if it doesn't look like |
|
# { or α |
|
$string=~s/(&(?!((\#[0-9]+)|([a-z]+));))/\\$1/gi; |
$string=~s/([^&])\#/$1\\#/g; |
$string=~s/([^&])\#/$1\\#/g; |
$string=~s/(\$|_|{|})/\\$1/g; |
$string=~s/(\$|_|{|})/\\$1/g; |
$string=~s/\\char92 /\\texttt{\\char92}/g; |
$string=~s/\\char92 /\\texttt{\\char92}/g; |
Line 985 sub parstring {
|
Line 994 sub parstring {
|
my $val=$token->[2]->{$_}; |
my $val=$token->[2]->{$_}; |
$val =~ s/([\%\@\\\"\'])/\\$1/g; |
$val =~ s/([\%\@\\\"\'])/\\$1/g; |
#if ($val =~ m/^[\%\@]/) { $val="\\".$val; } |
#if ($val =~ m/^[\%\@]/) { $val="\\".$val; } |
|
if ($val !~ m/^\s*\$[a-z_]/i) { $val =~ s/\$/\\\$/g; } |
$temp .= "my \$$_=\"$val\";"; |
$temp .= "my \$$_=\"$val\";"; |
} |
} |
} |
} |
Line 1060 ENDSCRIPT
|
Line 1070 ENDSCRIPT
|
|
|
sub storefile { |
sub storefile { |
my ($file,$contents)=@_; |
my ($file,$contents)=@_; |
|
&Apache::lonnet::correct_line_ends(\$contents); |
if (my $fh=Apache::File->new('>'.$file)) { |
if (my $fh=Apache::File->new('>'.$file)) { |
print $fh $contents; |
print $fh $contents; |
$fh->close(); |
$fh->close(); |