version 1.191, 2002/09/04 04:55:13
|
version 1.192, 2002/09/04 06:55:27
|
Line 541 sub htmlclean {
|
Line 541 sub htmlclean {
|
|
|
sub latex_special_symbols { |
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; |
} |
} |
|
|