version 1.183, 2002/07/23 14:17:45
|
version 1.189, 2002/08/28 17:07:54
|
Line 176 sub xmlend {
|
Line 176 sub xmlend {
|
unless (($hidden) && (!$seeid)) { |
unless (($hidden) && (!$seeid)) { |
my $message=$contrib{$idx.':message'}; |
my $message=$contrib{$idx.':message'}; |
$message=~s/\n/\<br \/\>/g; |
$message=~s/\n/\<br \/\>/g; |
|
$message=&Apache::lontexconvert::msgtexconverted($message); |
if ($message) { |
if ($message) { |
if ($hidden) { |
if ($hidden) { |
$message='<font color="#888888">'.$message.'</font>'; |
$message='<font color="#888888">'.$message.'</font>'; |
Line 332 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 384 ENDPARM
|
Line 386 ENDPARM
|
menu.switchbutton |
menu.switchbutton |
(8,1,'eval.gif','evaluate','this','gopost("/adm/evaluate",currentURL)'); |
(8,1,'eval.gif','evaluate','this','gopost("/adm/evaluate",currentURL)'); |
menu.switchbutton |
menu.switchbutton |
(8,2,'fdbk.gif','feedback','on this','gopost("/adm/feedback",currentURL)'); |
(8,2,'fdbk.gif','feedback','discuss','gopost("/adm/feedback",currentURL)'); |
menu.switchbutton |
menu.switchbutton |
(8,3,'prt.gif','prepare','printout','gopost("/adm/printout",currentURL)'); |
(8,3,'prt.gif','prepare','printout','gopost("/adm/printout",currentURL)'); |
menu.switchbutton |
menu.switchbutton |
Line 537 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;} #more |
|
if ($current_token=~m/</) {$current_token=~s/</\$<\$/g;} #less |
|
if ($current_token=~m/\d%/) {$current_token =~ s/%/\\%/g;} #percent after digit |
|
if ($current_token=~m/\s%/) {$current_token =~ s/%/\\%/g;} #persent after space |
|
|
|
|
|
# $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 547 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') { |
my @temp_array = @$stack; |
my $text=$token->[1]; |
if ($temp_array[-1] ne 'm') { |
if ($token->[0] eq 'C') { |
if ($temp_array[-1] ne 'tt') { |
$text = '%'.$text; |
if ($token->[1]=~m/\^/) {$token->[1]=~s/\^/\\verb|\^|/g;} |
$text =~ s/[\n\r]//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.=&latex_special_sumbols($text,$stack,$parstack); |
|
} else { |
|
$result.=$token->[1]; |
} |
} |
$result.=$token->[1]; |
|
} |
} |
} elsif ($token->[0] eq 'PI') { |
} elsif ($token->[0] eq 'PI') { |
if ($metamode<1) { |
if ($metamode<1) { |
Line 747 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]; |