--- loncom/xml/lonplot.pm 2002/04/24 21:24:40 1.67 +++ loncom/xml/lonplot.pm 2002/04/25 17:23:10 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.67 2002/04/24 21:24:40 matthew Exp $ +# $Id: lonplot.pm,v 1.68 2002/04/25 17:23:10 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -498,9 +498,8 @@ sub end_gnuplot { alt = "$plot{'alttag'}" /> ENDIMAGE } elsif ($target eq 'tex') { - &Apache::lonnet::ssi('cgi-bin/plot.gif?file=$filename'. - '&output=eps'); - $result = "$filename.eps"; + &Apache::lonnet::ssi("/cgi-bin/plot.gif?file=$filename&output=eps"); + $result = '\\\\ \graphicspath{/home/httpd/perl/tmp/}\fbox{\includegraphics[width=9.0 cm]{'.&Apache::lonnet::unescape($filename).'.eps}} \\\\'; } } elsif ($target eq 'edit') { $result.=&Apache::edit::tag_end($target,$token); @@ -992,7 +991,8 @@ sub write_gnuplot_file { $gnuplot_input .= "set output\n"; } elsif ($target eq 'tex') { $gnuplot_input .= "set term postscript eps monochrome\n"; - $gnuplot_input .= "set output \"/home/httpd/perl/tmp/$filename.eps\"\n"; + $gnuplot_input .= "set output \"/home/httpd/perl/tmp/". + &Apache::lonnet::unescape($filename).".eps\"\n"; } # grid $gnuplot_input .= 'set grid'.$/ if ($plot{'grid'} eq 'on');