version 1.187, 2002/08/07 13:58:38
|
version 1.188, 2002/08/23 19:10:32
|
Line 539 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 549 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) { |