version 1.146.4.2, 2011/03/04 16:53:06
|
version 1.148, 2011/04/26 10:47:25
|
Line 477 foreach $texfile (@texfile) {
|
Line 477 foreach $texfile (@texfile) {
|
my $ps_file = my $tempo_file = $1.'temporar.ps'; |
my $ps_file = my $tempo_file = $1.'temporar.ps'; |
my $pdf_file = $1.'.pdf'; |
my $pdf_file = $1.'.pdf'; |
$papera=~s/t/p/; |
$papera=~s/t/p/; |
|
#---- |
|
# The code below uses fixps to make pdf include in sequences work. |
|
# |
|
# $comma = "fixps --force $new_name_file"; |
|
# &debug("FIXPS command: $comma"); |
|
# &busy_wait_command("$comma 1>$tempo_file 2>/dev/null", |
|
# "for $status_statement now validating PS", |
|
# \%prog_state,$tempo_file); |
|
|
|
#--- |
|
# The code below uses gs to make pdf includes in sequences work |
|
|
|
# Use gs to fix the postscript -> level 1.5 |
|
|
|
$comma = "gs -sDEVICE=pswrite -dLanguageLevel=1.5 "; |
|
&busy_wait_command("$comma -o $tempo_file $new_name_file 2>/dev/null 1>/dev/null", |
|
"for $status_statement now validating PS", |
|
\%prog_state, $tempo_file); |
|
|
|
#--- |
|
&busy_wait_command("mv $tempo_file $new_name_file", |
|
'File move', \%prog_state, $new_name_file); |
if ($laystyle eq 'album' and $numberofcolumns eq '2') { |
if ($laystyle eq 'album' and $numberofcolumns eq '2') { |
$comma = "psnup $papera -2 -s1.0 $new_name_file"; |
$comma = "psnup $papera -2 -s1.0 $new_name_file"; |
&debug("PSNUP command: $comma"); |
&debug("PSNUP command: $comma"); |
Line 904 sub convert_figure {
|
Line 926 sub convert_figure {
|
$not_eps =~ s/^\s+//; |
$not_eps =~ s/^\s+//; |
$not_eps =~ s/\s+$//; |
$not_eps =~ s/\s+$//; |
$not_eps =~ s/ /\\ /g; |
$not_eps =~ s/ /\\ /g; |
my $prettyname=$not_eps; |
my $prettyname=$not_eps; |
if ($advanced_role) { |
if ($advanced_role) { |
$prettyname=~s|/home/([^/]+)/public_html|/priv/$1|; |
$prettyname=~s|/home/([^/]+)/public_html|/priv/$1|; |
$prettyname=~s|$perlvar{'lonDocRoot'}/|/|; |
$prettyname=~s|$perlvar{'lonDocRoot'}/|/|; |
Line 928 sub convert_figure {
|
Line 950 sub convert_figure {
|
system("pdftops $not_eps $eps_f"); |
system("pdftops $not_eps $eps_f"); |
} else { |
} else { |
system("convert $not_eps $eps_f"); |
system("convert $not_eps $eps_f"); |
if ($? and $advanced_role) { |
if($? and $advanced_role){ |
print '<p class="LC_warning">' |
print "<p class=\"LC_warning\">" |
.&mt('An error occured during the conversion of [_1].[_2]If possible try to save this image using different settings and republish it.', |
.mt("An error occured during the conversion of [_1].[_2]" |
'<span class="LC_filename">'.$prettyname.'</span>','<br/>') |
."If possible try to save this image using different settings and republish it.", |
.'</p>'; |
"<span class=\"LC_filename\">".$prettyname."</span>", "<br/>") |
} |
."</p>"; |
|
} |
} |
} |
|
|
if (not -e $eps_f) { |
if (not -e $eps_f) { |