--- loncom/homework/imageresponse.pm 2005/05/23 11:02:59 1.69 +++ loncom/homework/imageresponse.pm 2005/06/07 22:43:08 1.70 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.69 2005/05/23 11:02:59 foxr Exp $ +# $Id: imageresponse.pm,v 1.70 2005/06/07 22:43:08 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -477,8 +477,13 @@ sub end_image { # Gnuplot e.g. just generates the latex to put inplace. # my $graphinclude; - if ($src =~ /^\\graphicspath/) { + if ($src =~ /^%DYNAMICIMAGE/) { + # This is needed because the newline is not always passed -> tex. + # At present we don't care about the sizing info. + + my ($commentline, $restofstuff) = split(/\n/, $src); $graphinclude = $src; + $graphinclude =~ s/^$commentline//; } else { my ($path,$file) = &Apache::londefdef::get_eps_image($src); my ($height_param,$width_param)=