2022-10-20 21:23:52 +01:00
|
|
|
# Use subroutine to do preprocessing and running pdflatex
|
|
|
|
$pdflatex = 'internal mylatex %B %O';
|
|
|
|
sub mylatex {
|
|
|
|
my $base = shift @_;
|
|
|
|
my $tex = "$base.tex";
|
|
|
|
|
|
|
|
# Run the preprocessor
|
2024-03-03 17:05:13 +00:00
|
|
|
if (-e "$base.lhs" && `which lhs2TeX` ne "") {
|
|
|
|
# Run the preprocessor
|
|
|
|
system('lhs2TeX', '--poly', '-o', $tex, "$base.lhs") == 0 or return $?;
|
|
|
|
}
|
2022-10-20 21:23:52 +01:00
|
|
|
# Run pdflatex
|
|
|
|
my $return = system('pdflatex', @_, $tex);
|
|
|
|
system "echo INPUT $base.lhs >> $aux_dir1$base.fls";
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|