--- loncom/xml/londefdef.pm 2007/06/26 01:36:48 1.371 +++ loncom/xml/londefdef.pm 2007/07/04 14:02:14 1.372 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.371 2007/06/26 01:36:48 albertel Exp $ +# $Id: londefdef.pm,v 1.372 2007/07/04 14:02:14 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -2066,6 +2066,7 @@ sub end_table { if ($target eq 'web' || $target eq 'webgrade') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { + my $border = &Apache::lonxml::get_param('border',$parstack,$safeeval); my $inmemory = ''; my $output = ''; my $WARNING=''; @@ -2313,6 +2314,10 @@ sub end_table { # Do the appropriate magic if this has a colspan # + my $border_char = ""; + if ($border) { + $border_char = "|"; + } my $spanwidth = 0; if ($colspan > 1) { for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) { @@ -2322,12 +2327,12 @@ sub end_table { $colspan ."}"; if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') { - $output .= '{|c|}{'; + $output .= '{'.$border_char.'c'.$border_char.'}{'; } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') { - $output .= '{|r|}{'; + $output .= '{'.$border_char.'r'.$border_char.'}{'; } else { - $output .= "{|p{$spanwidth mm}|}{"; + $output .= '{'.$border_char."p{$spanwidth mm}".$border_char.'}{'; } } else { @@ -2343,10 +2348,10 @@ sub end_table { if ($rowspan > 1) { if ($colspan == 1) { if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') { - $output .= '\multicolumn{1}{|c|}{'; + $output .= '\multicolumn{1}{'.$border_char.'c'.$border_char.'}{'; $multirow_aligned = 1; } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') { - $output .= '\multicolumn{1}{|r|}{'; + $output .= '\multicolumn{1}{'.$border_char.'r'.$border_char.'}{'; $multirow_aligned = 1; } } @@ -2383,9 +2388,9 @@ sub end_table { # if ($colspan == 1 && $rowspan == 1) { if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') { - $output .= '\multicolumn{1}{|c|}{'; + $output .= '\multicolumn{1}{'.$border_char.'c'.$border_char.'}{'; } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') { - $output .= '\multicolumn{1}{|r|}{'; + $output .= '\multicolumn{1}{'.$border_char.'r'.$border_char.'}{'; } }