--- loncom/xml/londefdef.pm 2003/06/30 14:09:03 1.147 +++ loncom/xml/londefdef.pm 2003/06/30 15:05:54 1.148 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.147 2003/06/30 14:09:03 sakharuk Exp $ +# $Id: londefdef.pm,v 1.148 2003/06/30 15:05:54 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1064,7 +1064,7 @@ sub start_br { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { if ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') { - $currentstring .= '\vskip 0.2 mm'; + $currentstring .= '\vskip 0.2 mm '; } } return $currentstring; @@ -1299,7 +1299,7 @@ sub start_hr { $LaTeXwidth=($LaTeXwidth/100).'\textwidth'; } } else { - $LaTeXwidth ='0.95\textwidth'; + $LaTeXwidth ='0.9\textwidth'; } my ($pre,$post); my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); @@ -1310,7 +1310,7 @@ sub start_hr { } elsif ($align eq 'right') { $pre=' \hfill \llap{'; $post='}'; } - $currentstring .= ' \vskip 0 mm \noindent\makebox[\textwidth]{'.$pre.'\makebox['. + $currentstring .= ' \vskip 0 mm \noindent\makebox['.$LaTeXwidth.']{'.$pre.'\makebox['. $LaTeXwidth.'][b]{\hrulefill}'.$post.'}\vskip 0 mm '; } return $currentstring; @@ -1321,8 +1321,7 @@ sub end_hr { my $currentstring = ''; if ($target eq 'web') { $currentstring .= $token->[2]; - } elsif ($target eq 'tex') { - } + } return $currentstring; } @@ -1840,11 +1839,9 @@ sub end_td { $current_length=~/(\d+\.?\d*)/; $Apache::londefdef::table[-1]{'TeXlength'} .= $1.','; $Apache::londefdef::table[-1]{'length'} .= '0,'; - } else { - $data=~/^\s*(\S.*)/; - $data=$1; - $data=~/(.*\S)\s*$/; - $data=$1; + } else { + $data=~s/^\s+(\S.*)/$1/; + $data=~s/(.*\S)\s+$/$1/; my $current_length=2*length($data); $Apache::londefdef::table[-1]{'length'} .= $current_length.','; $Apache::londefdef::table[-1]{'TeXlength'} .= '0,';