[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 20 Mar 2002 22:14:30 -0000
sakharuk Wed Mar 20 17:14:30 2002 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
corrections for Latex output: <br> tag and \noindent command mainly
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.16 loncom/interface/lonprintout.pm:1.17
--- loncom/interface/lonprintout.pm:1.16 Wed Mar 6 15:43:06 2002
+++ loncom/interface/lonprintout.pm Wed Mar 20 17:14:30 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.16 2002/03/06 20:43:06 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.17 2002/03/20 22:14:30 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -249,9 +249,12 @@
m/.*\/(.*)/;
$courseidinfo = $ENV{'course.physnet_'.$1.'.description'};
$result =~ s/\\documentclass\[letterpaper\]{article}/\\documentclass\[twocolumn\]{article}/;
- $result =~ s/\\begin{document}/\\textheight 25\.9cm\\oddsidemargin = -0\.57in\\evensidemargin = -0\.57in\\textwidth= 7\.7in\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}}\\hskip 1\.4in $courseidinfo\\newline\\noindent\\textit{Physics for Scientists and Engineers}\\newline\\noindent\\textbf{Due Thursday, March 7, 2002 at 8:00PM}\\vskip 5 mm/;
+ $result =~ s/\\begin{document}/\\textheight 25\.9cm\\oddsidemargin = -0\.57in\\evensidemargin = -0\.57in\\textwidth= 7\.7in\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}}\\hskip 1\.4in $courseidinfo \\vskip 5 mm /;
$result =~ s/\\includegraphics/\\includegraphics\[width=9\.0 cm\]/g;
}
+#-- LaTeX corrections
+ $result =~ s/^\s+$//gm; #remove empty lines
+ $result =~ s/%/\\%/g; #corrects %
#-- writing .tex file in prtspool
my $temp_file;
$filename = "/home/httpd/prtspool/$ENV{'environment.firstname'}$ENV{'environment.lastname'}temp$ENV{'user.login.time'}.tex";