--- loncom/interface/lonprintout.pm 2004/07/15 15:53:30 1.315 +++ loncom/interface/lonprintout.pm 2004/07/15 16:00:16 1.316 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.315 2004/07/15 15:53:30 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.316 2004/07/15 16:00:16 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -540,11 +540,15 @@ sub details_for_menu { sub latex_corrections { - my ($number_of_columns,$result) = @_; + my ($number_of_columns,$result,$selectionmade) = @_; # $result =~ s/\\includegraphics{/\\includegraphics\[width=\\minipagewidth\]{/g; $result =~ s/\$number_of_columns/$number_of_columns/g; - $result =~ s/(\\end{document})/\\strut\\vspace\*{-4 mm}\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License $1/; + if ($selectionmade ne '1') { + $result =~ s/(\\end{document})/\\strut\\vspace\*{-4 mm}\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License $1/; + } else { + $result =~ s/(\\end{document})/\\strut\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License $1/; + } $result =~ s/(\\end{longtable}\s*)(\\strut\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill})/$2$1/g; $result =~ s/(\\end{longtable}\s*)\\strut\\newline/$1/g; #-- LaTeX corrections @@ -1174,8 +1178,8 @@ ENDPART } #-------------------------------------------------------- corrections for the different page formats $result = &page_format_transformation($papersize,$laystyle,$numberofcolumns,$helper->{'VARS'}->{'PRINT_TYPE'},$result,$helper->{VARS}->{'assignment'},$helper->{'VARS'}->{'TABLE_CONTENTS'},$helper->{'VARS'}->{'TABLE_INDEX'},$selectionmade); - $result = &latex_corrections($number_of_columns,$result); - for (my $i=1;$i<=$#print_array;$i++) {$print_array[$i] = &latex_corrections($number_of_columns,$print_array[$i]);} + $result = &latex_corrections($number_of_columns,$result,$selectionmade); + for (my $i=1;$i<=$#print_array;$i++) {$print_array[$i] = &latex_corrections($number_of_columns,$print_array[$i],$selectionmade);} #changes page's parameters for the one column output if ($numberofcolumns == 1) { $result =~ s/\\textwidth\s*=\s*\d*\.?\d*\s*(cm|mm|in)/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;