--- loncom/interface/lonprintout.pm 2003/10/20 18:35:22 1.257 +++ loncom/interface/lonprintout.pm 2003/10/27 19:01:31 1.259 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.257 2003/10/20 18:35:22 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.259 2003/10/27 19:01:31 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -815,6 +815,13 @@ ENDPART } if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} $result .= '\end{document}'; + } elsif ($currentURL=~/\/smppg$/) { + my %form; + $form{'grade_target'}='tex'; + $form{'textwidth'}=$LaTeXwidth; + $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'}; + my $texversion=&Apache::lonnet::ssi($currentURL,%form); + $result .= $texversion; } else { $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: '; if ($currentURL=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) { @@ -840,7 +847,6 @@ ENDPART my $flag_page_in_sequence = 'NO'; my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'}; my $prevassignment=''; - &Apache::lonnet::delenv('form.counter'); &Apache::lonxml::init_counter(); for (my $i=0;$i<=$#master_seq;$i++) { my (undef,undef,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]); @@ -859,7 +865,8 @@ ENDPART my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #tittle of the assignment which contains this problem if ($i==0) {$prevassignment=$assignment;} #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]"); - my $texversion=&Apache::lonnet::ssi($urlp,%form); + $form{'freeze_counter'}='no'; + my $texversion.=&Apache::lonnet::ssi($urlp,%form); if ($urlp=~/\.page$/) { ($texversion,my $number_of_columns_page) = &page_cleanup($texversion); if ($number_of_columns_page > $number_of_columns) {$number_of_columns=$number_of_columns_page;} @@ -871,6 +878,7 @@ ENDPART my %form; $form{'grade_target'}='answer'; $form{'answer_output_mode'}='tex'; + $form{'freeze_counter'}='yes'; my $answer=&Apache::lonnet::ssi($urlp,%form); if ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') { $texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;