Package: sql-ledger / 3.0.3-1

latex-cmdline-option Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: Allow changing latex & pdflatex command line options
Author: Raphaƫl Hertzog <hertzog@debian.org>
--- a/SL/Form.pm
+++ b/SL/Form.pm
@@ -1152,10 +1152,11 @@ sub run_latex {
 
   my $r = 1;
 
+  $main::exec_latex //= "latex";
   if ($self->{format} eq 'ps') {
-    system("latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+    system("$main::exec_latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
     while ($self->rerun_latex) {
-      system("latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+      system("$main::exec_latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
       last if ++$r > 4;
     }
     $self->{tmpfile} =~ s/tex$/dvi/;
@@ -1171,9 +1172,9 @@ sub run_latex {
   if ($self->{format} eq 'pdf') {
 
     if ($dvipdf) {
-      system("latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+      system("$main::exec_latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
       while ($self->rerun_latex) {
-	system("latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+	system("$main::exec_latex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
 	last if ++$r > 4;
       }
       $self->{tmpfile} =~ s/tex$/dvi/;
@@ -1184,9 +1185,10 @@ sub run_latex {
       $self->{tmpfile} =~ s/dvi$/pdf/;
       
     } else {
-      system("pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+      $main::exec_pdflatex //= "pdflatex";
+      system("$main::exec_pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
       while ($self->rerun_latex) {
-	system("pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
+	system("$main::exec_pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{errfile}");
 	last if ++$r > 4;
       }