[latexmkrc] only use lhs2TeX if it's an lhs file

This commit is contained in:
Afonso Franco 2024-03-03 17:05:13 +00:00
parent 2db011dbc3
commit ae228da2ce
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys

View file

@ -5,7 +5,10 @@ sub mylatex {
my $tex = "$base.tex"; my $tex = "$base.tex";
# Run the preprocessor # Run the preprocessor
system('lhs2TeX', '--poly', '-o', $tex, "$base.lhs") == 0 or return $?; if (-e "$base.lhs" && `which lhs2TeX` ne "") {
# Run the preprocessor
system('lhs2TeX', '--poly', '-o', $tex, "$base.lhs") == 0 or return $?;
}
# Run pdflatex # Run pdflatex
my $return = system('pdflatex', @_, $tex); my $return = system('pdflatex', @_, $tex);
system "echo INPUT $base.lhs >> $aux_dir1$base.fls"; system "echo INPUT $base.lhs >> $aux_dir1$base.fls";