aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/texpdf.rb')
-rw-r--r--lib/sisu/v2/texpdf.rb34
1 files changed, 13 insertions, 21 deletions
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index f0e04b33..a9b1df51 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -104,14 +104,11 @@ module SiSU_TeX
def song
begin
@md=@particulars.md
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF')
- tell.green_title_hi unless @opt.cmd =~/q/
- path=@env.url.output_tell
+ SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/
if @opt.cmd =~/[MVv]/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}")
- tell.flow
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}")
- tell.flow
+ path=@env.url.output_tell
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}").flow
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}").flow
end
@md=@particulars.md
SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
@@ -159,26 +156,24 @@ module SiSU_TeX
def latex_do(texfilename,papersize)
@texfilename=texfilename
@@n_lpdf=@@n_lpdf+1
- tell=SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} portrait ->")
- tell.dark_grey_title_hi if @md.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} portrait ->").dark_grey_title_hi if @md.cmd =~/[MVv]/
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=SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} landscape ->")
- tell.dark_grey_title_hi if @md.cmd =~/[MVv]/
+ tell.p_off if @md.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} landscape ->").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/
+ tell.p_off if @md.cmd =~/[MVv]/
pwd=Dir.pwd
portrait_pdf="#{pwd}/#{tex_fn_base}.pdf"
landscape_pdf="#{pwd}/#{tex_fn_base}.landscape.pdf"
@@ -200,8 +195,7 @@ module SiSU_TeX
rm(landscape_pdf)
else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.cmd.inspect =~/M/
end
- tell=SiSU_Screen::Ansi.new(@md.cmd,@@n_lpdf,'processed (SiSU LaTeX to pdf - using pdfetex aka. pdftex or pdflatex)')
- tell.generic_number unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,@@n_lpdf,'processed (SiSU LaTeX to pdf - using pdfetex aka. pdftex or pdflatex)').generic_number if @md.cmd =~/[MVv]/
end
def latexrun_selective
begin
@@ -256,8 +250,7 @@ module SiSU_TeX
")
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"FILE NOT FOUND: << #{@md.fns} >> - requested latex system processing skipped")
- tell.warn
+ SiSU_Screen::Ansi.new(@md.cmd,"FILE NOT FOUND: << #{@md.fns} >> - requested latex system processing skipped").warn
end
lst=Dir["*.{aux,log,out}"]
lst.each {|file| File.unlink(file)} if lst
@@ -296,8 +289,7 @@ module SiSU_TeX
data=@data
@@tex_footnote_array=[]
@@rights=nil
- tell=SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape")
- tell.txt_grey unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape").txt_grey if @md.cmd=~/[MVvz]/
if defined? @md.rights.all \
and not @md.rights.all.empty?
rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed