version 1.116, 2003/02/14 21:43:35
|
version 1.117, 2003/02/17 16:43:54
|
Line 381 ENDDISHEADER
|
Line 381 ENDDISHEADER
|
} |
} |
} |
} |
$r->print(<<ENDMENUOUT2); |
$r->print(<<ENDMENUOUT2); |
<br />Number of blank pages to add: <select name="addedpages"><option selected>0</option> |
<br /><br /><br /> |
<option>1</option> |
<table><tr><td width=300>Number of blank pages added to each student assignments to print these assignments on physically different sheets (<b>requires manual addjustment</b>): <select name="addedpages"><option selected>0</option> |
<option>2</option> |
<option>1</option> |
<option>3</option> |
<option>2</option> |
</select> |
<option>3</option> |
|
</select></td></tr></table> |
<br /> |
<br /> |
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}"> |
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}"> |
<input type="hidden" name="numberofstudents" value="$i"> |
<input type="hidden" name="numberofstudents" value="$i"> |
Line 630 ENDPART
|
Line 631 ENDPART
|
$flag_latex_header_remove = 'YES'; |
$flag_latex_header_remove = 'YES'; |
} |
} |
} |
} |
|
my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
if ($current_output=~/\\documentclass/) { |
if ($current_output=~/\\documentclass/) { |
my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
$current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}} - $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}\\vskip 3 mm /; |
$current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{}\\lhead{$courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}} \\begin{document}\\noindent\\textit{\\textbf{$fullname}}\\vskip 3 mm /; |
|
} else { |
} else { |
my $blanspages = ''; |
my $blanspages = ''; |
for (my $j=0;$j<$ENV{'form.addedpages'};$j++) {$blanspages.='\clearpage\strut\clearpage';} |
for (my $j=0;$j<$ENV{'form.addedpages'};$j++) {$blanspages.='\clearpage\strut\clearpage';} |
$current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License } \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\textit{\textbf{'.$fullname.'}}\hskip 1.4in } \vskip 5 mm '.$current_output; |
$current_output = '\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent{\\tiny Printed from LON-CAPA\\copyright MSU{\\hfill} Licensed under GNU General Public License } \\vskip 3mm'.$blanspages.'\setcounter{page}{1}\noindent\parbox{\minipagewidth}{\noindent\\lhead{\\textit{\\textbf{'.$fullname.'}} - '.$courseidinfo.' \\hfill \\thepage \\\\ \\textit{'.$assignment.'}}\hskip 1.4in } \vskip 5 mm '.$current_output; |
} |
} |
$result .= $current_output; |
$result .= $current_output; |
&Apache::lonnet::delenv('form.counter'); |
&Apache::lonnet::delenv('form.counter'); |
Line 834 sub character_chart {
|
Line 835 sub character_chart {
|
$result =~ s/&\#0?61;/\$=\$/g; |
$result =~ s/&\#0?61;/\$=\$/g; |
$result =~ s/&(\#0?62|gt|\#155);/\$>\$/g; |
$result =~ s/&(\#0?62|gt|\#155);/\$>\$/g; |
$result =~ s/&\#0?63;/\?/g; |
$result =~ s/&\#0?63;/\?/g; |
# $result =~ s/�?64;//g; |
|
$result =~ s/&\#0?65;/A/g; |
$result =~ s/&\#0?65;/A/g; |
$result =~ s/&\#0?66;/B/g; |
$result =~ s/&\#0?66;/B/g; |
$result =~ s/&\#0?67;/C/g; |
$result =~ s/&\#0?67;/C/g; |
Line 924 sub character_chart {
|
Line 924 sub character_chart {
|
$result =~ s/&(\#168|uml);/\\texthighdieresis /g; |
$result =~ s/&(\#168|uml);/\\texthighdieresis /g; |
$result =~ s/&(\#169|copy);/\\copyright /g; |
$result =~ s/&(\#169|copy);/\\copyright /g; |
$result =~ s/&(\#170|ordf);/\\textordfeminine /g; |
$result =~ s/&(\#170|ordf);/\\textordfeminine /g; |
# $result =~ s/«//g; |
|
# $result =~ s/«//g; |
|
$result =~ s/&(\#172|not);/\$\\neg\$/g; |
$result =~ s/&(\#172|not);/\$\\neg\$/g; |
$result =~ s/&(\#173|shy);/ - /g; |
$result =~ s/&(\#173|shy);/ - /g; |
$result =~ s/&(\#174|reg);/\\textregistered /g; |
$result =~ s/&(\#174|reg);/\\textregistered /g; |
Line 941 sub character_chart {
|
Line 939 sub character_chart {
|
$result =~ s/&(\#184|cedil);/\\c{\\strut}/g; |
$result =~ s/&(\#184|cedil);/\\c{\\strut}/g; |
$result =~ s/&(\#185|sup1);/\$^1\$/g; |
$result =~ s/&(\#185|sup1);/\$^1\$/g; |
$result =~ s/&(\#186|ordm);/\\textordmasculine /g; |
$result =~ s/&(\#186|ordm);/\\textordmasculine /g; |
# $result =~ s/»//g; |
|
# $result =~ s/»//g; |
|
$result =~ s/&(\#188|frac14);/\\textonequarter /g; |
$result =~ s/&(\#188|frac14);/\\textonequarter /g; |
$result =~ s/&(\#189|frac12);/\\textonehalf /g; |
$result =~ s/&(\#189|frac12);/\\textonehalf /g; |
$result =~ s/&(\#190|frac34);/\\textthreequarters /g; |
$result =~ s/&(\#190|frac34);/\\textthreequarters /g; |
Line 963 sub character_chart {
|
Line 959 sub character_chart {
|
$result =~ s/&(\#205|Iacute);/\\\'{I}/g; |
$result =~ s/&(\#205|Iacute);/\\\'{I}/g; |
$result =~ s/&(\#206|Icirc);/\\^{I}/g; |
$result =~ s/&(\#206|Icirc);/\\^{I}/g; |
$result =~ s/&(\#207|Iuml);/\\\"{I}/g; |
$result =~ s/&(\#207|Iuml);/\\\"{I}/g; |
# $result =~ s/Ð//g; |
|
# $result =~ s/Ð//g; |
|
$result =~ s/&(\#209|Ntilde);/\\~{N}/g; |
$result =~ s/&(\#209|Ntilde);/\\~{N}/g; |
$result =~ s/&(\#210|Ograve);/\\\`{O}/g; |
$result =~ s/&(\#210|Ograve);/\\\`{O}/g; |
$result =~ s/&(\#211|Oacute);/\\\'{O}/g; |
$result =~ s/&(\#211|Oacute);/\\\'{O}/g; |
Line 978 sub character_chart {
|
Line 972 sub character_chart {
|
$result =~ s/&(\#219|Ucirc);/\\^{U}/g; |
$result =~ s/&(\#219|Ucirc);/\\^{U}/g; |
$result =~ s/&(\#220|Uuml);/\\\"{U}/g; |
$result =~ s/&(\#220|Uuml);/\\\"{U}/g; |
$result =~ s/&(\#221|Yacute);/\\\'{Y}/g; |
$result =~ s/&(\#221|Yacute);/\\\'{Y}/g; |
# $result =~ s/Þ//g; |
|
# $result =~ s/Þ//g; |
|
$result =~ s/&(\#223|szlig);/\\ss/g; |
$result =~ s/&(\#223|szlig);/\\ss/g; |
$result =~ s/&(\#224|agrave);/\\\`{a}/g; |
$result =~ s/&(\#224|agrave);/\\\`{a}/g; |
$result =~ s/&(\#225|aacute);/\\\'{a}/g; |
$result =~ s/&(\#225|aacute);/\\\'{a}/g; |
Line 1011 sub character_chart {
|
Line 1003 sub character_chart {
|
$result =~ s/&(\#251|ucirc);/\\^{u}/g; |
$result =~ s/&(\#251|ucirc);/\\^{u}/g; |
$result =~ s/&(\#252|uuml);/\\\"{u}/g; |
$result =~ s/&(\#252|uuml);/\\\"{u}/g; |
$result =~ s/&(\#253|yacute);/\\\'{y}/g; |
$result =~ s/&(\#253|yacute);/\\\'{y}/g; |
# $result =~ s/þ//g; |
|
# $result =~ s/þ//g; |
|
$result =~ s/&(\#255|yuml);/\\\"{y}/g; |
$result =~ s/&(\#255|yuml);/\\\"{y}/g; |
$result =~ s/&\#952;/\$\\theta\$/g; |
$result =~ s/&\#952;/\$\\theta\$/g; |
|
#Greek Alphabet |
|
$result =~ s/&(alpha|\#945);/\$\\alpha \$/g; |
|
$result =~ s/&(beta|\#946);/\$\\beta \$/g; |
|
$result =~ s/&(gamma|\#947);/\$\\gamma \$/g; |
|
$result =~ s/&(delta|\#948);/\$\\delta \$/g; |
|
$result =~ s/&(epsilon|\#949);/\$\\epsilon \$/g; |
|
$result =~ s/&(zeta|\#950);/\$\\zeta \$/g; |
|
$result =~ s/&(eta|\#951);/\$\\eta \$/g; |
|
$result =~ s/&(theta|\#952);/\$\\theta \$/g; |
|
$result =~ s/&(iota|\#953);/\$\\iota \$/g; |
|
$result =~ s/&(kappa|\#954);/\$\\kappa \$/g; |
|
$result =~ s/&(lambda|\#955);/\$\\lambda \$/g; |
|
$result =~ s/&(mu|\#956);/\$\\mu \$/g; |
|
$result =~ s/&(nu|\#957);/\$\\nu \$/g; |
|
$result =~ s/&(xi|\#958);/\$\\xi \$/g; |
|
$result =~ s/&(pi|\#960);/\$\\pi \$/g; |
|
$result =~ s/&(rho|\#961);/\$\\rho \$/g; |
|
$result =~ s/&(sigma|\#963);/\$\\sigma \$/g; |
|
$result =~ s/&(tau|\#964);/\$\\tau \$/g; |
|
$result =~ s/&(upsilon|\#965);/\$\\upsilon \$/g; |
|
$result =~ s/&(phi|\#966);/\$\\phi \$/g; |
|
$result =~ s/&(chi|\#967);/\$\\chi \$/g; |
|
$result =~ s/&(psi|\#968);/\$\\psi \$/g; |
|
$result =~ s/&(omega|\#969);/\$\\omega \$/g; |
|
$result =~ s/&(Gamma|\#915);/\$\\Gamma \$/g; |
|
$result =~ s/&(Delta|\#916);/\$\\Delta \$/g; |
|
$result =~ s/&(Theta|\#920);/\$\\Theta \$/g; |
|
$result =~ s/&(Lambda|\#923);/\$\\Lambda \$/g; |
|
$result =~ s/&(Xi|\#926);/\$\\Xi \$/g; |
|
$result =~ s/&(Pi|\#928);/\$\\Pi \$/g; |
|
$result =~ s/&(Sigma|\#931);/\$\\Sigma \$/g; |
|
$result =~ s/&(Upsilon|\#933);/\$\\Upsilon \$/g; |
|
$result =~ s/&(Phi|\#934);/\$\\Phi \$/g; |
|
$result =~ s/&(Psi|\#936);/\$\\Psi \$/g; |
|
$result =~ s/&(Omega|\#937);/\$\\Omega \$/g; |
|
|
return $result; |
return $result; |
} |
} |
|
|
Line 1104 sub page_format_transformation {
|
Line 1130 sub page_format_transformation {
|
if ($choice ne 'All class print') { |
if ($choice ne 'All class print') { |
$text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{}\\lhead{\\textbf{$firstname $lastname} - $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}/; |
$text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\pagestyle{fancy}\\rhead{}\\chead{}\\lhead{\\textbf{$firstname $lastname} - $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}/; |
} else { |
} else { |
$text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\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\\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 /; |
|
|
} |
} |
} |
} |
return $text; |
return $text; |