version 1.188, 2002/08/23 19:10:32
|
version 1.189, 2002/08/28 17:07:54
|
Line 547 sub latex_special_sumbols {
|
Line 547 sub latex_special_sumbols {
|
} else { |
} else { |
if ($current_token=~m/\^/) {$current_token=~s/\^/}\\verb|\^|{/g;} |
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;} #more |
if ($current_token=~m/</) {$current_token=~s/</\$<\$/g;} |
if ($current_token=~m/</) {$current_token=~s/</\$<\$/g;} #less |
if ($current_token=~m/\d%/) {$current_token =~ s/%/\\%/g;} |
if ($current_token=~m/\d%/) {$current_token =~ s/%/\\%/g;} #percent after digit |
if ($current_token=~m/\s%/) {$current_token =~ s/%/\\%/g;} |
if ($current_token=~m/\s%/) {$current_token =~ s/%/\\%/g;} #persent after space |
|
|
|
|
# $current_token = ' start='.$current_token.'=finish '; |
# $current_token = ' start='.$current_token.'=finish '; |
return $current_token; |
return $current_token; |
Line 566 sub inner_xmlparse {
|
Line 567 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') { |
$result.=&latex_special_sumbols($token->[1],$stack,$parstack); |
my $text=$token->[1]; |
|
if ($token->[0] eq 'C') { |
|
$text = '%'.$text; |
|
$text =~ s/[\n\r]//g; |
|
} |
|
$result.=&latex_special_sumbols($text,$stack,$parstack); |
} else { |
} else { |
$result.=$token->[1]; |
$result.=$token->[1]; |
} |
} |
Line 758 sub callsub {
|
Line 764 sub callsub {
|
} |
} |
if (!$deleted) { |
if (!$deleted) { |
if ($space) { |
if ($space) { |
#&Apache::lonxml::debug("Calling sub $sub in $space $metamode"); |
&Apache::lonxml::debug("Calling sub $sub in $space $metamode"); |
$sub1="$space\:\:$sub"; |
$sub1="$space\:\:$sub"; |
($currentstring,$nodefault) = &$sub1($target,$token,$tagstack, |
($currentstring,$nodefault) = &$sub1($target,$token,$tagstack, |
$parstack,$parser,$safeeval, |
$parstack,$parser,$safeeval, |
$style); |
$style); |
} else { |
} else { |
#&Apache::lonxml::debug("NOT Calling sub $sub in $space $metamode"); |
&Apache::lonxml::debug("NOT Calling sub $sub in $space $metamode"); |
if ($metamode <1) { |
if ($metamode <1) { |
if (defined($token->[4]) && ($metamode < 1)) { |
if (defined($token->[4]) && ($metamode < 1)) { |
$currentstring = $token->[4]; |
$currentstring = $token->[4]; |