Diff for /loncom/interface/lonprintout.pm between versions 1.322 and 1.325

version 1.322, 2004/08/13 17:14:48 version 1.325, 2004/08/16 17:11:10
Line 447  sub page_format { Line 447  sub page_format {
     } elsif($papersize eq '2') {      } elsif($papersize eq '2') {
  if ($layout eq 'book') {   if ($layout eq 'book') {
     if ($numberofcolumns == 1) {      if ($numberofcolumns == 1) {
  $textwidth = '7.1 in';         $textwidth = '9.8 in';      
  $textheight = '15 in';       $textheight = '16 in';    
  $oddoffset = '-0.57 in';   $oddoffset = '-0.57 in';
  $evenoffset = '-0.57 in';   $evenoffset = '-0.57 in';
  $topmargin = '-0.5 in';   $topmargin = '-0.5 in';
Line 473  sub page_format { Line 473  sub page_format {
 # $topmargin = '3.5 in';  # $topmargin = '3.5 in';
     }      }
  }   }
 #    } elsif($papersize eq '3'/) {      } elsif($papersize eq '3') {
    if ($layout eq 'book') {
       if ($numberofcolumns == 1) {
    $textwidth = '6.8 in';      
    $textheight = '9 in';    
    $oddoffset = '-0.57 in';
    $evenoffset = '-0.57 in';
    $topmargin = '1.2 in';
       } elsif ($numberofcolumns == 2) {
    $textwidth = '3.1 in';     
    $textheight = '9 in';    
    $oddoffset = '-0.57 in';
    $evenoffset = '-0.57 in';
    $topmargin = '1.2 in';
       }
    } elsif ($layout eq 'album') {
       if ($numberofcolumns eq '1') {
   # $textwidth = '8.8 in';
   # $textheight = '6.8 in';
   # $oddoffset = '-40 pt';
   # $evenoffset = '-60 pt';
       } elsif ($numberofcolumns == 2) {
   # $textwidth = '4.4 in';
   # $textheight = '6.8 in';
   # $oddoffset = '-0.5 in';
   # $evenoffset = '-1.5 in';
   # $topmargin = '3.5 in';
       }
    }
     } elsif($papersize eq '6') {      } elsif($papersize eq '6') {
  if ($layout eq 'book') {   if ($layout eq 'book') {
     if ($numberofcolumns == 1) {      if ($numberofcolumns == 1) {
Line 502  sub page_format { Line 530  sub page_format {
  $evenoffset = '-60 pt';   $evenoffset = '-60 pt';
     }      }
  }   }
 #    } elsif($papersize eq '5') {  
 #    } elsif($papersize eq '4') {  #    } elsif($papersize eq '4') {
   #    } elsif($papersize eq '5') {
 #    } elsif($papersize eq '7') {  #    } elsif($papersize eq '7') {
 #    } elsif($papersize eq '8') {  #    } elsif($papersize eq '8') {
     }      }
Line 543  sub page_format_transformation { Line 571  sub page_format_transformation {
     if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }      if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
     my $topmargintoinsert = '';      my $topmargintoinsert = '';
     if ($topmargin ne '0') {$topmargintoinsert='\setlength{\topmargin}{'.$topmargin.'}';}      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') {      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') {      } elsif ($layout eq 'book') {
   
  if ($choice ne 'All class print') {    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 {   } 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 /;      $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 /;
  }   }
Line 1360  sub print_resources { Line 1393  sub print_resources {
     my $current_output = '';       my $current_output = ''; 
     my ($username,$userdomain,$usersection) = split /:/,$person;      my ($username,$userdomain,$usersection) = split /:/,$person;
     my $fullname = &get_name($username,$userdomain);      my $fullname = &get_name($username,$userdomain);
       my $namepostfix;
     if ($person =~ 'anon') {      if ($person =~ 'anon') {
    $namepostfix="\\\\Name: ";
  $fullname = "CODE - ".$moreenv->{'CODE'};   $fullname = "CODE - ".$moreenv->{'CODE'};
     }      }
     #goes through all resources, checks if they are available for       #goes through all resources, checks if they are available for 
Line 1434  sub print_resources { Line 1469  sub print_resources {
     if ($usersection ne '') {$courseidinfo.=' - Sec. '.$usersection}      if ($usersection ne '') {$courseidinfo.=' - Sec. '.$usersection}
     my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');      my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');
     if ($current_output=~/\\documentclass/) {      if ($current_output=~/\\documentclass/) {
  $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}}$courseidinfo \\hfill \\thepage \\\\ \\textit{$currentassignment}}\\vskip 3 mm /;   $current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}}$courseidinfo \\hfill \\thepage \\\\ \\textit{$currentassignment}$namepostfix}\\vskip 3 mm /;
     } else {      } else {
  my $blankpages = '';   my $blankpages = '';
  for (my $j=0;$j<$helper->{'VARS'}->{'EMPTY_PAGES'};$j++) {$blankpages.='\clearpage\strut\clearpage';}   for (my $j=0;$j<$helper->{'VARS'}->{'EMPTY_PAGES'};$j++) {$blankpages.='\clearpage\strut\clearpage';}
  $current_output = '\strut\vspace*{-6 mm}\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\vspace*{-2 mm}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage '.$blankpages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}}'.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$currentassignment.'}}} \vskip -5 mm '.$current_output;   $current_output = '\strut\vspace*{-6 mm}\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\vspace*{-2 mm}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License }\\newpage '.$blankpages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}}'.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$currentassignment.'}'.$namepostfix.'}} \vskip -5 mm '.$current_output;
     }      }
     return ($current_output,$fullname);      return ($current_output,$fullname);
   

Removed from v.1.322  
changed lines
  Added in v.1.325


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>