Revision f353a0b2
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
SL/Template/LaTeX.pm | ||
---|---|---|
387 | 387 |
|
388 | 388 |
my $latex = $self->_get_latex_path(); |
389 | 389 |
my $old_home = $ENV{HOME}; |
390 |
my $old_openin_any = $ENV{openin_any}; |
|
390 | 391 |
$ENV{HOME} = $userspath =~ m|^/| ? $userspath : getcwd() . "/" . $userspath; |
392 |
$ENV{openin_any} = "p"; |
|
391 | 393 |
|
392 | 394 |
for (my $run = 1; $run <= 2; $run++) { |
393 | 395 |
system("${latex} --interaction=nonstopmode $form->{tmpfile} " . |
394 | 396 |
"> $form->{tmpfile}.err"); |
395 | 397 |
if ($?) { |
396 | 398 |
$ENV{HOME} = $old_home; |
399 |
$ENV{openin_any} = $old_openin_any; |
|
397 | 400 |
$self->{"error"} = $form->cleanup($latex); |
398 | 401 |
return 0; |
399 | 402 |
} |
... | ... | |
403 | 406 |
|
404 | 407 |
system("dvips $form->{tmpfile} -o -q > /dev/null"); |
405 | 408 |
$ENV{HOME} = $old_home; |
409 |
$ENV{openin_any} = $old_openin_any; |
|
406 | 410 |
|
407 | 411 |
if ($?) { |
408 | 412 |
$self->{"error"} = "dvips : $!"; |
... | ... | |
432 | 436 |
|
433 | 437 |
my $latex = $self->_get_latex_path(); |
434 | 438 |
my $old_home = $ENV{HOME}; |
439 |
my $old_openin_any = $ENV{openin_any}; |
|
435 | 440 |
$ENV{HOME} = $userspath =~ m|^/| ? $userspath : getcwd() . "/" . $userspath; |
441 |
$ENV{openin_any} = "p"; |
|
436 | 442 |
|
437 | 443 |
for (my $run = 1; $run <= 2; $run++) { |
438 | 444 |
system("${latex} --interaction=nonstopmode $form->{tmpfile} " . |
439 | 445 |
"> $form->{tmpfile}.err"); |
440 | 446 |
if ($?) { |
441 | 447 |
$ENV{HOME} = $old_home; |
448 |
$ENV{openin_any} = $old_openin_any; |
|
442 | 449 |
$self->{error} = $form->cleanup($latex); |
443 | 450 |
return 0; |
444 | 451 |
} |
445 | 452 |
} |
446 | 453 |
|
447 | 454 |
$ENV{HOME} = $old_home; |
455 |
$ENV{openin_any} = $old_openin_any; |
|
448 | 456 |
$form->{tmpfile} =~ s/tex$/pdf/; |
449 | 457 |
|
450 | 458 |
$self->cleanup(); |
Auch abrufbar als: Unified diff
Umgebungsvariable openin_any=p setzen.
Damit können keine Dateien aus höheren Verzeichnissen als in TEXINPUTS
eingebunden werden. TEXINPUTS zeigt das Users und das Vorlagen-Verzeichnis.