--- loncom/homework/randomlabel.pm 2002/07/30 16:12:38 1.32 +++ loncom/homework/randomlabel.pm 2002/08/02 18:20:48 1.33 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # random labelling tool # -# $Id: randomlabel.pm,v 1.32 2002/07/30 16:12:38 sakharuk Exp $ +# $Id: randomlabel.pm,v 1.33 2002/08/02 18:20:48 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -116,10 +116,10 @@ sub start_randomlabel { } $bgimg=~s/\/$//; if ($texwidth==90) { - $result.='\vspace*{2mm} \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. + $result.='\vspace*{2mm} \parbox{\textwidth}{ \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. $bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')'; } else { - $result.='\vspace*{2mm} \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. + $result.='\vspace*{2mm} \parbox{\textwidth}{ \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. $bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')('.(100-$texwidth).','.(100-$texwidth)*$h/$w.')'; } } elsif ($target eq 'edit') { @@ -155,7 +155,7 @@ sub end_randomlabel { if( $count != 0) { $result.= "\n"; } $result .= "\n
"; } elsif ($target eq 'tex') { - $result='\end{picture}\\\\'; + $result='\end{picture}\\\\}'; if (@$parstack[-1]=~/\$texwidth\s*=\s*?"90/) { #" @$parstack[-1]=~/\$height\s*=\s*?"(.+)?"/; my $howtoskipback = $1/48;