version 1.124, 2007/04/23 20:06:00
|
version 1.128, 2007/10/11 22:49:49
|
Line 166 END
|
Line 166 END
|
my %perlvar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')}; |
my %perlvar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')}; |
&Apache::lonlocal::get_language_handle(); |
&Apache::lonlocal::get_language_handle(); |
&Apache::loncommon::content_type(undef,'text/html'); |
&Apache::loncommon::content_type(undef,'text/html'); |
|
$env{'request.noversionuri'} = '/cgi-bin/printout.pl'; |
print(&Apache::loncommon::start_page('Creating PDF')); |
print(&Apache::loncommon::start_page('Creating PDF')); |
|
|
my $identifier = $ENV{'QUERY_STRING'}; |
my $identifier = $ENV{'QUERY_STRING'}; |
Line 187 my %perlvar=%{&LONCAPA::Configuration::r
|
Line 187 my %perlvar=%{&LONCAPA::Configuration::r
|
if ($student_names=~/_END_/) { |
if ($student_names=~/_END_/) { |
@names_pack=split(/_ENDPERSON_/,$student_names); |
@names_pack=split(/_ENDPERSON_/,$student_names); |
} |
} |
|
if ($backref) { |
print "<a href=\"$backref\"><b>Return</b></a> to last resource.<br /><br />"; |
print('<p>'.&mt("[_1]Return[_2] to editing resource.", |
|
"<a href=\"$backref\"><b>","</b></a>").'</p>'); |
|
} |
my $figfile = $texfile; |
my $figfile = $texfile; |
$figfile =~ s/^(.*_printout)_\d+_\d+_\d+\.tex/$1\.dat/; |
$figfile =~ s/^(.*_printout)_\d+_\d+_\d+\.tex/$1\.dat/; |
my $duefile = $texfile; |
my $duefile = $texfile; |
Line 217 print "<a href=\"$backref\"><b>Return</b
|
Line 218 print "<a href=\"$backref\"><b>Return</b
|
# $eps_f =~ s/\.[^.]*$/\.eps/i; |
# $eps_f =~ s/\.[^.]*$/\.eps/i; |
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) { |
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) { |
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/; |
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/; |
$eps_f = $perlvar{'lonPrtDir'}.$eps_f; |
$eps_f = $perlvar{'lonPrtDir'}.'/'.$eps_f; |
} elsif ($eps_f=~/$perlvar{'lonDocRoot'}\/res\//) { |
} elsif ($eps_f=~/$perlvar{'lonDocRoot'}\/res\//) { |
$eps_f=~m/$perlvar{'lonDocRoot'}\/res\/(.+)/; |
$eps_f=~m/$perlvar{'lonDocRoot'}\/res\/(.+)/; |
$eps_f = $perlvar{'lonPrtDir'}.$1; |
$eps_f = $perlvar{'lonPrtDir'}.'/'.$1; |
} elsif ($eps_f=~/$perlvar{'lonUsersDir'}\//) { |
} elsif ($eps_f=~/$perlvar{'lonUsersDir'}\//) { |
$eps_f=~/$perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/; |
$eps_f=~/$perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/; |
$eps_f = $perlvar{'lonPrtDir'}.$1.'/'.$2; |
$eps_f = $perlvar{'lonPrtDir'}.'/'.$1.'/'.$2; |
} |
} |
$eps_f =~ s/ /\_/g; # Spaces are problematic for system commands and LaTeX. |
$eps_f =~ s/ /\_/g; # Spaces are problematic for system commands and LaTeX. |
# |
# |
Line 523 foreach $texfile (@texfile) {
|
Line 524 foreach $texfile (@texfile) {
|
if ($tableofindex eq 'yes') { |
if ($tableofindex eq 'yes') { |
my $idxname = $latex_file; |
my $idxname = $latex_file; |
$idxname =~ s/\.tex$/\.idx/; |
$idxname =~ s/\.tex$/\.idx/; |
&busy_wait_command("makindex $idxname", |
&busy_wait_command("makeindex $idxname", |
"Re-creating index file", |
"Re-creating index file", |
\%prog_state, $idxname); |
\%prog_state, $idxname); |
&busy_wait_command("latex $latex_file 1>/dev/null 2>/dev/null", |
&busy_wait_command("latex $latex_file 1>/dev/null 2>/dev/null", |
Line 868 sub repaginate {
|
Line 869 sub repaginate {
|
# bottom of the page, m the page number within the document. |
# bottom of the page, m the page number within the document. |
# |
# |
|
|
if ($line =~ /^%%Page:/) { |
if ($line =~ /^%%Page:\s+\d+\s+\d+/) { |
my @pageinfo = split(/\s+/, $line); |
my @pageinfo = split(/\s+/, $line); |
if ($page_number < $pageinfo[1]) { |
if ($page_number < $pageinfo[1]) { |
$page_number = $pageinfo[1]; |
$page_number = $pageinfo[1]; |