[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 24 Sep 2002 13:52:24 -0000
sakharuk Tue Sep 24 09:52:24 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Removed syntax error. Sorry.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.74 loncom/interface/lonprintout.pm:1.75
--- loncom/interface/lonprintout.pm:1.74 Mon Sep 23 17:09:58 2002
+++ loncom/interface/lonprintout.pm Tue Sep 24 09:52:24 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.74 2002/09/23 21:09:58 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.75 2002/09/24 13:52:24 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -460,7 +460,7 @@
my $symbolic = &Apache::lonnet::symbread($ENV{'form.url'});
my @sequence = split('___',$symbolic);
my $primary_sequence = '/res/'.$sequence[0];
- my @master_seq = &coming_from_hash($primary_sequence,$sequence[0);
+ my @master_seq = &coming_from_hash($primary_sequence,$sequence[0]);
#loop over students
my $flag_latex_header_remove = 'NO';
foreach my $person (@students) {
@@ -527,11 +527,33 @@
$result .= '\end{document}';
}
#-------------------------------------------------------- corrections for the different page formats
-# my ($textwidth,$textheight,$offset) = (0,0,0);
-# if ($papersize=~/Letter/) {
-# $textwidth = ;
-# $textheight = ;
-# $offset = ;
+ my ($textwidth,$textheight,$oddoffset,$evenoffset) = (0,0,0,0);
+ if ($papersize=~/Letter/) {
+ if ($layout eq 'CAPA') {
+ if ($numberofcolumns == 1) {
+ $textwidth = '18 cm';
+ $textheight = '25.9 cm';
+ $oddoffset = '-0.57 in';
+ $evenoffset = '-0.57 in';
+ } elsif ($numberofcolumns == 2) {
+ $textwidth = '9 cm';
+ $textheight = '25.9 cm';
+ $oddoffset = '-0.57 in';
+ $evenoffset = '-0.57 in';
+ }
+ } elsif ($layout eq 'CBI') {
+ if ($numberofcolumns == 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 = '-40 pt';
+ $evenoffset = '-60 pt';
+ }
+ }
# } elsif($papersize=~/Legal/) {
# $textwidth = ;
# $textheight = ;
@@ -574,7 +596,7 @@
# <option> A5 [148x210 mm] </option>
# <option> A6 [105x148 mm] </option>
#
-# }
+ }
if ($layout eq 'CBI' and $numberofcolumns eq '1') {
$result =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{-40pt}\\setlength{\\evensidemargin}{-60pt}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{4\.4in}\\setlength{\\textheight}{6\.8in}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt} \\begin{document}/;
@@ -624,7 +646,6 @@
$result =~ s/\\\\\s*\\noindent\s*(\\\\)+/\\\\\\noindent /g;
$result =~ s/{\\par }\s*\\\\/\\\\/gm;
$result =~ s/\\\\\s+\[/ \[/g;
- $result =~ s/θ/\$\\theta\$/g; #converts theta from html into tex
$result =~ s/\b__+\b/\\makebox\[1 cm\]\[b\]{\\hrulefill}/g;
#conversion of html characters to LaTeX equivalents
if ($result =~ m/&(\w+|#\d+);/) {
@@ -1071,7 +1092,8 @@
# $result =~ s/þ//g;
# $result =~ s/þ//g;
$result =~ s/ÿ/\\"{y}/g;
- $result =~ s/ÿ/\\"{y}/g;
+ $result =~ s/ÿ/\\"{y}/g;
+ $result =~ s/θ/\$\\theta\$/g; #converts theta from html into tex
return $result;
}