version 1.186, 2002/07/29 22:06:38
|
version 1.188, 2002/08/23 19:10:32
|
Line 333 sub registerurl {
|
Line 333 sub registerurl {
|
my $target = shift; |
my $target = shift; |
my $result = ''; |
my $result = ''; |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
$result .="<script>\n menu.currentURL=null;\n". |
$result .="<script>\n". |
|
"if (typeof menu != 'undefined') {menu.currentURL=null;}\n". |
&Apache::loncommon::browser_and_searcher_javascript(). |
&Apache::loncommon::browser_and_searcher_javascript(). |
"\n</script>\n"; |
"\n</script>\n"; |
} |
} |
Line 538 sub htmlclean {
|
Line 539 sub htmlclean {
|
return $output; |
return $output; |
} |
} |
|
|
|
sub latex_special_sumbols { |
|
my ($current_token,$stack,$parstack)=@_; |
|
my @temp_array = @$stack; |
|
if ($temp_array[-1] ne 'tt') { |
|
if ($current_token=~m/\^/) {$current_token=~s/\^/\\verb|\^|/g;} |
|
} else { |
|
if ($current_token=~m/\^/) {$current_token=~s/\^/}\\verb|\^|{/g;} |
|
} |
|
if ($current_token=~m/>/) {$current_token=~s/>/\$>\$/g;} |
|
if ($current_token=~m/</) {$current_token=~s/</\$<\$/g;} |
|
if ($current_token=~m/\d%/) {$current_token =~ s/%/\\%/g;} |
|
if ($current_token=~m/\s%/) {$current_token =~ s/%/\\%/g;} |
|
|
|
# $current_token = ' start='.$current_token.'=finish '; |
|
return $current_token; |
|
} |
|
|
sub inner_xmlparse { |
sub inner_xmlparse { |
my ($target,$stack,$parstack,$pars,$safeeval,$style_for_target)=@_; |
my ($target,$stack,$parstack,$pars,$safeeval,$style_for_target)=@_; |
my $finaloutput = ''; |
my $finaloutput = ''; |
Line 548 sub inner_xmlparse {
|
Line 566 sub inner_xmlparse {
|
if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { |
if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { |
if ($metamode<1) { |
if ($metamode<1) { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
my @temp_array = @$stack; |
$result.=&latex_special_sumbols($token->[1],$stack,$parstack); |
if ($temp_array[-1] ne 'm') { |
} else { |
if ($temp_array[-1] ne 'tt') { |
$result.=$token->[1]; |
if ($token->[1]=~m/\^/) {$token->[1]=~s/\^/\\verb|\^|/g;} |
|
} else { |
|
if ($token->[1]=~m/\^/) {$token->[1]=~s/\^/}\\verb|\^|{/g;} |
|
} |
|
if ($token->[1]=~m/>/) {$token->[1]=~s/>/\$>\$/g;} |
|
if ($token->[1]=~m/</) {$token->[1]=~s/</\$<\$/g;} |
|
} |
|
} |
} |
$result.=$token->[1]; |
|
} |
} |
} elsif ($token->[0] eq 'PI') { |
} elsif ($token->[0] eq 'PI') { |
if ($metamode<1) { |
if ($metamode<1) { |