diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-05-02 19:45:44 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-05-02 19:45:44 -0400 |
commit | 003c1facff69bbfd2c9fe017406bc11e6d97cce0 (patch) | |
tree | b78c35f2e8b652e01270c91a5852f93a5069009a | |
parent | share source and sisupod make, control screen output (diff) |
screen output, & minor arranging
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 16 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf.rb | 10 |
2 files changed, 12 insertions, 14 deletions
diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index 5f3695de..05277012 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -689,17 +689,13 @@ module SiSU_Env if @pdfetex_flag; texpdf_cmd=case texpdf when /xetex/ - if @input =~/landscape\.tex$/ - %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize} -l" #{@input} #{tell}\n} - else - %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize}" #{@input} #{tell}\n} - end + @input =~/landscape\.tex$/ \ + ? %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize} -l" #{@input} #{tell}\n} \ + : %{#{texpdf} -interaction=#{mode} -fmt=xelatex -papersize="#{papersize}" #{@input} #{tell}\n} when /xelatex/ - if @input =~/landscape\.tex$/ - %{#{texpdf} -interaction=#{mode} -papersize="#{papersize} -l" #{@input} #{tell}\n} - else - %{#{texpdf} -interaction=#{mode} -papersize="#{papersize}" #{@input} #{tell}\n} - end + @input =~/landscape\.tex$/ \ + ? %{#{texpdf} -interaction=#{mode} -papersize="#{papersize} -l" #{@input} #{tell}\n} \ + : %{#{texpdf} -interaction=#{mode} -papersize="#{papersize}" #{@input} #{tell}\n} when /pdftex/; "#{texpdf} -interaction=#{mode} -fmt=pdflatex #{@input} #{tell}\n" when /pdflatex/; "#{texpdf} -interaction=#{mode} #{@input} #{tell}\n" end diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb index bdb3f7dd..3412d64c 100644 --- a/lib/sisu/v2/texpdf.rb +++ b/lib/sisu/v2/texpdf.rb @@ -164,21 +164,23 @@ module SiSU_TeX tex_fn_base=@texfilename.gsub(/\.tex$/,'') cmd=SiSU_Env::System_call.new("#{tex_fn_base}.tex",'',@md.cmd) tell=SiSU_Screen::Ansi.new(@md.cmd) - tell.grey_open unless @md.cmd =~/q/ + tell.grey_open if @md.cmd =~/[MVv]/ if "#{tex_fn_base}" =~/\w+/ \ and "#{papersize}" =~/\w+/ 2.times { |i| cmd.latex2pdf(@md,papersize) } end - tell.p_off unless @md.cmd =~/q/ + tell.p_off if @md.cmd =~/[MVv]/ tell=SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} landscape ->") tell.dark_grey_title_hi if @md.cmd =~/[MVv]/ cmd=SiSU_Env::System_call.new("#{tex_fn_base}.landscape.tex",'',@md.cmd) - tell.grey_open + tell.grey_open if @md.cmd =~/[MVv]/ if "#{tex_fn_base}" =~/\w+/ \ and "#{papersize}" =~/\w+/ 2.times { |i| cmd.latex2pdf(@md,papersize) } end - tell.p_off unless @md.cmd =~/q/ + unless @md.cmd =~/q/ + tell.p_off if @md.cmd =~/[MVv]/ + end pwd=Dir.pwd portrait_pdf="#{pwd}/#{tex_fn_base}.pdf" landscape_pdf="#{pwd}/#{tex_fn_base}.landscape.pdf" |