--- loncom/xml/londefdef.pm 2003/01/30 23:30:24 1.108 +++ loncom/xml/londefdef.pm 2003/02/03 19:10:28 1.109 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.108 2003/01/30 23:30:24 albertel Exp $ +# $Id: londefdef.pm,v 1.109 2003/02/03 19:10:28 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1434,6 +1434,9 @@ sub start_table { my $shorthand = ($filled_columns+1)*4; $output =~ s/\$SpacePerColumn/$SpacePerColumn - $shorthand mm/g; } + if ($how_many_columns==1) { #start of block with width correction for one column table + $output=~s/^\s*\\parbox{([^}]*)}/\\parbox{\\textwidth - 1 cm}/; + } #end of block with width correction for one column table $Apache::londefdef::table[-1]{'output'} .= $header_of_table.$output.$Apache::londefdef::table[-1]{'hinc'}.'\end{tabular}\vskip 0 mm '; if ($#Apache::londefdef::table > 0) { $inmemory = $Apache::londefdef::table[-1]{'output'}; @@ -1487,7 +1490,7 @@ sub start_table { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } elsif ($target eq 'tex') { + } elsif ($target eq 'tex') { my $what_to_push = substr(&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1),0,1); if ($what_to_push eq '') { $what_to_push = substr($Apache::londefdef::table[-1]{'rows'}[0],0,1);; @@ -1495,7 +1498,6 @@ sub start_table { push @{ $Apache::londefdef::table[-1]{'columns'} }, $what_to_push; $Apache::londefdef::table[-1]{'counter_columns'}++; &Apache::lonxml::startredirection(); -; } return $currentstring; }