--- loncom/xml/londefdef.pm 2005/07/22 11:44:51 1.282 +++ loncom/xml/londefdef.pm 2005/08/11 22:04:09 1.285 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.282 2005/07/22 11:44:51 foxr Exp $ +# $Id: londefdef.pm,v 1.285 2005/08/11 22:04:09 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -540,6 +540,10 @@ sub start_body { $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; } $currentstring.='>'; + &Apache::lontexconvert::jsMath_reset(); + if ($env{'environment.texengine'} eq 'jsMath') { + $currentstring.=&Apache::lontexconvert::jsMath_header(); + } if ($env{'request.state'} ne 'published') { if ($env{'environment.remote'} eq 'off') { $currentstring.= @@ -3961,6 +3965,13 @@ sub image_height { sub get_eps_image { my ($src)=@_; my $orig_src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1], $src); + + # In order to prevent the substitution of the alt text, we need to + # be sure the orig_src file is on system now so: + + if (! -e $orig_src) { + &Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal. + } &Apache::lonxml::debug("get_eps_image: Original image: $orig_src"); my ($spath, $sname, $sext) = fileparse($src, qr/\.(gif|png|jpg|jpeg)/i); $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; @@ -3991,13 +4002,13 @@ sub get_eps_image { close FILE; $src=~s|/home/httpd/html/res|/home/httpd/prtspool|; $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|; + if ($sext ne "") { # Put the ext. back in to uniquify. + $src =~ s/\.eps$/$sext.eps/; + } } } } my ($path,$file)=($src=~m|(.*)/([^/]*)$|); - if ($sext ne "") { # Put the ext. back in to uniquify. - $file =~ s/\.eps$/$sext.eps/; - } &Apache::lonxml::debug("get_eps_image returning: $path / $file
"); return ($path.'/',$file); }