--- loncom/interface/lonprintout.pm 2006/02/14 20:40:10 1.408.2.5 +++ loncom/interface/lonprintout.pm 2006/01/17 18:02:34 1.413 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.408.2.5 2006/02/14 20:40:10 albertel Exp $ +# $Id: lonprintout.pm,v 1.413 2006/01/17 18:02:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -816,11 +816,12 @@ sub IndexCreation { sub print_latex_header { my $mode=shift; - my $output='\documentclass[letterpaper]{article}'; + my $output='\documentclass[letterpaper,twoside]{article}'; if (($mode eq 'batchmode') || (!$perm{'pav'})) { $output.='\batchmode'; } $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'."\n". + '\usepackage{multirow}'."\n". '\usepackage{longtable}\usepackage{textcomp}\usepackage{makeidx}'."\n". '\usepackage[dvips]{graphicx}\usepackage{epsfig}'."\n". '\usepackage{wrapfig}'. @@ -894,14 +895,11 @@ sub get_textwidth { sub unsupported { - my ($currentURL,$mode,$symb)=@_; + my ($currentURL,$mode)=@_; if ($mode ne '') {$mode='\\'.$mode} my $result.= &print_latex_header($mode); - if ($currentURL=~m|^(/adm/wrapper/)?ext/|) { - $currentURL=~s|^(/adm/wrapper/)?ext/|http://|; - my $title=&Apache::lonnet::gettitle($symb); - $title = &Apache::lonxml::latex_special_symbols($title); - $result.=' \strut \\\\ '.$title.' \strut \\\\ '.$currentURL.' '; + if ($currentURL=~/\/ext\//) { + $result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' '; } else { $result.=$currentURL; } @@ -1220,8 +1218,7 @@ ENDPART my $texversion=&Apache::lonnet::ssi($currentURL,%form); $result .= $texversion; } else { - $result.=&unsupported($currentURL,$helper->{'VARS'}->{'LATEX_TYPE'}, - $helper->{'VARS'}->{'symb'}); + $result.=&unsupported($currentURL,$helper->{'VARS'}->{'LATEX_TYPE'}); } } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or @@ -1338,8 +1335,7 @@ ENDPART $result .= $texversion; $flag_latex_header_remove = 'YES'; } else { - $texversion=&unsupported($urlp,$helper->{'VARS'}->{'LATEX_TYPE'}, - $master_seq[$i]); + $texversion=&unsupported($urlp,$helper->{'VARS'}->{'LATEX_TYPE'}); if ($flag_latex_header_remove ne 'NO') { $texversion = &latex_header_footer_remove($texversion); } else { @@ -1442,7 +1438,6 @@ ENDPART } my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth)); $moreenv{'problem_split'} = $parmhash{'problem_stream_switch'}; - $moreenv{'instructor_comments'}='hide'; my $seed=time+($$<<16)+($$); my @allcodes; if ($old_name) { @@ -1745,7 +1740,7 @@ sub print_resources { ($curresline!~ m/\.(problem|exam|quiz|assess|survey|form|library)$/)) ) { my ($map,$id,$res_url) = &Apache::lonnet::decode_symb($curresline); if (&Apache::lonnet::allowed('bre',$res_url)) { - if ($res_url!~m|^ext/| + if ($res_url!~m|^/adm/| && $res_url=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { $printed .= $curresline.':'; my $pre_counter=$env{'form.counter'}; @@ -1792,10 +1787,9 @@ sub print_resources { } else { $rendered =~ s/\\end{document}//; } - $current_output .= $rendered.'\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\strut \vskip 0 mm \strut '; - + $current_output .= $rendered.'\vskip 0.5mm\noindent\makebox[\textwidth/'.$number_of_columns.'][b]{\hrulefill}\strut \vskip 0 mm \strut '; } else { - my $rendered = &unsupported($res_url,$helper->{'VARS'}->{'LATEX_TYPE'},$curresline); + my $rendered = &unsupported($res_url,$helper->{'VARS'}->{'LATEX_TYPE'}); if ($remove_latex_header ne 'NO') { $rendered = &latex_header_footer_remove($rendered); } else { @@ -1942,7 +1936,7 @@ sub printHelper { # But we only do this in the initial state so that they are allowed to change. # - # $helper->{VARS}->{FINISHPAGE} = ''; + $helper->{VARS}->{FINISHPAGE} = ''; &Apache::loncommon::restore_course_settings('print', {'pagebreaks' => 'scalar', @@ -2519,7 +2513,7 @@ CHOOSE_FROM_ANY_SEQUENCE Use style file: -   Select style file +   Select style file Show all foils?