From 0d2f83bc883446eedeb765ae89e05941b149c724 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 20 Jan 2014 18:52:01 -0500 Subject: v4 v5: sysenv for texpdf, fix for when tex to pdf generator is absent --- lib/sisu/v4/sysenv.rb | 9 ++++----- lib/sisu/v5/sysenv.rb | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index bcd7c09d..eda1ad46 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -822,11 +822,11 @@ module SiSU_Env : (STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}") end def tex2pdf_engine - prog=['xetex','xelatex','pdflatex','pdfetex','pdftex'] + progs=['xetex','xelatex','pdflatex','pdfetex','pdftex'] @pdfetex_flag=false @cmd ||='' @texpdf=nil - prog.each do |program| + progs.each do |program| if program_found?(program) @texpdf=program if program =~/xetex|xelatex|pdftex|pdflatex/ @pdfetex_flag=true @@ -834,7 +834,7 @@ module SiSU_Env end end if @pdfetex_flag==false - @texpdf=prog.join(', ') + @texpdf=progs.join(', ') end @texpdf end @@ -846,7 +846,6 @@ module SiSU_Env else %q{2>&1 | grep -v '$'} end mode='batchmode' #mode='nonstopmode' - program_ref="\n\t\tSee http://www.tug.org/applications/pdftex/\n\t\tOn Debian this is is included in tetex-extra" texpdf=tex2pdf_engine if @pdfetex_flag texpdf_cmd=case texpdf @@ -860,7 +859,7 @@ module SiSU_Env "#{texpdf} -interaction=#{mode} #{@input} #{tell}\n" end system(texpdf_cmd) - else STDERR.puts "\t*WARN* none of the following programs are installed: #{program[0]}, #{program[1]}, #{program[2]} is installed. #{program_ref}" + else STDERR.puts "\t*WARN* none of the following programs are installed: #{@texpdf}" end end def makeinfo #texinfo diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index aad87231..a8fcbd7a 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -823,11 +823,11 @@ module SiSU_Env : (STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}") end def tex2pdf_engine - prog=['xetex','xelatex','pdflatex','pdfetex','pdftex'] + progs=['xetex','xelatex','pdflatex','pdfetex','pdftex'] @pdfetex_flag=false @cmd ||='' @texpdf=nil - prog.each do |program| + progs.each do |program| if program_found?(program) @texpdf=program if program =~/xetex|xelatex|pdftex|pdflatex/ @pdfetex_flag=true @@ -835,7 +835,7 @@ module SiSU_Env end end if @pdfetex_flag==false - @texpdf=prog.join(', ') + @texpdf=progs.join(', ') end @texpdf end @@ -847,7 +847,6 @@ module SiSU_Env else %q{2>&1 | grep -v '$'} end mode='batchmode' #mode='nonstopmode' - program_ref="\n\t\tSee http://www.tug.org/applications/pdftex/\n\t\tOn Debian this is is included in tetex-extra" texpdf=tex2pdf_engine if @pdfetex_flag texpdf_cmd=case texpdf @@ -861,7 +860,7 @@ module SiSU_Env "#{texpdf} -interaction=#{mode} #{@input} #{tell}\n" end system(texpdf_cmd) - else STDERR.puts "\t*WARN* none of the following programs are installed: #{program[0]}, #{program[1]}, #{program[2]} is installed. #{program_ref}" + else STDERR.puts "\t*WARN* none of the following programs are installed: #{@texpdf}" end end def makeinfo #texinfo -- cgit v1.2.3