version 1.190, 2002/09/04 03:57:18
|
version 1.192, 2002/09/04 06:55:27
|
Line 539 sub htmlclean {
|
Line 539 sub htmlclean {
|
return $output; |
return $output; |
} |
} |
|
|
sub latex_special_sumbols { |
sub latex_special_symbols { |
my ($current_token,$stack,$parstack)=@_; |
my ($current_token,$stack,$parstack)=@_; |
my @temp_array = @$stack; |
$current_token=~s/\\/\\char92 /g; |
if ($temp_array[-1] ne 'tt') { |
$current_token=~s/\^/\\char94 /g; |
if ($current_token=~m/\^/) {$current_token=~s/\^/\\verb|\^|/g;} |
$current_token=~s/\~/\\char126 /g; |
} else { |
$current_token=~s/(&[^a-z#])/\\$1/g; |
if ($current_token=~m/\^/) {$current_token=~s/\^/}\\verb|\^|{/g;} |
$current_token=~s/([^&]\#)/\\$1/g; |
} |
$current_token=~s/(\$|_|{|})/\\$1/g; |
if ($current_token=~m/>/) {$current_token=~s/>/\$>\$/g;} #more |
$current_token=~s/\\char92 /\\texttt{\\char92}/g; |
if ($current_token=~m/</) {$current_token=~s/</\$<\$/g;} #less |
$current_token=~s/>/\$>\$/g; #more |
if ($current_token=~m/\d%/) {$current_token =~ s/%/\\%/g;} #percent after digit |
$current_token=~s/</\$<\$/g; #less |
if ($current_token=~m/\s%/) {$current_token =~ s/%/\\%/g;} #persent after space |
if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit |
|
if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space |
|
|
# $current_token = ' start='.$current_token.'=finish '; |
|
return $current_token; |
return $current_token; |
} |
} |
|
|
Line 636 sub inner_xmlparse {
|
Line 634 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 ($target eq 'tex') { |
if ($target eq 'tex') { |
$result=&latex_special_sumbols($result,$stack,$parstack); |
$result=&latex_special_symbols($result,$stack,$parstack); |
} |
} |
} |
} |
|
|