From 9d8f5b9f534e55aa5ab3ade02d3ccabf10072b61 Mon Sep 17 00:00:00 2001 From: afranco Date: Sun, 3 Mar 2024 17:05:13 +0000 Subject: [PATCH] chore(latexmkrc): only use lhs2TeX if it's an lhs file --- .latexmkrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.latexmkrc b/.latexmkrc index 9325115..e7d1b48 100644 --- a/.latexmkrc +++ b/.latexmkrc @@ -5,7 +5,10 @@ sub mylatex { my $tex = "$base.tex"; # 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 my $return = system('pdflatex', @_, $tex); system "echo INPUT $base.lhs >> $aux_dir1$base.fls";