version 1.93, 2002/10/08 20:18:36
|
version 1.94, 2002/10/08 20:35:19
|
Line 1553 sub start_table {
|
Line 1553 sub start_table {
|
$currentstring = $token->[4]; |
$currentstring = $token->[4]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
if (not -e '/home/httpd/html'.$src) { |
&image_replication($src); |
#replicates image itself |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$src); |
|
#replicates eps or ps |
|
my $newsrc = $src; |
|
$newsrc =~ s/(.gif|.jpg)$/.eps/; |
|
if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') { |
|
$newsrc =~ s/\.ps$/\.eps/; |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$newsrc); |
|
} |
|
} |
|
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
#if original gif/jpg file exist do following: |
#if original gif/jpg file exist do following: |
if (-e $src) { |
if (-e $src) { |
Line 1729 sub start_embed {
|
Line 1719 sub start_embed {
|
$Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]= |
$Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]= |
$token->[2]->{'src'}; |
$token->[2]->{'src'}; |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
if (not -e '/home/httpd/html'.$src) { |
&image_replication($src); |
#replicates image itself |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$src); |
|
#replicates eps or ps |
|
my $newsrc = $src; |
|
$newsrc =~ s/(.gif|.jpg)$/.eps/; |
|
if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') { |
|
$newsrc =~ s/\.ps$/\.eps/; |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$newsrc); |
|
} |
|
} |
|
return ''; |
return ''; |
} |
} |
sub end_allow { |
sub end_allow { |
Line 2538 sub start_embed {
|
Line 2518 sub start_embed {
|
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
|
|
|
sub image_replication { |
|
my $src = shift; |
|
if (not -e '/home/httpd/html'.$src) { |
|
#replicates image itself |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$src); |
|
#replicates eps or ps |
|
my $newsrc = $src; |
|
$newsrc =~ s/(.gif|.jpg)$/.eps/; |
|
if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') { |
|
$newsrc =~ s/\.ps$/\.eps/; |
|
&Apache::lonnet::repcopy('/home/httpd/html'.$newsrc); |
|
} |
|
} |
|
return ''; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |