--- loncom/xml/lonplot.pm 2003/09/27 04:15:26 1.85.2.1 +++ loncom/xml/lonplot.pm 2003/08/26 21:52:46 1.86 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.85.2.1 2003/09/27 04:15:26 albertel Exp $ +# $Id: lonplot.pm,v 1.86 2003/08/26 21:52:46 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -513,8 +513,8 @@ sub end_gnuplot { alt = "$plot{'alttag'}" /> ENDIMAGE } elsif ($target eq 'tex') { - #might be inside the safe space, register the URL for later - &Apache::lonxml::register_ssi("/cgi-bin/plot.gif?file=$filename.data&output=eps"); + &Apache::lonnet::ssi("/cgi-bin/plot.gif?file=$filename.data&output=eps"); + $result = '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$plot{'texwidth'}.' mm]{'.&Apache::lonnet::unescape($filename).'.eps}'; } } elsif ($target eq 'edit') { @@ -970,8 +970,13 @@ sub set_defaults { sub get_attributes{ my ($values,$defaults,$parstack,$safeeval,$tag) = @_; foreach my $attr (keys(%{$defaults})) { - $values->{$attr} = - &Apache::lonxml::get_param($attr,$parstack,$safeeval); + if ($attr eq 'texwidth') { + $values->{$attr} = + &Apache::lonxml::get_param($attr,$parstack,$safeeval,undef,1); + } else { + $values->{$attr} = + &Apache::lonxml::get_param($attr,$parstack,$safeeval); + } if ($values->{$attr} eq '' | !defined($values->{$attr})) { $values->{$attr} = $defaults->{$attr}->{'default'}; next;