--- loncom/homework/structuretags.pm 2004/07/03 20:52:19 1.260 +++ loncom/homework/structuretags.pm 2004/08/25 20:12:15 1.260.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.260 2004/07/03 20:52:19 albertel Exp $ +# $Id: structuretags.pm,v 1.260.2.3 2004/08/25 20:12:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -61,7 +61,7 @@ sub start_tex { if ($target eq 'tex') { return $bodytext.' '; } - return $result;; + return $result; } sub end_tex { @@ -1083,7 +1083,11 @@ sub start_part { } else { if ($target eq 'tex') { if (not $ENV{'form.problem_split'}=~/yes/) { - $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; + if ($$tagstack[-2] eq 'td') { + $result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; + } else { + $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; + } } my $weight = &Apache::lonnet::EXT("resource.$id.weight"); my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages'); @@ -1143,6 +1147,7 @@ sub end_part { $gradestatus=''; } $result=$gradestatus; + if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';} } elsif ($target eq 'edit') { $result=&Apache::edit::end_table(); }