--- loncom/interface/lonprintout.pm 2003/02/07 19:47:48 1.112 +++ loncom/interface/lonprintout.pm 2003/02/12 20:44:38 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.112 2003/02/07 19:47:48 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.113 2003/02/12 20:44:38 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1200,9 +1200,9 @@ sub page_format_transformation { } else { ($textwidth,$textheight,$oddoffset,$evenoffset) = ($ENV{'form.width'},$ENV{'form.height'},$ENV{'form.leftmargin'},$ENV{'form.leftmargin'}); } - my $firstname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.firstname'})); - my $lastname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.lastname'})); - my $courseidinfo = &special_character_corrections(&Apache::lonnet::unescape($ENV{'course.'.$ENV{'request.course.id'}.'.description'})); + my $firstname = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'environment.firstname'}),'','','header'); + my $lastname = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'environment.lastname'}),'','','header'); + my $courseidinfo = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'course.'.$ENV{'request.course.id'}.'.description'}),'','','header'); if ($layout eq 'CBI') { $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm} \\begin{document}\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$firstname $lastname}} \\hfill $courseidinfo} \\vskip 5 mm /; } elsif ($layout eq 'CAPA') { @@ -1255,15 +1255,6 @@ sub details_for_menu { } -sub special_character_corrections { - my $argument = shift; - $argument =~ s/_/ /g; - $argument =~ s/\^/ /g; - $argument =~ s/&/\\&/g; - return $argument; -} - - sub latex_corrections { my ($number_of_columns,$result) = @_;