--- loncom/interface/lonprintout.pm 2016/08/10 00:56:37 1.627.2.17 +++ loncom/interface/lonprintout.pm 2016/12/06 03:46:09 1.627.2.19 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.627.2.17 2016/08/10 00:56:37 raeburn Exp $ +# $Id: lonprintout.pm,v 1.627.2.19 2016/12/06 03:46:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1981,8 +1981,8 @@ sub latex_corrections { if ($result =~ m/&(\w+|#\d+);/) { $result = &character_chart($result); } - $result =~ s/(\\end{tabular})\s*\\vskip 0 mm/$1/g; - $result =~ s/(\\begin{enumerate})\s*\\noindent/$1/g; + $result =~ s/(\\end\{tabular})\s*\\vskip 0 mm/$1/g; + $result =~ s/(\\begin\{enumerate})\s*\\noindent/$1/g; return $result; } @@ -2591,7 +2591,7 @@ sub print_construction_sequence { $result .= $texversion; } } - if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} + if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin\{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} return $result; } @@ -2748,7 +2748,7 @@ ENDPART $cleanURL=$currentURL; } $selectionmade = 1; - + if ($cleanURL!~m|^/adm/| && $cleanURL=~/\.(problem|exam|quiz|assess|survey|form|library|xml|html|htm|xhtml|xhtm)$/) { my $rndseed=time; @@ -2961,6 +2961,7 @@ ENDPART my $texversion=''; if ($urlp!~m|^/adm/| && $urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { + my $extension = $1; $resources_printed .= $urlp.':'; &Apache::lonxml::remember_problem_counter(); if ($flag_latex_header_remove eq 'NO') { @@ -2969,7 +2970,7 @@ ENDPART (($i==0) && (($urlp=~/\.page$/) || ($print_type eq 'map_problems_in_page') || - ($print_type eq 'map_resources_in_page')))) { + (($print_type eq 'map_resources_in_page') && ($extension !~ /^x?html?$/))))) { $flag_latex_header_remove = 'YES'; } } @@ -3402,7 +3403,7 @@ ENDPART #this chunk is responsible for printing the path to problem my $newurlp=&path_to_problem($urlp,$LaTeXwidth); - $texversion =~ s/(\\begin\{minipage}{\\textwidth})/$1 $newurlp/; + $texversion =~ s/(\\begin\{minipage}\{\\textwidth})/$1 $newurlp/; if ($flag_latex_header_remove ne 'NO') { $texversion = &latex_header_footer_remove($texversion); } else {