--- loncom/interface/lonprintout.pm 2005/01/04 14:01:21 1.348 +++ loncom/interface/lonprintout.pm 2005/02/10 21:05:03 1.360 @@ -1,7 +1,7 @@ -# The LearningOnline Network +# The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.348 2005/01/04 14:01:21 albertel Exp $ +# $Id: lonprintout.pm,v 1.360 2005/02/10 21:05:03 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,9 +42,6 @@ use Apache::lonratedt; use POSIX qw(strftime); use Apache::lonlocal; -my $LaTeXwidth = 0; - - # Compare two students by name. The students are in the form # returned by the helper: # user:domain:section:last, first:status @@ -432,8 +429,8 @@ sub character_chart { my %page_formats= ('letter' => { 'book' => { - '1' => [ '7.1 in','10.0 in', '-0.57 in','-0.57 in','1 cm'], - '2' => ['3.66 in','10.0 in', '-0.57 in','-0.57 in','1 cm'] + '1' => [ '7.1 in','9.8 in', '-0.57 in','-0.57 in','0.7 cm'], + '2' => ['3.66 in','9.8 in', '-0.57 in','-0.57 in','0.7 cm'] }, 'album' => { '1' => [ '8.8 in', '6.8 in','-40 pt in', '-60 pt','1 cm'], @@ -698,7 +695,7 @@ sub IndexCreation { sub print_latex_header { my $mode=shift; my $output='\documentclass[letterpaper]{article}'; - if ($mode eq 'batchmode') { + if (($mode eq 'batchmode') || (!$ENV{'request.role.adv'})) { $output.='\batchmode'; } $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'."\n". @@ -726,7 +723,7 @@ sub path_to_problem { my $newurlp = ''; $colwidth=~s/\s*mm\s*$//; #characters average about 2 mm in width - if (length($urlp)*2 > $LaTeXwidth) { + if (length($urlp)*2 > $colwidth) { my @elements = split '/',$urlp; my $curlength=0; foreach my $element (@elements) { @@ -789,6 +786,9 @@ sub output_data { my %parmhash = %$rparmhash; my $bodytag=&Apache::loncommon::bodytag('Preparing Printout'); $r->print(<