--- loncom/interface/lonprintout.pm 2004/08/13 18:06:14 1.324 +++ loncom/interface/lonprintout.pm 2004/08/16 17:11:10 1.325 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.324 2004/08/13 18:06:14 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.325 2004/08/16 17:11:10 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -476,17 +476,17 @@ sub page_format { } elsif($papersize eq '3') { if ($layout eq 'book') { if ($numberofcolumns == 1) { - $textwidth = '7 in'; + $textwidth = '6.8 in'; $textheight = '9 in'; $oddoffset = '-0.57 in'; $evenoffset = '-0.57 in'; - $topmargin = '-0.5 in'; + $topmargin = '1.2 in'; } elsif ($numberofcolumns == 2) { - $textwidth = '3.5 in'; + $textwidth = '3.1 in'; $textheight = '9 in'; $oddoffset = '-0.57 in'; $evenoffset = '-0.57 in'; - $topmargin = '-0.5 in'; + $topmargin = '1.2 in'; } } elsif ($layout eq 'album') { if ($numberofcolumns eq '1') { @@ -530,8 +530,8 @@ sub page_format { $evenoffset = '-60 pt'; } } -# } elsif($papersize eq '5') { # } elsif($papersize eq '4') { +# } elsif($papersize eq '5') { # } elsif($papersize eq '7') { # } elsif($papersize eq '8') { } @@ -571,12 +571,17 @@ sub page_format_transformation { if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo } my $topmargintoinsert = ''; if ($topmargin ne '0') {$topmargintoinsert='\setlength{\topmargin}{'.$topmargin.'}';} + my $fancypagestatement=''; + if ($numberofcolumns eq '2') { + $fancypagestatement="\\fancyhead{}\\fancyhead[LO]{\\textbf{$name} $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}"; + } else { + $fancypagestatement="\\rhead{}\\chead{}\\lhead{\\textbf{$name} $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}"; + } if ($layout eq 'album') { - $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{}\\lhead{\\textbf{$name} $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}} \\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1} /; + $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1} /; } elsif ($layout eq 'book') { - if ($choice ne 'All class print') { - $text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{}\\lhead{\\textbf{$name} $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}/; + $text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}/; } else { $text =~ s/\\pagestyle{fancy}\\rhead{}\\chead{}\s*\\begin{document}/\\textheight = $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\pagestyle{fancy}\\rhead{}\\chead{}\\begin{document}\\voffset=-0\.8cm\\setcounter{page}{1} \\vskip 5 mm /; }