--- loncom/xml/londefdef.pm 2004/05/10 18:33:31 1.212 +++ loncom/xml/londefdef.pm 2004/05/21 21:06:59 1.216 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.212 2004/05/10 18:33:31 sakharuk Exp $ +# $Id: londefdef.pm,v 1.216 2004/05/21 21:06:59 matthew Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1110,7 +1110,9 @@ sub start_p { $currentstring='\makebox['.$ENV{'form.textwidth'}.']{\hfill\llap{'; } elsif ($align eq 'left') { $currentstring='\noindent\makebox['.$ENV{'form.textwidth'}.']{\rlap{'; - } + } else { + $currentstring='\par '; + } my $signal=1;#

does not work inside ... foreach my $tag (@$tagstack) {if (lc($tag) eq 'b') {$signal=0;} if (!$signal) {$currentstring = '';} @@ -1904,7 +1906,6 @@ sub end_table { $space_neeeded=$space_neeeded+$max_len[$jn]; } if ($space_neeeded<=$available_space) { -## &Apache::lonnet::logthis("I am in position 1: $space_neeeded <= $available_space"); for (my $jn=0;$jn<=$#max_len;$jn++) { if ($fwidth[$jn]==0) { $fwidth[$jn]=$max_len[$jn]; @@ -1917,7 +1918,6 @@ sub end_table { $space_neeeded+=$min_len[$jn]; } if ($space_neeeded>$available_space) { -## &Apache::lonnet::logthis("I am in position 2"); $WARNING=' \textbf{NOT ENOUGH SPACE FOR TABLE} '; for (my $jn=0;$jn<=$#max_len;$jn++) { if ($fwidth[$jn]==0) { @@ -1926,7 +1926,6 @@ sub end_table { } } else { #step 3. adjustment over minimal + corrections -## &Apache::lonnet::logthis("I am in position 3"); my $enlarge_coef=$available_space/$space_neeeded; my $acsessive=0; for (my $jn=0;$jn<=$#min_len;$jn++) { @@ -2271,6 +2270,12 @@ sub start_img { } } elsif ($target eq 'tex') { $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); + #if uploaded restore the path + if ($src=~/^\/uploaded\/([^\/]+)\/([^\/]+)\/simplepage\/([^\/]+)$/) { + $src=&Apache::loncommon::propath($1,$2).'/userfiles/simplepage/'.$3; + } elsif ($src=~/^\/uploaded\/([^\/]+)\/([^\/]+)\/aboutme\/([^\/]+)$/) { + $src=&Apache::loncommon::propath($1,$2).'/userfiles/aboutme/'.$3; + } #if original gif/jpg/png file exist do following: if (-e $src) { #what is the image size? @@ -3540,6 +3545,10 @@ sub eps_generation { $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//; $newsrc=~s/\/\.\//\//; $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//; + if ($newsrc=~/\/home\/httpd\/lonUsers\//) { + $newsrc=~s/\/home\/httpd\/lonUsers//; + $newsrc=~s/\/([^\/]+)\/(\w)\/(\w)\/(\w)\//\/$1\//; + } return ' \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} '; }