--- loncom/xml/londefdef.pm 2006/04/20 02:08:15 1.328 +++ loncom/xml/londefdef.pm 2006/08/31 18:45:42 1.334 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.328 2006/04/20 02:08:15 albertel Exp $ +# $Id: londefdef.pm,v 1.334 2006/08/31 18:45:42 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -180,11 +180,11 @@ sub end_tthoption { sub start_html { my ($target,$token) = @_; my $currentstring = ''; - &Apache::lontexconvert::init_tth(); if ($target eq 'web' || $target eq 'edit' || $target eq 'webgrade' ) { # start_body() takes care of emitting the } elsif ($target eq 'tex') { - $currentstring .= '\documentclass[letterpaper,twoside]{article}'; + $currentstring .= + '\documentclass[letterpaper,twoside]{article}\raggedbottom'; if (($env{'form.latex_type'}=~'batchmode') || (!$env{'request.role.adv'})) {$currentstring .='\batchmode';} $currentstring .= '\newcommand{\keephidden}[1]{}'. @@ -534,6 +534,7 @@ sub start_body { 'force_register' => 1}); if ($env{'request.state'} ne 'published') { + $currentstring.=&Apache::lonmenu::constspaceform(); $currentstring.=(< @@ -1153,7 +1154,7 @@ sub start_p { $currentstring .= &end_p(); # close off prior para if in progress. my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); if ($align eq 'center') { - $currentstring .='\begin{center}\par'; + $currentstring .='\begin{center}\par '; $closing_string = '\end{center}'; if (&is_inside_of($tagstack, "table")) { $currentstring = ¢er_correction().$currentstring; @@ -1209,14 +1210,22 @@ sub start_br { # for (my $i=$#tempo;$i>=0;$i--) { if (($tempo[$i] eq 'b') || ($tempo[$i] eq 'strong') || - ($tempo[$i] eq 'ol') || ($tempo[$i] eq 'ul') || - ($tempo[$i] eq 'td') || ($tempo[$i] eq 'th')) { + ($tempo[$i] eq 'ol') || ($tempo[$i] eq 'ul')) { $signal=1; - last; + } + if (($tempo[$i] eq 'td') || ($tempo[$i] eq 'th')) { + my $colspan = + &Apache::lonxml::get_param('colspan', $parstack, + $safeeval, $i, 0); + if ($colspan) { + $signal = 2; + } } } - if ($signal) { + if ($signal eq 1) { $currentstring .= ' \vskip 0 mm '; + } elsif ($signal eq '2') { + # multicol doesn't like blank lines } elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') { $currentstring .= '\strut \\\\ \strut '; } @@ -2866,7 +2875,7 @@ sub start_img { ['','bottom','middle','top','left','right'],$token,5); $currentstring .=&Apache::edit::select_arg('TeXwrap:', 'TeXwrap', ['', 'parbox', 'parpic'], $token, 2); - $currentstring .=&Apache::edit::select_arg('Encyrpt URL:','encrypturl', + $currentstring .=&Apache::edit::select_arg('Encrypt URL:','encrypturl', ['no','yes'], $token, 2); $currentstring .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); my $src= &Apache::lonxml::get_param('src',$parstack,$safeeval);